Вы не можете выбрать более 25 тем Темы должны начинаться с буквы или цифры, могут содержать дефисы(-) и должны содержать не более 35 символов.

3 лет назад
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697269826992700270127022703270427052706270727082709271027112712271327142715271627172718271927202721272227232724272527262727272827292730273127322733273427352736273727382739274027412742274327442745274627472748274927502751275227532754275527562757275827592760276127622763276427652766276727682769277027712772277327742775277627772778277927802781278227832784278527862787278827892790279127922793279427952796279727982799280028012802280328042805280628072808280928102811281228132814281528162817281828192820282128222823282428252826282728282829283028312832283328342835283628372838283928402841284228432844284528462847284828492850285128522853285428552856285728582859286028612862286328642865286628672868286928702871287228732874287528762877287828792880288128822883288428852886288728882889289028912892289328942895289628972898289929002901290229032904290529062907290829092910291129122913291429152916291729182919292029212922292329242925292629272928292929302931293229332934293529362937293829392940294129422943294429452946294729482949295029512952295329542955295629572958295929602961296229632964296529662967296829692970297129722973297429752976297729782979298029812982298329842985298629872988298929902991299229932994299529962997299829993000300130023003300430053006300730083009301030113012301330143015301630173018301930203021302230233024302530263027302830293030303130323033303430353036303730383039304030413042304330443045304630473048304930503051305230533054305530563057305830593060306130623063306430653066306730683069307030713072307330743075307630773078307930803081308230833084308530863087308830893090309130923093309430953096309730983099310031013102310331043105310631073108310931103111311231133114311531163117311831193120312131223123312431253126312731283129313031313132313331343135313631373138313931403141314231433144314531463147314831493150315131523153315431553156315731583159316031613162316331643165316631673168316931703171317231733174317531763177317831793180318131823183318431853186318731883189319031913192319331943195319631973198319932003201320232033204320532063207320832093210321132123213321432153216321732183219322032213222322332243225322632273228322932303231323232333234323532363237323832393240324132423243324432453246324732483249325032513252325332543255325632573258325932603261326232633264326532663267326832693270327132723273327432753276327732783279328032813282328332843285328632873288328932903291329232933294329532963297329832993300330133023303330433053306330733083309331033113312331333143315331633173318331933203321332233233324332533263327332833293330333133323333333433353336333733383339334033413342334333443345334633473348334933503351335233533354335533563357335833593360336133623363336433653366336733683369337033713372337333743375337633773378337933803381338233833384338533863387338833893390339133923393339433953396339733983399340034013402340334043405340634073408340934103411341234133414341534163417341834193420342134223423342434253426342734283429343034313432343334343435343634373438343934403441344234433444344534463447344834493450345134523453345434553456345734583459346034613462346334643465346634673468346934703471347234733474347534763477347834793480348134823483348434853486348734883489349034913492349334943495349634973498349935003501350235033504350535063507350835093510351135123513351435153516351735183519352035213522352335243525352635273528352935303531353235333534353535363537353835393540354135423543354435453546354735483549355035513552355335543555355635573558355935603561356235633564356535663567356835693570357135723573357435753576357735783579358035813582358335843585358635873588358935903591359235933594359535963597359835993600360136023603360436053606360736083609361036113612361336143615361636173618361936203621362236233624362536263627362836293630363136323633363436353636363736383639364036413642364336443645364636473648364936503651365236533654365536563657365836593660366136623663366436653666366736683669367036713672367336743675367636773678367936803681368236833684368536863687368836893690369136923693369436953696369736983699370037013702370337043705370637073708370937103711371237133714371537163717371837193720372137223723372437253726372737283729373037313732373337343735373637373738373937403741374237433744374537463747374837493750375137523753375437553756375737583759376037613762376337643765376637673768376937703771377237733774377537763777377837793780378137823783378437853786378737883789379037913792379337943795379637973798379938003801380238033804380538063807380838093810381138123813381438153816381738183819382038213822382338243825382638273828382938303831383238333834383538363837383838393840384138423843384438453846384738483849385038513852385338543855385638573858385938603861386238633864386538663867386838693870387138723873387438753876387738783879388038813882388338843885388638873888388938903891389238933894389538963897389838993900390139023903390439053906390739083909391039113912391339143915391639173918391939203921392239233924392539263927392839293930393139323933393439353936393739383939394039413942394339443945394639473948394939503951395239533954395539563957395839593960396139623963396439653966396739683969397039713972397339743975397639773978397939803981398239833984398539863987398839893990399139923993399439953996399739983999400040014002400340044005400640074008400940104011401240134014401540164017401840194020402140224023402440254026402740284029403040314032403340344035403640374038403940404041404240434044404540464047404840494050405140524053405440554056405740584059406040614062406340644065406640674068406940704071407240734074407540764077407840794080408140824083408440854086408740884089409040914092409340944095409640974098409941004101410241034104410541064107410841094110411141124113411441154116411741184119412041214122412341244125412641274128412941304131413241334134413541364137413841394140414141424143414441454146414741484149415041514152415341544155415641574158415941604161416241634164416541664167416841694170417141724173417441754176417741784179418041814182418341844185418641874188418941904191419241934194419541964197419841994200420142024203420442054206420742084209421042114212421342144215421642174218421942204221422242234224422542264227422842294230423142324233423442354236423742384239424042414242424342444245424642474248424942504251425242534254425542564257425842594260426142624263426442654266426742684269427042714272427342744275427642774278427942804281428242834284428542864287428842894290429142924293429442954296429742984299430043014302430343044305430643074308430943104311431243134314431543164317431843194320432143224323432443254326432743284329433043314332433343344335433643374338433943404341434243434344434543464347434843494350435143524353435443554356435743584359436043614362436343644365436643674368436943704371437243734374437543764377437843794380438143824383438443854386438743884389439043914392439343944395439643974398439944004401440244034404440544064407440844094410441144124413441444154416441744184419442044214422442344244425442644274428442944304431443244334434443544364437443844394440444144424443444444454446444744484449445044514452445344544455445644574458445944604461446244634464446544664467446844694470447144724473447444754476447744784479448044814482448344844485448644874488448944904491449244934494449544964497449844994500450145024503450445054506450745084509451045114512451345144515451645174518451945204521452245234524452545264527452845294530453145324533453445354536453745384539454045414542454345444545454645474548454945504551455245534554455545564557455845594560456145624563456445654566456745684569457045714572457345744575457645774578457945804581458245834584458545864587458845894590459145924593459445954596459745984599460046014602460346044605460646074608460946104611461246134614461546164617461846194620462146224623462446254626462746284629463046314632463346344635463646374638463946404641464246434644464546464647464846494650465146524653465446554656465746584659466046614662466346644665466646674668466946704671467246734674467546764677467846794680468146824683468446854686468746884689469046914692469346944695469646974698469947004701470247034704470547064707470847094710471147124713471447154716471747184719472047214722472347244725472647274728472947304731473247334734473547364737473847394740474147424743474447454746474747484749475047514752475347544755475647574758475947604761476247634764476547664767476847694770477147724773477447754776477747784779478047814782478347844785478647874788478947904791479247934794479547964797479847994800480148024803480448054806480748084809481048114812481348144815481648174818481948204821482248234824482548264827482848294830483148324833483448354836483748384839484048414842484348444845484648474848484948504851485248534854485548564857485848594860486148624863486448654866486748684869487048714872487348744875487648774878487948804881488248834884488548864887488848894890489148924893489448954896489748984899490049014902490349044905490649074908490949104911491249134914491549164917491849194920492149224923492449254926492749284929493049314932493349344935493649374938493949404941494249434944494549464947494849494950495149524953495449554956495749584959496049614962496349644965496649674968496949704971497249734974497549764977497849794980498149824983498449854986498749884989499049914992499349944995499649974998499950005001500250035004500550065007500850095010501150125013501450155016501750185019502050215022502350245025502650275028502950305031503250335034503550365037503850395040504150425043504450455046504750485049505050515052505350545055505650575058505950605061506250635064506550665067506850695070507150725073507450755076507750785079508050815082508350845085508650875088508950905091509250935094509550965097509850995100510151025103510451055106510751085109511051115112511351145115511651175118511951205121512251235124512551265127512851295130513151325133513451355136513751385139514051415142514351445145514651475148514951505151515251535154515551565157515851595160516151625163516451655166516751685169517051715172517351745175517651775178517951805181518251835184518551865187518851895190519151925193519451955196519751985199520052015202520352045205520652075208520952105211521252135214521552165217521852195220522152225223522452255226522752285229523052315232523352345235523652375238523952405241524252435244524552465247524852495250525152525253525452555256525752585259526052615262526352645265526652675268526952705271527252735274527552765277527852795280528152825283528452855286528752885289529052915292529352945295529652975298529953005301530253035304530553065307530853095310531153125313531453155316531753185319532053215322532353245325532653275328532953305331533253335334533553365337533853395340534153425343534453455346534753485349535053515352535353545355535653575358535953605361536253635364536553665367536853695370537153725373537453755376537753785379538053815382538353845385538653875388538953905391539253935394539553965397539853995400540154025403540454055406540754085409541054115412541354145415541654175418541954205421542254235424542554265427542854295430543154325433543454355436543754385439544054415442544354445445544654475448544954505451545254535454545554565457545854595460546154625463546454655466546754685469547054715472547354745475547654775478547954805481548254835484548554865487548854895490549154925493549454955496549754985499550055015502550355045505550655075508550955105511551255135514551555165517551855195520552155225523552455255526552755285529553055315532553355345535553655375538553955405541554255435544554555465547554855495550555155525553555455555556555755585559556055615562556355645565556655675568556955705571557255735574557555765577557855795580558155825583558455855586558755885589559055915592559355945595559655975598559956005601560256035604560556065607560856095610561156125613561456155616561756185619562056215622562356245625562656275628562956305631563256335634563556365637563856395640564156425643564456455646564756485649565056515652565356545655565656575658565956605661566256635664566556665667566856695670567156725673567456755676567756785679568056815682568356845685568656875688568956905691569256935694569556965697569856995700570157025703570457055706570757085709571057115712571357145715571657175718571957205721572257235724572557265727572857295730573157325733573457355736573757385739574057415742574357445745574657475748574957505751575257535754575557565757575857595760576157625763576457655766576757685769577057715772577357745775577657775778577957805781578257835784578557865787578857895790579157925793579457955796579757985799580058015802580358045805580658075808580958105811581258135814581558165817581858195820582158225823582458255826582758285829583058315832583358345835583658375838583958405841584258435844584558465847584858495850585158525853585458555856585758585859586058615862586358645865586658675868586958705871587258735874587558765877587858795880588158825883588458855886588758885889589058915892589358945895589658975898589959005901590259035904590559065907590859095910591159125913591459155916591759185919592059215922592359245925592659275928592959305931593259335934593559365937593859395940594159425943594459455946594759485949595059515952595359545955595659575958595959605961596259635964596559665967596859695970597159725973597459755976597759785979598059815982598359845985598659875988598959905991599259935994599559965997599859996000600160026003600460056006600760086009601060116012601360146015601660176018601960206021602260236024602560266027602860296030603160326033603460356036603760386039604060416042604360446045604660476048604960506051605260536054605560566057605860596060606160626063606460656066606760686069607060716072607360746075607660776078607960806081608260836084608560866087608860896090609160926093609460956096609760986099610061016102610361046105610661076108610961106111611261136114611561166117611861196120612161226123612461256126612761286129613061316132613361346135613661376138613961406141614261436144614561466147614861496150615161526153615461556156615761586159616061616162616361646165616661676168616961706171617261736174617561766177617861796180618161826183618461856186618761886189619061916192619361946195619661976198619962006201620262036204620562066207620862096210621162126213621462156216621762186219622062216222622362246225622662276228622962306231623262336234623562366237623862396240624162426243624462456246624762486249625062516252625362546255625662576258625962606261626262636264626562666267626862696270627162726273627462756276627762786279628062816282628362846285628662876288628962906291629262936294629562966297629862996300630163026303630463056306630763086309631063116312631363146315631663176318631963206321632263236324632563266327632863296330633163326333633463356336633763386339634063416342634363446345634663476348634963506351635263536354635563566357635863596360636163626363636463656366636763686369637063716372637363746375637663776378637963806381638263836384638563866387638863896390639163926393639463956396639763986399640064016402640364046405640664076408640964106411641264136414641564166417641864196420642164226423642464256426642764286429643064316432643364346435643664376438643964406441644264436444644564466447644864496450645164526453645464556456645764586459646064616462646364646465646664676468646964706471647264736474647564766477647864796480648164826483648464856486648764886489649064916492649364946495649664976498649965006501650265036504650565066507650865096510651165126513651465156516651765186519652065216522652365246525652665276528652965306531653265336534653565366537653865396540654165426543654465456546654765486549655065516552655365546555655665576558655965606561656265636564656565666567656865696570657165726573657465756576657765786579658065816582658365846585658665876588658965906591659265936594659565966597659865996600660166026603660466056606660766086609661066116612661366146615661666176618661966206621662266236624662566266627662866296630663166326633663466356636663766386639664066416642664366446645664666476648664966506651665266536654665566566657665866596660666166626663666466656666666766686669667066716672667366746675667666776678667966806681668266836684668566866687668866896690669166926693669466956696669766986699670067016702670367046705670667076708670967106711671267136714671567166717671867196720672167226723672467256726672767286729673067316732673367346735673667376738673967406741674267436744674567466747674867496750675167526753675467556756675767586759676067616762676367646765676667676768676967706771677267736774677567766777677867796780678167826783678467856786678767886789679067916792679367946795679667976798679968006801680268036804680568066807680868096810681168126813681468156816681768186819682068216822682368246825682668276828682968306831683268336834683568366837683868396840684168426843684468456846684768486849685068516852685368546855685668576858685968606861686268636864686568666867686868696870687168726873687468756876687768786879688068816882688368846885688668876888688968906891689268936894689568966897689868996900690169026903690469056906690769086909691069116912691369146915691669176918691969206921692269236924692569266927692869296930693169326933693469356936693769386939694069416942694369446945694669476948694969506951695269536954695569566957695869596960696169626963696469656966696769686969697069716972697369746975697669776978697969806981698269836984698569866987698869896990699169926993699469956996699769986999700070017002700370047005700670077008700970107011701270137014701570167017701870197020702170227023702470257026702770287029703070317032703370347035703670377038703970407041704270437044704570467047704870497050705170527053705470557056705770587059706070617062706370647065706670677068706970707071707270737074707570767077707870797080708170827083708470857086708770887089709070917092709370947095709670977098709971007101710271037104710571067107710871097110711171127113711471157116711771187119712071217122712371247125712671277128712971307131713271337134713571367137713871397140714171427143714471457146714771487149715071517152715371547155715671577158715971607161716271637164716571667167716871697170717171727173717471757176717771787179718071817182718371847185718671877188718971907191719271937194719571967197719871997200720172027203720472057206720772087209721072117212721372147215721672177218721972207221722272237224722572267227722872297230723172327233723472357236723772387239724072417242724372447245724672477248724972507251725272537254725572567257725872597260726172627263726472657266726772687269727072717272727372747275727672777278727972807281728272837284728572867287728872897290729172927293729472957296729772987299730073017302730373047305730673077308730973107311731273137314731573167317731873197320732173227323732473257326732773287329733073317332733373347335733673377338733973407341734273437344734573467347734873497350735173527353735473557356735773587359736073617362736373647365736673677368736973707371737273737374737573767377737873797380738173827383738473857386738773887389739073917392739373947395739673977398739974007401740274037404740574067407740874097410741174127413741474157416741774187419742074217422742374247425742674277428742974307431743274337434743574367437743874397440744174427443744474457446744774487449745074517452745374547455745674577458745974607461746274637464746574667467746874697470747174727473747474757476747774787479748074817482
  1. (function (global, factory) {
  2. typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('react'), require('react-dom'), require('react-popper')) :
  3. typeof define === 'function' && define.amd ? define(['exports', 'react', 'react-dom', 'react-popper'], factory) :
  4. (global = global || self, factory(global.Reactstrap = {}, global.React, global.ReactDOM, global.ReactPopper));
  5. }(this, function (exports, React, ReactDOM, reactPopper) { 'use strict';
  6. var React__default = 'default' in React ? React['default'] : React;
  7. ReactDOM = ReactDOM && ReactDOM.hasOwnProperty('default') ? ReactDOM['default'] : ReactDOM;
  8. function _extends() {
  9. _extends = Object.assign || function (target) {
  10. for (var i = 1; i < arguments.length; i++) {
  11. var source = arguments[i];
  12. for (var key in source) {
  13. if (Object.prototype.hasOwnProperty.call(source, key)) {
  14. target[key] = source[key];
  15. }
  16. }
  17. }
  18. return target;
  19. };
  20. return _extends.apply(this, arguments);
  21. }
  22. function _inheritsLoose(subClass, superClass) {
  23. subClass.prototype = Object.create(superClass.prototype);
  24. subClass.prototype.constructor = subClass;
  25. subClass.__proto__ = superClass;
  26. }
  27. function _objectWithoutPropertiesLoose(source, excluded) {
  28. if (source == null) return {};
  29. var target = {};
  30. var sourceKeys = Object.keys(source);
  31. var key, i;
  32. for (i = 0; i < sourceKeys.length; i++) {
  33. key = sourceKeys[i];
  34. if (excluded.indexOf(key) >= 0) continue;
  35. target[key] = source[key];
  36. }
  37. return target;
  38. }
  39. function _assertThisInitialized(self) {
  40. if (self === void 0) {
  41. throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
  42. }
  43. return self;
  44. }
  45. var commonjsGlobal = typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
  46. function unwrapExports (x) {
  47. return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, 'default') ? x.default : x;
  48. }
  49. function createCommonjsModule(fn, module) {
  50. return module = { exports: {} }, fn(module, module.exports), module.exports;
  51. }
  52. /*
  53. object-assign
  54. (c) Sindre Sorhus
  55. @license MIT
  56. */
  57. /* eslint-disable no-unused-vars */
  58. var getOwnPropertySymbols = Object.getOwnPropertySymbols;
  59. var hasOwnProperty = Object.prototype.hasOwnProperty;
  60. var propIsEnumerable = Object.prototype.propertyIsEnumerable;
  61. function toObject(val) {
  62. if (val === null || val === undefined) {
  63. throw new TypeError('Object.assign cannot be called with null or undefined');
  64. }
  65. return Object(val);
  66. }
  67. function shouldUseNative() {
  68. try {
  69. if (!Object.assign) {
  70. return false;
  71. } // Detect buggy property enumeration order in older V8 versions.
  72. // https://bugs.chromium.org/p/v8/issues/detail?id=4118
  73. var test1 = new String('abc'); // eslint-disable-line no-new-wrappers
  74. test1[5] = 'de';
  75. if (Object.getOwnPropertyNames(test1)[0] === '5') {
  76. return false;
  77. } // https://bugs.chromium.org/p/v8/issues/detail?id=3056
  78. var test2 = {};
  79. for (var i = 0; i < 10; i++) {
  80. test2['_' + String.fromCharCode(i)] = i;
  81. }
  82. var order2 = Object.getOwnPropertyNames(test2).map(function (n) {
  83. return test2[n];
  84. });
  85. if (order2.join('') !== '0123456789') {
  86. return false;
  87. } // https://bugs.chromium.org/p/v8/issues/detail?id=3056
  88. var test3 = {};
  89. 'abcdefghijklmnopqrst'.split('').forEach(function (letter) {
  90. test3[letter] = letter;
  91. });
  92. if (Object.keys(Object.assign({}, test3)).join('') !== 'abcdefghijklmnopqrst') {
  93. return false;
  94. }
  95. return true;
  96. } catch (err) {
  97. // We don't expect any of the above to throw, but better to be safe.
  98. return false;
  99. }
  100. }
  101. var objectAssign = shouldUseNative() ? Object.assign : function (target, source) {
  102. var from;
  103. var to = toObject(target);
  104. var symbols;
  105. for (var s = 1; s < arguments.length; s++) {
  106. from = Object(arguments[s]);
  107. for (var key in from) {
  108. if (hasOwnProperty.call(from, key)) {
  109. to[key] = from[key];
  110. }
  111. }
  112. if (getOwnPropertySymbols) {
  113. symbols = getOwnPropertySymbols(from);
  114. for (var i = 0; i < symbols.length; i++) {
  115. if (propIsEnumerable.call(from, symbols[i])) {
  116. to[symbols[i]] = from[symbols[i]];
  117. }
  118. }
  119. }
  120. }
  121. return to;
  122. };
  123. /**
  124. * Copyright (c) 2013-present, Facebook, Inc.
  125. *
  126. * This source code is licensed under the MIT license found in the
  127. * LICENSE file in the root directory of this source tree.
  128. */
  129. var ReactPropTypesSecret = 'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED';
  130. var ReactPropTypesSecret_1 = ReactPropTypesSecret;
  131. function emptyFunction() {}
  132. var factoryWithThrowingShims = function factoryWithThrowingShims() {
  133. function shim(props, propName, componentName, location, propFullName, secret) {
  134. if (secret === ReactPropTypesSecret_1) {
  135. // It is still safe when called from React.
  136. return;
  137. }
  138. var err = new Error('Calling PropTypes validators directly is not supported by the `prop-types` package. ' + 'Use PropTypes.checkPropTypes() to call them. ' + 'Read more at http://fb.me/use-check-prop-types');
  139. err.name = 'Invariant Violation';
  140. throw err;
  141. }
  142. shim.isRequired = shim;
  143. function getShim() {
  144. return shim;
  145. }
  146. // Keep this list in sync with production version in `./factoryWithTypeCheckers.js`.
  147. var ReactPropTypes = {
  148. array: shim,
  149. bool: shim,
  150. func: shim,
  151. number: shim,
  152. object: shim,
  153. string: shim,
  154. symbol: shim,
  155. any: shim,
  156. arrayOf: getShim,
  157. element: shim,
  158. instanceOf: getShim,
  159. node: shim,
  160. objectOf: getShim,
  161. oneOf: getShim,
  162. oneOfType: getShim,
  163. shape: getShim,
  164. exact: getShim
  165. };
  166. ReactPropTypes.checkPropTypes = emptyFunction;
  167. ReactPropTypes.PropTypes = ReactPropTypes;
  168. return ReactPropTypes;
  169. };
  170. var propTypes = createCommonjsModule(function (module) {
  171. /**
  172. * Copyright (c) 2013-present, Facebook, Inc.
  173. *
  174. * This source code is licensed under the MIT license found in the
  175. * LICENSE file in the root directory of this source tree.
  176. */
  177. {
  178. // By explicitly using `prop-types` you are opting into new production behavior.
  179. // http://fb.me/prop-types-in-prod
  180. module.exports = factoryWithThrowingShims();
  181. }
  182. });
  183. var classnames = createCommonjsModule(function (module) {
  184. /*!
  185. Copyright (c) 2017 Jed Watson.
  186. Licensed under the MIT License (MIT), see
  187. http://jedwatson.github.io/classnames
  188. */
  189. /* global define */
  190. (function () {
  191. var hasOwn = {}.hasOwnProperty;
  192. function classNames() {
  193. var classes = [];
  194. for (var i = 0; i < arguments.length; i++) {
  195. var arg = arguments[i];
  196. if (!arg) continue;
  197. var argType = typeof arg;
  198. if (argType === 'string' || argType === 'number') {
  199. classes.push(arg);
  200. } else if (Array.isArray(arg) && arg.length) {
  201. var inner = classNames.apply(null, arg);
  202. if (inner) {
  203. classes.push(inner);
  204. }
  205. } else if (argType === 'object') {
  206. for (var key in arg) {
  207. if (hasOwn.call(arg, key) && arg[key]) {
  208. classes.push(key);
  209. }
  210. }
  211. }
  212. }
  213. return classes.join(' ');
  214. }
  215. if (module.exports) {
  216. classNames.default = classNames;
  217. module.exports = classNames;
  218. } else {
  219. window.classNames = classNames;
  220. }
  221. })();
  222. });
  223. /**
  224. * Lodash (Custom Build) <https://lodash.com/>
  225. * Build: `lodash modularize exports="npm" -o ./`
  226. * Copyright JS Foundation and other contributors <https://js.foundation/>
  227. * Released under MIT license <https://lodash.com/license>
  228. * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
  229. * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
  230. */
  231. /** `Object#toString` result references. */
  232. var asyncTag = '[object AsyncFunction]',
  233. funcTag = '[object Function]',
  234. genTag = '[object GeneratorFunction]',
  235. nullTag = '[object Null]',
  236. proxyTag = '[object Proxy]',
  237. undefinedTag = '[object Undefined]';
  238. /** Detect free variable `global` from Node.js. */
  239. var freeGlobal = typeof commonjsGlobal == 'object' && commonjsGlobal && commonjsGlobal.Object === Object && commonjsGlobal;
  240. /** Detect free variable `self`. */
  241. var freeSelf = typeof self == 'object' && self && self.Object === Object && self;
  242. /** Used as a reference to the global object. */
  243. var root = freeGlobal || freeSelf || Function('return this')();
  244. /** Used for built-in method references. */
  245. var objectProto = Object.prototype;
  246. /** Used to check objects for own properties. */
  247. var hasOwnProperty$1 = objectProto.hasOwnProperty;
  248. /**
  249. * Used to resolve the
  250. * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)
  251. * of values.
  252. */
  253. var nativeObjectToString = objectProto.toString;
  254. /** Built-in value references. */
  255. var Symbol$1 = root.Symbol,
  256. symToStringTag = Symbol$1 ? Symbol$1.toStringTag : undefined;
  257. /**
  258. * The base implementation of `getTag` without fallbacks for buggy environments.
  259. *
  260. * @private
  261. * @param {*} value The value to query.
  262. * @returns {string} Returns the `toStringTag`.
  263. */
  264. function baseGetTag(value) {
  265. if (value == null) {
  266. return value === undefined ? undefinedTag : nullTag;
  267. }
  268. return symToStringTag && symToStringTag in Object(value) ? getRawTag(value) : objectToString(value);
  269. }
  270. /**
  271. * A specialized version of `baseGetTag` which ignores `Symbol.toStringTag` values.
  272. *
  273. * @private
  274. * @param {*} value The value to query.
  275. * @returns {string} Returns the raw `toStringTag`.
  276. */
  277. function getRawTag(value) {
  278. var isOwn = hasOwnProperty$1.call(value, symToStringTag),
  279. tag = value[symToStringTag];
  280. try {
  281. value[symToStringTag] = undefined;
  282. var unmasked = true;
  283. } catch (e) {}
  284. var result = nativeObjectToString.call(value);
  285. if (unmasked) {
  286. if (isOwn) {
  287. value[symToStringTag] = tag;
  288. } else {
  289. delete value[symToStringTag];
  290. }
  291. }
  292. return result;
  293. }
  294. /**
  295. * Converts `value` to a string using `Object.prototype.toString`.
  296. *
  297. * @private
  298. * @param {*} value The value to convert.
  299. * @returns {string} Returns the converted string.
  300. */
  301. function objectToString(value) {
  302. return nativeObjectToString.call(value);
  303. }
  304. /**
  305. * Checks if `value` is classified as a `Function` object.
  306. *
  307. * @static
  308. * @memberOf _
  309. * @since 0.1.0
  310. * @category Lang
  311. * @param {*} value The value to check.
  312. * @returns {boolean} Returns `true` if `value` is a function, else `false`.
  313. * @example
  314. *
  315. * _.isFunction(_);
  316. * // => true
  317. *
  318. * _.isFunction(/abc/);
  319. * // => false
  320. */
  321. function isFunction(value) {
  322. if (!isObject(value)) {
  323. return false;
  324. } // The use of `Object#toString` avoids issues with the `typeof` operator
  325. // in Safari 9 which returns 'object' for typed arrays and other constructors.
  326. var tag = baseGetTag(value);
  327. return tag == funcTag || tag == genTag || tag == asyncTag || tag == proxyTag;
  328. }
  329. /**
  330. * Checks if `value` is the
  331. * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types)
  332. * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)
  333. *
  334. * @static
  335. * @memberOf _
  336. * @since 0.1.0
  337. * @category Lang
  338. * @param {*} value The value to check.
  339. * @returns {boolean} Returns `true` if `value` is an object, else `false`.
  340. * @example
  341. *
  342. * _.isObject({});
  343. * // => true
  344. *
  345. * _.isObject([1, 2, 3]);
  346. * // => true
  347. *
  348. * _.isObject(_.noop);
  349. * // => true
  350. *
  351. * _.isObject(null);
  352. * // => false
  353. */
  354. function isObject(value) {
  355. var type = typeof value;
  356. return value != null && (type == 'object' || type == 'function');
  357. }
  358. var lodash_isfunction = isFunction;
  359. function getScrollbarWidth() {
  360. var scrollDiv = document.createElement('div'); // .modal-scrollbar-measure styles // https://github.com/twbs/bootstrap/blob/v4.0.0-alpha.4/scss/_modal.scss#L106-L113
  361. scrollDiv.style.position = 'absolute';
  362. scrollDiv.style.top = '-9999px';
  363. scrollDiv.style.width = '50px';
  364. scrollDiv.style.height = '50px';
  365. scrollDiv.style.overflow = 'scroll';
  366. document.body.appendChild(scrollDiv);
  367. var scrollbarWidth = scrollDiv.offsetWidth - scrollDiv.clientWidth;
  368. document.body.removeChild(scrollDiv);
  369. return scrollbarWidth;
  370. }
  371. function setScrollbarWidth(padding) {
  372. document.body.style.paddingRight = padding > 0 ? padding + "px" : null;
  373. }
  374. function isBodyOverflowing() {
  375. return document.body.clientWidth < window.innerWidth;
  376. }
  377. function getOriginalBodyPadding() {
  378. var style = window.getComputedStyle(document.body, null);
  379. return parseInt(style && style.getPropertyValue('padding-right') || 0, 10);
  380. }
  381. function conditionallyUpdateScrollbar() {
  382. var scrollbarWidth = getScrollbarWidth(); // https://github.com/twbs/bootstrap/blob/v4.0.0-alpha.6/js/src/modal.js#L433
  383. var fixedContent = document.querySelectorAll('.fixed-top, .fixed-bottom, .is-fixed, .sticky-top')[0];
  384. var bodyPadding = fixedContent ? parseInt(fixedContent.style.paddingRight || 0, 10) : 0;
  385. if (isBodyOverflowing()) {
  386. setScrollbarWidth(bodyPadding + scrollbarWidth);
  387. }
  388. }
  389. var globalCssModule;
  390. function setGlobalCssModule(cssModule) {
  391. globalCssModule = cssModule;
  392. }
  393. function mapToCssModules(className, cssModule) {
  394. if (className === void 0) {
  395. className = '';
  396. }
  397. if (cssModule === void 0) {
  398. cssModule = globalCssModule;
  399. }
  400. if (!cssModule) return className;
  401. return className.split(' ').map(function (c) {
  402. return cssModule[c] || c;
  403. }).join(' ');
  404. }
  405. /**
  406. * Returns a new object with the key/value pairs from `obj` that are not in the array `omitKeys`.
  407. */
  408. function omit(obj, omitKeys) {
  409. var result = {};
  410. Object.keys(obj).forEach(function (key) {
  411. if (omitKeys.indexOf(key) === -1) {
  412. result[key] = obj[key];
  413. }
  414. });
  415. return result;
  416. }
  417. /**
  418. * Returns a filtered copy of an object with only the specified keys.
  419. */
  420. function pick(obj, keys) {
  421. var pickKeys = Array.isArray(keys) ? keys : [keys];
  422. var length = pickKeys.length;
  423. var key;
  424. var result = {};
  425. while (length > 0) {
  426. length -= 1;
  427. key = pickKeys[length];
  428. result[key] = obj[key];
  429. }
  430. return result;
  431. }
  432. var warned = {};
  433. function warnOnce(message) {
  434. if (!warned[message]) {
  435. /* istanbul ignore else */
  436. if (typeof console !== 'undefined') {
  437. console.error(message); // eslint-disable-line no-console
  438. }
  439. warned[message] = true;
  440. }
  441. }
  442. function deprecated(propType, explanation) {
  443. return function validate(props, propName, componentName) {
  444. if (props[propName] !== null && typeof props[propName] !== 'undefined') {
  445. warnOnce("\"" + propName + "\" property of \"" + componentName + "\" has been deprecated.\n" + explanation);
  446. }
  447. for (var _len = arguments.length, rest = new Array(_len > 3 ? _len - 3 : 0), _key = 3; _key < _len; _key++) {
  448. rest[_key - 3] = arguments[_key];
  449. }
  450. return propType.apply(void 0, [props, propName, componentName].concat(rest));
  451. };
  452. }
  453. function DOMElement(props, propName, componentName) {
  454. if (!(props[propName] instanceof Element)) {
  455. return new Error('Invalid prop `' + propName + '` supplied to `' + componentName + '`. Expected prop to be an instance of Element. Validation failed.');
  456. }
  457. }
  458. var targetPropType = propTypes.oneOfType([propTypes.string, propTypes.func, DOMElement, propTypes.shape({
  459. current: propTypes.any
  460. })]);
  461. var tagPropType = propTypes.oneOfType([propTypes.func, propTypes.string, propTypes.shape({
  462. $$typeof: propTypes.symbol,
  463. render: propTypes.func
  464. }), propTypes.arrayOf(propTypes.oneOfType([propTypes.func, propTypes.string, propTypes.shape({
  465. $$typeof: propTypes.symbol,
  466. render: propTypes.func
  467. })]))]);
  468. /* eslint key-spacing: ["error", { afterColon: true, align: "value" }] */
  469. // These are all setup to match what is in the bootstrap _variables.scss
  470. // https://github.com/twbs/bootstrap/blob/v4-dev/scss/_variables.scss
  471. var TransitionTimeouts = {
  472. Fade: 150,
  473. // $transition-fade
  474. Collapse: 350,
  475. // $transition-collapse
  476. Modal: 300,
  477. // $modal-transition
  478. Carousel: 600 // $carousel-transition
  479. }; // Duplicated Transition.propType keys to ensure that Reactstrap builds
  480. // for distribution properly exclude these keys for nested child HTML attributes
  481. // since `react-transition-group` removes propTypes in production builds.
  482. var TransitionPropTypeKeys = ['in', 'mountOnEnter', 'unmountOnExit', 'appear', 'enter', 'exit', 'timeout', 'onEnter', 'onEntering', 'onEntered', 'onExit', 'onExiting', 'onExited'];
  483. var TransitionStatuses = {
  484. ENTERING: 'entering',
  485. ENTERED: 'entered',
  486. EXITING: 'exiting',
  487. EXITED: 'exited'
  488. };
  489. var keyCodes = {
  490. esc: 27,
  491. space: 32,
  492. enter: 13,
  493. tab: 9,
  494. up: 38,
  495. down: 40,
  496. home: 36,
  497. end: 35,
  498. n: 78,
  499. p: 80
  500. };
  501. var PopperPlacements = ['auto-start', 'auto', 'auto-end', 'top-start', 'top', 'top-end', 'right-start', 'right', 'right-end', 'bottom-end', 'bottom', 'bottom-start', 'left-end', 'left', 'left-start'];
  502. var canUseDOM = !!(typeof window !== 'undefined' && window.document && window.document.createElement);
  503. function isReactRefObj(target) {
  504. if (target && typeof target === 'object') {
  505. return 'current' in target;
  506. }
  507. return false;
  508. }
  509. function findDOMElements(target) {
  510. if (isReactRefObj(target)) {
  511. return target.current;
  512. }
  513. if (lodash_isfunction(target)) {
  514. return target();
  515. }
  516. if (typeof target === 'string' && canUseDOM) {
  517. var selection = document.querySelectorAll(target);
  518. if (!selection.length) {
  519. selection = document.querySelectorAll("#" + target);
  520. }
  521. if (!selection.length) {
  522. throw new Error("The target '" + target + "' could not be identified in the dom, tip: check spelling");
  523. }
  524. return selection;
  525. }
  526. return target;
  527. }
  528. function isArrayOrNodeList(els) {
  529. if (els === null) {
  530. return false;
  531. }
  532. return Array.isArray(els) || canUseDOM && typeof els.length === 'number';
  533. }
  534. function getTarget(target) {
  535. var els = findDOMElements(target);
  536. if (isArrayOrNodeList(els)) {
  537. return els[0];
  538. }
  539. return els;
  540. }
  541. var defaultToggleEvents = ['touchstart', 'click'];
  542. function addMultipleEventListeners(_els, handler, _events, useCapture) {
  543. var els = _els;
  544. if (!isArrayOrNodeList(els)) {
  545. els = [els];
  546. }
  547. var events = _events;
  548. if (typeof events === 'string') {
  549. events = events.split(/\s+/);
  550. }
  551. if (!isArrayOrNodeList(els) || typeof handler !== 'function' || !Array.isArray(events)) {
  552. throw new Error("\n The first argument of this function must be DOM node or an array on DOM nodes or NodeList.\n The second must be a function.\n The third is a string or an array of strings that represents DOM events\n ");
  553. }
  554. Array.prototype.forEach.call(events, function (event) {
  555. Array.prototype.forEach.call(els, function (el) {
  556. el.addEventListener(event, handler, useCapture);
  557. });
  558. });
  559. return function removeEvents() {
  560. Array.prototype.forEach.call(events, function (event) {
  561. Array.prototype.forEach.call(els, function (el) {
  562. el.removeEventListener(event, handler, useCapture);
  563. });
  564. });
  565. };
  566. }
  567. var focusableElements = ['a[href]', 'area[href]', 'input:not([disabled]):not([type=hidden])', 'select:not([disabled])', 'textarea:not([disabled])', 'button:not([disabled])', 'object', 'embed', '[tabindex]:not(.modal)', 'audio[controls]', 'video[controls]', '[contenteditable]:not([contenteditable="false"])'];
  568. var utils = /*#__PURE__*/Object.freeze({
  569. getScrollbarWidth: getScrollbarWidth,
  570. setScrollbarWidth: setScrollbarWidth,
  571. isBodyOverflowing: isBodyOverflowing,
  572. getOriginalBodyPadding: getOriginalBodyPadding,
  573. conditionallyUpdateScrollbar: conditionallyUpdateScrollbar,
  574. setGlobalCssModule: setGlobalCssModule,
  575. mapToCssModules: mapToCssModules,
  576. omit: omit,
  577. pick: pick,
  578. warnOnce: warnOnce,
  579. deprecated: deprecated,
  580. DOMElement: DOMElement,
  581. targetPropType: targetPropType,
  582. tagPropType: tagPropType,
  583. TransitionTimeouts: TransitionTimeouts,
  584. TransitionPropTypeKeys: TransitionPropTypeKeys,
  585. TransitionStatuses: TransitionStatuses,
  586. keyCodes: keyCodes,
  587. PopperPlacements: PopperPlacements,
  588. canUseDOM: canUseDOM,
  589. isReactRefObj: isReactRefObj,
  590. findDOMElements: findDOMElements,
  591. isArrayOrNodeList: isArrayOrNodeList,
  592. getTarget: getTarget,
  593. defaultToggleEvents: defaultToggleEvents,
  594. addMultipleEventListeners: addMultipleEventListeners,
  595. focusableElements: focusableElements
  596. });
  597. var propTypes$1 = {
  598. tag: tagPropType,
  599. fluid: propTypes.bool,
  600. className: propTypes.string,
  601. cssModule: propTypes.object
  602. };
  603. var defaultProps = {
  604. tag: 'div'
  605. };
  606. var Container = function Container(props) {
  607. var className = props.className,
  608. cssModule = props.cssModule,
  609. fluid = props.fluid,
  610. Tag = props.tag,
  611. attributes = _objectWithoutPropertiesLoose(props, ["className", "cssModule", "fluid", "tag"]);
  612. var classes = mapToCssModules(classnames(className, fluid ? 'container-fluid' : 'container'), cssModule);
  613. return React__default.createElement(Tag, _extends({}, attributes, {
  614. className: classes
  615. }));
  616. };
  617. Container.propTypes = propTypes$1;
  618. Container.defaultProps = defaultProps;
  619. var propTypes$2 = {
  620. tag: tagPropType,
  621. noGutters: propTypes.bool,
  622. className: propTypes.string,
  623. cssModule: propTypes.object,
  624. form: propTypes.bool
  625. };
  626. var defaultProps$1 = {
  627. tag: 'div'
  628. };
  629. var Row = function Row(props) {
  630. var className = props.className,
  631. cssModule = props.cssModule,
  632. noGutters = props.noGutters,
  633. Tag = props.tag,
  634. form = props.form,
  635. attributes = _objectWithoutPropertiesLoose(props, ["className", "cssModule", "noGutters", "tag", "form"]);
  636. var classes = mapToCssModules(classnames(className, noGutters ? 'no-gutters' : null, form ? 'form-row' : 'row'), cssModule);
  637. return React__default.createElement(Tag, _extends({}, attributes, {
  638. className: classes
  639. }));
  640. };
  641. Row.propTypes = propTypes$2;
  642. Row.defaultProps = defaultProps$1;
  643. /**
  644. * lodash 3.0.2 (Custom Build) <https://lodash.com/>
  645. * Build: `lodash modern modularize exports="npm" -o ./`
  646. * Copyright 2012-2015 The Dojo Foundation <http://dojofoundation.org/>
  647. * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
  648. * Copyright 2009-2015 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
  649. * Available under MIT license <https://lodash.com/license>
  650. */
  651. /**
  652. * Checks if `value` is the [language type](https://es5.github.io/#x8) of `Object`.
  653. * (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)
  654. *
  655. * @static
  656. * @memberOf _
  657. * @category Lang
  658. * @param {*} value The value to check.
  659. * @returns {boolean} Returns `true` if `value` is an object, else `false`.
  660. * @example
  661. *
  662. * _.isObject({});
  663. * // => true
  664. *
  665. * _.isObject([1, 2, 3]);
  666. * // => true
  667. *
  668. * _.isObject(1);
  669. * // => false
  670. */
  671. function isObject$1(value) {
  672. // Avoid a V8 JIT bug in Chrome 19-20.
  673. // See https://code.google.com/p/v8/issues/detail?id=2291 for more details.
  674. var type = typeof value;
  675. return !!value && (type == 'object' || type == 'function');
  676. }
  677. var lodash_isobject = isObject$1;
  678. var colWidths = ['xs', 'sm', 'md', 'lg', 'xl'];
  679. var stringOrNumberProp = propTypes.oneOfType([propTypes.number, propTypes.string]);
  680. var columnProps = propTypes.oneOfType([propTypes.bool, propTypes.number, propTypes.string, propTypes.shape({
  681. size: propTypes.oneOfType([propTypes.bool, propTypes.number, propTypes.string]),
  682. push: deprecated(stringOrNumberProp, 'Please use the prop "order"'),
  683. pull: deprecated(stringOrNumberProp, 'Please use the prop "order"'),
  684. order: stringOrNumberProp,
  685. offset: stringOrNumberProp
  686. })]);
  687. var propTypes$3 = {
  688. tag: tagPropType,
  689. xs: columnProps,
  690. sm: columnProps,
  691. md: columnProps,
  692. lg: columnProps,
  693. xl: columnProps,
  694. className: propTypes.string,
  695. cssModule: propTypes.object,
  696. widths: propTypes.array
  697. };
  698. var defaultProps$2 = {
  699. tag: 'div',
  700. widths: colWidths
  701. };
  702. var getColumnSizeClass = function getColumnSizeClass(isXs, colWidth, colSize) {
  703. if (colSize === true || colSize === '') {
  704. return isXs ? 'col' : "col-" + colWidth;
  705. } else if (colSize === 'auto') {
  706. return isXs ? 'col-auto' : "col-" + colWidth + "-auto";
  707. }
  708. return isXs ? "col-" + colSize : "col-" + colWidth + "-" + colSize;
  709. };
  710. var Col = function Col(props) {
  711. var className = props.className,
  712. cssModule = props.cssModule,
  713. widths = props.widths,
  714. Tag = props.tag,
  715. attributes = _objectWithoutPropertiesLoose(props, ["className", "cssModule", "widths", "tag"]);
  716. var colClasses = [];
  717. widths.forEach(function (colWidth, i) {
  718. var columnProp = props[colWidth];
  719. delete attributes[colWidth];
  720. if (!columnProp && columnProp !== '') {
  721. return;
  722. }
  723. var isXs = !i;
  724. if (lodash_isobject(columnProp)) {
  725. var _classNames;
  726. var colSizeInterfix = isXs ? '-' : "-" + colWidth + "-";
  727. var colClass = getColumnSizeClass(isXs, colWidth, columnProp.size);
  728. colClasses.push(mapToCssModules(classnames((_classNames = {}, _classNames[colClass] = columnProp.size || columnProp.size === '', _classNames["order" + colSizeInterfix + columnProp.order] = columnProp.order || columnProp.order === 0, _classNames["offset" + colSizeInterfix + columnProp.offset] = columnProp.offset || columnProp.offset === 0, _classNames)), cssModule));
  729. } else {
  730. var _colClass = getColumnSizeClass(isXs, colWidth, columnProp);
  731. colClasses.push(_colClass);
  732. }
  733. });
  734. if (!colClasses.length) {
  735. colClasses.push('col');
  736. }
  737. var classes = mapToCssModules(classnames(className, colClasses), cssModule);
  738. return React__default.createElement(Tag, _extends({}, attributes, {
  739. className: classes
  740. }));
  741. };
  742. Col.propTypes = propTypes$3;
  743. Col.defaultProps = defaultProps$2;
  744. var propTypes$4 = {
  745. light: propTypes.bool,
  746. dark: propTypes.bool,
  747. inverse: deprecated(propTypes.bool, 'Please use the prop "dark"'),
  748. full: propTypes.bool,
  749. fixed: propTypes.string,
  750. sticky: propTypes.string,
  751. color: propTypes.string,
  752. role: propTypes.string,
  753. tag: tagPropType,
  754. className: propTypes.string,
  755. cssModule: propTypes.object,
  756. toggleable: deprecated(propTypes.oneOfType([propTypes.bool, propTypes.string]), 'Please use the prop "expand"'),
  757. expand: propTypes.oneOfType([propTypes.bool, propTypes.string])
  758. };
  759. var defaultProps$3 = {
  760. tag: 'nav',
  761. expand: false
  762. };
  763. var getExpandClass = function getExpandClass(expand) {
  764. if (expand === false) {
  765. return false;
  766. } else if (expand === true || expand === 'xs') {
  767. return 'navbar-expand';
  768. }
  769. return "navbar-expand-" + expand;
  770. }; // To better maintain backwards compatibility while toggleable is deprecated.
  771. // We must map breakpoints to the next breakpoint so that toggleable and expand do the same things at the same breakpoint.
  772. var toggleableToExpand = {
  773. xs: 'sm',
  774. sm: 'md',
  775. md: 'lg',
  776. lg: 'xl'
  777. };
  778. var getToggleableClass = function getToggleableClass(toggleable) {
  779. if (toggleable === undefined || toggleable === 'xl') {
  780. return false;
  781. } else if (toggleable === false) {
  782. return 'navbar-expand';
  783. }
  784. return "navbar-expand-" + (toggleable === true ? 'sm' : toggleableToExpand[toggleable] || toggleable);
  785. };
  786. var Navbar = function Navbar(props) {
  787. var _classNames;
  788. var toggleable = props.toggleable,
  789. expand = props.expand,
  790. className = props.className,
  791. cssModule = props.cssModule,
  792. light = props.light,
  793. dark = props.dark,
  794. inverse = props.inverse,
  795. fixed = props.fixed,
  796. sticky = props.sticky,
  797. color = props.color,
  798. Tag = props.tag,
  799. attributes = _objectWithoutPropertiesLoose(props, ["toggleable", "expand", "className", "cssModule", "light", "dark", "inverse", "fixed", "sticky", "color", "tag"]);
  800. var classes = mapToCssModules(classnames(className, 'navbar', getExpandClass(expand) || getToggleableClass(toggleable), (_classNames = {
  801. 'navbar-light': light,
  802. 'navbar-dark': inverse || dark
  803. }, _classNames["bg-" + color] = color, _classNames["fixed-" + fixed] = fixed, _classNames["sticky-" + sticky] = sticky, _classNames)), cssModule);
  804. return React__default.createElement(Tag, _extends({}, attributes, {
  805. className: classes
  806. }));
  807. };
  808. Navbar.propTypes = propTypes$4;
  809. Navbar.defaultProps = defaultProps$3;
  810. var propTypes$5 = {
  811. tag: tagPropType,
  812. className: propTypes.string,
  813. cssModule: propTypes.object
  814. };
  815. var defaultProps$4 = {
  816. tag: 'a'
  817. };
  818. var NavbarBrand = function NavbarBrand(props) {
  819. var className = props.className,
  820. cssModule = props.cssModule,
  821. Tag = props.tag,
  822. attributes = _objectWithoutPropertiesLoose(props, ["className", "cssModule", "tag"]);
  823. var classes = mapToCssModules(classnames(className, 'navbar-brand'), cssModule);
  824. return React__default.createElement(Tag, _extends({}, attributes, {
  825. className: classes
  826. }));
  827. };
  828. NavbarBrand.propTypes = propTypes$5;
  829. NavbarBrand.defaultProps = defaultProps$4;
  830. var propTypes$6 = {
  831. tag: tagPropType,
  832. type: propTypes.string,
  833. className: propTypes.string,
  834. cssModule: propTypes.object,
  835. children: propTypes.node
  836. };
  837. var defaultProps$5 = {
  838. tag: 'button',
  839. type: 'button'
  840. };
  841. var NavbarToggler = function NavbarToggler(props) {
  842. var className = props.className,
  843. cssModule = props.cssModule,
  844. children = props.children,
  845. Tag = props.tag,
  846. attributes = _objectWithoutPropertiesLoose(props, ["className", "cssModule", "children", "tag"]);
  847. var classes = mapToCssModules(classnames(className, 'navbar-toggler'), cssModule);
  848. return React__default.createElement(Tag, _extends({}, attributes, {
  849. className: classes
  850. }), children || React__default.createElement("span", {
  851. className: mapToCssModules('navbar-toggler-icon', cssModule)
  852. }));
  853. };
  854. NavbarToggler.propTypes = propTypes$6;
  855. NavbarToggler.defaultProps = defaultProps$5;
  856. var propTypes$7 = {
  857. tabs: propTypes.bool,
  858. pills: propTypes.bool,
  859. vertical: propTypes.oneOfType([propTypes.bool, propTypes.string]),
  860. horizontal: propTypes.string,
  861. justified: propTypes.bool,
  862. fill: propTypes.bool,
  863. navbar: propTypes.bool,
  864. card: propTypes.bool,
  865. tag: tagPropType,
  866. className: propTypes.string,
  867. cssModule: propTypes.object
  868. };
  869. var defaultProps$6 = {
  870. tag: 'ul',
  871. vertical: false
  872. };
  873. var getVerticalClass = function getVerticalClass(vertical) {
  874. if (vertical === false) {
  875. return false;
  876. } else if (vertical === true || vertical === 'xs') {
  877. return 'flex-column';
  878. }
  879. return "flex-" + vertical + "-column";
  880. };
  881. var Nav = function Nav(props) {
  882. var className = props.className,
  883. cssModule = props.cssModule,
  884. tabs = props.tabs,
  885. pills = props.pills,
  886. vertical = props.vertical,
  887. horizontal = props.horizontal,
  888. justified = props.justified,
  889. fill = props.fill,
  890. navbar = props.navbar,
  891. card = props.card,
  892. Tag = props.tag,
  893. attributes = _objectWithoutPropertiesLoose(props, ["className", "cssModule", "tabs", "pills", "vertical", "horizontal", "justified", "fill", "navbar", "card", "tag"]);
  894. var classes = mapToCssModules(classnames(className, navbar ? 'navbar-nav' : 'nav', horizontal ? "justify-content-" + horizontal : false, getVerticalClass(vertical), {
  895. 'nav-tabs': tabs,
  896. 'card-header-tabs': card && tabs,
  897. 'nav-pills': pills,
  898. 'card-header-pills': card && pills,
  899. 'nav-justified': justified,
  900. 'nav-fill': fill
  901. }), cssModule);
  902. return React__default.createElement(Tag, _extends({}, attributes, {
  903. className: classes
  904. }));
  905. };
  906. Nav.propTypes = propTypes$7;
  907. Nav.defaultProps = defaultProps$6;
  908. var propTypes$8 = {
  909. tag: tagPropType,
  910. active: propTypes.bool,
  911. className: propTypes.string,
  912. cssModule: propTypes.object
  913. };
  914. var defaultProps$7 = {
  915. tag: 'li'
  916. };
  917. var NavItem = function NavItem(props) {
  918. var className = props.className,
  919. cssModule = props.cssModule,
  920. active = props.active,
  921. Tag = props.tag,
  922. attributes = _objectWithoutPropertiesLoose(props, ["className", "cssModule", "active", "tag"]);
  923. var classes = mapToCssModules(classnames(className, 'nav-item', active ? 'active' : false), cssModule);
  924. return React__default.createElement(Tag, _extends({}, attributes, {
  925. className: classes
  926. }));
  927. };
  928. NavItem.propTypes = propTypes$8;
  929. NavItem.defaultProps = defaultProps$7;
  930. var propTypes$9 = {
  931. disabled: propTypes.bool,
  932. dropup: deprecated(propTypes.bool, 'Please use the prop "direction" with the value "up".'),
  933. direction: propTypes.oneOf(['up', 'down', 'left', 'right']),
  934. group: propTypes.bool,
  935. isOpen: propTypes.bool,
  936. nav: propTypes.bool,
  937. active: propTypes.bool,
  938. addonType: propTypes.oneOfType([propTypes.bool, propTypes.oneOf(['prepend', 'append'])]),
  939. size: propTypes.string,
  940. tag: tagPropType,
  941. toggle: propTypes.func,
  942. children: propTypes.node,
  943. className: propTypes.string,
  944. cssModule: propTypes.object,
  945. inNavbar: propTypes.bool,
  946. setActiveFromChild: propTypes.bool
  947. };
  948. var defaultProps$8 = {
  949. isOpen: false,
  950. direction: 'down',
  951. nav: false,
  952. active: false,
  953. addonType: false,
  954. inNavbar: false,
  955. setActiveFromChild: false
  956. };
  957. var childContextTypes = {
  958. toggle: propTypes.func.isRequired,
  959. isOpen: propTypes.bool.isRequired,
  960. direction: propTypes.oneOf(['up', 'down', 'left', 'right']).isRequired,
  961. inNavbar: propTypes.bool.isRequired
  962. };
  963. var Dropdown =
  964. /*#__PURE__*/
  965. function (_React$Component) {
  966. _inheritsLoose(Dropdown, _React$Component);
  967. function Dropdown(props) {
  968. var _this;
  969. _this = _React$Component.call(this, props) || this;
  970. _this.addEvents = _this.addEvents.bind(_assertThisInitialized(_assertThisInitialized(_this)));
  971. _this.handleDocumentClick = _this.handleDocumentClick.bind(_assertThisInitialized(_assertThisInitialized(_this)));
  972. _this.handleKeyDown = _this.handleKeyDown.bind(_assertThisInitialized(_assertThisInitialized(_this)));
  973. _this.removeEvents = _this.removeEvents.bind(_assertThisInitialized(_assertThisInitialized(_this)));
  974. _this.toggle = _this.toggle.bind(_assertThisInitialized(_assertThisInitialized(_this)));
  975. return _this;
  976. }
  977. var _proto = Dropdown.prototype;
  978. _proto.getChildContext = function getChildContext() {
  979. return {
  980. toggle: this.props.toggle,
  981. isOpen: this.props.isOpen,
  982. direction: this.props.direction === 'down' && this.props.dropup ? 'up' : this.props.direction,
  983. inNavbar: this.props.inNavbar
  984. };
  985. };
  986. _proto.componentDidMount = function componentDidMount() {
  987. this.handleProps();
  988. };
  989. _proto.componentDidUpdate = function componentDidUpdate(prevProps) {
  990. if (this.props.isOpen !== prevProps.isOpen) {
  991. this.handleProps();
  992. }
  993. };
  994. _proto.componentWillUnmount = function componentWillUnmount() {
  995. this.removeEvents();
  996. };
  997. _proto.getContainer = function getContainer() {
  998. if (this._$container) return this._$container;
  999. this._$container = ReactDOM.findDOMNode(this);
  1000. return ReactDOM.findDOMNode(this);
  1001. };
  1002. _proto.getMenuCtrl = function getMenuCtrl() {
  1003. if (this._$menuCtrl) return this._$menuCtrl;
  1004. this._$menuCtrl = this.getContainer().querySelector('[aria-expanded]');
  1005. return this._$menuCtrl;
  1006. };
  1007. _proto.getMenuItems = function getMenuItems() {
  1008. return [].slice.call(this.getContainer().querySelectorAll('[role="menuitem"]'));
  1009. };
  1010. _proto.addEvents = function addEvents() {
  1011. var _this2 = this;
  1012. ['click', 'touchstart', 'keyup'].forEach(function (event) {
  1013. return document.addEventListener(event, _this2.handleDocumentClick, true);
  1014. });
  1015. };
  1016. _proto.removeEvents = function removeEvents() {
  1017. var _this3 = this;
  1018. ['click', 'touchstart', 'keyup'].forEach(function (event) {
  1019. return document.removeEventListener(event, _this3.handleDocumentClick, true);
  1020. });
  1021. };
  1022. _proto.handleDocumentClick = function handleDocumentClick(e) {
  1023. if (e && (e.which === 3 || e.type === 'keyup' && e.which !== keyCodes.tab)) return;
  1024. var container = this.getContainer();
  1025. if (container.contains(e.target) && container !== e.target && (e.type !== 'keyup' || e.which === keyCodes.tab)) {
  1026. return;
  1027. }
  1028. this.toggle(e);
  1029. };
  1030. _proto.handleKeyDown = function handleKeyDown(e) {
  1031. var _this4 = this;
  1032. if (/input|textarea/i.test(e.target.tagName) || keyCodes.tab === e.which && e.target.getAttribute('role') !== 'menuitem') {
  1033. return;
  1034. }
  1035. e.preventDefault();
  1036. if (this.props.disabled) return;
  1037. if (this.getMenuCtrl() === e.target) {
  1038. if (!this.props.isOpen && [keyCodes.space, keyCodes.enter, keyCodes.up, keyCodes.down].indexOf(e.which) > -1) {
  1039. this.toggle(e);
  1040. setTimeout(function () {
  1041. return _this4.getMenuItems()[0].focus();
  1042. });
  1043. }
  1044. }
  1045. if (this.props.isOpen && e.target.getAttribute('role') === 'menuitem') {
  1046. if ([keyCodes.tab, keyCodes.esc].indexOf(e.which) > -1) {
  1047. this.toggle(e);
  1048. this.getMenuCtrl().focus();
  1049. } else if ([keyCodes.space, keyCodes.enter].indexOf(e.which) > -1) {
  1050. e.target.click();
  1051. this.getMenuCtrl().focus();
  1052. } else if ([keyCodes.down, keyCodes.up].indexOf(e.which) > -1 || [keyCodes.n, keyCodes.p].indexOf(e.which) > -1 && e.ctrlKey) {
  1053. var $menuitems = this.getMenuItems();
  1054. var index = $menuitems.indexOf(e.target);
  1055. if (keyCodes.up === e.which || keyCodes.p === e.which && e.ctrlKey) {
  1056. index = index !== 0 ? index - 1 : $menuitems.length - 1;
  1057. } else if (keyCodes.down === e.which || keyCodes.n === e.which && e.ctrlKey) {
  1058. index = index === $menuitems.length - 1 ? 0 : index + 1;
  1059. }
  1060. $menuitems[index].focus();
  1061. } else if (keyCodes.end === e.which) {
  1062. var _$menuitems = this.getMenuItems();
  1063. _$menuitems[_$menuitems.length - 1].focus();
  1064. } else if (keyCodes.home === e.which) {
  1065. var _$menuitems2 = this.getMenuItems();
  1066. _$menuitems2[0].focus();
  1067. } else if (e.which >= 48 && e.which <= 90) {
  1068. var _$menuitems3 = this.getMenuItems();
  1069. var charPressed = String.fromCharCode(e.which).toLowerCase();
  1070. for (var i = 0; i < _$menuitems3.length; i += 1) {
  1071. var firstLetter = _$menuitems3[i].textContent && _$menuitems3[i].textContent[0].toLowerCase();
  1072. if (firstLetter === charPressed) {
  1073. _$menuitems3[i].focus();
  1074. break;
  1075. }
  1076. }
  1077. }
  1078. }
  1079. };
  1080. _proto.handleProps = function handleProps() {
  1081. if (this.props.isOpen) {
  1082. this.addEvents();
  1083. } else {
  1084. this.removeEvents();
  1085. }
  1086. };
  1087. _proto.toggle = function toggle(e) {
  1088. if (this.props.disabled) {
  1089. return e && e.preventDefault();
  1090. }
  1091. return this.props.toggle(e);
  1092. };
  1093. _proto.render = function render() {
  1094. var _classNames;
  1095. var _omit = omit(this.props, ['toggle', 'disabled', 'inNavbar', 'direction']),
  1096. className = _omit.className,
  1097. cssModule = _omit.cssModule,
  1098. dropup = _omit.dropup,
  1099. isOpen = _omit.isOpen,
  1100. group = _omit.group,
  1101. size = _omit.size,
  1102. nav = _omit.nav,
  1103. setActiveFromChild = _omit.setActiveFromChild,
  1104. active = _omit.active,
  1105. addonType = _omit.addonType,
  1106. attrs = _objectWithoutPropertiesLoose(_omit, ["className", "cssModule", "dropup", "isOpen", "group", "size", "nav", "setActiveFromChild", "active", "addonType"]);
  1107. var direction = this.props.direction === 'down' && dropup ? 'up' : this.props.direction;
  1108. attrs.tag = attrs.tag || (nav ? 'li' : 'div');
  1109. var subItemIsActive = false;
  1110. if (setActiveFromChild) {
  1111. React__default.Children.map(this.props.children[1].props.children, function (dropdownItem) {
  1112. if (dropdownItem && dropdownItem.props.active) subItemIsActive = true;
  1113. });
  1114. }
  1115. var classes = mapToCssModules(classnames(className, direction !== 'down' && "drop" + direction, nav && active ? 'active' : false, setActiveFromChild && subItemIsActive ? 'active' : false, (_classNames = {}, _classNames["input-group-" + addonType] = addonType, _classNames['btn-group'] = group, _classNames["btn-group-" + size] = !!size, _classNames.dropdown = !group && !addonType, _classNames.show = isOpen, _classNames['nav-item'] = nav, _classNames)), cssModule);
  1116. return React__default.createElement(reactPopper.Manager, _extends({}, attrs, {
  1117. className: classes,
  1118. onKeyDown: this.handleKeyDown
  1119. }));
  1120. };
  1121. return Dropdown;
  1122. }(React__default.Component);
  1123. Dropdown.propTypes = propTypes$9;
  1124. Dropdown.defaultProps = defaultProps$8;
  1125. Dropdown.childContextTypes = childContextTypes;
  1126. function NavDropdown(props) {
  1127. warnOnce('The "NavDropdown" component has been deprecated.\nPlease use component "Dropdown" with nav prop.');
  1128. return React__default.createElement(Dropdown, _extends({
  1129. nav: true
  1130. }, props));
  1131. }
  1132. var propTypes$a = {
  1133. tag: tagPropType,
  1134. innerRef: propTypes.oneOfType([propTypes.object, propTypes.func, propTypes.string]),
  1135. disabled: propTypes.bool,
  1136. active: propTypes.bool,
  1137. className: propTypes.string,
  1138. cssModule: propTypes.object,
  1139. onClick: propTypes.func,
  1140. href: propTypes.any
  1141. };
  1142. var defaultProps$9 = {
  1143. tag: 'a'
  1144. };
  1145. var NavLink =
  1146. /*#__PURE__*/
  1147. function (_React$Component) {
  1148. _inheritsLoose(NavLink, _React$Component);
  1149. function NavLink(props) {
  1150. var _this;
  1151. _this = _React$Component.call(this, props) || this;
  1152. _this.onClick = _this.onClick.bind(_assertThisInitialized(_assertThisInitialized(_this)));
  1153. return _this;
  1154. }
  1155. var _proto = NavLink.prototype;
  1156. _proto.onClick = function onClick(e) {
  1157. if (this.props.disabled) {
  1158. e.preventDefault();
  1159. return;
  1160. }
  1161. if (this.props.href === '#') {
  1162. e.preventDefault();
  1163. }
  1164. if (this.props.onClick) {
  1165. this.props.onClick(e);
  1166. }
  1167. };
  1168. _proto.render = function render() {
  1169. var _this$props = this.props,
  1170. className = _this$props.className,
  1171. cssModule = _this$props.cssModule,
  1172. active = _this$props.active,
  1173. Tag = _this$props.tag,
  1174. innerRef = _this$props.innerRef,
  1175. attributes = _objectWithoutPropertiesLoose(_this$props, ["className", "cssModule", "active", "tag", "innerRef"]);
  1176. var classes = mapToCssModules(classnames(className, 'nav-link', {
  1177. disabled: attributes.disabled,
  1178. active: active
  1179. }), cssModule);
  1180. return React__default.createElement(Tag, _extends({}, attributes, {
  1181. ref: innerRef,
  1182. onClick: this.onClick,
  1183. className: classes
  1184. }));
  1185. };
  1186. return NavLink;
  1187. }(React__default.Component);
  1188. NavLink.propTypes = propTypes$a;
  1189. NavLink.defaultProps = defaultProps$9;
  1190. var propTypes$b = {
  1191. tag: tagPropType,
  1192. listTag: tagPropType,
  1193. className: propTypes.string,
  1194. listClassName: propTypes.string,
  1195. cssModule: propTypes.object,
  1196. children: propTypes.node,
  1197. 'aria-label': propTypes.string
  1198. };
  1199. var defaultProps$a = {
  1200. tag: 'nav',
  1201. listTag: 'ol',
  1202. 'aria-label': 'breadcrumb'
  1203. };
  1204. var Breadcrumb = function Breadcrumb(props) {
  1205. var className = props.className,
  1206. listClassName = props.listClassName,
  1207. cssModule = props.cssModule,
  1208. children = props.children,
  1209. Tag = props.tag,
  1210. ListTag = props.listTag,
  1211. label = props['aria-label'],
  1212. attributes = _objectWithoutPropertiesLoose(props, ["className", "listClassName", "cssModule", "children", "tag", "listTag", "aria-label"]);
  1213. var classes = mapToCssModules(classnames(className), cssModule);
  1214. var listClasses = mapToCssModules(classnames('breadcrumb', listClassName), cssModule);
  1215. return React__default.createElement(Tag, _extends({}, attributes, {
  1216. className: classes,
  1217. "aria-label": label
  1218. }), React__default.createElement(ListTag, {
  1219. className: listClasses
  1220. }, children));
  1221. };
  1222. Breadcrumb.propTypes = propTypes$b;
  1223. Breadcrumb.defaultProps = defaultProps$a;
  1224. var propTypes$c = {
  1225. tag: tagPropType,
  1226. active: propTypes.bool,
  1227. className: propTypes.string,
  1228. cssModule: propTypes.object
  1229. };
  1230. var defaultProps$b = {
  1231. tag: 'li'
  1232. };
  1233. var BreadcrumbItem = function BreadcrumbItem(props) {
  1234. var className = props.className,
  1235. cssModule = props.cssModule,
  1236. active = props.active,
  1237. Tag = props.tag,
  1238. attributes = _objectWithoutPropertiesLoose(props, ["className", "cssModule", "active", "tag"]);
  1239. var classes = mapToCssModules(classnames(className, active ? 'active' : false, 'breadcrumb-item'), cssModule);
  1240. return React__default.createElement(Tag, _extends({}, attributes, {
  1241. className: classes,
  1242. "aria-current": active ? 'page' : undefined
  1243. }));
  1244. };
  1245. BreadcrumbItem.propTypes = propTypes$c;
  1246. BreadcrumbItem.defaultProps = defaultProps$b;
  1247. var propTypes$d = {
  1248. active: propTypes.bool,
  1249. 'aria-label': propTypes.string,
  1250. block: propTypes.bool,
  1251. color: propTypes.string,
  1252. disabled: propTypes.bool,
  1253. outline: propTypes.bool,
  1254. tag: tagPropType,
  1255. innerRef: propTypes.oneOfType([propTypes.object, propTypes.func, propTypes.string]),
  1256. onClick: propTypes.func,
  1257. size: propTypes.string,
  1258. children: propTypes.node,
  1259. className: propTypes.string,
  1260. cssModule: propTypes.object,
  1261. close: propTypes.bool
  1262. };
  1263. var defaultProps$c = {
  1264. color: 'secondary',
  1265. tag: 'button'
  1266. };
  1267. var Button =
  1268. /*#__PURE__*/
  1269. function (_React$Component) {
  1270. _inheritsLoose(Button, _React$Component);
  1271. function Button(props) {
  1272. var _this;
  1273. _this = _React$Component.call(this, props) || this;
  1274. _this.onClick = _this.onClick.bind(_assertThisInitialized(_assertThisInitialized(_this)));
  1275. return _this;
  1276. }
  1277. var _proto = Button.prototype;
  1278. _proto.onClick = function onClick(e) {
  1279. if (this.props.disabled) {
  1280. e.preventDefault();
  1281. return;
  1282. }
  1283. if (this.props.onClick) {
  1284. this.props.onClick(e);
  1285. }
  1286. };
  1287. _proto.render = function render() {
  1288. var _this$props = this.props,
  1289. active = _this$props.active,
  1290. ariaLabel = _this$props['aria-label'],
  1291. block = _this$props.block,
  1292. className = _this$props.className,
  1293. close = _this$props.close,
  1294. cssModule = _this$props.cssModule,
  1295. color = _this$props.color,
  1296. outline = _this$props.outline,
  1297. size = _this$props.size,
  1298. Tag = _this$props.tag,
  1299. innerRef = _this$props.innerRef,
  1300. attributes = _objectWithoutPropertiesLoose(_this$props, ["active", "aria-label", "block", "className", "close", "cssModule", "color", "outline", "size", "tag", "innerRef"]);
  1301. if (close && typeof attributes.children === 'undefined') {
  1302. attributes.children = React__default.createElement("span", {
  1303. "aria-hidden": true
  1304. }, "\xD7");
  1305. }
  1306. var btnOutlineColor = "btn" + (outline ? '-outline' : '') + "-" + color;
  1307. var classes = mapToCssModules(classnames(className, {
  1308. close: close
  1309. }, close || 'btn', close || btnOutlineColor, size ? "btn-" + size : false, block ? 'btn-block' : false, {
  1310. active: active,
  1311. disabled: this.props.disabled
  1312. }), cssModule);
  1313. if (attributes.href && Tag === 'button') {
  1314. Tag = 'a';
  1315. }
  1316. var defaultAriaLabel = close ? 'Close' : null;
  1317. return React__default.createElement(Tag, _extends({
  1318. type: Tag === 'button' && attributes.onClick ? 'button' : undefined
  1319. }, attributes, {
  1320. className: classes,
  1321. ref: innerRef,
  1322. onClick: this.onClick,
  1323. "aria-label": ariaLabel || defaultAriaLabel
  1324. }));
  1325. };
  1326. return Button;
  1327. }(React__default.Component);
  1328. Button.propTypes = propTypes$d;
  1329. Button.defaultProps = defaultProps$c;
  1330. var propTypes$e = {
  1331. children: propTypes.node
  1332. };
  1333. var ButtonDropdown = function ButtonDropdown(props) {
  1334. return React__default.createElement(Dropdown, _extends({
  1335. group: true
  1336. }, props));
  1337. };
  1338. ButtonDropdown.propTypes = propTypes$e;
  1339. var propTypes$f = {
  1340. tag: tagPropType,
  1341. 'aria-label': propTypes.string,
  1342. className: propTypes.string,
  1343. cssModule: propTypes.object,
  1344. role: propTypes.string,
  1345. size: propTypes.string,
  1346. vertical: propTypes.bool
  1347. };
  1348. var defaultProps$d = {
  1349. tag: 'div',
  1350. role: 'group'
  1351. };
  1352. var ButtonGroup = function ButtonGroup(props) {
  1353. var className = props.className,
  1354. cssModule = props.cssModule,
  1355. size = props.size,
  1356. vertical = props.vertical,
  1357. Tag = props.tag,
  1358. attributes = _objectWithoutPropertiesLoose(props, ["className", "cssModule", "size", "vertical", "tag"]);
  1359. var classes = mapToCssModules(classnames(className, size ? 'btn-group-' + size : false, vertical ? 'btn-group-vertical' : 'btn-group'), cssModule);
  1360. return React__default.createElement(Tag, _extends({}, attributes, {
  1361. className: classes
  1362. }));
  1363. };
  1364. ButtonGroup.propTypes = propTypes$f;
  1365. ButtonGroup.defaultProps = defaultProps$d;
  1366. var propTypes$g = {
  1367. tag: tagPropType,
  1368. 'aria-label': propTypes.string,
  1369. className: propTypes.string,
  1370. cssModule: propTypes.object,
  1371. role: propTypes.string
  1372. };
  1373. var defaultProps$e = {
  1374. tag: 'div',
  1375. role: 'toolbar'
  1376. };
  1377. var ButtonToolbar = function ButtonToolbar(props) {
  1378. var className = props.className,
  1379. cssModule = props.cssModule,
  1380. Tag = props.tag,
  1381. attributes = _objectWithoutPropertiesLoose(props, ["className", "cssModule", "tag"]);
  1382. var classes = mapToCssModules(classnames(className, 'btn-toolbar'), cssModule);
  1383. return React__default.createElement(Tag, _extends({}, attributes, {
  1384. className: classes
  1385. }));
  1386. };
  1387. ButtonToolbar.propTypes = propTypes$g;
  1388. ButtonToolbar.defaultProps = defaultProps$e;
  1389. var propTypes$h = {
  1390. children: propTypes.node,
  1391. active: propTypes.bool,
  1392. disabled: propTypes.bool,
  1393. divider: propTypes.bool,
  1394. tag: tagPropType,
  1395. header: propTypes.bool,
  1396. onClick: propTypes.func,
  1397. className: propTypes.string,
  1398. cssModule: propTypes.object,
  1399. toggle: propTypes.bool
  1400. };
  1401. var contextTypes = {
  1402. toggle: propTypes.func
  1403. };
  1404. var defaultProps$f = {
  1405. tag: 'button',
  1406. toggle: true
  1407. };
  1408. var DropdownItem =
  1409. /*#__PURE__*/
  1410. function (_React$Component) {
  1411. _inheritsLoose(DropdownItem, _React$Component);
  1412. function DropdownItem(props) {
  1413. var _this;
  1414. _this = _React$Component.call(this, props) || this;
  1415. _this.onClick = _this.onClick.bind(_assertThisInitialized(_assertThisInitialized(_this)));
  1416. _this.getTabIndex = _this.getTabIndex.bind(_assertThisInitialized(_assertThisInitialized(_this)));
  1417. return _this;
  1418. }
  1419. var _proto = DropdownItem.prototype;
  1420. _proto.onClick = function onClick(e) {
  1421. if (this.props.disabled || this.props.header || this.props.divider) {
  1422. e.preventDefault();
  1423. return;
  1424. }
  1425. if (this.props.onClick) {
  1426. this.props.onClick(e);
  1427. }
  1428. if (this.props.toggle) {
  1429. this.context.toggle(e);
  1430. }
  1431. };
  1432. _proto.getTabIndex = function getTabIndex() {
  1433. if (this.props.disabled || this.props.header || this.props.divider) {
  1434. return '-1';
  1435. }
  1436. return '0';
  1437. };
  1438. _proto.render = function render() {
  1439. var tabIndex = this.getTabIndex();
  1440. var role = tabIndex > -1 ? 'menuitem' : undefined;
  1441. var _omit = omit(this.props, ['toggle']),
  1442. className = _omit.className,
  1443. cssModule = _omit.cssModule,
  1444. divider = _omit.divider,
  1445. Tag = _omit.tag,
  1446. header = _omit.header,
  1447. active = _omit.active,
  1448. props = _objectWithoutPropertiesLoose(_omit, ["className", "cssModule", "divider", "tag", "header", "active"]);
  1449. var classes = mapToCssModules(classnames(className, {
  1450. disabled: props.disabled,
  1451. 'dropdown-item': !divider && !header,
  1452. active: active,
  1453. 'dropdown-header': header,
  1454. 'dropdown-divider': divider
  1455. }), cssModule);
  1456. if (Tag === 'button') {
  1457. if (header) {
  1458. Tag = 'h6';
  1459. } else if (divider) {
  1460. Tag = 'div';
  1461. } else if (props.href) {
  1462. Tag = 'a';
  1463. }
  1464. }
  1465. return React__default.createElement(Tag, _extends({
  1466. type: Tag === 'button' && (props.onClick || this.props.toggle) ? 'button' : undefined
  1467. }, props, {
  1468. tabIndex: tabIndex,
  1469. role: role,
  1470. className: classes,
  1471. onClick: this.onClick
  1472. }));
  1473. };
  1474. return DropdownItem;
  1475. }(React__default.Component);
  1476. DropdownItem.propTypes = propTypes$h;
  1477. DropdownItem.defaultProps = defaultProps$f;
  1478. DropdownItem.contextTypes = contextTypes;
  1479. var propTypes$i = {
  1480. tag: tagPropType,
  1481. children: propTypes.node.isRequired,
  1482. right: propTypes.bool,
  1483. flip: propTypes.bool,
  1484. modifiers: propTypes.object,
  1485. className: propTypes.string,
  1486. cssModule: propTypes.object,
  1487. persist: propTypes.bool
  1488. };
  1489. var defaultProps$g = {
  1490. tag: 'div',
  1491. flip: true
  1492. };
  1493. var contextTypes$1 = {
  1494. isOpen: propTypes.bool.isRequired,
  1495. direction: propTypes.oneOf(['up', 'down', 'left', 'right']).isRequired,
  1496. inNavbar: propTypes.bool.isRequired
  1497. };
  1498. var noFlipModifier = {
  1499. flip: {
  1500. enabled: false
  1501. }
  1502. };
  1503. var directionPositionMap = {
  1504. up: 'top',
  1505. left: 'left',
  1506. right: 'right',
  1507. down: 'bottom'
  1508. };
  1509. var DropdownMenu = function DropdownMenu(props, context) {
  1510. var className = props.className,
  1511. cssModule = props.cssModule,
  1512. right = props.right,
  1513. tag = props.tag,
  1514. flip = props.flip,
  1515. modifiers = props.modifiers,
  1516. persist = props.persist,
  1517. attrs = _objectWithoutPropertiesLoose(props, ["className", "cssModule", "right", "tag", "flip", "modifiers", "persist"]);
  1518. var classes = mapToCssModules(classnames(className, 'dropdown-menu', {
  1519. 'dropdown-menu-right': right,
  1520. show: context.isOpen
  1521. }), cssModule);
  1522. var Tag = tag;
  1523. if (persist || context.isOpen && !context.inNavbar) {
  1524. Tag = reactPopper.Popper;
  1525. var position1 = directionPositionMap[context.direction] || 'bottom';
  1526. var position2 = right ? 'end' : 'start';
  1527. attrs.placement = position1 + "-" + position2;
  1528. attrs.component = tag;
  1529. attrs.modifiers = !flip ? _extends({}, modifiers, noFlipModifier) : modifiers;
  1530. }
  1531. return React__default.createElement(Tag, _extends({
  1532. tabIndex: "-1",
  1533. role: "menu"
  1534. }, attrs, {
  1535. "aria-hidden": !context.isOpen,
  1536. className: classes,
  1537. "x-placement": attrs.placement
  1538. }));
  1539. };
  1540. DropdownMenu.propTypes = propTypes$i;
  1541. DropdownMenu.defaultProps = defaultProps$g;
  1542. DropdownMenu.contextTypes = contextTypes$1;
  1543. var propTypes$j = {
  1544. caret: propTypes.bool,
  1545. color: propTypes.string,
  1546. children: propTypes.node,
  1547. className: propTypes.string,
  1548. cssModule: propTypes.object,
  1549. disabled: propTypes.bool,
  1550. onClick: propTypes.func,
  1551. 'aria-haspopup': propTypes.bool,
  1552. split: propTypes.bool,
  1553. tag: tagPropType,
  1554. nav: propTypes.bool
  1555. };
  1556. var defaultProps$h = {
  1557. 'aria-haspopup': true,
  1558. color: 'secondary'
  1559. };
  1560. var contextTypes$2 = {
  1561. isOpen: propTypes.bool.isRequired,
  1562. toggle: propTypes.func.isRequired,
  1563. inNavbar: propTypes.bool.isRequired
  1564. };
  1565. var DropdownToggle =
  1566. /*#__PURE__*/
  1567. function (_React$Component) {
  1568. _inheritsLoose(DropdownToggle, _React$Component);
  1569. function DropdownToggle(props) {
  1570. var _this;
  1571. _this = _React$Component.call(this, props) || this;
  1572. _this.onClick = _this.onClick.bind(_assertThisInitialized(_assertThisInitialized(_this)));
  1573. return _this;
  1574. }
  1575. var _proto = DropdownToggle.prototype;
  1576. _proto.onClick = function onClick(e) {
  1577. if (this.props.disabled) {
  1578. e.preventDefault();
  1579. return;
  1580. }
  1581. if (this.props.nav && !this.props.tag) {
  1582. e.preventDefault();
  1583. }
  1584. if (this.props.onClick) {
  1585. this.props.onClick(e);
  1586. }
  1587. this.context.toggle(e);
  1588. };
  1589. _proto.render = function render() {
  1590. var _this$props = this.props,
  1591. className = _this$props.className,
  1592. color = _this$props.color,
  1593. cssModule = _this$props.cssModule,
  1594. caret = _this$props.caret,
  1595. split = _this$props.split,
  1596. nav = _this$props.nav,
  1597. tag = _this$props.tag,
  1598. props = _objectWithoutPropertiesLoose(_this$props, ["className", "color", "cssModule", "caret", "split", "nav", "tag"]);
  1599. var ariaLabel = props['aria-label'] || 'Toggle Dropdown';
  1600. var classes = mapToCssModules(classnames(className, {
  1601. 'dropdown-toggle': caret || split,
  1602. 'dropdown-toggle-split': split,
  1603. 'nav-link': nav
  1604. }), cssModule);
  1605. var children = props.children || React__default.createElement("span", {
  1606. className: "sr-only"
  1607. }, ariaLabel);
  1608. var Tag;
  1609. if (nav && !tag) {
  1610. Tag = 'a';
  1611. props.href = '#';
  1612. } else if (!tag) {
  1613. Tag = Button;
  1614. props.color = color;
  1615. props.cssModule = cssModule;
  1616. } else {
  1617. Tag = tag;
  1618. }
  1619. if (this.context.inNavbar) {
  1620. return React__default.createElement(Tag, _extends({}, props, {
  1621. className: classes,
  1622. onClick: this.onClick,
  1623. "aria-expanded": this.context.isOpen,
  1624. children: children
  1625. }));
  1626. }
  1627. return React__default.createElement(reactPopper.Target, _extends({}, props, {
  1628. className: classes,
  1629. component: Tag,
  1630. onClick: this.onClick,
  1631. "aria-expanded": this.context.isOpen,
  1632. children: children
  1633. }));
  1634. };
  1635. return DropdownToggle;
  1636. }(React__default.Component);
  1637. DropdownToggle.propTypes = propTypes$j;
  1638. DropdownToggle.defaultProps = defaultProps$h;
  1639. DropdownToggle.contextTypes = contextTypes$2;
  1640. var interopRequireDefault = createCommonjsModule(function (module) {
  1641. function _interopRequireDefault(obj) {
  1642. return obj && obj.__esModule ? obj : {
  1643. default: obj
  1644. };
  1645. }
  1646. module.exports = _interopRequireDefault;
  1647. });
  1648. unwrapExports(interopRequireDefault);
  1649. var hasClass_1 = createCommonjsModule(function (module, exports) {
  1650. exports.__esModule = true;
  1651. exports.default = hasClass;
  1652. function hasClass(element, className) {
  1653. if (element.classList) return !!className && element.classList.contains(className);else return (" " + (element.className.baseVal || element.className) + " ").indexOf(" " + className + " ") !== -1;
  1654. }
  1655. module.exports = exports["default"];
  1656. });
  1657. unwrapExports(hasClass_1);
  1658. var addClass_1 = createCommonjsModule(function (module, exports) {
  1659. exports.__esModule = true;
  1660. exports.default = addClass;
  1661. var _hasClass = interopRequireDefault(hasClass_1);
  1662. function addClass(element, className) {
  1663. if (element.classList) element.classList.add(className);else if (!(0, _hasClass.default)(element, className)) if (typeof element.className === 'string') element.className = element.className + ' ' + className;else element.setAttribute('class', (element.className && element.className.baseVal || '') + ' ' + className);
  1664. }
  1665. module.exports = exports["default"];
  1666. });
  1667. unwrapExports(addClass_1);
  1668. function replaceClassName(origClass, classToRemove) {
  1669. return origClass.replace(new RegExp('(^|\\s)' + classToRemove + '(?:\\s|$)', 'g'), '$1').replace(/\s+/g, ' ').replace(/^\s*|\s*$/g, '');
  1670. }
  1671. var removeClass = function removeClass(element, className) {
  1672. if (element.classList) element.classList.remove(className);else if (typeof element.className === 'string') element.className = replaceClassName(element.className, className);else element.setAttribute('class', replaceClassName(element.className && element.className.baseVal || '', className));
  1673. };
  1674. /**
  1675. * Copyright (c) 2013-present, Facebook, Inc.
  1676. *
  1677. * This source code is licensed under the MIT license found in the
  1678. * LICENSE file in the root directory of this source tree.
  1679. */
  1680. function componentWillMount() {
  1681. // Call this.constructor.gDSFP to support sub-classes.
  1682. var state = this.constructor.getDerivedStateFromProps(this.props, this.state);
  1683. if (state !== null && state !== undefined) {
  1684. this.setState(state);
  1685. }
  1686. }
  1687. function componentWillReceiveProps(nextProps) {
  1688. // Call this.constructor.gDSFP to support sub-classes.
  1689. // Use the setState() updater to ensure state isn't stale in certain edge cases.
  1690. function updater(prevState) {
  1691. var state = this.constructor.getDerivedStateFromProps(nextProps, prevState);
  1692. return state !== null && state !== undefined ? state : null;
  1693. } // Binding "this" is important for shallow renderer support.
  1694. this.setState(updater.bind(this));
  1695. }
  1696. function componentWillUpdate(nextProps, nextState) {
  1697. try {
  1698. var prevProps = this.props;
  1699. var prevState = this.state;
  1700. this.props = nextProps;
  1701. this.state = nextState;
  1702. this.__reactInternalSnapshotFlag = true;
  1703. this.__reactInternalSnapshot = this.getSnapshotBeforeUpdate(prevProps, prevState);
  1704. } finally {
  1705. this.props = prevProps;
  1706. this.state = prevState;
  1707. }
  1708. } // React may warn about cWM/cWRP/cWU methods being deprecated.
  1709. // Add a flag to suppress these warnings for this special case.
  1710. componentWillMount.__suppressDeprecationWarning = true;
  1711. componentWillReceiveProps.__suppressDeprecationWarning = true;
  1712. componentWillUpdate.__suppressDeprecationWarning = true;
  1713. function polyfill(Component) {
  1714. var prototype = Component.prototype;
  1715. if (!prototype || !prototype.isReactComponent) {
  1716. throw new Error('Can only polyfill class components');
  1717. }
  1718. if (typeof Component.getDerivedStateFromProps !== 'function' && typeof prototype.getSnapshotBeforeUpdate !== 'function') {
  1719. return Component;
  1720. } // If new component APIs are defined, "unsafe" lifecycles won't be called.
  1721. // Error if any of these lifecycles are present,
  1722. // Because they would work differently between older and newer (16.3+) versions of React.
  1723. var foundWillMountName = null;
  1724. var foundWillReceivePropsName = null;
  1725. var foundWillUpdateName = null;
  1726. if (typeof prototype.componentWillMount === 'function') {
  1727. foundWillMountName = 'componentWillMount';
  1728. } else if (typeof prototype.UNSAFE_componentWillMount === 'function') {
  1729. foundWillMountName = 'UNSAFE_componentWillMount';
  1730. }
  1731. if (typeof prototype.componentWillReceiveProps === 'function') {
  1732. foundWillReceivePropsName = 'componentWillReceiveProps';
  1733. } else if (typeof prototype.UNSAFE_componentWillReceiveProps === 'function') {
  1734. foundWillReceivePropsName = 'UNSAFE_componentWillReceiveProps';
  1735. }
  1736. if (typeof prototype.componentWillUpdate === 'function') {
  1737. foundWillUpdateName = 'componentWillUpdate';
  1738. } else if (typeof prototype.UNSAFE_componentWillUpdate === 'function') {
  1739. foundWillUpdateName = 'UNSAFE_componentWillUpdate';
  1740. }
  1741. if (foundWillMountName !== null || foundWillReceivePropsName !== null || foundWillUpdateName !== null) {
  1742. var componentName = Component.displayName || Component.name;
  1743. var newApiName = typeof Component.getDerivedStateFromProps === 'function' ? 'getDerivedStateFromProps()' : 'getSnapshotBeforeUpdate()';
  1744. throw Error('Unsafe legacy lifecycles will not be called for components using new component APIs.\n\n' + componentName + ' uses ' + newApiName + ' but also contains the following legacy lifecycles:' + (foundWillMountName !== null ? '\n ' + foundWillMountName : '') + (foundWillReceivePropsName !== null ? '\n ' + foundWillReceivePropsName : '') + (foundWillUpdateName !== null ? '\n ' + foundWillUpdateName : '') + '\n\nThe above lifecycles should be removed. Learn more about this warning here:\n' + 'https://fb.me/react-async-component-lifecycle-hooks');
  1745. } // React <= 16.2 does not support static getDerivedStateFromProps.
  1746. // As a workaround, use cWM and cWRP to invoke the new static lifecycle.
  1747. // Newer versions of React will ignore these lifecycles if gDSFP exists.
  1748. if (typeof Component.getDerivedStateFromProps === 'function') {
  1749. prototype.componentWillMount = componentWillMount;
  1750. prototype.componentWillReceiveProps = componentWillReceiveProps;
  1751. } // React <= 16.2 does not support getSnapshotBeforeUpdate.
  1752. // As a workaround, use cWU to invoke the new lifecycle.
  1753. // Newer versions of React will ignore that lifecycle if gSBU exists.
  1754. if (typeof prototype.getSnapshotBeforeUpdate === 'function') {
  1755. if (typeof prototype.componentDidUpdate !== 'function') {
  1756. throw new Error('Cannot polyfill getSnapshotBeforeUpdate() for components that do not define componentDidUpdate() on the prototype');
  1757. }
  1758. prototype.componentWillUpdate = componentWillUpdate;
  1759. var componentDidUpdate = prototype.componentDidUpdate;
  1760. prototype.componentDidUpdate = function componentDidUpdatePolyfill(prevProps, prevState, maybeSnapshot) {
  1761. // 16.3+ will not execute our will-update method;
  1762. // It will pass a snapshot value to did-update though.
  1763. // Older versions will require our polyfilled will-update value.
  1764. // We need to handle both cases, but can't just check for the presence of "maybeSnapshot",
  1765. // Because for <= 15.x versions this might be a "prevContext" object.
  1766. // We also can't just check "__reactInternalSnapshot",
  1767. // Because get-snapshot might return a falsy value.
  1768. // So check for the explicit __reactInternalSnapshotFlag flag to determine behavior.
  1769. var snapshot = this.__reactInternalSnapshotFlag ? this.__reactInternalSnapshot : maybeSnapshot;
  1770. componentDidUpdate.call(this, prevProps, prevState, snapshot);
  1771. };
  1772. }
  1773. return Component;
  1774. }
  1775. var reactLifecyclesCompat_es = /*#__PURE__*/Object.freeze({
  1776. polyfill: polyfill
  1777. });
  1778. var PropTypes = createCommonjsModule(function (module, exports) {
  1779. exports.__esModule = true;
  1780. exports.transitionTimeout = transitionTimeout;
  1781. exports.classNamesShape = exports.timeoutsShape = void 0;
  1782. var _propTypes = _interopRequireDefault(propTypes);
  1783. function _interopRequireDefault(obj) {
  1784. return obj && obj.__esModule ? obj : {
  1785. default: obj
  1786. };
  1787. }
  1788. function transitionTimeout(transitionType) {
  1789. var timeoutPropName = 'transition' + transitionType + 'Timeout';
  1790. var enabledPropName = 'transition' + transitionType;
  1791. return function (props) {
  1792. // If the transition is enabled
  1793. if (props[enabledPropName]) {
  1794. // If no timeout duration is provided
  1795. if (props[timeoutPropName] == null) {
  1796. return new Error(timeoutPropName + ' wasn\'t supplied to CSSTransitionGroup: ' + 'this can cause unreliable animations and won\'t be supported in ' + 'a future version of React. See ' + 'https://fb.me/react-animation-transition-group-timeout for more ' + 'information.'); // If the duration isn't a number
  1797. } else if (typeof props[timeoutPropName] !== 'number') {
  1798. return new Error(timeoutPropName + ' must be a number (in milliseconds)');
  1799. }
  1800. }
  1801. return null;
  1802. };
  1803. }
  1804. var timeoutsShape = _propTypes.default.oneOfType([_propTypes.default.number, _propTypes.default.shape({
  1805. enter: _propTypes.default.number,
  1806. exit: _propTypes.default.number
  1807. }).isRequired]);
  1808. exports.timeoutsShape = timeoutsShape;
  1809. var classNamesShape = _propTypes.default.oneOfType([_propTypes.default.string, _propTypes.default.shape({
  1810. enter: _propTypes.default.string,
  1811. exit: _propTypes.default.string,
  1812. active: _propTypes.default.string
  1813. }), _propTypes.default.shape({
  1814. enter: _propTypes.default.string,
  1815. enterDone: _propTypes.default.string,
  1816. enterActive: _propTypes.default.string,
  1817. exit: _propTypes.default.string,
  1818. exitDone: _propTypes.default.string,
  1819. exitActive: _propTypes.default.string
  1820. })]);
  1821. exports.classNamesShape = classNamesShape;
  1822. });
  1823. unwrapExports(PropTypes);
  1824. var PropTypes_1 = PropTypes.transitionTimeout;
  1825. var PropTypes_2 = PropTypes.classNamesShape;
  1826. var PropTypes_3 = PropTypes.timeoutsShape;
  1827. var Transition_1 = createCommonjsModule(function (module, exports) {
  1828. exports.__esModule = true;
  1829. exports.default = exports.EXITING = exports.ENTERED = exports.ENTERING = exports.EXITED = exports.UNMOUNTED = void 0;
  1830. var PropTypes$$1 = _interopRequireWildcard(propTypes);
  1831. var _react = _interopRequireDefault(React__default);
  1832. var _reactDom = _interopRequireDefault(ReactDOM);
  1833. function _interopRequireDefault(obj) {
  1834. return obj && obj.__esModule ? obj : {
  1835. default: obj
  1836. };
  1837. }
  1838. function _interopRequireWildcard(obj) {
  1839. if (obj && obj.__esModule) {
  1840. return obj;
  1841. } else {
  1842. var newObj = {};
  1843. if (obj != null) {
  1844. for (var key in obj) {
  1845. if (Object.prototype.hasOwnProperty.call(obj, key)) {
  1846. var desc = Object.defineProperty && Object.getOwnPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : {};
  1847. if (desc.get || desc.set) {
  1848. Object.defineProperty(newObj, key, desc);
  1849. } else {
  1850. newObj[key] = obj[key];
  1851. }
  1852. }
  1853. }
  1854. }
  1855. newObj.default = obj;
  1856. return newObj;
  1857. }
  1858. }
  1859. function _objectWithoutPropertiesLoose(source, excluded) {
  1860. if (source == null) return {};
  1861. var target = {};
  1862. var sourceKeys = Object.keys(source);
  1863. var key, i;
  1864. for (i = 0; i < sourceKeys.length; i++) {
  1865. key = sourceKeys[i];
  1866. if (excluded.indexOf(key) >= 0) continue;
  1867. target[key] = source[key];
  1868. }
  1869. return target;
  1870. }
  1871. function _inheritsLoose(subClass, superClass) {
  1872. subClass.prototype = Object.create(superClass.prototype);
  1873. subClass.prototype.constructor = subClass;
  1874. subClass.__proto__ = superClass;
  1875. }
  1876. var UNMOUNTED = 'unmounted';
  1877. exports.UNMOUNTED = UNMOUNTED;
  1878. var EXITED = 'exited';
  1879. exports.EXITED = EXITED;
  1880. var ENTERING = 'entering';
  1881. exports.ENTERING = ENTERING;
  1882. var ENTERED = 'entered';
  1883. exports.ENTERED = ENTERED;
  1884. var EXITING = 'exiting';
  1885. /**
  1886. * The Transition component lets you describe a transition from one component
  1887. * state to another _over time_ with a simple declarative API. Most commonly
  1888. * it's used to animate the mounting and unmounting of a component, but can also
  1889. * be used to describe in-place transition states as well.
  1890. *
  1891. * By default the `Transition` component does not alter the behavior of the
  1892. * component it renders, it only tracks "enter" and "exit" states for the components.
  1893. * It's up to you to give meaning and effect to those states. For example we can
  1894. * add styles to a component when it enters or exits:
  1895. *
  1896. * ```jsx
  1897. * import Transition from 'react-transition-group/Transition';
  1898. *
  1899. * const duration = 300;
  1900. *
  1901. * const defaultStyle = {
  1902. * transition: `opacity ${duration}ms ease-in-out`,
  1903. * opacity: 0,
  1904. * }
  1905. *
  1906. * const transitionStyles = {
  1907. * entering: { opacity: 0 },
  1908. * entered: { opacity: 1 },
  1909. * };
  1910. *
  1911. * const Fade = ({ in: inProp }) => (
  1912. * <Transition in={inProp} timeout={duration}>
  1913. * {(state) => (
  1914. * <div style={{
  1915. * ...defaultStyle,
  1916. * ...transitionStyles[state]
  1917. * }}>
  1918. * I'm a fade Transition!
  1919. * </div>
  1920. * )}
  1921. * </Transition>
  1922. * );
  1923. * ```
  1924. *
  1925. * As noted the `Transition` component doesn't _do_ anything by itself to its child component.
  1926. * What it does do is track transition states over time so you can update the
  1927. * component (such as by adding styles or classes) when it changes states.
  1928. *
  1929. * There are 4 main states a Transition can be in:
  1930. * - `'entering'`
  1931. * - `'entered'`
  1932. * - `'exiting'`
  1933. * - `'exited'`
  1934. *
  1935. * Transition state is toggled via the `in` prop. When `true` the component begins the
  1936. * "Enter" stage. During this stage, the component will shift from its current transition state,
  1937. * to `'entering'` for the duration of the transition and then to the `'entered'` stage once
  1938. * it's complete. Let's take the following example:
  1939. *
  1940. * ```jsx
  1941. * state = { in: false };
  1942. *
  1943. * toggleEnterState = () => {
  1944. * this.setState({ in: true });
  1945. * }
  1946. *
  1947. * render() {
  1948. * return (
  1949. * <div>
  1950. * <Transition in={this.state.in} timeout={500} />
  1951. * <button onClick={this.toggleEnterState}>Click to Enter</button>
  1952. * </div>
  1953. * );
  1954. * }
  1955. * ```
  1956. *
  1957. * When the button is clicked the component will shift to the `'entering'` state and
  1958. * stay there for 500ms (the value of `timeout`) before it finally switches to `'entered'`.
  1959. *
  1960. * When `in` is `false` the same thing happens except the state moves from `'exiting'` to `'exited'`.
  1961. *
  1962. * ## Timing
  1963. *
  1964. * Timing is often the trickiest part of animation, mistakes can result in slight delays
  1965. * that are hard to pin down. A common example is when you want to add an exit transition,
  1966. * you should set the desired final styles when the state is `'exiting'`. That's when the
  1967. * transition to those styles will start and, if you matched the `timeout` prop with the
  1968. * CSS Transition duration, it will end exactly when the state changes to `'exited'`.
  1969. *
  1970. * > **Note**: For simpler transitions the `Transition` component might be enough, but
  1971. * > take into account that it's platform-agnostic, while the `CSSTransition` component
  1972. * > [forces reflows](https://github.com/reactjs/react-transition-group/blob/5007303e729a74be66a21c3e2205e4916821524b/src/CSSTransition.js#L208-L215)
  1973. * > in order to make more complex transitions more predictable. For example, even though
  1974. * > classes `example-enter` and `example-enter-active` are applied immediately one after
  1975. * > another, you can still transition from one to the other because of the forced reflow
  1976. * > (read [this issue](https://github.com/reactjs/react-transition-group/issues/159#issuecomment-322761171)
  1977. * > for more info). Take this into account when choosing between `Transition` and
  1978. * > `CSSTransition`.
  1979. */
  1980. exports.EXITING = EXITING;
  1981. var Transition =
  1982. /*#__PURE__*/
  1983. function (_React$Component) {
  1984. _inheritsLoose(Transition, _React$Component);
  1985. function Transition(props, context) {
  1986. var _this;
  1987. _this = _React$Component.call(this, props, context) || this;
  1988. var parentGroup = context.transitionGroup; // In the context of a TransitionGroup all enters are really appears
  1989. var appear = parentGroup && !parentGroup.isMounting ? props.enter : props.appear;
  1990. var initialStatus;
  1991. _this.appearStatus = null;
  1992. if (props.in) {
  1993. if (appear) {
  1994. initialStatus = EXITED;
  1995. _this.appearStatus = ENTERING;
  1996. } else {
  1997. initialStatus = ENTERED;
  1998. }
  1999. } else {
  2000. if (props.unmountOnExit || props.mountOnEnter) {
  2001. initialStatus = UNMOUNTED;
  2002. } else {
  2003. initialStatus = EXITED;
  2004. }
  2005. }
  2006. _this.state = {
  2007. status: initialStatus
  2008. };
  2009. _this.nextCallback = null;
  2010. return _this;
  2011. }
  2012. var _proto = Transition.prototype;
  2013. _proto.getChildContext = function getChildContext() {
  2014. return {
  2015. transitionGroup: null // allows for nested Transitions
  2016. };
  2017. };
  2018. Transition.getDerivedStateFromProps = function getDerivedStateFromProps(_ref, prevState) {
  2019. var nextIn = _ref.in;
  2020. if (nextIn && prevState.status === UNMOUNTED) {
  2021. return {
  2022. status: EXITED
  2023. };
  2024. }
  2025. return null;
  2026. }; // getSnapshotBeforeUpdate(prevProps) {
  2027. // let nextStatus = null
  2028. // if (prevProps !== this.props) {
  2029. // const { status } = this.state
  2030. // if (this.props.in) {
  2031. // if (status !== ENTERING && status !== ENTERED) {
  2032. // nextStatus = ENTERING
  2033. // }
  2034. // } else {
  2035. // if (status === ENTERING || status === ENTERED) {
  2036. // nextStatus = EXITING
  2037. // }
  2038. // }
  2039. // }
  2040. // return { nextStatus }
  2041. // }
  2042. _proto.componentDidMount = function componentDidMount() {
  2043. this.updateStatus(true, this.appearStatus);
  2044. };
  2045. _proto.componentDidUpdate = function componentDidUpdate(prevProps) {
  2046. var nextStatus = null;
  2047. if (prevProps !== this.props) {
  2048. var status = this.state.status;
  2049. if (this.props.in) {
  2050. if (status !== ENTERING && status !== ENTERED) {
  2051. nextStatus = ENTERING;
  2052. }
  2053. } else {
  2054. if (status === ENTERING || status === ENTERED) {
  2055. nextStatus = EXITING;
  2056. }
  2057. }
  2058. }
  2059. this.updateStatus(false, nextStatus);
  2060. };
  2061. _proto.componentWillUnmount = function componentWillUnmount() {
  2062. this.cancelNextCallback();
  2063. };
  2064. _proto.getTimeouts = function getTimeouts() {
  2065. var timeout = this.props.timeout;
  2066. var exit, enter, appear;
  2067. exit = enter = appear = timeout;
  2068. if (timeout != null && typeof timeout !== 'number') {
  2069. exit = timeout.exit;
  2070. enter = timeout.enter;
  2071. appear = timeout.appear;
  2072. }
  2073. return {
  2074. exit: exit,
  2075. enter: enter,
  2076. appear: appear
  2077. };
  2078. };
  2079. _proto.updateStatus = function updateStatus(mounting, nextStatus) {
  2080. if (mounting === void 0) {
  2081. mounting = false;
  2082. }
  2083. if (nextStatus !== null) {
  2084. // nextStatus will always be ENTERING or EXITING.
  2085. this.cancelNextCallback();
  2086. var node = _reactDom.default.findDOMNode(this);
  2087. if (nextStatus === ENTERING) {
  2088. this.performEnter(node, mounting);
  2089. } else {
  2090. this.performExit(node);
  2091. }
  2092. } else if (this.props.unmountOnExit && this.state.status === EXITED) {
  2093. this.setState({
  2094. status: UNMOUNTED
  2095. });
  2096. }
  2097. };
  2098. _proto.performEnter = function performEnter(node, mounting) {
  2099. var _this2 = this;
  2100. var enter = this.props.enter;
  2101. var appearing = this.context.transitionGroup ? this.context.transitionGroup.isMounting : mounting;
  2102. var timeouts = this.getTimeouts(); // no enter animation skip right to ENTERED
  2103. // if we are mounting and running this it means appear _must_ be set
  2104. if (!mounting && !enter) {
  2105. this.safeSetState({
  2106. status: ENTERED
  2107. }, function () {
  2108. _this2.props.onEntered(node);
  2109. });
  2110. return;
  2111. }
  2112. this.props.onEnter(node, appearing);
  2113. this.safeSetState({
  2114. status: ENTERING
  2115. }, function () {
  2116. _this2.props.onEntering(node, appearing); // FIXME: appear timeout?
  2117. _this2.onTransitionEnd(node, timeouts.enter, function () {
  2118. _this2.safeSetState({
  2119. status: ENTERED
  2120. }, function () {
  2121. _this2.props.onEntered(node, appearing);
  2122. });
  2123. });
  2124. });
  2125. };
  2126. _proto.performExit = function performExit(node) {
  2127. var _this3 = this;
  2128. var exit = this.props.exit;
  2129. var timeouts = this.getTimeouts(); // no exit animation skip right to EXITED
  2130. if (!exit) {
  2131. this.safeSetState({
  2132. status: EXITED
  2133. }, function () {
  2134. _this3.props.onExited(node);
  2135. });
  2136. return;
  2137. }
  2138. this.props.onExit(node);
  2139. this.safeSetState({
  2140. status: EXITING
  2141. }, function () {
  2142. _this3.props.onExiting(node);
  2143. _this3.onTransitionEnd(node, timeouts.exit, function () {
  2144. _this3.safeSetState({
  2145. status: EXITED
  2146. }, function () {
  2147. _this3.props.onExited(node);
  2148. });
  2149. });
  2150. });
  2151. };
  2152. _proto.cancelNextCallback = function cancelNextCallback() {
  2153. if (this.nextCallback !== null) {
  2154. this.nextCallback.cancel();
  2155. this.nextCallback = null;
  2156. }
  2157. };
  2158. _proto.safeSetState = function safeSetState(nextState, callback) {
  2159. // This shouldn't be necessary, but there are weird race conditions with
  2160. // setState callbacks and unmounting in testing, so always make sure that
  2161. // we can cancel any pending setState callbacks after we unmount.
  2162. callback = this.setNextCallback(callback);
  2163. this.setState(nextState, callback);
  2164. };
  2165. _proto.setNextCallback = function setNextCallback(callback) {
  2166. var _this4 = this;
  2167. var active = true;
  2168. this.nextCallback = function (event) {
  2169. if (active) {
  2170. active = false;
  2171. _this4.nextCallback = null;
  2172. callback(event);
  2173. }
  2174. };
  2175. this.nextCallback.cancel = function () {
  2176. active = false;
  2177. };
  2178. return this.nextCallback;
  2179. };
  2180. _proto.onTransitionEnd = function onTransitionEnd(node, timeout, handler) {
  2181. this.setNextCallback(handler);
  2182. if (node) {
  2183. if (this.props.addEndListener) {
  2184. this.props.addEndListener(node, this.nextCallback);
  2185. }
  2186. if (timeout != null) {
  2187. setTimeout(this.nextCallback, timeout);
  2188. }
  2189. } else {
  2190. setTimeout(this.nextCallback, 0);
  2191. }
  2192. };
  2193. _proto.render = function render() {
  2194. var status = this.state.status;
  2195. if (status === UNMOUNTED) {
  2196. return null;
  2197. }
  2198. var _this$props = this.props,
  2199. children = _this$props.children,
  2200. childProps = _objectWithoutPropertiesLoose(_this$props, ["children"]); // filter props for Transtition
  2201. delete childProps.in;
  2202. delete childProps.mountOnEnter;
  2203. delete childProps.unmountOnExit;
  2204. delete childProps.appear;
  2205. delete childProps.enter;
  2206. delete childProps.exit;
  2207. delete childProps.timeout;
  2208. delete childProps.addEndListener;
  2209. delete childProps.onEnter;
  2210. delete childProps.onEntering;
  2211. delete childProps.onEntered;
  2212. delete childProps.onExit;
  2213. delete childProps.onExiting;
  2214. delete childProps.onExited;
  2215. if (typeof children === 'function') {
  2216. return children(status, childProps);
  2217. }
  2218. var child = _react.default.Children.only(children);
  2219. return _react.default.cloneElement(child, childProps);
  2220. };
  2221. return Transition;
  2222. }(_react.default.Component);
  2223. Transition.contextTypes = {
  2224. transitionGroup: PropTypes$$1.object
  2225. };
  2226. Transition.childContextTypes = {
  2227. transitionGroup: function transitionGroup() {}
  2228. };
  2229. Transition.propTypes = {};
  2230. function noop() {}
  2231. Transition.defaultProps = {
  2232. in: false,
  2233. mountOnEnter: false,
  2234. unmountOnExit: false,
  2235. appear: false,
  2236. enter: true,
  2237. exit: true,
  2238. onEnter: noop,
  2239. onEntering: noop,
  2240. onEntered: noop,
  2241. onExit: noop,
  2242. onExiting: noop,
  2243. onExited: noop
  2244. };
  2245. Transition.UNMOUNTED = 0;
  2246. Transition.EXITED = 1;
  2247. Transition.ENTERING = 2;
  2248. Transition.ENTERED = 3;
  2249. Transition.EXITING = 4;
  2250. var _default = (0, reactLifecyclesCompat_es.polyfill)(Transition);
  2251. exports.default = _default;
  2252. });
  2253. unwrapExports(Transition_1);
  2254. var Transition_2 = Transition_1.EXITING;
  2255. var Transition_3 = Transition_1.ENTERED;
  2256. var Transition_4 = Transition_1.ENTERING;
  2257. var Transition_5 = Transition_1.EXITED;
  2258. var Transition_6 = Transition_1.UNMOUNTED;
  2259. var CSSTransition_1 = createCommonjsModule(function (module, exports) {
  2260. exports.__esModule = true;
  2261. exports.default = void 0;
  2262. var PropTypes$$1 = _interopRequireWildcard(propTypes);
  2263. var _addClass = _interopRequireDefault(addClass_1);
  2264. var _removeClass = _interopRequireDefault(removeClass);
  2265. var _react = _interopRequireDefault(React__default);
  2266. var _Transition = _interopRequireDefault(Transition_1);
  2267. function _interopRequireDefault(obj) {
  2268. return obj && obj.__esModule ? obj : {
  2269. default: obj
  2270. };
  2271. }
  2272. function _interopRequireWildcard(obj) {
  2273. if (obj && obj.__esModule) {
  2274. return obj;
  2275. } else {
  2276. var newObj = {};
  2277. if (obj != null) {
  2278. for (var key in obj) {
  2279. if (Object.prototype.hasOwnProperty.call(obj, key)) {
  2280. var desc = Object.defineProperty && Object.getOwnPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : {};
  2281. if (desc.get || desc.set) {
  2282. Object.defineProperty(newObj, key, desc);
  2283. } else {
  2284. newObj[key] = obj[key];
  2285. }
  2286. }
  2287. }
  2288. }
  2289. newObj.default = obj;
  2290. return newObj;
  2291. }
  2292. }
  2293. function _inheritsLoose(subClass, superClass) {
  2294. subClass.prototype = Object.create(superClass.prototype);
  2295. subClass.prototype.constructor = subClass;
  2296. subClass.__proto__ = superClass;
  2297. }
  2298. function _extends() {
  2299. _extends = Object.assign || function (target) {
  2300. for (var i = 1; i < arguments.length; i++) {
  2301. var source = arguments[i];
  2302. for (var key in source) {
  2303. if (Object.prototype.hasOwnProperty.call(source, key)) {
  2304. target[key] = source[key];
  2305. }
  2306. }
  2307. }
  2308. return target;
  2309. };
  2310. return _extends.apply(this, arguments);
  2311. }
  2312. var addClass = function addClass(node, classes) {
  2313. return node && classes && classes.split(' ').forEach(function (c) {
  2314. return (0, _addClass.default)(node, c);
  2315. });
  2316. };
  2317. var removeClass$$1 = function removeClass$$1(node, classes) {
  2318. return node && classes && classes.split(' ').forEach(function (c) {
  2319. return (0, _removeClass.default)(node, c);
  2320. });
  2321. };
  2322. /**
  2323. * A `Transition` component using CSS transitions and animations.
  2324. * It's inspired by the excellent [ng-animate](http://www.nganimate.org/) library.
  2325. *
  2326. * `CSSTransition` applies a pair of class names during the `appear`, `enter`,
  2327. * and `exit` stages of the transition. The first class is applied and then a
  2328. * second "active" class in order to activate the css animation. After the animation,
  2329. * matching `done` class names are applied to persist the animation state.
  2330. *
  2331. * When the `in` prop is toggled to `true` the Component will get
  2332. * the `example-enter` CSS class and the `example-enter-active` CSS class
  2333. * added in the next tick. This is a convention based on the `classNames` prop.
  2334. */
  2335. var CSSTransition =
  2336. /*#__PURE__*/
  2337. function (_React$Component) {
  2338. _inheritsLoose(CSSTransition, _React$Component);
  2339. function CSSTransition() {
  2340. var _this;
  2341. for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
  2342. args[_key] = arguments[_key];
  2343. }
  2344. _this = _React$Component.call.apply(_React$Component, [this].concat(args)) || this;
  2345. _this.onEnter = function (node, appearing) {
  2346. var _this$getClassNames = _this.getClassNames(appearing ? 'appear' : 'enter'),
  2347. className = _this$getClassNames.className;
  2348. _this.removeClasses(node, 'exit');
  2349. addClass(node, className);
  2350. if (_this.props.onEnter) {
  2351. _this.props.onEnter(node, appearing);
  2352. }
  2353. };
  2354. _this.onEntering = function (node, appearing) {
  2355. var _this$getClassNames2 = _this.getClassNames(appearing ? 'appear' : 'enter'),
  2356. activeClassName = _this$getClassNames2.activeClassName;
  2357. _this.reflowAndAddClass(node, activeClassName);
  2358. if (_this.props.onEntering) {
  2359. _this.props.onEntering(node, appearing);
  2360. }
  2361. };
  2362. _this.onEntered = function (node, appearing) {
  2363. var _this$getClassNames3 = _this.getClassNames('enter'),
  2364. doneClassName = _this$getClassNames3.doneClassName;
  2365. _this.removeClasses(node, appearing ? 'appear' : 'enter');
  2366. addClass(node, doneClassName);
  2367. if (_this.props.onEntered) {
  2368. _this.props.onEntered(node, appearing);
  2369. }
  2370. };
  2371. _this.onExit = function (node) {
  2372. var _this$getClassNames4 = _this.getClassNames('exit'),
  2373. className = _this$getClassNames4.className;
  2374. _this.removeClasses(node, 'appear');
  2375. _this.removeClasses(node, 'enter');
  2376. addClass(node, className);
  2377. if (_this.props.onExit) {
  2378. _this.props.onExit(node);
  2379. }
  2380. };
  2381. _this.onExiting = function (node) {
  2382. var _this$getClassNames5 = _this.getClassNames('exit'),
  2383. activeClassName = _this$getClassNames5.activeClassName;
  2384. _this.reflowAndAddClass(node, activeClassName);
  2385. if (_this.props.onExiting) {
  2386. _this.props.onExiting(node);
  2387. }
  2388. };
  2389. _this.onExited = function (node) {
  2390. var _this$getClassNames6 = _this.getClassNames('exit'),
  2391. doneClassName = _this$getClassNames6.doneClassName;
  2392. _this.removeClasses(node, 'exit');
  2393. addClass(node, doneClassName);
  2394. if (_this.props.onExited) {
  2395. _this.props.onExited(node);
  2396. }
  2397. };
  2398. _this.getClassNames = function (type) {
  2399. var classNames = _this.props.classNames;
  2400. var className = typeof classNames !== 'string' ? classNames[type] : classNames + '-' + type;
  2401. var activeClassName = typeof classNames !== 'string' ? classNames[type + 'Active'] : className + '-active';
  2402. var doneClassName = typeof classNames !== 'string' ? classNames[type + 'Done'] : className + '-done';
  2403. return {
  2404. className: className,
  2405. activeClassName: activeClassName,
  2406. doneClassName: doneClassName
  2407. };
  2408. };
  2409. return _this;
  2410. }
  2411. var _proto = CSSTransition.prototype;
  2412. _proto.removeClasses = function removeClasses(node, type) {
  2413. var _this$getClassNames7 = this.getClassNames(type),
  2414. className = _this$getClassNames7.className,
  2415. activeClassName = _this$getClassNames7.activeClassName,
  2416. doneClassName = _this$getClassNames7.doneClassName;
  2417. className && removeClass$$1(node, className);
  2418. activeClassName && removeClass$$1(node, activeClassName);
  2419. doneClassName && removeClass$$1(node, doneClassName);
  2420. };
  2421. _proto.reflowAndAddClass = function reflowAndAddClass(node, className) {
  2422. // This is for to force a repaint,
  2423. // which is necessary in order to transition styles when adding a class name.
  2424. if (className) {
  2425. /* eslint-disable no-unused-expressions */
  2426. node && node.scrollTop;
  2427. /* eslint-enable no-unused-expressions */
  2428. addClass(node, className);
  2429. }
  2430. };
  2431. _proto.render = function render() {
  2432. var props = _extends({}, this.props);
  2433. delete props.classNames;
  2434. return _react.default.createElement(_Transition.default, _extends({}, props, {
  2435. onEnter: this.onEnter,
  2436. onEntered: this.onEntered,
  2437. onEntering: this.onEntering,
  2438. onExit: this.onExit,
  2439. onExiting: this.onExiting,
  2440. onExited: this.onExited
  2441. }));
  2442. };
  2443. return CSSTransition;
  2444. }(_react.default.Component);
  2445. CSSTransition.propTypes = {};
  2446. var _default = CSSTransition;
  2447. exports.default = _default;
  2448. module.exports = exports["default"];
  2449. });
  2450. unwrapExports(CSSTransition_1);
  2451. var ChildMapping = createCommonjsModule(function (module, exports) {
  2452. exports.__esModule = true;
  2453. exports.getChildMapping = getChildMapping;
  2454. exports.mergeChildMappings = mergeChildMappings;
  2455. exports.getInitialChildMapping = getInitialChildMapping;
  2456. exports.getNextChildMapping = getNextChildMapping;
  2457. /**
  2458. * Given `this.props.children`, return an object mapping key to child.
  2459. *
  2460. * @param {*} children `this.props.children`
  2461. * @return {object} Mapping of key to child
  2462. */
  2463. function getChildMapping(children, mapFn) {
  2464. var mapper = function mapper(child) {
  2465. return mapFn && (0, React__default.isValidElement)(child) ? mapFn(child) : child;
  2466. };
  2467. var result = Object.create(null);
  2468. if (children) React__default.Children.map(children, function (c) {
  2469. return c;
  2470. }).forEach(function (child) {
  2471. // run the map function here instead so that the key is the computed one
  2472. result[child.key] = mapper(child);
  2473. });
  2474. return result;
  2475. }
  2476. /**
  2477. * When you're adding or removing children some may be added or removed in the
  2478. * same render pass. We want to show *both* since we want to simultaneously
  2479. * animate elements in and out. This function takes a previous set of keys
  2480. * and a new set of keys and merges them with its best guess of the correct
  2481. * ordering. In the future we may expose some of the utilities in
  2482. * ReactMultiChild to make this easy, but for now React itself does not
  2483. * directly have this concept of the union of prevChildren and nextChildren
  2484. * so we implement it here.
  2485. *
  2486. * @param {object} prev prev children as returned from
  2487. * `ReactTransitionChildMapping.getChildMapping()`.
  2488. * @param {object} next next children as returned from
  2489. * `ReactTransitionChildMapping.getChildMapping()`.
  2490. * @return {object} a key set that contains all keys in `prev` and all keys
  2491. * in `next` in a reasonable order.
  2492. */
  2493. function mergeChildMappings(prev, next) {
  2494. prev = prev || {};
  2495. next = next || {};
  2496. function getValueForKey(key) {
  2497. return key in next ? next[key] : prev[key];
  2498. } // For each key of `next`, the list of keys to insert before that key in
  2499. // the combined list
  2500. var nextKeysPending = Object.create(null);
  2501. var pendingKeys = [];
  2502. for (var prevKey in prev) {
  2503. if (prevKey in next) {
  2504. if (pendingKeys.length) {
  2505. nextKeysPending[prevKey] = pendingKeys;
  2506. pendingKeys = [];
  2507. }
  2508. } else {
  2509. pendingKeys.push(prevKey);
  2510. }
  2511. }
  2512. var i;
  2513. var childMapping = {};
  2514. for (var nextKey in next) {
  2515. if (nextKeysPending[nextKey]) {
  2516. for (i = 0; i < nextKeysPending[nextKey].length; i++) {
  2517. var pendingNextKey = nextKeysPending[nextKey][i];
  2518. childMapping[nextKeysPending[nextKey][i]] = getValueForKey(pendingNextKey);
  2519. }
  2520. }
  2521. childMapping[nextKey] = getValueForKey(nextKey);
  2522. } // Finally, add the keys which didn't appear before any key in `next`
  2523. for (i = 0; i < pendingKeys.length; i++) {
  2524. childMapping[pendingKeys[i]] = getValueForKey(pendingKeys[i]);
  2525. }
  2526. return childMapping;
  2527. }
  2528. function getProp(child, prop, props) {
  2529. return props[prop] != null ? props[prop] : child.props[prop];
  2530. }
  2531. function getInitialChildMapping(props, onExited) {
  2532. return getChildMapping(props.children, function (child) {
  2533. return (0, React__default.cloneElement)(child, {
  2534. onExited: onExited.bind(null, child),
  2535. in: true,
  2536. appear: getProp(child, 'appear', props),
  2537. enter: getProp(child, 'enter', props),
  2538. exit: getProp(child, 'exit', props)
  2539. });
  2540. });
  2541. }
  2542. function getNextChildMapping(nextProps, prevChildMapping, onExited) {
  2543. var nextChildMapping = getChildMapping(nextProps.children);
  2544. var children = mergeChildMappings(prevChildMapping, nextChildMapping);
  2545. Object.keys(children).forEach(function (key) {
  2546. var child = children[key];
  2547. if (!(0, React__default.isValidElement)(child)) return;
  2548. var hasPrev = key in prevChildMapping;
  2549. var hasNext = key in nextChildMapping;
  2550. var prevChild = prevChildMapping[key];
  2551. var isLeaving = (0, React__default.isValidElement)(prevChild) && !prevChild.props.in; // item is new (entering)
  2552. if (hasNext && (!hasPrev || isLeaving)) {
  2553. // console.log('entering', key)
  2554. children[key] = (0, React__default.cloneElement)(child, {
  2555. onExited: onExited.bind(null, child),
  2556. in: true,
  2557. exit: getProp(child, 'exit', nextProps),
  2558. enter: getProp(child, 'enter', nextProps)
  2559. });
  2560. } else if (!hasNext && hasPrev && !isLeaving) {
  2561. // item is old (exiting)
  2562. // console.log('leaving', key)
  2563. children[key] = (0, React__default.cloneElement)(child, {
  2564. in: false
  2565. });
  2566. } else if (hasNext && hasPrev && (0, React__default.isValidElement)(prevChild)) {
  2567. // item hasn't changed transition states
  2568. // copy over the last transition props;
  2569. // console.log('unchanged', key)
  2570. children[key] = (0, React__default.cloneElement)(child, {
  2571. onExited: onExited.bind(null, child),
  2572. in: prevChild.props.in,
  2573. exit: getProp(child, 'exit', nextProps),
  2574. enter: getProp(child, 'enter', nextProps)
  2575. });
  2576. }
  2577. });
  2578. return children;
  2579. }
  2580. });
  2581. unwrapExports(ChildMapping);
  2582. var ChildMapping_1 = ChildMapping.getChildMapping;
  2583. var ChildMapping_2 = ChildMapping.mergeChildMappings;
  2584. var ChildMapping_3 = ChildMapping.getInitialChildMapping;
  2585. var ChildMapping_4 = ChildMapping.getNextChildMapping;
  2586. var TransitionGroup_1 = createCommonjsModule(function (module, exports) {
  2587. exports.__esModule = true;
  2588. exports.default = void 0;
  2589. var _propTypes = _interopRequireDefault(propTypes);
  2590. var _react = _interopRequireDefault(React__default);
  2591. function _interopRequireDefault(obj) {
  2592. return obj && obj.__esModule ? obj : {
  2593. default: obj
  2594. };
  2595. }
  2596. function _objectWithoutPropertiesLoose(source, excluded) {
  2597. if (source == null) return {};
  2598. var target = {};
  2599. var sourceKeys = Object.keys(source);
  2600. var key, i;
  2601. for (i = 0; i < sourceKeys.length; i++) {
  2602. key = sourceKeys[i];
  2603. if (excluded.indexOf(key) >= 0) continue;
  2604. target[key] = source[key];
  2605. }
  2606. return target;
  2607. }
  2608. function _extends() {
  2609. _extends = Object.assign || function (target) {
  2610. for (var i = 1; i < arguments.length; i++) {
  2611. var source = arguments[i];
  2612. for (var key in source) {
  2613. if (Object.prototype.hasOwnProperty.call(source, key)) {
  2614. target[key] = source[key];
  2615. }
  2616. }
  2617. }
  2618. return target;
  2619. };
  2620. return _extends.apply(this, arguments);
  2621. }
  2622. function _inheritsLoose(subClass, superClass) {
  2623. subClass.prototype = Object.create(superClass.prototype);
  2624. subClass.prototype.constructor = subClass;
  2625. subClass.__proto__ = superClass;
  2626. }
  2627. function _assertThisInitialized(self) {
  2628. if (self === void 0) {
  2629. throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
  2630. }
  2631. return self;
  2632. }
  2633. var values = Object.values || function (obj) {
  2634. return Object.keys(obj).map(function (k) {
  2635. return obj[k];
  2636. });
  2637. };
  2638. var defaultProps = {
  2639. component: 'div',
  2640. childFactory: function childFactory(child) {
  2641. return child;
  2642. }
  2643. /**
  2644. * The `<TransitionGroup>` component manages a set of transition components
  2645. * (`<Transition>` and `<CSSTransition>`) in a list. Like with the transition
  2646. * components, `<TransitionGroup>` is a state machine for managing the mounting
  2647. * and unmounting of components over time.
  2648. *
  2649. * Consider the example below. As items are removed or added to the TodoList the
  2650. * `in` prop is toggled automatically by the `<TransitionGroup>`.
  2651. *
  2652. * Note that `<TransitionGroup>` does not define any animation behavior!
  2653. * Exactly _how_ a list item animates is up to the individual transition
  2654. * component. This means you can mix and match animations across different list
  2655. * items.
  2656. */
  2657. };
  2658. var TransitionGroup =
  2659. /*#__PURE__*/
  2660. function (_React$Component) {
  2661. _inheritsLoose(TransitionGroup, _React$Component);
  2662. function TransitionGroup(props, context) {
  2663. var _this;
  2664. _this = _React$Component.call(this, props, context) || this;
  2665. var handleExited = _this.handleExited.bind(_assertThisInitialized(_assertThisInitialized(_this))); // Initial children should all be entering, dependent on appear
  2666. _this.state = {
  2667. handleExited: handleExited,
  2668. firstRender: true
  2669. };
  2670. return _this;
  2671. }
  2672. var _proto = TransitionGroup.prototype;
  2673. _proto.getChildContext = function getChildContext() {
  2674. return {
  2675. transitionGroup: {
  2676. isMounting: !this.appeared
  2677. }
  2678. };
  2679. };
  2680. _proto.componentDidMount = function componentDidMount() {
  2681. this.appeared = true;
  2682. this.mounted = true;
  2683. };
  2684. _proto.componentWillUnmount = function componentWillUnmount() {
  2685. this.mounted = false;
  2686. };
  2687. TransitionGroup.getDerivedStateFromProps = function getDerivedStateFromProps(nextProps, _ref) {
  2688. var prevChildMapping = _ref.children,
  2689. handleExited = _ref.handleExited,
  2690. firstRender = _ref.firstRender;
  2691. return {
  2692. children: firstRender ? (0, ChildMapping.getInitialChildMapping)(nextProps, handleExited) : (0, ChildMapping.getNextChildMapping)(nextProps, prevChildMapping, handleExited),
  2693. firstRender: false
  2694. };
  2695. };
  2696. _proto.handleExited = function handleExited(child, node) {
  2697. var currentChildMapping = (0, ChildMapping.getChildMapping)(this.props.children);
  2698. if (child.key in currentChildMapping) return;
  2699. if (child.props.onExited) {
  2700. child.props.onExited(node);
  2701. }
  2702. if (this.mounted) {
  2703. this.setState(function (state) {
  2704. var children = _extends({}, state.children);
  2705. delete children[child.key];
  2706. return {
  2707. children: children
  2708. };
  2709. });
  2710. }
  2711. };
  2712. _proto.render = function render() {
  2713. var _this$props = this.props,
  2714. Component = _this$props.component,
  2715. childFactory = _this$props.childFactory,
  2716. props = _objectWithoutPropertiesLoose(_this$props, ["component", "childFactory"]);
  2717. var children = values(this.state.children).map(childFactory);
  2718. delete props.appear;
  2719. delete props.enter;
  2720. delete props.exit;
  2721. if (Component === null) {
  2722. return children;
  2723. }
  2724. return _react.default.createElement(Component, props, children);
  2725. };
  2726. return TransitionGroup;
  2727. }(_react.default.Component);
  2728. TransitionGroup.childContextTypes = {
  2729. transitionGroup: _propTypes.default.object.isRequired
  2730. };
  2731. TransitionGroup.propTypes = {};
  2732. TransitionGroup.defaultProps = defaultProps;
  2733. var _default = (0, reactLifecyclesCompat_es.polyfill)(TransitionGroup);
  2734. exports.default = _default;
  2735. module.exports = exports["default"];
  2736. });
  2737. unwrapExports(TransitionGroup_1);
  2738. var ReplaceTransition_1 = createCommonjsModule(function (module, exports) {
  2739. exports.__esModule = true;
  2740. exports.default = void 0;
  2741. var _propTypes = _interopRequireDefault(propTypes);
  2742. var _react = _interopRequireDefault(React__default);
  2743. var _TransitionGroup = _interopRequireDefault(TransitionGroup_1);
  2744. function _interopRequireDefault(obj) {
  2745. return obj && obj.__esModule ? obj : {
  2746. default: obj
  2747. };
  2748. }
  2749. function _objectWithoutPropertiesLoose(source, excluded) {
  2750. if (source == null) return {};
  2751. var target = {};
  2752. var sourceKeys = Object.keys(source);
  2753. var key, i;
  2754. for (i = 0; i < sourceKeys.length; i++) {
  2755. key = sourceKeys[i];
  2756. if (excluded.indexOf(key) >= 0) continue;
  2757. target[key] = source[key];
  2758. }
  2759. return target;
  2760. }
  2761. function _inheritsLoose(subClass, superClass) {
  2762. subClass.prototype = Object.create(superClass.prototype);
  2763. subClass.prototype.constructor = subClass;
  2764. subClass.__proto__ = superClass;
  2765. }
  2766. /**
  2767. * The `<ReplaceTransition>` component is a specialized `Transition` component
  2768. * that animates between two children.
  2769. *
  2770. * ```jsx
  2771. * <ReplaceTransition in>
  2772. * <Fade><div>I appear first</div></Fade>
  2773. * <Fade><div>I replace the above</div></Fade>
  2774. * </ReplaceTransition>
  2775. * ```
  2776. */
  2777. var ReplaceTransition =
  2778. /*#__PURE__*/
  2779. function (_React$Component) {
  2780. _inheritsLoose(ReplaceTransition, _React$Component);
  2781. function ReplaceTransition() {
  2782. var _this;
  2783. for (var _len = arguments.length, _args = new Array(_len), _key = 0; _key < _len; _key++) {
  2784. _args[_key] = arguments[_key];
  2785. }
  2786. _this = _React$Component.call.apply(_React$Component, [this].concat(_args)) || this;
  2787. _this.handleEnter = function () {
  2788. for (var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {
  2789. args[_key2] = arguments[_key2];
  2790. }
  2791. return _this.handleLifecycle('onEnter', 0, args);
  2792. };
  2793. _this.handleEntering = function () {
  2794. for (var _len3 = arguments.length, args = new Array(_len3), _key3 = 0; _key3 < _len3; _key3++) {
  2795. args[_key3] = arguments[_key3];
  2796. }
  2797. return _this.handleLifecycle('onEntering', 0, args);
  2798. };
  2799. _this.handleEntered = function () {
  2800. for (var _len4 = arguments.length, args = new Array(_len4), _key4 = 0; _key4 < _len4; _key4++) {
  2801. args[_key4] = arguments[_key4];
  2802. }
  2803. return _this.handleLifecycle('onEntered', 0, args);
  2804. };
  2805. _this.handleExit = function () {
  2806. for (var _len5 = arguments.length, args = new Array(_len5), _key5 = 0; _key5 < _len5; _key5++) {
  2807. args[_key5] = arguments[_key5];
  2808. }
  2809. return _this.handleLifecycle('onExit', 1, args);
  2810. };
  2811. _this.handleExiting = function () {
  2812. for (var _len6 = arguments.length, args = new Array(_len6), _key6 = 0; _key6 < _len6; _key6++) {
  2813. args[_key6] = arguments[_key6];
  2814. }
  2815. return _this.handleLifecycle('onExiting', 1, args);
  2816. };
  2817. _this.handleExited = function () {
  2818. for (var _len7 = arguments.length, args = new Array(_len7), _key7 = 0; _key7 < _len7; _key7++) {
  2819. args[_key7] = arguments[_key7];
  2820. }
  2821. return _this.handleLifecycle('onExited', 1, args);
  2822. };
  2823. return _this;
  2824. }
  2825. var _proto = ReplaceTransition.prototype;
  2826. _proto.handleLifecycle = function handleLifecycle(handler, idx, originalArgs) {
  2827. var _child$props;
  2828. var children = this.props.children;
  2829. var child = _react.default.Children.toArray(children)[idx];
  2830. if (child.props[handler]) (_child$props = child.props)[handler].apply(_child$props, originalArgs);
  2831. if (this.props[handler]) this.props[handler]((0, ReactDOM.findDOMNode)(this));
  2832. };
  2833. _proto.render = function render() {
  2834. var _this$props = this.props,
  2835. children = _this$props.children,
  2836. inProp = _this$props.in,
  2837. props = _objectWithoutPropertiesLoose(_this$props, ["children", "in"]);
  2838. var _React$Children$toArr = _react.default.Children.toArray(children),
  2839. first = _React$Children$toArr[0],
  2840. second = _React$Children$toArr[1];
  2841. delete props.onEnter;
  2842. delete props.onEntering;
  2843. delete props.onEntered;
  2844. delete props.onExit;
  2845. delete props.onExiting;
  2846. delete props.onExited;
  2847. return _react.default.createElement(_TransitionGroup.default, props, inProp ? _react.default.cloneElement(first, {
  2848. key: 'first',
  2849. onEnter: this.handleEnter,
  2850. onEntering: this.handleEntering,
  2851. onEntered: this.handleEntered
  2852. }) : _react.default.cloneElement(second, {
  2853. key: 'second',
  2854. onEnter: this.handleExit,
  2855. onEntering: this.handleExiting,
  2856. onEntered: this.handleExited
  2857. }));
  2858. };
  2859. return ReplaceTransition;
  2860. }(_react.default.Component);
  2861. ReplaceTransition.propTypes = {};
  2862. var _default = ReplaceTransition;
  2863. exports.default = _default;
  2864. module.exports = exports["default"];
  2865. });
  2866. unwrapExports(ReplaceTransition_1);
  2867. var reactTransitionGroup = createCommonjsModule(function (module) {
  2868. var _CSSTransition = _interopRequireDefault(CSSTransition_1);
  2869. var _ReplaceTransition = _interopRequireDefault(ReplaceTransition_1);
  2870. var _TransitionGroup = _interopRequireDefault(TransitionGroup_1);
  2871. var _Transition = _interopRequireDefault(Transition_1);
  2872. function _interopRequireDefault(obj) {
  2873. return obj && obj.__esModule ? obj : {
  2874. default: obj
  2875. };
  2876. }
  2877. module.exports = {
  2878. Transition: _Transition.default,
  2879. TransitionGroup: _TransitionGroup.default,
  2880. ReplaceTransition: _ReplaceTransition.default,
  2881. CSSTransition: _CSSTransition.default
  2882. };
  2883. });
  2884. unwrapExports(reactTransitionGroup);
  2885. var reactTransitionGroup_1 = reactTransitionGroup.Transition;
  2886. var reactTransitionGroup_2 = reactTransitionGroup.TransitionGroup;
  2887. var reactTransitionGroup_3 = reactTransitionGroup.ReplaceTransition;
  2888. var reactTransitionGroup_4 = reactTransitionGroup.CSSTransition;
  2889. var propTypes$k = _extends({}, reactTransitionGroup_1.propTypes, {
  2890. children: propTypes.oneOfType([propTypes.arrayOf(propTypes.node), propTypes.node]),
  2891. tag: tagPropType,
  2892. baseClass: propTypes.string,
  2893. baseClassActive: propTypes.string,
  2894. className: propTypes.string,
  2895. cssModule: propTypes.object,
  2896. innerRef: propTypes.oneOfType([propTypes.object, propTypes.string, propTypes.func])
  2897. });
  2898. var defaultProps$i = _extends({}, reactTransitionGroup_1.defaultProps, {
  2899. tag: 'div',
  2900. baseClass: 'fade',
  2901. baseClassActive: 'show',
  2902. timeout: TransitionTimeouts.Fade,
  2903. appear: true,
  2904. enter: true,
  2905. exit: true,
  2906. in: true
  2907. });
  2908. function Fade(props) {
  2909. var Tag = props.tag,
  2910. baseClass = props.baseClass,
  2911. baseClassActive = props.baseClassActive,
  2912. className = props.className,
  2913. cssModule = props.cssModule,
  2914. children = props.children,
  2915. innerRef = props.innerRef,
  2916. otherProps = _objectWithoutPropertiesLoose(props, ["tag", "baseClass", "baseClassActive", "className", "cssModule", "children", "innerRef"]);
  2917. var transitionProps = pick(otherProps, TransitionPropTypeKeys);
  2918. var childProps = omit(otherProps, TransitionPropTypeKeys);
  2919. return React__default.createElement(reactTransitionGroup_1, transitionProps, function (status) {
  2920. var isActive = status === 'entered';
  2921. var classes = mapToCssModules(classnames(className, baseClass, isActive && baseClassActive), cssModule);
  2922. return React__default.createElement(Tag, _extends({
  2923. className: classes
  2924. }, childProps, {
  2925. ref: innerRef
  2926. }), children);
  2927. });
  2928. }
  2929. Fade.propTypes = propTypes$k;
  2930. Fade.defaultProps = defaultProps$i;
  2931. var propTypes$l = {
  2932. color: propTypes.string,
  2933. pill: propTypes.bool,
  2934. tag: tagPropType,
  2935. innerRef: propTypes.oneOfType([propTypes.object, propTypes.func, propTypes.string]),
  2936. children: propTypes.node,
  2937. className: propTypes.string,
  2938. cssModule: propTypes.object
  2939. };
  2940. var defaultProps$j = {
  2941. color: 'secondary',
  2942. pill: false,
  2943. tag: 'span'
  2944. };
  2945. var Badge = function Badge(props) {
  2946. var className = props.className,
  2947. cssModule = props.cssModule,
  2948. color = props.color,
  2949. innerRef = props.innerRef,
  2950. pill = props.pill,
  2951. Tag = props.tag,
  2952. attributes = _objectWithoutPropertiesLoose(props, ["className", "cssModule", "color", "innerRef", "pill", "tag"]);
  2953. var classes = mapToCssModules(classnames(className, 'badge', 'badge-' + color, pill ? 'badge-pill' : false), cssModule);
  2954. if (attributes.href && Tag === 'span') {
  2955. Tag = 'a';
  2956. }
  2957. return React__default.createElement(Tag, _extends({}, attributes, {
  2958. className: classes,
  2959. ref: innerRef
  2960. }));
  2961. };
  2962. Badge.propTypes = propTypes$l;
  2963. Badge.defaultProps = defaultProps$j;
  2964. var propTypes$m = {
  2965. tag: tagPropType,
  2966. inverse: propTypes.bool,
  2967. color: propTypes.string,
  2968. block: deprecated(propTypes.bool, 'Please use the props "body"'),
  2969. body: propTypes.bool,
  2970. outline: propTypes.bool,
  2971. className: propTypes.string,
  2972. cssModule: propTypes.object,
  2973. innerRef: propTypes.oneOfType([propTypes.object, propTypes.string, propTypes.func])
  2974. };
  2975. var defaultProps$k = {
  2976. tag: 'div'
  2977. };
  2978. var Card = function Card(props) {
  2979. var className = props.className,
  2980. cssModule = props.cssModule,
  2981. color = props.color,
  2982. block = props.block,
  2983. body = props.body,
  2984. inverse = props.inverse,
  2985. outline = props.outline,
  2986. Tag = props.tag,
  2987. innerRef = props.innerRef,
  2988. attributes = _objectWithoutPropertiesLoose(props, ["className", "cssModule", "color", "block", "body", "inverse", "outline", "tag", "innerRef"]);
  2989. var classes = mapToCssModules(classnames(className, 'card', inverse ? 'text-white' : false, block || body ? 'card-body' : false, color ? (outline ? 'border' : 'bg') + "-" + color : false), cssModule);
  2990. return React__default.createElement(Tag, _extends({}, attributes, {
  2991. className: classes,
  2992. ref: innerRef
  2993. }));
  2994. };
  2995. Card.propTypes = propTypes$m;
  2996. Card.defaultProps = defaultProps$k;
  2997. var propTypes$n = {
  2998. tag: tagPropType,
  2999. className: propTypes.string,
  3000. cssModule: propTypes.object
  3001. };
  3002. var defaultProps$l = {
  3003. tag: 'div'
  3004. };
  3005. var CardGroup = function CardGroup(props) {
  3006. var className = props.className,
  3007. cssModule = props.cssModule,
  3008. Tag = props.tag,
  3009. attributes = _objectWithoutPropertiesLoose(props, ["className", "cssModule", "tag"]);
  3010. var classes = mapToCssModules(classnames(className, 'card-group'), cssModule);
  3011. return React__default.createElement(Tag, _extends({}, attributes, {
  3012. className: classes
  3013. }));
  3014. };
  3015. CardGroup.propTypes = propTypes$n;
  3016. CardGroup.defaultProps = defaultProps$l;
  3017. var propTypes$o = {
  3018. tag: tagPropType,
  3019. className: propTypes.string,
  3020. cssModule: propTypes.object
  3021. };
  3022. var defaultProps$m = {
  3023. tag: 'div'
  3024. };
  3025. var CardDeck = function CardDeck(props) {
  3026. var className = props.className,
  3027. cssModule = props.cssModule,
  3028. Tag = props.tag,
  3029. attributes = _objectWithoutPropertiesLoose(props, ["className", "cssModule", "tag"]);
  3030. var classes = mapToCssModules(classnames(className, 'card-deck'), cssModule);
  3031. return React__default.createElement(Tag, _extends({}, attributes, {
  3032. className: classes
  3033. }));
  3034. };
  3035. CardDeck.propTypes = propTypes$o;
  3036. CardDeck.defaultProps = defaultProps$m;
  3037. var propTypes$p = {
  3038. tag: tagPropType,
  3039. className: propTypes.string,
  3040. cssModule: propTypes.object
  3041. };
  3042. var defaultProps$n = {
  3043. tag: 'div'
  3044. };
  3045. var CardColumns = function CardColumns(props) {
  3046. var className = props.className,
  3047. cssModule = props.cssModule,
  3048. Tag = props.tag,
  3049. attributes = _objectWithoutPropertiesLoose(props, ["className", "cssModule", "tag"]);
  3050. var classes = mapToCssModules(classnames(className, 'card-columns'), cssModule);
  3051. return React__default.createElement(Tag, _extends({}, attributes, {
  3052. className: classes
  3053. }));
  3054. };
  3055. CardColumns.propTypes = propTypes$p;
  3056. CardColumns.defaultProps = defaultProps$n;
  3057. var propTypes$q = {
  3058. tag: tagPropType,
  3059. className: propTypes.string,
  3060. cssModule: propTypes.object,
  3061. innerRef: propTypes.oneOfType([propTypes.object, propTypes.string, propTypes.func])
  3062. };
  3063. var defaultProps$o = {
  3064. tag: 'div'
  3065. };
  3066. var CardBody = function CardBody(props) {
  3067. var className = props.className,
  3068. cssModule = props.cssModule,
  3069. innerRef = props.innerRef,
  3070. Tag = props.tag,
  3071. attributes = _objectWithoutPropertiesLoose(props, ["className", "cssModule", "innerRef", "tag"]);
  3072. var classes = mapToCssModules(classnames(className, 'card-body'), cssModule);
  3073. return React__default.createElement(Tag, _extends({}, attributes, {
  3074. className: classes,
  3075. ref: innerRef
  3076. }));
  3077. };
  3078. CardBody.propTypes = propTypes$q;
  3079. CardBody.defaultProps = defaultProps$o;
  3080. function CardBlock(props) {
  3081. warnOnce('The "CardBlock" component has been deprecated.\nPlease use component "CardBody".');
  3082. return React__default.createElement(CardBody, props);
  3083. }
  3084. var propTypes$r = {
  3085. tag: tagPropType,
  3086. innerRef: propTypes.oneOfType([propTypes.object, propTypes.func, propTypes.string]),
  3087. className: propTypes.string,
  3088. cssModule: propTypes.object
  3089. };
  3090. var defaultProps$p = {
  3091. tag: 'a'
  3092. };
  3093. var CardLink = function CardLink(props) {
  3094. var className = props.className,
  3095. cssModule = props.cssModule,
  3096. Tag = props.tag,
  3097. innerRef = props.innerRef,
  3098. attributes = _objectWithoutPropertiesLoose(props, ["className", "cssModule", "tag", "innerRef"]);
  3099. var classes = mapToCssModules(classnames(className, 'card-link'), cssModule);
  3100. return React__default.createElement(Tag, _extends({}, attributes, {
  3101. ref: innerRef,
  3102. className: classes
  3103. }));
  3104. };
  3105. CardLink.propTypes = propTypes$r;
  3106. CardLink.defaultProps = defaultProps$p;
  3107. var propTypes$s = {
  3108. tag: tagPropType,
  3109. className: propTypes.string,
  3110. cssModule: propTypes.object
  3111. };
  3112. var defaultProps$q = {
  3113. tag: 'div'
  3114. };
  3115. var CardFooter = function CardFooter(props) {
  3116. var className = props.className,
  3117. cssModule = props.cssModule,
  3118. Tag = props.tag,
  3119. attributes = _objectWithoutPropertiesLoose(props, ["className", "cssModule", "tag"]);
  3120. var classes = mapToCssModules(classnames(className, 'card-footer'), cssModule);
  3121. return React__default.createElement(Tag, _extends({}, attributes, {
  3122. className: classes
  3123. }));
  3124. };
  3125. CardFooter.propTypes = propTypes$s;
  3126. CardFooter.defaultProps = defaultProps$q;
  3127. var propTypes$t = {
  3128. tag: tagPropType,
  3129. className: propTypes.string,
  3130. cssModule: propTypes.object
  3131. };
  3132. var defaultProps$r = {
  3133. tag: 'div'
  3134. };
  3135. var CardHeader = function CardHeader(props) {
  3136. var className = props.className,
  3137. cssModule = props.cssModule,
  3138. Tag = props.tag,
  3139. attributes = _objectWithoutPropertiesLoose(props, ["className", "cssModule", "tag"]);
  3140. var classes = mapToCssModules(classnames(className, 'card-header'), cssModule);
  3141. return React__default.createElement(Tag, _extends({}, attributes, {
  3142. className: classes
  3143. }));
  3144. };
  3145. CardHeader.propTypes = propTypes$t;
  3146. CardHeader.defaultProps = defaultProps$r;
  3147. var propTypes$u = {
  3148. tag: tagPropType,
  3149. top: propTypes.bool,
  3150. bottom: propTypes.bool,
  3151. className: propTypes.string,
  3152. cssModule: propTypes.object
  3153. };
  3154. var defaultProps$s = {
  3155. tag: 'img'
  3156. };
  3157. var CardImg = function CardImg(props) {
  3158. var className = props.className,
  3159. cssModule = props.cssModule,
  3160. top = props.top,
  3161. bottom = props.bottom,
  3162. Tag = props.tag,
  3163. attributes = _objectWithoutPropertiesLoose(props, ["className", "cssModule", "top", "bottom", "tag"]);
  3164. var cardImgClassName = 'card-img';
  3165. if (top) {
  3166. cardImgClassName = 'card-img-top';
  3167. }
  3168. if (bottom) {
  3169. cardImgClassName = 'card-img-bottom';
  3170. }
  3171. var classes = mapToCssModules(classnames(className, cardImgClassName), cssModule);
  3172. return React__default.createElement(Tag, _extends({}, attributes, {
  3173. className: classes
  3174. }));
  3175. };
  3176. CardImg.propTypes = propTypes$u;
  3177. CardImg.defaultProps = defaultProps$s;
  3178. var propTypes$v = {
  3179. tag: tagPropType,
  3180. className: propTypes.string,
  3181. cssModule: propTypes.object
  3182. };
  3183. var defaultProps$t = {
  3184. tag: 'div'
  3185. };
  3186. var CardImgOverlay = function CardImgOverlay(props) {
  3187. var className = props.className,
  3188. cssModule = props.cssModule,
  3189. Tag = props.tag,
  3190. attributes = _objectWithoutPropertiesLoose(props, ["className", "cssModule", "tag"]);
  3191. var classes = mapToCssModules(classnames(className, 'card-img-overlay'), cssModule);
  3192. return React__default.createElement(Tag, _extends({}, attributes, {
  3193. className: classes
  3194. }));
  3195. };
  3196. CardImgOverlay.propTypes = propTypes$v;
  3197. CardImgOverlay.defaultProps = defaultProps$t;
  3198. var CarouselItem =
  3199. /*#__PURE__*/
  3200. function (_React$Component) {
  3201. _inheritsLoose(CarouselItem, _React$Component);
  3202. function CarouselItem(props) {
  3203. var _this;
  3204. _this = _React$Component.call(this, props) || this;
  3205. _this.state = {
  3206. startAnimation: false
  3207. };
  3208. _this.onEnter = _this.onEnter.bind(_assertThisInitialized(_assertThisInitialized(_this)));
  3209. _this.onEntering = _this.onEntering.bind(_assertThisInitialized(_assertThisInitialized(_this)));
  3210. _this.onExit = _this.onExit.bind(_assertThisInitialized(_assertThisInitialized(_this)));
  3211. _this.onExiting = _this.onExiting.bind(_assertThisInitialized(_assertThisInitialized(_this)));
  3212. _this.onExited = _this.onExited.bind(_assertThisInitialized(_assertThisInitialized(_this)));
  3213. return _this;
  3214. }
  3215. var _proto = CarouselItem.prototype;
  3216. _proto.onEnter = function onEnter(node, isAppearing) {
  3217. this.setState({
  3218. startAnimation: false
  3219. });
  3220. this.props.onEnter(node, isAppearing);
  3221. };
  3222. _proto.onEntering = function onEntering(node, isAppearing) {
  3223. // getting this variable triggers a reflow
  3224. var offsetHeight = node.offsetHeight;
  3225. this.setState({
  3226. startAnimation: true
  3227. });
  3228. this.props.onEntering(node, isAppearing);
  3229. return offsetHeight;
  3230. };
  3231. _proto.onExit = function onExit(node) {
  3232. this.setState({
  3233. startAnimation: false
  3234. });
  3235. this.props.onExit(node);
  3236. };
  3237. _proto.onExiting = function onExiting(node) {
  3238. this.setState({
  3239. startAnimation: true
  3240. });
  3241. node.dispatchEvent(new CustomEvent('slide.bs.carousel'));
  3242. this.props.onExiting(node);
  3243. };
  3244. _proto.onExited = function onExited(node) {
  3245. node.dispatchEvent(new CustomEvent('slid.bs.carousel'));
  3246. this.props.onExited(node);
  3247. };
  3248. _proto.render = function render() {
  3249. var _this2 = this;
  3250. var _this$props = this.props,
  3251. isIn = _this$props.in,
  3252. children = _this$props.children,
  3253. cssModule = _this$props.cssModule,
  3254. slide = _this$props.slide,
  3255. Tag = _this$props.tag,
  3256. className = _this$props.className,
  3257. transitionProps = _objectWithoutPropertiesLoose(_this$props, ["in", "children", "cssModule", "slide", "tag", "className"]);
  3258. return React__default.createElement(reactTransitionGroup_1, _extends({}, transitionProps, {
  3259. enter: slide,
  3260. exit: slide,
  3261. in: isIn,
  3262. onEnter: this.onEnter,
  3263. onEntering: this.onEntering,
  3264. onExit: this.onExit,
  3265. onExiting: this.onExiting,
  3266. onExited: this.onExited
  3267. }), function (status) {
  3268. var direction = _this2.context.direction;
  3269. var isActive = status === TransitionStatuses.ENTERED || status === TransitionStatuses.EXITING;
  3270. var directionClassName = (status === TransitionStatuses.ENTERING || status === TransitionStatuses.EXITING) && _this2.state.startAnimation && (direction === 'right' ? 'carousel-item-left' : 'carousel-item-right');
  3271. var orderClassName = status === TransitionStatuses.ENTERING && (direction === 'right' ? 'carousel-item-next' : 'carousel-item-prev');
  3272. var itemClasses = mapToCssModules(classnames(className, 'carousel-item', isActive && 'active', directionClassName, orderClassName), cssModule);
  3273. return React__default.createElement(Tag, {
  3274. className: itemClasses
  3275. }, children);
  3276. });
  3277. };
  3278. return CarouselItem;
  3279. }(React__default.Component);
  3280. CarouselItem.propTypes = _extends({}, reactTransitionGroup_1.propTypes, {
  3281. tag: tagPropType,
  3282. in: propTypes.bool,
  3283. cssModule: propTypes.object,
  3284. children: propTypes.node,
  3285. slide: propTypes.bool,
  3286. className: propTypes.string
  3287. });
  3288. CarouselItem.defaultProps = _extends({}, reactTransitionGroup_1.defaultProps, {
  3289. tag: 'div',
  3290. timeout: TransitionTimeouts.Carousel,
  3291. slide: true
  3292. });
  3293. CarouselItem.contextTypes = {
  3294. direction: propTypes.string
  3295. };
  3296. var Carousel =
  3297. /*#__PURE__*/
  3298. function (_React$Component) {
  3299. _inheritsLoose(Carousel, _React$Component);
  3300. function Carousel(props) {
  3301. var _this;
  3302. _this = _React$Component.call(this, props) || this;
  3303. _this.handleKeyPress = _this.handleKeyPress.bind(_assertThisInitialized(_assertThisInitialized(_this)));
  3304. _this.renderItems = _this.renderItems.bind(_assertThisInitialized(_assertThisInitialized(_this)));
  3305. _this.hoverStart = _this.hoverStart.bind(_assertThisInitialized(_assertThisInitialized(_this)));
  3306. _this.hoverEnd = _this.hoverEnd.bind(_assertThisInitialized(_assertThisInitialized(_this)));
  3307. _this.state = {
  3308. direction: 'right',
  3309. indicatorClicked: false
  3310. };
  3311. return _this;
  3312. }
  3313. var _proto = Carousel.prototype;
  3314. _proto.getChildContext = function getChildContext() {
  3315. return {
  3316. direction: this.state.direction
  3317. };
  3318. };
  3319. _proto.componentDidMount = function componentDidMount() {
  3320. // Set up the cycle
  3321. if (this.props.ride === 'carousel') {
  3322. this.setInterval();
  3323. } // TODO: move this to the specific carousel like bootstrap. Currently it will trigger ALL carousels on the page.
  3324. document.addEventListener('keyup', this.handleKeyPress);
  3325. };
  3326. _proto.componentWillReceiveProps = function componentWillReceiveProps(nextProps) {
  3327. this.setInterval(nextProps); // Calculate the direction to turn
  3328. if (this.props.activeIndex + 1 === nextProps.activeIndex) {
  3329. this.setState({
  3330. direction: 'right'
  3331. });
  3332. } else if (this.props.activeIndex - 1 === nextProps.activeIndex) {
  3333. this.setState({
  3334. direction: 'left'
  3335. });
  3336. } else if (this.props.activeIndex > nextProps.activeIndex) {
  3337. this.setState({
  3338. direction: this.state.indicatorClicked ? 'left' : 'right'
  3339. });
  3340. } else if (this.props.activeIndex !== nextProps.activeIndex) {
  3341. this.setState({
  3342. direction: this.state.indicatorClicked ? 'right' : 'left'
  3343. });
  3344. }
  3345. this.setState({
  3346. indicatorClicked: false
  3347. });
  3348. };
  3349. _proto.componentWillUnmount = function componentWillUnmount() {
  3350. this.clearInterval();
  3351. document.removeEventListener('keyup', this.handleKeyPress);
  3352. };
  3353. _proto.setInterval = function (_setInterval) {
  3354. function setInterval() {
  3355. return _setInterval.apply(this, arguments);
  3356. }
  3357. setInterval.toString = function () {
  3358. return _setInterval.toString();
  3359. };
  3360. return setInterval;
  3361. }(function (props) {
  3362. if (props === void 0) {
  3363. props = this.props;
  3364. }
  3365. // make sure not to have multiple intervals going...
  3366. this.clearInterval();
  3367. if (props.interval) {
  3368. this.cycleInterval = setInterval(function () {
  3369. props.next();
  3370. }, parseInt(props.interval, 10));
  3371. }
  3372. });
  3373. _proto.clearInterval = function (_clearInterval) {
  3374. function clearInterval() {
  3375. return _clearInterval.apply(this, arguments);
  3376. }
  3377. clearInterval.toString = function () {
  3378. return _clearInterval.toString();
  3379. };
  3380. return clearInterval;
  3381. }(function () {
  3382. clearInterval(this.cycleInterval);
  3383. });
  3384. _proto.hoverStart = function hoverStart() {
  3385. if (this.props.pause === 'hover') {
  3386. this.clearInterval();
  3387. }
  3388. if (this.props.mouseEnter) {
  3389. var _this$props;
  3390. (_this$props = this.props).mouseEnter.apply(_this$props, arguments);
  3391. }
  3392. };
  3393. _proto.hoverEnd = function hoverEnd() {
  3394. if (this.props.pause === 'hover') {
  3395. this.setInterval();
  3396. }
  3397. if (this.props.mouseLeave) {
  3398. var _this$props2;
  3399. (_this$props2 = this.props).mouseLeave.apply(_this$props2, arguments);
  3400. }
  3401. };
  3402. _proto.handleKeyPress = function handleKeyPress(evt) {
  3403. if (this.props.keyboard) {
  3404. if (evt.keyCode === 37) {
  3405. this.props.previous();
  3406. } else if (evt.keyCode === 39) {
  3407. this.props.next();
  3408. }
  3409. }
  3410. };
  3411. _proto.renderItems = function renderItems(carouselItems, className) {
  3412. var _this2 = this;
  3413. var slide = this.props.slide;
  3414. return React__default.createElement("div", {
  3415. role: "listbox",
  3416. className: className
  3417. }, carouselItems.map(function (item, index) {
  3418. var isIn = index === _this2.props.activeIndex;
  3419. return React__default.cloneElement(item, {
  3420. in: isIn,
  3421. slide: slide
  3422. });
  3423. }));
  3424. };
  3425. _proto.render = function render() {
  3426. var _this3 = this;
  3427. var _this$props3 = this.props,
  3428. cssModule = _this$props3.cssModule,
  3429. slide = _this$props3.slide,
  3430. className = _this$props3.className;
  3431. var outerClasses = mapToCssModules(classnames(className, 'carousel', slide && 'slide'), cssModule);
  3432. var innerClasses = mapToCssModules(classnames('carousel-inner'), cssModule); // filter out booleans, null, or undefined
  3433. var children = this.props.children.filter(function (child) {
  3434. return child !== null && child !== undefined && typeof child !== 'boolean';
  3435. });
  3436. var slidesOnly = children.every(function (child) {
  3437. return child.type === CarouselItem;
  3438. }); // Rendering only slides
  3439. if (slidesOnly) {
  3440. return React__default.createElement("div", {
  3441. className: outerClasses,
  3442. onMouseEnter: this.hoverStart,
  3443. onMouseLeave: this.hoverEnd
  3444. }, this.renderItems(children, innerClasses));
  3445. } // Rendering slides and controls
  3446. if (children[0] instanceof Array) {
  3447. var _carouselItems = children[0];
  3448. var _controlLeft = children[1];
  3449. var _controlRight = children[2];
  3450. return React__default.createElement("div", {
  3451. className: outerClasses,
  3452. onMouseEnter: this.hoverStart,
  3453. onMouseLeave: this.hoverEnd
  3454. }, this.renderItems(_carouselItems, innerClasses), _controlLeft, _controlRight);
  3455. } // Rendering indicators, slides and controls
  3456. var indicators = children[0];
  3457. var wrappedOnClick = function wrappedOnClick(e) {
  3458. if (typeof indicators.props.onClickHandler === 'function') {
  3459. _this3.setState({
  3460. indicatorClicked: true
  3461. }, function () {
  3462. return indicators.props.onClickHandler(e);
  3463. });
  3464. }
  3465. };
  3466. var wrappedIndicators = React__default.cloneElement(indicators, {
  3467. onClickHandler: wrappedOnClick
  3468. });
  3469. var carouselItems = children[1];
  3470. var controlLeft = children[2];
  3471. var controlRight = children[3];
  3472. return React__default.createElement("div", {
  3473. className: outerClasses,
  3474. onMouseEnter: this.hoverStart,
  3475. onMouseLeave: this.hoverEnd
  3476. }, wrappedIndicators, this.renderItems(carouselItems, innerClasses), controlLeft, controlRight);
  3477. };
  3478. return Carousel;
  3479. }(React__default.Component);
  3480. Carousel.propTypes = {
  3481. // the current active slide of the carousel
  3482. activeIndex: propTypes.number,
  3483. // a function which should advance the carousel to the next slide (via activeIndex)
  3484. next: propTypes.func.isRequired,
  3485. // a function which should advance the carousel to the previous slide (via activeIndex)
  3486. previous: propTypes.func.isRequired,
  3487. // controls if the left and right arrow keys should control the carousel
  3488. keyboard: propTypes.bool,
  3489. /* If set to "hover", pauses the cycling of the carousel on mouseenter and resumes the cycling of the carousel on
  3490. * mouseleave. If set to false, hovering over the carousel won't pause it. (default: "hover")
  3491. */
  3492. pause: propTypes.oneOf(['hover', false]),
  3493. // Autoplays the carousel after the user manually cycles the first item. If "carousel", autoplays the carousel on load.
  3494. // This is how bootstrap defines it... I would prefer a bool named autoplay or something...
  3495. ride: propTypes.oneOf(['carousel']),
  3496. // the interval at which the carousel automatically cycles (default: 5000)
  3497. // eslint-disable-next-line react/no-unused-prop-types
  3498. interval: propTypes.oneOfType([propTypes.number, propTypes.string, propTypes.bool]),
  3499. children: propTypes.array,
  3500. // called when the mouse enters the Carousel
  3501. mouseEnter: propTypes.func,
  3502. // called when the mouse exits the Carousel
  3503. mouseLeave: propTypes.func,
  3504. // controls whether the slide animation on the Carousel works or not
  3505. slide: propTypes.bool,
  3506. cssModule: propTypes.object,
  3507. className: propTypes.string
  3508. };
  3509. Carousel.defaultProps = {
  3510. interval: 5000,
  3511. pause: 'hover',
  3512. keyboard: true,
  3513. slide: true
  3514. };
  3515. Carousel.childContextTypes = {
  3516. direction: propTypes.string
  3517. };
  3518. var CarouselControl = function CarouselControl(props) {
  3519. var direction = props.direction,
  3520. onClickHandler = props.onClickHandler,
  3521. cssModule = props.cssModule,
  3522. directionText = props.directionText,
  3523. className = props.className;
  3524. var anchorClasses = mapToCssModules(classnames(className, "carousel-control-" + direction), cssModule);
  3525. var iconClasses = mapToCssModules(classnames("carousel-control-" + direction + "-icon"), cssModule);
  3526. var screenReaderClasses = mapToCssModules(classnames('sr-only'), cssModule);
  3527. return React__default.createElement("a", {
  3528. className: anchorClasses,
  3529. role: "button",
  3530. tabIndex: "0",
  3531. onClick: function onClick(e) {
  3532. e.preventDefault();
  3533. onClickHandler();
  3534. }
  3535. }, React__default.createElement("span", {
  3536. className: iconClasses,
  3537. "aria-hidden": "true"
  3538. }), React__default.createElement("span", {
  3539. className: screenReaderClasses
  3540. }, directionText || direction));
  3541. };
  3542. CarouselControl.propTypes = {
  3543. direction: propTypes.oneOf(['prev', 'next']).isRequired,
  3544. onClickHandler: propTypes.func.isRequired,
  3545. cssModule: propTypes.object,
  3546. directionText: propTypes.string,
  3547. className: propTypes.string
  3548. };
  3549. var CarouselIndicators = function CarouselIndicators(props) {
  3550. var items = props.items,
  3551. activeIndex = props.activeIndex,
  3552. cssModule = props.cssModule,
  3553. onClickHandler = props.onClickHandler,
  3554. className = props.className;
  3555. var listClasses = mapToCssModules(classnames(className, 'carousel-indicators'), cssModule);
  3556. var indicators = items.map(function (item, idx) {
  3557. var indicatorClasses = mapToCssModules(classnames({
  3558. active: activeIndex === idx
  3559. }), cssModule);
  3560. return React__default.createElement("li", {
  3561. key: "" + (item.key || Object.values(item).join('')),
  3562. onClick: function onClick(e) {
  3563. e.preventDefault();
  3564. onClickHandler(idx);
  3565. },
  3566. className: indicatorClasses
  3567. });
  3568. });
  3569. return React__default.createElement("ol", {
  3570. className: listClasses
  3571. }, indicators);
  3572. };
  3573. CarouselIndicators.propTypes = {
  3574. items: propTypes.array.isRequired,
  3575. activeIndex: propTypes.number.isRequired,
  3576. cssModule: propTypes.object,
  3577. onClickHandler: propTypes.func.isRequired,
  3578. className: propTypes.string
  3579. };
  3580. var CarouselCaption = function CarouselCaption(props) {
  3581. var captionHeader = props.captionHeader,
  3582. captionText = props.captionText,
  3583. cssModule = props.cssModule,
  3584. className = props.className;
  3585. var classes = mapToCssModules(classnames(className, 'carousel-caption', 'd-none', 'd-md-block'), cssModule);
  3586. return React__default.createElement("div", {
  3587. className: classes
  3588. }, React__default.createElement("h3", null, captionHeader), React__default.createElement("p", null, captionText));
  3589. };
  3590. CarouselCaption.propTypes = {
  3591. captionHeader: propTypes.string,
  3592. captionText: propTypes.string.isRequired,
  3593. cssModule: propTypes.object,
  3594. className: propTypes.string
  3595. };
  3596. var propTypes$w = {
  3597. items: propTypes.array.isRequired,
  3598. indicators: propTypes.bool,
  3599. controls: propTypes.bool,
  3600. autoPlay: propTypes.bool,
  3601. defaultActiveIndex: propTypes.number,
  3602. activeIndex: propTypes.number,
  3603. next: propTypes.func,
  3604. previous: propTypes.func,
  3605. goToIndex: propTypes.func
  3606. };
  3607. var UncontrolledCarousel =
  3608. /*#__PURE__*/
  3609. function (_Component) {
  3610. _inheritsLoose(UncontrolledCarousel, _Component);
  3611. function UncontrolledCarousel(props) {
  3612. var _this;
  3613. _this = _Component.call(this, props) || this;
  3614. _this.animating = false;
  3615. _this.state = {
  3616. activeIndex: props.defaultActiveIndex || 0
  3617. };
  3618. _this.next = _this.next.bind(_assertThisInitialized(_assertThisInitialized(_this)));
  3619. _this.previous = _this.previous.bind(_assertThisInitialized(_assertThisInitialized(_this)));
  3620. _this.goToIndex = _this.goToIndex.bind(_assertThisInitialized(_assertThisInitialized(_this)));
  3621. _this.onExiting = _this.onExiting.bind(_assertThisInitialized(_assertThisInitialized(_this)));
  3622. _this.onExited = _this.onExited.bind(_assertThisInitialized(_assertThisInitialized(_this)));
  3623. return _this;
  3624. }
  3625. var _proto = UncontrolledCarousel.prototype;
  3626. _proto.onExiting = function onExiting() {
  3627. this.animating = true;
  3628. };
  3629. _proto.onExited = function onExited() {
  3630. this.animating = false;
  3631. };
  3632. _proto.next = function next() {
  3633. if (this.animating) return;
  3634. var nextIndex = this.state.activeIndex === this.props.items.length - 1 ? 0 : this.state.activeIndex + 1;
  3635. this.setState({
  3636. activeIndex: nextIndex
  3637. });
  3638. };
  3639. _proto.previous = function previous() {
  3640. if (this.animating) return;
  3641. var nextIndex = this.state.activeIndex === 0 ? this.props.items.length - 1 : this.state.activeIndex - 1;
  3642. this.setState({
  3643. activeIndex: nextIndex
  3644. });
  3645. };
  3646. _proto.goToIndex = function goToIndex(newIndex) {
  3647. if (this.animating) return;
  3648. this.setState({
  3649. activeIndex: newIndex
  3650. });
  3651. };
  3652. _proto.render = function render() {
  3653. var _this2 = this;
  3654. var _this$props = this.props,
  3655. defaultActiveIndex = _this$props.defaultActiveIndex,
  3656. autoPlay = _this$props.autoPlay,
  3657. indicators = _this$props.indicators,
  3658. controls = _this$props.controls,
  3659. items = _this$props.items,
  3660. goToIndex = _this$props.goToIndex,
  3661. props = _objectWithoutPropertiesLoose(_this$props, ["defaultActiveIndex", "autoPlay", "indicators", "controls", "items", "goToIndex"]);
  3662. var activeIndex = this.state.activeIndex;
  3663. var slides = items.map(function (item) {
  3664. return React__default.createElement(CarouselItem, {
  3665. onExiting: _this2.onExiting,
  3666. onExited: _this2.onExited,
  3667. key: item.src
  3668. }, React__default.createElement("img", {
  3669. className: "d-block w-100",
  3670. src: item.src,
  3671. alt: item.altText
  3672. }), React__default.createElement(CarouselCaption, {
  3673. captionText: item.caption,
  3674. captionHeader: item.header || item.caption
  3675. }));
  3676. });
  3677. return React__default.createElement(Carousel, _extends({
  3678. activeIndex: activeIndex,
  3679. next: this.next,
  3680. previous: this.previous,
  3681. ride: autoPlay ? 'carousel' : undefined
  3682. }, props), indicators && React__default.createElement(CarouselIndicators, {
  3683. items: items,
  3684. activeIndex: props.activeIndex || activeIndex,
  3685. onClickHandler: goToIndex || this.goToIndex
  3686. }), slides, controls && React__default.createElement(CarouselControl, {
  3687. direction: "prev",
  3688. directionText: "Previous",
  3689. onClickHandler: props.previous || this.previous
  3690. }), controls && React__default.createElement(CarouselControl, {
  3691. direction: "next",
  3692. directionText: "Next",
  3693. onClickHandler: props.next || this.next
  3694. }));
  3695. };
  3696. return UncontrolledCarousel;
  3697. }(React.Component);
  3698. UncontrolledCarousel.propTypes = propTypes$w;
  3699. UncontrolledCarousel.defaultProps = {
  3700. controls: true,
  3701. indicators: true,
  3702. autoPlay: true
  3703. };
  3704. var propTypes$x = {
  3705. tag: tagPropType,
  3706. className: propTypes.string,
  3707. cssModule: propTypes.object
  3708. };
  3709. var defaultProps$u = {
  3710. tag: 'div'
  3711. };
  3712. var CardSubtitle = function CardSubtitle(props) {
  3713. var className = props.className,
  3714. cssModule = props.cssModule,
  3715. Tag = props.tag,
  3716. attributes = _objectWithoutPropertiesLoose(props, ["className", "cssModule", "tag"]);
  3717. var classes = mapToCssModules(classnames(className, 'card-subtitle'), cssModule);
  3718. return React__default.createElement(Tag, _extends({}, attributes, {
  3719. className: classes
  3720. }));
  3721. };
  3722. CardSubtitle.propTypes = propTypes$x;
  3723. CardSubtitle.defaultProps = defaultProps$u;
  3724. var propTypes$y = {
  3725. tag: tagPropType,
  3726. className: propTypes.string,
  3727. cssModule: propTypes.object
  3728. };
  3729. var defaultProps$v = {
  3730. tag: 'p'
  3731. };
  3732. var CardText = function CardText(props) {
  3733. var className = props.className,
  3734. cssModule = props.cssModule,
  3735. Tag = props.tag,
  3736. attributes = _objectWithoutPropertiesLoose(props, ["className", "cssModule", "tag"]);
  3737. var classes = mapToCssModules(classnames(className, 'card-text'), cssModule);
  3738. return React__default.createElement(Tag, _extends({}, attributes, {
  3739. className: classes
  3740. }));
  3741. };
  3742. CardText.propTypes = propTypes$y;
  3743. CardText.defaultProps = defaultProps$v;
  3744. var propTypes$z = {
  3745. tag: tagPropType,
  3746. className: propTypes.string,
  3747. cssModule: propTypes.object
  3748. };
  3749. var defaultProps$w = {
  3750. tag: 'div'
  3751. };
  3752. var CardTitle = function CardTitle(props) {
  3753. var className = props.className,
  3754. cssModule = props.cssModule,
  3755. Tag = props.tag,
  3756. attributes = _objectWithoutPropertiesLoose(props, ["className", "cssModule", "tag"]);
  3757. var classes = mapToCssModules(classnames(className, 'card-title'), cssModule);
  3758. return React__default.createElement(Tag, _extends({}, attributes, {
  3759. className: classes
  3760. }));
  3761. };
  3762. CardTitle.propTypes = propTypes$z;
  3763. CardTitle.defaultProps = defaultProps$w;
  3764. var propTypes$A = {
  3765. className: propTypes.string,
  3766. id: propTypes.oneOfType([propTypes.string, propTypes.number]).isRequired,
  3767. type: propTypes.string.isRequired,
  3768. label: propTypes.node,
  3769. inline: propTypes.bool,
  3770. valid: propTypes.bool,
  3771. invalid: propTypes.bool,
  3772. bsSize: propTypes.string,
  3773. cssModule: propTypes.object,
  3774. children: propTypes.oneOfType([propTypes.node, propTypes.array, propTypes.func]),
  3775. innerRef: propTypes.oneOfType([propTypes.object, propTypes.string, propTypes.func])
  3776. };
  3777. function CustomInput(props) {
  3778. var className = props.className,
  3779. label = props.label,
  3780. inline = props.inline,
  3781. valid = props.valid,
  3782. invalid = props.invalid,
  3783. cssModule = props.cssModule,
  3784. children = props.children,
  3785. bsSize = props.bsSize,
  3786. innerRef = props.innerRef,
  3787. attributes = _objectWithoutPropertiesLoose(props, ["className", "label", "inline", "valid", "invalid", "cssModule", "children", "bsSize", "innerRef"]);
  3788. var type = attributes.type;
  3789. var customClass = mapToCssModules(classnames(className, "custom-" + type, bsSize ? "custom-" + type + "-" + bsSize : false), cssModule);
  3790. var validationClassNames = mapToCssModules(classnames(invalid && 'is-invalid', valid && 'is-valid'), cssModule);
  3791. if (type === 'select') {
  3792. return React__default.createElement("select", _extends({}, attributes, {
  3793. ref: innerRef,
  3794. className: classnames(validationClassNames, customClass)
  3795. }), children);
  3796. }
  3797. if (type === 'file') {
  3798. return React__default.createElement("div", {
  3799. className: customClass
  3800. }, React__default.createElement("input", _extends({}, attributes, {
  3801. ref: innerRef,
  3802. className: classnames(validationClassNames, mapToCssModules('custom-file-input', cssModule))
  3803. })), React__default.createElement("label", {
  3804. className: mapToCssModules('custom-file-label', cssModule),
  3805. htmlFor: attributes.id
  3806. }, label || 'Choose file'));
  3807. }
  3808. if (type !== 'checkbox' && type !== 'radio' && type !== 'switch') {
  3809. return React__default.createElement("input", _extends({}, attributes, {
  3810. ref: innerRef,
  3811. className: classnames(validationClassNames, customClass)
  3812. }));
  3813. }
  3814. var wrapperClasses = classnames(customClass, mapToCssModules(classnames('custom-control', {
  3815. 'custom-control-inline': inline
  3816. }), cssModule));
  3817. return React__default.createElement("div", {
  3818. className: wrapperClasses
  3819. }, React__default.createElement("input", _extends({}, attributes, {
  3820. type: type === 'switch' ? 'checkbox' : type,
  3821. ref: innerRef,
  3822. className: classnames(validationClassNames, mapToCssModules('custom-control-input', cssModule))
  3823. })), React__default.createElement("label", {
  3824. className: mapToCssModules('custom-control-label', cssModule),
  3825. htmlFor: attributes.id
  3826. }, label), children);
  3827. }
  3828. CustomInput.propTypes = propTypes$A;
  3829. var propTypes$B = {
  3830. children: propTypes.node.isRequired,
  3831. className: propTypes.string,
  3832. placement: propTypes.string,
  3833. placementPrefix: propTypes.string,
  3834. arrowClassName: propTypes.string,
  3835. hideArrow: propTypes.bool,
  3836. tag: tagPropType,
  3837. isOpen: propTypes.bool.isRequired,
  3838. cssModule: propTypes.object,
  3839. offset: propTypes.oneOfType([propTypes.string, propTypes.number]),
  3840. fallbackPlacement: propTypes.oneOfType([propTypes.string, propTypes.array]),
  3841. flip: propTypes.bool,
  3842. container: targetPropType,
  3843. target: targetPropType.isRequired,
  3844. modifiers: propTypes.object,
  3845. boundariesElement: propTypes.oneOfType([propTypes.string, DOMElement])
  3846. };
  3847. var defaultProps$x = {
  3848. boundariesElement: 'scrollParent',
  3849. placement: 'auto',
  3850. hideArrow: false,
  3851. isOpen: false,
  3852. offset: 0,
  3853. fallbackPlacement: 'flip',
  3854. flip: true,
  3855. container: 'body',
  3856. modifiers: {}
  3857. };
  3858. var childContextTypes$1 = {
  3859. popperManager: propTypes.object.isRequired
  3860. };
  3861. var PopperContent =
  3862. /*#__PURE__*/
  3863. function (_React$Component) {
  3864. _inheritsLoose(PopperContent, _React$Component);
  3865. function PopperContent(props) {
  3866. var _this;
  3867. _this = _React$Component.call(this, props) || this;
  3868. _this.handlePlacementChange = _this.handlePlacementChange.bind(_assertThisInitialized(_assertThisInitialized(_this)));
  3869. _this.setTargetNode = _this.setTargetNode.bind(_assertThisInitialized(_assertThisInitialized(_this)));
  3870. _this.getTargetNode = _this.getTargetNode.bind(_assertThisInitialized(_assertThisInitialized(_this)));
  3871. _this.getRef = _this.getRef.bind(_assertThisInitialized(_assertThisInitialized(_this)));
  3872. _this.state = {};
  3873. return _this;
  3874. }
  3875. var _proto = PopperContent.prototype;
  3876. _proto.getChildContext = function getChildContext() {
  3877. return {
  3878. popperManager: {
  3879. setTargetNode: this.setTargetNode,
  3880. getTargetNode: this.getTargetNode
  3881. }
  3882. };
  3883. };
  3884. _proto.componentDidUpdate = function componentDidUpdate() {
  3885. if (this._element && this._element.childNodes && this._element.childNodes[0] && this._element.childNodes[0].focus) {
  3886. this._element.childNodes[0].focus();
  3887. }
  3888. };
  3889. _proto.setTargetNode = function setTargetNode(node) {
  3890. this.targetNode = node;
  3891. };
  3892. _proto.getTargetNode = function getTargetNode() {
  3893. return this.targetNode;
  3894. };
  3895. _proto.getContainerNode = function getContainerNode() {
  3896. return getTarget(this.props.container);
  3897. };
  3898. _proto.getRef = function getRef(ref) {
  3899. this._element = ref;
  3900. };
  3901. _proto.handlePlacementChange = function handlePlacementChange(data) {
  3902. if (this.state.placement !== data.placement) {
  3903. this.setState({
  3904. placement: data.placement
  3905. });
  3906. }
  3907. return data;
  3908. };
  3909. _proto.renderChildren = function renderChildren() {
  3910. var _this$props = this.props,
  3911. cssModule = _this$props.cssModule,
  3912. children = _this$props.children,
  3913. isOpen = _this$props.isOpen,
  3914. flip = _this$props.flip,
  3915. target = _this$props.target,
  3916. offset = _this$props.offset,
  3917. fallbackPlacement = _this$props.fallbackPlacement,
  3918. placementPrefix = _this$props.placementPrefix,
  3919. _arrowClassName = _this$props.arrowClassName,
  3920. hideArrow = _this$props.hideArrow,
  3921. className = _this$props.className,
  3922. tag = _this$props.tag,
  3923. container = _this$props.container,
  3924. modifiers = _this$props.modifiers,
  3925. boundariesElement = _this$props.boundariesElement,
  3926. attrs = _objectWithoutPropertiesLoose(_this$props, ["cssModule", "children", "isOpen", "flip", "target", "offset", "fallbackPlacement", "placementPrefix", "arrowClassName", "hideArrow", "className", "tag", "container", "modifiers", "boundariesElement"]);
  3927. var arrowClassName = mapToCssModules(classnames('arrow', _arrowClassName), cssModule);
  3928. var placement = (this.state.placement || attrs.placement).split('-')[0];
  3929. var popperClassName = mapToCssModules(classnames(className, placementPrefix ? placementPrefix + "-" + placement : placement), this.props.cssModule);
  3930. var extendedModifiers = _extends({
  3931. offset: {
  3932. offset: offset
  3933. },
  3934. flip: {
  3935. enabled: flip,
  3936. behavior: fallbackPlacement
  3937. },
  3938. preventOverflow: {
  3939. boundariesElement: boundariesElement
  3940. },
  3941. update: {
  3942. enabled: true,
  3943. order: 950,
  3944. fn: this.handlePlacementChange
  3945. }
  3946. }, modifiers);
  3947. return React__default.createElement(reactPopper.Popper, _extends({
  3948. modifiers: extendedModifiers
  3949. }, attrs, {
  3950. component: tag,
  3951. className: popperClassName,
  3952. "x-placement": this.state.placement || attrs.placement
  3953. }), children, !hideArrow && React__default.createElement(reactPopper.Arrow, {
  3954. className: arrowClassName
  3955. }));
  3956. };
  3957. _proto.render = function render() {
  3958. this.setTargetNode(getTarget(this.props.target));
  3959. if (this.props.isOpen) {
  3960. return this.props.container === 'inline' ? this.renderChildren() : ReactDOM.createPortal(React__default.createElement("div", {
  3961. ref: this.getRef
  3962. }, this.renderChildren()), this.getContainerNode());
  3963. }
  3964. return null;
  3965. };
  3966. return PopperContent;
  3967. }(React__default.Component);
  3968. PopperContent.propTypes = propTypes$B;
  3969. PopperContent.defaultProps = defaultProps$x;
  3970. PopperContent.childContextTypes = childContextTypes$1;
  3971. var PopperTargetHelper = function PopperTargetHelper(props, context) {
  3972. context.popperManager.setTargetNode(getTarget(props.target));
  3973. return null;
  3974. };
  3975. PopperTargetHelper.contextTypes = {
  3976. popperManager: propTypes.object.isRequired
  3977. };
  3978. PopperTargetHelper.propTypes = {
  3979. target: targetPropType.isRequired
  3980. };
  3981. var propTypes$C = {
  3982. placement: propTypes.oneOf(PopperPlacements),
  3983. target: targetPropType.isRequired,
  3984. container: targetPropType,
  3985. isOpen: propTypes.bool,
  3986. disabled: propTypes.bool,
  3987. hideArrow: propTypes.bool,
  3988. boundariesElement: propTypes.oneOfType([propTypes.string, DOMElement]),
  3989. className: propTypes.string,
  3990. innerClassName: propTypes.string,
  3991. arrowClassName: propTypes.string,
  3992. cssModule: propTypes.object,
  3993. toggle: propTypes.func,
  3994. autohide: propTypes.bool,
  3995. placementPrefix: propTypes.string,
  3996. delay: propTypes.oneOfType([propTypes.shape({
  3997. show: propTypes.number,
  3998. hide: propTypes.number
  3999. }), propTypes.number]),
  4000. modifiers: propTypes.object,
  4001. offset: propTypes.oneOfType([propTypes.string, propTypes.number]),
  4002. innerRef: propTypes.oneOfType([propTypes.func, propTypes.string, propTypes.object]),
  4003. trigger: propTypes.string
  4004. };
  4005. var DEFAULT_DELAYS = {
  4006. show: 0,
  4007. hide: 250
  4008. };
  4009. var defaultProps$y = {
  4010. isOpen: false,
  4011. hideArrow: false,
  4012. autohide: false,
  4013. delay: DEFAULT_DELAYS,
  4014. toggle: function toggle() {},
  4015. trigger: 'click'
  4016. };
  4017. function isInDOMSubtree(element, subtreeRoot) {
  4018. return subtreeRoot && (element === subtreeRoot || subtreeRoot.contains(element));
  4019. }
  4020. var TooltipPopoverWrapper =
  4021. /*#__PURE__*/
  4022. function (_React$Component) {
  4023. _inheritsLoose(TooltipPopoverWrapper, _React$Component);
  4024. function TooltipPopoverWrapper(props) {
  4025. var _this;
  4026. _this = _React$Component.call(this, props) || this;
  4027. _this._target = null;
  4028. _this.addTargetEvents = _this.addTargetEvents.bind(_assertThisInitialized(_assertThisInitialized(_this)));
  4029. _this.handleDocumentClick = _this.handleDocumentClick.bind(_assertThisInitialized(_assertThisInitialized(_this)));
  4030. _this.removeTargetEvents = _this.removeTargetEvents.bind(_assertThisInitialized(_assertThisInitialized(_this)));
  4031. _this.toggle = _this.toggle.bind(_assertThisInitialized(_assertThisInitialized(_this)));
  4032. _this.showWithDelay = _this.showWithDelay.bind(_assertThisInitialized(_assertThisInitialized(_this)));
  4033. _this.hideWithDelay = _this.hideWithDelay.bind(_assertThisInitialized(_assertThisInitialized(_this)));
  4034. _this.onMouseOverTooltipContent = _this.onMouseOverTooltipContent.bind(_assertThisInitialized(_assertThisInitialized(_this)));
  4035. _this.onMouseLeaveTooltipContent = _this.onMouseLeaveTooltipContent.bind(_assertThisInitialized(_assertThisInitialized(_this)));
  4036. _this.show = _this.show.bind(_assertThisInitialized(_assertThisInitialized(_this)));
  4037. _this.hide = _this.hide.bind(_assertThisInitialized(_assertThisInitialized(_this)));
  4038. _this.onEscKeyDown = _this.onEscKeyDown.bind(_assertThisInitialized(_assertThisInitialized(_this)));
  4039. _this.getRef = _this.getRef.bind(_assertThisInitialized(_assertThisInitialized(_this)));
  4040. return _this;
  4041. }
  4042. var _proto = TooltipPopoverWrapper.prototype;
  4043. _proto.componentDidMount = function componentDidMount() {
  4044. this.updateTarget();
  4045. };
  4046. _proto.componentWillUnmount = function componentWillUnmount() {
  4047. this.removeTargetEvents();
  4048. };
  4049. _proto.onMouseOverTooltipContent = function onMouseOverTooltipContent() {
  4050. if (this.props.trigger.indexOf('hover') > -1 && !this.props.autohide) {
  4051. if (this._hideTimeout) {
  4052. this.clearHideTimeout();
  4053. }
  4054. }
  4055. };
  4056. _proto.onMouseLeaveTooltipContent = function onMouseLeaveTooltipContent(e) {
  4057. if (this.props.trigger.indexOf('hover') > -1 && !this.props.autohide) {
  4058. if (this._showTimeout) {
  4059. this.clearShowTimeout();
  4060. }
  4061. e.persist();
  4062. this._hideTimeout = setTimeout(this.hide.bind(this, e), this.getDelay('hide'));
  4063. }
  4064. };
  4065. _proto.onEscKeyDown = function onEscKeyDown(e) {
  4066. if (e.key === 'Escape') {
  4067. this.hide(e);
  4068. }
  4069. };
  4070. _proto.getRef = function getRef(ref) {
  4071. var innerRef = this.props.innerRef;
  4072. if (innerRef) {
  4073. if (typeof innerRef === 'function') {
  4074. innerRef(ref);
  4075. } else if (typeof innerRef === 'object') {
  4076. innerRef.current = ref;
  4077. }
  4078. }
  4079. this._popover = ref;
  4080. };
  4081. _proto.getDelay = function getDelay(key) {
  4082. var delay = this.props.delay;
  4083. if (typeof delay === 'object') {
  4084. return isNaN(delay[key]) ? DEFAULT_DELAYS[key] : delay[key];
  4085. }
  4086. return delay;
  4087. };
  4088. _proto.show = function show(e) {
  4089. if (!this.props.isOpen) {
  4090. this.clearShowTimeout();
  4091. this.toggle(e);
  4092. }
  4093. };
  4094. _proto.showWithDelay = function showWithDelay(e) {
  4095. if (this._hideTimeout) {
  4096. this.clearHideTimeout();
  4097. }
  4098. this._showTimeout = setTimeout(this.show.bind(this, e), this.getDelay('show'));
  4099. };
  4100. _proto.hide = function hide(e) {
  4101. if (this.props.isOpen) {
  4102. this.clearHideTimeout();
  4103. this.toggle(e);
  4104. }
  4105. };
  4106. _proto.hideWithDelay = function hideWithDelay(e) {
  4107. if (this._showTimeout) {
  4108. this.clearShowTimeout();
  4109. }
  4110. this._hideTimeout = setTimeout(this.hide.bind(this, e), this.getDelay('hide'));
  4111. };
  4112. _proto.clearShowTimeout = function clearShowTimeout() {
  4113. clearTimeout(this._showTimeout);
  4114. this._showTimeout = undefined;
  4115. };
  4116. _proto.clearHideTimeout = function clearHideTimeout() {
  4117. clearTimeout(this._hideTimeout);
  4118. this._hideTimeout = undefined;
  4119. };
  4120. _proto.handleDocumentClick = function handleDocumentClick(e) {
  4121. var triggers = this.props.trigger.split(' ');
  4122. if (triggers.indexOf('legacy') > -1 && (this.props.isOpen || isInDOMSubtree(e.target, this._target))) {
  4123. if (this._hideTimeout) {
  4124. this.clearHideTimeout();
  4125. }
  4126. if (this.props.isOpen && !isInDOMSubtree(e.target, this._popover)) {
  4127. this.hideWithDelay(e);
  4128. } else {
  4129. this.showWithDelay(e);
  4130. }
  4131. } else if (triggers.indexOf('click') > -1 && isInDOMSubtree(e.target, this._target)) {
  4132. if (this._hideTimeout) {
  4133. this.clearHideTimeout();
  4134. }
  4135. if (!this.props.isOpen) {
  4136. this.showWithDelay(e);
  4137. } else {
  4138. this.hideWithDelay(e);
  4139. }
  4140. }
  4141. };
  4142. _proto.addTargetEvents = function addTargetEvents() {
  4143. var _this2 = this;
  4144. if (this.props.trigger) {
  4145. var triggers = this.props.trigger.split(' ');
  4146. if (triggers.indexOf('manual') === -1) {
  4147. if (triggers.indexOf('click') > -1 || triggers.indexOf('legacy') > -1) {
  4148. ['click', 'touchstart'].forEach(function (event) {
  4149. return document.addEventListener(event, _this2.handleDocumentClick, true);
  4150. });
  4151. }
  4152. if (this._target) {
  4153. if (triggers.indexOf('hover') > -1) {
  4154. this._target.addEventListener('mouseover', this.showWithDelay, true);
  4155. this._target.addEventListener('mouseout', this.hideWithDelay, true);
  4156. }
  4157. if (triggers.indexOf('focus') > -1) {
  4158. this._target.addEventListener('focusin', this.show, true);
  4159. this._target.addEventListener('focusout', this.hide, true);
  4160. }
  4161. this._target.addEventListener('keydown', this.onEscKeyDown, true);
  4162. }
  4163. }
  4164. }
  4165. };
  4166. _proto.removeTargetEvents = function removeTargetEvents() {
  4167. var _this3 = this;
  4168. if (this._target) {
  4169. this._target.removeEventListener('mouseover', this.showWithDelay, true);
  4170. this._target.removeEventListener('mouseout', this.hideWithDelay, true);
  4171. this._target.removeEventListener('keydown', this.onEscKeyDown, true);
  4172. this._target.removeEventListener('focusin', this.show, true);
  4173. this._target.removeEventListener('focusout', this.hide, true);
  4174. }
  4175. ['click', 'touchstart'].forEach(function (event) {
  4176. return document.removeEventListener(event, _this3.handleDocumentClick, true);
  4177. });
  4178. };
  4179. _proto.updateTarget = function updateTarget() {
  4180. var newTarget = getTarget(this.props.target);
  4181. if (newTarget !== this._target) {
  4182. this.removeTargetEvents();
  4183. this._target = newTarget;
  4184. this.addTargetEvents();
  4185. }
  4186. };
  4187. _proto.toggle = function toggle(e) {
  4188. if (this.props.disabled) {
  4189. return e && e.preventDefault();
  4190. }
  4191. return this.props.toggle(e);
  4192. };
  4193. _proto.render = function render() {
  4194. if (!this.props.isOpen) {
  4195. return null;
  4196. }
  4197. this.updateTarget();
  4198. var _this$props = this.props,
  4199. className = _this$props.className,
  4200. cssModule = _this$props.cssModule,
  4201. innerClassName = _this$props.innerClassName,
  4202. target = _this$props.target,
  4203. isOpen = _this$props.isOpen,
  4204. hideArrow = _this$props.hideArrow,
  4205. boundariesElement = _this$props.boundariesElement,
  4206. placement = _this$props.placement,
  4207. placementPrefix = _this$props.placementPrefix,
  4208. arrowClassName = _this$props.arrowClassName,
  4209. container = _this$props.container,
  4210. modifiers = _this$props.modifiers,
  4211. offset = _this$props.offset;
  4212. var attributes = omit(this.props, Object.keys(propTypes$C));
  4213. var popperClasses = mapToCssModules(className, cssModule);
  4214. var classes = mapToCssModules(innerClassName, cssModule);
  4215. return React__default.createElement(PopperContent, {
  4216. className: popperClasses,
  4217. target: target,
  4218. isOpen: isOpen,
  4219. hideArrow: hideArrow,
  4220. boundariesElement: boundariesElement,
  4221. placement: placement,
  4222. placementPrefix: placementPrefix,
  4223. arrowClassName: arrowClassName,
  4224. container: container,
  4225. modifiers: modifiers,
  4226. offset: offset,
  4227. cssModule: cssModule
  4228. }, React__default.createElement("div", _extends({}, attributes, {
  4229. ref: this.getRef,
  4230. className: classes,
  4231. role: "tooltip",
  4232. "aria-hidden": isOpen,
  4233. onMouseOver: this.onMouseOverTooltipContent,
  4234. onMouseLeave: this.onMouseLeaveTooltipContent,
  4235. onKeyDown: this.onEscKeyDown
  4236. })));
  4237. };
  4238. return TooltipPopoverWrapper;
  4239. }(React__default.Component);
  4240. TooltipPopoverWrapper.propTypes = propTypes$C;
  4241. TooltipPopoverWrapper.defaultProps = defaultProps$y;
  4242. var defaultProps$z = {
  4243. placement: 'right',
  4244. placementPrefix: 'bs-popover',
  4245. trigger: 'click'
  4246. };
  4247. var Popover = function Popover(props) {
  4248. var popperClasses = classnames('popover', 'show', props.className);
  4249. var classes = classnames('popover-inner', props.innerClassName);
  4250. return React__default.createElement(TooltipPopoverWrapper, _extends({}, props, {
  4251. className: popperClasses,
  4252. innerClassName: classes
  4253. }));
  4254. };
  4255. Popover.propTypes = propTypes$C;
  4256. Popover.defaultProps = defaultProps$z;
  4257. var omitKeys = ['defaultOpen'];
  4258. var UncontrolledPopover =
  4259. /*#__PURE__*/
  4260. function (_Component) {
  4261. _inheritsLoose(UncontrolledPopover, _Component);
  4262. function UncontrolledPopover(props) {
  4263. var _this;
  4264. _this = _Component.call(this, props) || this;
  4265. _this.state = {
  4266. isOpen: props.defaultOpen || false
  4267. };
  4268. _this.toggle = _this.toggle.bind(_assertThisInitialized(_assertThisInitialized(_this)));
  4269. return _this;
  4270. }
  4271. var _proto = UncontrolledPopover.prototype;
  4272. _proto.toggle = function toggle() {
  4273. this.setState({
  4274. isOpen: !this.state.isOpen
  4275. });
  4276. };
  4277. _proto.render = function render() {
  4278. return React__default.createElement(Popover, _extends({
  4279. isOpen: this.state.isOpen,
  4280. toggle: this.toggle
  4281. }, omit(this.props, omitKeys)));
  4282. };
  4283. return UncontrolledPopover;
  4284. }(React.Component);
  4285. UncontrolledPopover.propTypes = _extends({
  4286. defaultOpen: propTypes.bool
  4287. }, Popover.propTypes);
  4288. var propTypes$D = {
  4289. tag: tagPropType,
  4290. className: propTypes.string,
  4291. cssModule: propTypes.object
  4292. };
  4293. var defaultProps$A = {
  4294. tag: 'h3'
  4295. };
  4296. var PopoverHeader = function PopoverHeader(props) {
  4297. var className = props.className,
  4298. cssModule = props.cssModule,
  4299. Tag = props.tag,
  4300. attributes = _objectWithoutPropertiesLoose(props, ["className", "cssModule", "tag"]);
  4301. var classes = mapToCssModules(classnames(className, 'popover-header'), cssModule);
  4302. return React__default.createElement(Tag, _extends({}, attributes, {
  4303. className: classes
  4304. }));
  4305. };
  4306. PopoverHeader.propTypes = propTypes$D;
  4307. PopoverHeader.defaultProps = defaultProps$A;
  4308. function PopoverTitle(props) {
  4309. warnOnce('The "PopoverTitle" component has been deprecated.\nPlease use component "PopoverHeader".');
  4310. return React__default.createElement(PopoverHeader, props);
  4311. }
  4312. var propTypes$E = {
  4313. tag: tagPropType,
  4314. className: propTypes.string,
  4315. cssModule: propTypes.object
  4316. };
  4317. var defaultProps$B = {
  4318. tag: 'div'
  4319. };
  4320. var PopoverBody = function PopoverBody(props) {
  4321. var className = props.className,
  4322. cssModule = props.cssModule,
  4323. Tag = props.tag,
  4324. attributes = _objectWithoutPropertiesLoose(props, ["className", "cssModule", "tag"]);
  4325. var classes = mapToCssModules(classnames(className, 'popover-body'), cssModule);
  4326. return React__default.createElement(Tag, _extends({}, attributes, {
  4327. className: classes
  4328. }));
  4329. };
  4330. PopoverBody.propTypes = propTypes$E;
  4331. PopoverBody.defaultProps = defaultProps$B;
  4332. function PopoverContent(props) {
  4333. warnOnce('The "PopoverContent" component has been deprecated.\nPlease use component "PopoverBody".');
  4334. return React__default.createElement(PopoverBody, props);
  4335. }
  4336. /**
  4337. * lodash (Custom Build) <https://lodash.com/>
  4338. * Build: `lodash modularize exports="npm" -o ./`
  4339. * Copyright jQuery Foundation and other contributors <https://jquery.org/>
  4340. * Released under MIT license <https://lodash.com/license>
  4341. * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
  4342. * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
  4343. */
  4344. /** Used as references for various `Number` constants. */
  4345. var NAN = 0 / 0;
  4346. /** `Object#toString` result references. */
  4347. var symbolTag = '[object Symbol]';
  4348. /** Used to match leading and trailing whitespace. */
  4349. var reTrim = /^\s+|\s+$/g;
  4350. /** Used to detect bad signed hexadecimal string values. */
  4351. var reIsBadHex = /^[-+]0x[0-9a-f]+$/i;
  4352. /** Used to detect binary string values. */
  4353. var reIsBinary = /^0b[01]+$/i;
  4354. /** Used to detect octal string values. */
  4355. var reIsOctal = /^0o[0-7]+$/i;
  4356. /** Built-in method references without a dependency on `root`. */
  4357. var freeParseInt = parseInt;
  4358. /** Used for built-in method references. */
  4359. var objectProto$1 = Object.prototype;
  4360. /**
  4361. * Used to resolve the
  4362. * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)
  4363. * of values.
  4364. */
  4365. var objectToString$1 = objectProto$1.toString;
  4366. /**
  4367. * Checks if `value` is the
  4368. * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types)
  4369. * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)
  4370. *
  4371. * @static
  4372. * @memberOf _
  4373. * @since 0.1.0
  4374. * @category Lang
  4375. * @param {*} value The value to check.
  4376. * @returns {boolean} Returns `true` if `value` is an object, else `false`.
  4377. * @example
  4378. *
  4379. * _.isObject({});
  4380. * // => true
  4381. *
  4382. * _.isObject([1, 2, 3]);
  4383. * // => true
  4384. *
  4385. * _.isObject(_.noop);
  4386. * // => true
  4387. *
  4388. * _.isObject(null);
  4389. * // => false
  4390. */
  4391. function isObject$2(value) {
  4392. var type = typeof value;
  4393. return !!value && (type == 'object' || type == 'function');
  4394. }
  4395. /**
  4396. * Checks if `value` is object-like. A value is object-like if it's not `null`
  4397. * and has a `typeof` result of "object".
  4398. *
  4399. * @static
  4400. * @memberOf _
  4401. * @since 4.0.0
  4402. * @category Lang
  4403. * @param {*} value The value to check.
  4404. * @returns {boolean} Returns `true` if `value` is object-like, else `false`.
  4405. * @example
  4406. *
  4407. * _.isObjectLike({});
  4408. * // => true
  4409. *
  4410. * _.isObjectLike([1, 2, 3]);
  4411. * // => true
  4412. *
  4413. * _.isObjectLike(_.noop);
  4414. * // => false
  4415. *
  4416. * _.isObjectLike(null);
  4417. * // => false
  4418. */
  4419. function isObjectLike(value) {
  4420. return !!value && typeof value == 'object';
  4421. }
  4422. /**
  4423. * Checks if `value` is classified as a `Symbol` primitive or object.
  4424. *
  4425. * @static
  4426. * @memberOf _
  4427. * @since 4.0.0
  4428. * @category Lang
  4429. * @param {*} value The value to check.
  4430. * @returns {boolean} Returns `true` if `value` is a symbol, else `false`.
  4431. * @example
  4432. *
  4433. * _.isSymbol(Symbol.iterator);
  4434. * // => true
  4435. *
  4436. * _.isSymbol('abc');
  4437. * // => false
  4438. */
  4439. function isSymbol(value) {
  4440. return typeof value == 'symbol' || isObjectLike(value) && objectToString$1.call(value) == symbolTag;
  4441. }
  4442. /**
  4443. * Converts `value` to a number.
  4444. *
  4445. * @static
  4446. * @memberOf _
  4447. * @since 4.0.0
  4448. * @category Lang
  4449. * @param {*} value The value to process.
  4450. * @returns {number} Returns the number.
  4451. * @example
  4452. *
  4453. * _.toNumber(3.2);
  4454. * // => 3.2
  4455. *
  4456. * _.toNumber(Number.MIN_VALUE);
  4457. * // => 5e-324
  4458. *
  4459. * _.toNumber(Infinity);
  4460. * // => Infinity
  4461. *
  4462. * _.toNumber('3.2');
  4463. * // => 3.2
  4464. */
  4465. function toNumber(value) {
  4466. if (typeof value == 'number') {
  4467. return value;
  4468. }
  4469. if (isSymbol(value)) {
  4470. return NAN;
  4471. }
  4472. if (isObject$2(value)) {
  4473. var other = typeof value.valueOf == 'function' ? value.valueOf() : value;
  4474. value = isObject$2(other) ? other + '' : other;
  4475. }
  4476. if (typeof value != 'string') {
  4477. return value === 0 ? value : +value;
  4478. }
  4479. value = value.replace(reTrim, '');
  4480. var isBinary = reIsBinary.test(value);
  4481. return isBinary || reIsOctal.test(value) ? freeParseInt(value.slice(2), isBinary ? 2 : 8) : reIsBadHex.test(value) ? NAN : +value;
  4482. }
  4483. var lodash_tonumber = toNumber;
  4484. var propTypes$F = {
  4485. children: propTypes.node,
  4486. bar: propTypes.bool,
  4487. multi: propTypes.bool,
  4488. tag: tagPropType,
  4489. value: propTypes.oneOfType([propTypes.string, propTypes.number]),
  4490. max: propTypes.oneOfType([propTypes.string, propTypes.number]),
  4491. animated: propTypes.bool,
  4492. striped: propTypes.bool,
  4493. color: propTypes.string,
  4494. className: propTypes.string,
  4495. barClassName: propTypes.string,
  4496. cssModule: propTypes.object
  4497. };
  4498. var defaultProps$C = {
  4499. tag: 'div',
  4500. value: 0,
  4501. max: 100
  4502. };
  4503. var Progress = function Progress(props) {
  4504. var children = props.children,
  4505. className = props.className,
  4506. barClassName = props.barClassName,
  4507. cssModule = props.cssModule,
  4508. value = props.value,
  4509. max = props.max,
  4510. animated = props.animated,
  4511. striped = props.striped,
  4512. color = props.color,
  4513. bar = props.bar,
  4514. multi = props.multi,
  4515. Tag = props.tag,
  4516. attributes = _objectWithoutPropertiesLoose(props, ["children", "className", "barClassName", "cssModule", "value", "max", "animated", "striped", "color", "bar", "multi", "tag"]);
  4517. var percent = lodash_tonumber(value) / lodash_tonumber(max) * 100;
  4518. var progressClasses = mapToCssModules(classnames(className, 'progress'), cssModule);
  4519. var progressBarClasses = mapToCssModules(classnames('progress-bar', bar ? className || barClassName : barClassName, animated ? 'progress-bar-animated' : null, color ? "bg-" + color : null, striped || animated ? 'progress-bar-striped' : null), cssModule);
  4520. var ProgressBar = multi ? children : React__default.createElement("div", {
  4521. className: progressBarClasses,
  4522. style: {
  4523. width: percent + "%"
  4524. },
  4525. role: "progressbar",
  4526. "aria-valuenow": value,
  4527. "aria-valuemin": "0",
  4528. "aria-valuemax": max,
  4529. children: children
  4530. });
  4531. if (bar) {
  4532. return ProgressBar;
  4533. }
  4534. return React__default.createElement(Tag, _extends({}, attributes, {
  4535. className: progressClasses,
  4536. children: ProgressBar
  4537. }));
  4538. };
  4539. Progress.propTypes = propTypes$F;
  4540. Progress.defaultProps = defaultProps$C;
  4541. var propTypes$G = {
  4542. children: propTypes.node.isRequired,
  4543. node: propTypes.any
  4544. };
  4545. var Portal =
  4546. /*#__PURE__*/
  4547. function (_React$Component) {
  4548. _inheritsLoose(Portal, _React$Component);
  4549. function Portal() {
  4550. return _React$Component.apply(this, arguments) || this;
  4551. }
  4552. var _proto = Portal.prototype;
  4553. _proto.componentWillUnmount = function componentWillUnmount() {
  4554. if (this.defaultNode) {
  4555. document.body.removeChild(this.defaultNode);
  4556. }
  4557. this.defaultNode = null;
  4558. };
  4559. _proto.render = function render() {
  4560. if (!canUseDOM) {
  4561. return null;
  4562. }
  4563. if (!this.props.node && !this.defaultNode) {
  4564. this.defaultNode = document.createElement('div');
  4565. document.body.appendChild(this.defaultNode);
  4566. }
  4567. return ReactDOM.createPortal(this.props.children, this.props.node || this.defaultNode);
  4568. };
  4569. return Portal;
  4570. }(React__default.Component);
  4571. Portal.propTypes = propTypes$G;
  4572. function noop() {}
  4573. var FadePropTypes = propTypes.shape(Fade.propTypes);
  4574. var propTypes$H = {
  4575. isOpen: propTypes.bool,
  4576. autoFocus: propTypes.bool,
  4577. centered: propTypes.bool,
  4578. size: propTypes.string,
  4579. toggle: propTypes.func,
  4580. keyboard: propTypes.bool,
  4581. role: propTypes.string,
  4582. labelledBy: propTypes.string,
  4583. backdrop: propTypes.oneOfType([propTypes.bool, propTypes.oneOf(['static'])]),
  4584. onEnter: propTypes.func,
  4585. onExit: propTypes.func,
  4586. onOpened: propTypes.func,
  4587. onClosed: propTypes.func,
  4588. children: propTypes.node,
  4589. className: propTypes.string,
  4590. wrapClassName: propTypes.string,
  4591. modalClassName: propTypes.string,
  4592. backdropClassName: propTypes.string,
  4593. contentClassName: propTypes.string,
  4594. external: propTypes.node,
  4595. fade: propTypes.bool,
  4596. cssModule: propTypes.object,
  4597. zIndex: propTypes.oneOfType([propTypes.number, propTypes.string]),
  4598. backdropTransition: FadePropTypes,
  4599. modalTransition: FadePropTypes,
  4600. innerRef: propTypes.oneOfType([propTypes.object, propTypes.string, propTypes.func])
  4601. };
  4602. var propsToOmit = Object.keys(propTypes$H);
  4603. var defaultProps$D = {
  4604. isOpen: false,
  4605. autoFocus: true,
  4606. centered: false,
  4607. role: 'dialog',
  4608. backdrop: true,
  4609. keyboard: true,
  4610. zIndex: 1050,
  4611. fade: true,
  4612. onOpened: noop,
  4613. onClosed: noop,
  4614. modalTransition: {
  4615. timeout: TransitionTimeouts.Modal
  4616. },
  4617. backdropTransition: {
  4618. mountOnEnter: true,
  4619. timeout: TransitionTimeouts.Fade // uses standard fade transition
  4620. }
  4621. };
  4622. var Modal =
  4623. /*#__PURE__*/
  4624. function (_React$Component) {
  4625. _inheritsLoose(Modal, _React$Component);
  4626. function Modal(props) {
  4627. var _this;
  4628. _this = _React$Component.call(this, props) || this;
  4629. _this._element = null;
  4630. _this._originalBodyPadding = null;
  4631. _this.getFocusableChildren = _this.getFocusableChildren.bind(_assertThisInitialized(_assertThisInitialized(_this)));
  4632. _this.handleBackdropClick = _this.handleBackdropClick.bind(_assertThisInitialized(_assertThisInitialized(_this)));
  4633. _this.handleBackdropMouseDown = _this.handleBackdropMouseDown.bind(_assertThisInitialized(_assertThisInitialized(_this)));
  4634. _this.handleEscape = _this.handleEscape.bind(_assertThisInitialized(_assertThisInitialized(_this)));
  4635. _this.handleTab = _this.handleTab.bind(_assertThisInitialized(_assertThisInitialized(_this)));
  4636. _this.onOpened = _this.onOpened.bind(_assertThisInitialized(_assertThisInitialized(_this)));
  4637. _this.onClosed = _this.onClosed.bind(_assertThisInitialized(_assertThisInitialized(_this)));
  4638. _this.state = {
  4639. isOpen: props.isOpen
  4640. };
  4641. if (props.isOpen) {
  4642. _this.init();
  4643. }
  4644. return _this;
  4645. }
  4646. var _proto = Modal.prototype;
  4647. _proto.componentDidMount = function componentDidMount() {
  4648. if (this.props.onEnter) {
  4649. this.props.onEnter();
  4650. }
  4651. if (this.state.isOpen && this.props.autoFocus) {
  4652. this.setFocus();
  4653. }
  4654. this._isMounted = true;
  4655. };
  4656. _proto.componentWillReceiveProps = function componentWillReceiveProps(nextProps) {
  4657. if (nextProps.isOpen && !this.props.isOpen) {
  4658. this.setState({
  4659. isOpen: nextProps.isOpen
  4660. });
  4661. }
  4662. };
  4663. _proto.componentWillUpdate = function componentWillUpdate(nextProps, nextState) {
  4664. if (nextState.isOpen && !this.state.isOpen) {
  4665. this.init();
  4666. }
  4667. };
  4668. _proto.componentDidUpdate = function componentDidUpdate(prevProps, prevState) {
  4669. if (this.props.autoFocus && this.state.isOpen && !prevState.isOpen) {
  4670. this.setFocus();
  4671. }
  4672. if (this._element && prevProps.zIndex !== this.props.zIndex) {
  4673. this._element.style.zIndex = this.props.zIndex;
  4674. }
  4675. };
  4676. _proto.componentWillUnmount = function componentWillUnmount() {
  4677. if (this.props.onExit) {
  4678. this.props.onExit();
  4679. }
  4680. if (this.state.isOpen) {
  4681. this.destroy();
  4682. }
  4683. this._isMounted = false;
  4684. };
  4685. _proto.onOpened = function onOpened(node, isAppearing) {
  4686. this.props.onOpened();
  4687. (this.props.modalTransition.onEntered || noop)(node, isAppearing);
  4688. };
  4689. _proto.onClosed = function onClosed(node) {
  4690. // so all methods get called before it is unmounted
  4691. this.props.onClosed();
  4692. (this.props.modalTransition.onExited || noop)(node);
  4693. this.destroy();
  4694. if (this._isMounted) {
  4695. this.setState({
  4696. isOpen: false
  4697. });
  4698. }
  4699. };
  4700. _proto.setFocus = function setFocus() {
  4701. if (this._dialog && this._dialog.parentNode && typeof this._dialog.parentNode.focus === 'function') {
  4702. this._dialog.parentNode.focus();
  4703. }
  4704. };
  4705. _proto.getFocusableChildren = function getFocusableChildren() {
  4706. return this._element.querySelectorAll(focusableElements.join(', '));
  4707. };
  4708. _proto.getFocusedChild = function getFocusedChild() {
  4709. var currentFocus;
  4710. var focusableChildren = this.getFocusableChildren();
  4711. try {
  4712. currentFocus = document.activeElement;
  4713. } catch (err) {
  4714. currentFocus = focusableChildren[0];
  4715. }
  4716. return currentFocus;
  4717. } // not mouseUp because scrollbar fires it, shouldn't close when user scrolls
  4718. ;
  4719. _proto.handleBackdropClick = function handleBackdropClick(e) {
  4720. if (e.target === this._mouseDownElement) {
  4721. e.stopPropagation();
  4722. if (!this.props.isOpen || this.props.backdrop !== true) return;
  4723. var backdrop = this._dialog ? this._dialog.parentNode : null;
  4724. if (backdrop && e.target === backdrop && this.props.toggle) {
  4725. this.props.toggle(e);
  4726. }
  4727. }
  4728. };
  4729. _proto.handleTab = function handleTab(e) {
  4730. if (e.which !== 9) return;
  4731. var focusableChildren = this.getFocusableChildren();
  4732. var totalFocusable = focusableChildren.length;
  4733. var currentFocus = this.getFocusedChild();
  4734. var focusedIndex = 0;
  4735. for (var i = 0; i < totalFocusable; i += 1) {
  4736. if (focusableChildren[i] === currentFocus) {
  4737. focusedIndex = i;
  4738. break;
  4739. }
  4740. }
  4741. if (e.shiftKey && focusedIndex === 0) {
  4742. e.preventDefault();
  4743. focusableChildren[totalFocusable - 1].focus();
  4744. } else if (!e.shiftKey && focusedIndex === totalFocusable - 1) {
  4745. e.preventDefault();
  4746. focusableChildren[0].focus();
  4747. }
  4748. };
  4749. _proto.handleBackdropMouseDown = function handleBackdropMouseDown(e) {
  4750. this._mouseDownElement = e.target;
  4751. };
  4752. _proto.handleEscape = function handleEscape(e) {
  4753. if (this.props.isOpen && this.props.keyboard && e.keyCode === 27 && this.props.toggle) {
  4754. e.preventDefault();
  4755. e.stopPropagation();
  4756. this.props.toggle(e);
  4757. }
  4758. };
  4759. _proto.init = function init() {
  4760. try {
  4761. this._triggeringElement = document.activeElement;
  4762. } catch (err) {
  4763. this._triggeringElement = null;
  4764. }
  4765. this._element = document.createElement('div');
  4766. this._element.setAttribute('tabindex', '-1');
  4767. this._element.style.position = 'relative';
  4768. this._element.style.zIndex = this.props.zIndex;
  4769. this._originalBodyPadding = getOriginalBodyPadding();
  4770. conditionallyUpdateScrollbar();
  4771. document.body.appendChild(this._element);
  4772. if (Modal.openCount === 0) {
  4773. document.body.className = classnames(document.body.className, mapToCssModules('modal-open', this.props.cssModule));
  4774. }
  4775. Modal.openCount += 1;
  4776. };
  4777. _proto.destroy = function destroy() {
  4778. if (this._element) {
  4779. document.body.removeChild(this._element);
  4780. this._element = null;
  4781. }
  4782. if (this._triggeringElement) {
  4783. if (this._triggeringElement.focus) this._triggeringElement.focus();
  4784. this._triggeringElement = null;
  4785. }
  4786. if (Modal.openCount <= 1) {
  4787. var modalOpenClassName = mapToCssModules('modal-open', this.props.cssModule); // Use regex to prevent matching `modal-open` as part of a different class, e.g. `my-modal-opened`
  4788. var modalOpenClassNameRegex = new RegExp("(^| )" + modalOpenClassName + "( |$)");
  4789. document.body.className = document.body.className.replace(modalOpenClassNameRegex, ' ').trim();
  4790. }
  4791. Modal.openCount -= 1;
  4792. setScrollbarWidth(this._originalBodyPadding);
  4793. };
  4794. _proto.renderModalDialog = function renderModalDialog() {
  4795. var _classNames,
  4796. _this2 = this;
  4797. var attributes = omit(this.props, propsToOmit);
  4798. var dialogBaseClass = 'modal-dialog';
  4799. return React__default.createElement("div", _extends({}, attributes, {
  4800. className: mapToCssModules(classnames(dialogBaseClass, this.props.className, (_classNames = {}, _classNames["modal-" + this.props.size] = this.props.size, _classNames[dialogBaseClass + "-centered"] = this.props.centered, _classNames)), this.props.cssModule),
  4801. role: "document",
  4802. ref: function ref(c) {
  4803. _this2._dialog = c;
  4804. }
  4805. }), React__default.createElement("div", {
  4806. className: mapToCssModules(classnames('modal-content', this.props.contentClassName), this.props.cssModule)
  4807. }, this.props.children));
  4808. };
  4809. _proto.render = function render() {
  4810. if (this.state.isOpen) {
  4811. var _this$props = this.props,
  4812. wrapClassName = _this$props.wrapClassName,
  4813. modalClassName = _this$props.modalClassName,
  4814. backdropClassName = _this$props.backdropClassName,
  4815. cssModule = _this$props.cssModule,
  4816. isOpen = _this$props.isOpen,
  4817. backdrop = _this$props.backdrop,
  4818. role = _this$props.role,
  4819. labelledBy = _this$props.labelledBy,
  4820. external = _this$props.external,
  4821. innerRef = _this$props.innerRef;
  4822. var modalAttributes = {
  4823. onClick: this.handleBackdropClick,
  4824. onMouseDown: this.handleBackdropMouseDown,
  4825. onKeyUp: this.handleEscape,
  4826. onKeyDown: this.handleTab,
  4827. style: {
  4828. display: 'block'
  4829. },
  4830. 'aria-labelledby': labelledBy,
  4831. role: role,
  4832. tabIndex: '-1'
  4833. };
  4834. var hasTransition = this.props.fade;
  4835. var modalTransition = _extends({}, Fade.defaultProps, this.props.modalTransition, {
  4836. baseClass: hasTransition ? this.props.modalTransition.baseClass : '',
  4837. timeout: hasTransition ? this.props.modalTransition.timeout : 0
  4838. });
  4839. var backdropTransition = _extends({}, Fade.defaultProps, this.props.backdropTransition, {
  4840. baseClass: hasTransition ? this.props.backdropTransition.baseClass : '',
  4841. timeout: hasTransition ? this.props.backdropTransition.timeout : 0
  4842. });
  4843. var Backdrop = backdrop && (hasTransition ? React__default.createElement(Fade, _extends({}, backdropTransition, {
  4844. in: isOpen && !!backdrop,
  4845. cssModule: cssModule,
  4846. className: mapToCssModules(classnames('modal-backdrop', backdropClassName), cssModule)
  4847. })) : React__default.createElement("div", {
  4848. className: mapToCssModules(classnames('modal-backdrop', 'show', backdropClassName), cssModule)
  4849. }));
  4850. return React__default.createElement(Portal, {
  4851. node: this._element
  4852. }, React__default.createElement("div", {
  4853. className: mapToCssModules(wrapClassName)
  4854. }, React__default.createElement(Fade, _extends({}, modalAttributes, modalTransition, {
  4855. in: isOpen,
  4856. onEntered: this.onOpened,
  4857. onExited: this.onClosed,
  4858. cssModule: cssModule,
  4859. className: mapToCssModules(classnames('modal', modalClassName), cssModule),
  4860. innerRef: innerRef
  4861. }), external, this.renderModalDialog()), Backdrop));
  4862. }
  4863. return null;
  4864. };
  4865. return Modal;
  4866. }(React__default.Component);
  4867. Modal.propTypes = propTypes$H;
  4868. Modal.defaultProps = defaultProps$D;
  4869. Modal.openCount = 0;
  4870. var propTypes$I = {
  4871. tag: tagPropType,
  4872. wrapTag: tagPropType,
  4873. toggle: propTypes.func,
  4874. className: propTypes.string,
  4875. cssModule: propTypes.object,
  4876. children: propTypes.node,
  4877. closeAriaLabel: propTypes.string,
  4878. charCode: propTypes.oneOfType([propTypes.string, propTypes.number]),
  4879. close: propTypes.object
  4880. };
  4881. var defaultProps$E = {
  4882. tag: 'h5',
  4883. wrapTag: 'div',
  4884. closeAriaLabel: 'Close',
  4885. charCode: 215
  4886. };
  4887. var ModalHeader = function ModalHeader(props) {
  4888. var closeButton;
  4889. var className = props.className,
  4890. cssModule = props.cssModule,
  4891. children = props.children,
  4892. toggle = props.toggle,
  4893. Tag = props.tag,
  4894. WrapTag = props.wrapTag,
  4895. closeAriaLabel = props.closeAriaLabel,
  4896. charCode = props.charCode,
  4897. close = props.close,
  4898. attributes = _objectWithoutPropertiesLoose(props, ["className", "cssModule", "children", "toggle", "tag", "wrapTag", "closeAriaLabel", "charCode", "close"]);
  4899. var classes = mapToCssModules(classnames(className, 'modal-header'), cssModule);
  4900. if (!close && toggle) {
  4901. var closeIcon = typeof charCode === 'number' ? String.fromCharCode(charCode) : charCode;
  4902. closeButton = React__default.createElement("button", {
  4903. type: "button",
  4904. onClick: toggle,
  4905. className: mapToCssModules('close', cssModule),
  4906. "aria-label": closeAriaLabel
  4907. }, React__default.createElement("span", {
  4908. "aria-hidden": "true"
  4909. }, closeIcon));
  4910. }
  4911. return React__default.createElement(WrapTag, _extends({}, attributes, {
  4912. className: classes
  4913. }), React__default.createElement(Tag, {
  4914. className: mapToCssModules('modal-title', cssModule)
  4915. }, children), close || closeButton);
  4916. };
  4917. ModalHeader.propTypes = propTypes$I;
  4918. ModalHeader.defaultProps = defaultProps$E;
  4919. var propTypes$J = {
  4920. tag: tagPropType,
  4921. className: propTypes.string,
  4922. cssModule: propTypes.object
  4923. };
  4924. var defaultProps$F = {
  4925. tag: 'div'
  4926. };
  4927. var ModalBody = function ModalBody(props) {
  4928. var className = props.className,
  4929. cssModule = props.cssModule,
  4930. Tag = props.tag,
  4931. attributes = _objectWithoutPropertiesLoose(props, ["className", "cssModule", "tag"]);
  4932. var classes = mapToCssModules(classnames(className, 'modal-body'), cssModule);
  4933. return React__default.createElement(Tag, _extends({}, attributes, {
  4934. className: classes
  4935. }));
  4936. };
  4937. ModalBody.propTypes = propTypes$J;
  4938. ModalBody.defaultProps = defaultProps$F;
  4939. var propTypes$K = {
  4940. tag: tagPropType,
  4941. className: propTypes.string,
  4942. cssModule: propTypes.object
  4943. };
  4944. var defaultProps$G = {
  4945. tag: 'div'
  4946. };
  4947. var ModalFooter = function ModalFooter(props) {
  4948. var className = props.className,
  4949. cssModule = props.cssModule,
  4950. Tag = props.tag,
  4951. attributes = _objectWithoutPropertiesLoose(props, ["className", "cssModule", "tag"]);
  4952. var classes = mapToCssModules(classnames(className, 'modal-footer'), cssModule);
  4953. return React__default.createElement(Tag, _extends({}, attributes, {
  4954. className: classes
  4955. }));
  4956. };
  4957. ModalFooter.propTypes = propTypes$K;
  4958. ModalFooter.defaultProps = defaultProps$G;
  4959. var defaultProps$H = {
  4960. placement: 'top',
  4961. autohide: true,
  4962. placementPrefix: 'bs-tooltip',
  4963. trigger: 'click hover focus'
  4964. };
  4965. var Tooltip = function Tooltip(props) {
  4966. var popperClasses = classnames('tooltip', 'show', props.className);
  4967. var classes = classnames('tooltip-inner', props.innerClassName);
  4968. return React__default.createElement(TooltipPopoverWrapper, _extends({}, props, {
  4969. className: popperClasses,
  4970. innerClassName: classes
  4971. }));
  4972. };
  4973. Tooltip.propTypes = propTypes$C;
  4974. Tooltip.defaultProps = defaultProps$H;
  4975. var propTypes$L = {
  4976. className: propTypes.string,
  4977. cssModule: propTypes.object,
  4978. size: propTypes.string,
  4979. bordered: propTypes.bool,
  4980. borderless: propTypes.bool,
  4981. striped: propTypes.bool,
  4982. inverse: deprecated(propTypes.bool, 'Please use the prop "dark"'),
  4983. dark: propTypes.bool,
  4984. hover: propTypes.bool,
  4985. responsive: propTypes.oneOfType([propTypes.bool, propTypes.string]),
  4986. tag: tagPropType,
  4987. responsiveTag: tagPropType,
  4988. innerRef: propTypes.oneOfType([propTypes.func, propTypes.string, propTypes.object])
  4989. };
  4990. var defaultProps$I = {
  4991. tag: 'table',
  4992. responsiveTag: 'div'
  4993. };
  4994. var Table = function Table(props) {
  4995. var className = props.className,
  4996. cssModule = props.cssModule,
  4997. size = props.size,
  4998. bordered = props.bordered,
  4999. borderless = props.borderless,
  5000. striped = props.striped,
  5001. inverse = props.inverse,
  5002. dark = props.dark,
  5003. hover = props.hover,
  5004. responsive = props.responsive,
  5005. Tag = props.tag,
  5006. ResponsiveTag = props.responsiveTag,
  5007. innerRef = props.innerRef,
  5008. attributes = _objectWithoutPropertiesLoose(props, ["className", "cssModule", "size", "bordered", "borderless", "striped", "inverse", "dark", "hover", "responsive", "tag", "responsiveTag", "innerRef"]);
  5009. var classes = mapToCssModules(classnames(className, 'table', size ? 'table-' + size : false, bordered ? 'table-bordered' : false, borderless ? 'table-borderless' : false, striped ? 'table-striped' : false, dark || inverse ? 'table-dark' : false, hover ? 'table-hover' : false), cssModule);
  5010. var table = React__default.createElement(Tag, _extends({}, attributes, {
  5011. ref: innerRef,
  5012. className: classes
  5013. }));
  5014. if (responsive) {
  5015. var responsiveClassName = responsive === true ? 'table-responsive' : "table-responsive-" + responsive;
  5016. return React__default.createElement(ResponsiveTag, {
  5017. className: responsiveClassName
  5018. }, table);
  5019. }
  5020. return table;
  5021. };
  5022. Table.propTypes = propTypes$L;
  5023. Table.defaultProps = defaultProps$I;
  5024. var propTypes$M = {
  5025. tag: tagPropType,
  5026. flush: propTypes.bool,
  5027. className: propTypes.string,
  5028. cssModule: propTypes.object
  5029. };
  5030. var defaultProps$J = {
  5031. tag: 'ul'
  5032. };
  5033. var ListGroup = function ListGroup(props) {
  5034. var className = props.className,
  5035. cssModule = props.cssModule,
  5036. Tag = props.tag,
  5037. flush = props.flush,
  5038. attributes = _objectWithoutPropertiesLoose(props, ["className", "cssModule", "tag", "flush"]);
  5039. var classes = mapToCssModules(classnames(className, 'list-group', flush ? 'list-group-flush' : false), cssModule);
  5040. return React__default.createElement(Tag, _extends({}, attributes, {
  5041. className: classes
  5042. }));
  5043. };
  5044. ListGroup.propTypes = propTypes$M;
  5045. ListGroup.defaultProps = defaultProps$J;
  5046. var propTypes$N = {
  5047. children: propTypes.node,
  5048. inline: propTypes.bool,
  5049. tag: tagPropType,
  5050. innerRef: propTypes.oneOfType([propTypes.object, propTypes.func, propTypes.string]),
  5051. className: propTypes.string,
  5052. cssModule: propTypes.object
  5053. };
  5054. var defaultProps$K = {
  5055. tag: 'form'
  5056. };
  5057. var Form =
  5058. /*#__PURE__*/
  5059. function (_Component) {
  5060. _inheritsLoose(Form, _Component);
  5061. function Form(props) {
  5062. var _this;
  5063. _this = _Component.call(this, props) || this;
  5064. _this.getRef = _this.getRef.bind(_assertThisInitialized(_assertThisInitialized(_this)));
  5065. _this.submit = _this.submit.bind(_assertThisInitialized(_assertThisInitialized(_this)));
  5066. return _this;
  5067. }
  5068. var _proto = Form.prototype;
  5069. _proto.getRef = function getRef(ref) {
  5070. if (this.props.innerRef) {
  5071. this.props.innerRef(ref);
  5072. }
  5073. this.ref = ref;
  5074. };
  5075. _proto.submit = function submit() {
  5076. if (this.ref) {
  5077. this.ref.submit();
  5078. }
  5079. };
  5080. _proto.render = function render() {
  5081. var _this$props = this.props,
  5082. className = _this$props.className,
  5083. cssModule = _this$props.cssModule,
  5084. inline = _this$props.inline,
  5085. Tag = _this$props.tag,
  5086. innerRef = _this$props.innerRef,
  5087. attributes = _objectWithoutPropertiesLoose(_this$props, ["className", "cssModule", "inline", "tag", "innerRef"]);
  5088. var classes = mapToCssModules(classnames(className, inline ? 'form-inline' : false), cssModule);
  5089. return React__default.createElement(Tag, _extends({}, attributes, {
  5090. ref: innerRef,
  5091. className: classes
  5092. }));
  5093. };
  5094. return Form;
  5095. }(React.Component);
  5096. Form.propTypes = propTypes$N;
  5097. Form.defaultProps = defaultProps$K;
  5098. var propTypes$O = {
  5099. children: propTypes.node,
  5100. tag: tagPropType,
  5101. className: propTypes.string,
  5102. cssModule: propTypes.object,
  5103. valid: propTypes.bool,
  5104. tooltip: propTypes.bool
  5105. };
  5106. var defaultProps$L = {
  5107. tag: 'div',
  5108. valid: undefined
  5109. };
  5110. var FormFeedback = function FormFeedback(props) {
  5111. var className = props.className,
  5112. cssModule = props.cssModule,
  5113. valid = props.valid,
  5114. tooltip = props.tooltip,
  5115. Tag = props.tag,
  5116. attributes = _objectWithoutPropertiesLoose(props, ["className", "cssModule", "valid", "tooltip", "tag"]);
  5117. var validMode = tooltip ? 'tooltip' : 'feedback';
  5118. var classes = mapToCssModules(classnames(className, valid ? "valid-" + validMode : "invalid-" + validMode), cssModule);
  5119. return React__default.createElement(Tag, _extends({}, attributes, {
  5120. className: classes
  5121. }));
  5122. };
  5123. FormFeedback.propTypes = propTypes$O;
  5124. FormFeedback.defaultProps = defaultProps$L;
  5125. var propTypes$P = {
  5126. children: propTypes.node,
  5127. row: propTypes.bool,
  5128. check: propTypes.bool,
  5129. inline: propTypes.bool,
  5130. disabled: propTypes.bool,
  5131. tag: tagPropType,
  5132. className: propTypes.string,
  5133. cssModule: propTypes.object
  5134. };
  5135. var defaultProps$M = {
  5136. tag: 'div'
  5137. };
  5138. var FormGroup = function FormGroup(props) {
  5139. var className = props.className,
  5140. cssModule = props.cssModule,
  5141. row = props.row,
  5142. disabled = props.disabled,
  5143. check = props.check,
  5144. inline = props.inline,
  5145. Tag = props.tag,
  5146. attributes = _objectWithoutPropertiesLoose(props, ["className", "cssModule", "row", "disabled", "check", "inline", "tag"]);
  5147. var classes = mapToCssModules(classnames(className, row ? 'row' : false, check ? 'form-check' : 'form-group', check && inline ? 'form-check-inline' : false, check && disabled ? 'disabled' : false), cssModule);
  5148. return React__default.createElement(Tag, _extends({}, attributes, {
  5149. className: classes
  5150. }));
  5151. };
  5152. FormGroup.propTypes = propTypes$P;
  5153. FormGroup.defaultProps = defaultProps$M;
  5154. var propTypes$Q = {
  5155. children: propTypes.node,
  5156. inline: propTypes.bool,
  5157. tag: tagPropType,
  5158. color: propTypes.string,
  5159. className: propTypes.string,
  5160. cssModule: propTypes.object
  5161. };
  5162. var defaultProps$N = {
  5163. tag: 'small',
  5164. color: 'muted'
  5165. };
  5166. var FormText = function FormText(props) {
  5167. var className = props.className,
  5168. cssModule = props.cssModule,
  5169. inline = props.inline,
  5170. color = props.color,
  5171. Tag = props.tag,
  5172. attributes = _objectWithoutPropertiesLoose(props, ["className", "cssModule", "inline", "color", "tag"]);
  5173. var classes = mapToCssModules(classnames(className, !inline ? 'form-text' : false, color ? "text-" + color : false), cssModule);
  5174. return React__default.createElement(Tag, _extends({}, attributes, {
  5175. className: classes
  5176. }));
  5177. };
  5178. FormText.propTypes = propTypes$Q;
  5179. FormText.defaultProps = defaultProps$N;
  5180. var propTypes$R = {
  5181. children: propTypes.node,
  5182. type: propTypes.string,
  5183. size: propTypes.string,
  5184. bsSize: propTypes.string,
  5185. state: deprecated(propTypes.string, 'Please use the props "valid" and "invalid" to indicate the state.'),
  5186. valid: propTypes.bool,
  5187. invalid: propTypes.bool,
  5188. tag: tagPropType,
  5189. innerRef: propTypes.oneOfType([propTypes.object, propTypes.func, propTypes.string]),
  5190. static: deprecated(propTypes.bool, 'Please use the prop "plaintext"'),
  5191. plaintext: propTypes.bool,
  5192. addon: propTypes.bool,
  5193. className: propTypes.string,
  5194. cssModule: propTypes.object
  5195. };
  5196. var defaultProps$O = {
  5197. type: 'text'
  5198. };
  5199. var Input =
  5200. /*#__PURE__*/
  5201. function (_React$Component) {
  5202. _inheritsLoose(Input, _React$Component);
  5203. function Input(props) {
  5204. var _this;
  5205. _this = _React$Component.call(this, props) || this;
  5206. _this.getRef = _this.getRef.bind(_assertThisInitialized(_assertThisInitialized(_this)));
  5207. _this.focus = _this.focus.bind(_assertThisInitialized(_assertThisInitialized(_this)));
  5208. return _this;
  5209. }
  5210. var _proto = Input.prototype;
  5211. _proto.getRef = function getRef(ref) {
  5212. if (this.props.innerRef) {
  5213. this.props.innerRef(ref);
  5214. }
  5215. this.ref = ref;
  5216. };
  5217. _proto.focus = function focus() {
  5218. if (this.ref) {
  5219. this.ref.focus();
  5220. }
  5221. };
  5222. _proto.render = function render() {
  5223. var _this$props = this.props,
  5224. className = _this$props.className,
  5225. cssModule = _this$props.cssModule,
  5226. type = _this$props.type,
  5227. bsSize = _this$props.bsSize,
  5228. state = _this$props.state,
  5229. valid = _this$props.valid,
  5230. invalid = _this$props.invalid,
  5231. tag = _this$props.tag,
  5232. addon = _this$props.addon,
  5233. staticInput = _this$props.static,
  5234. plaintext = _this$props.plaintext,
  5235. innerRef = _this$props.innerRef,
  5236. attributes = _objectWithoutPropertiesLoose(_this$props, ["className", "cssModule", "type", "bsSize", "state", "valid", "invalid", "tag", "addon", "static", "plaintext", "innerRef"]);
  5237. var checkInput = ['radio', 'checkbox'].indexOf(type) > -1;
  5238. var isNotaNumber = new RegExp('\\D', 'g');
  5239. var fileInput = type === 'file';
  5240. var textareaInput = type === 'textarea';
  5241. var selectInput = type === 'select';
  5242. var Tag = tag || (selectInput || textareaInput ? type : 'input');
  5243. var formControlClass = 'form-control';
  5244. if (plaintext || staticInput) {
  5245. formControlClass = formControlClass + "-plaintext";
  5246. Tag = tag || 'input';
  5247. } else if (fileInput) {
  5248. formControlClass = formControlClass + "-file";
  5249. } else if (checkInput) {
  5250. if (addon) {
  5251. formControlClass = null;
  5252. } else {
  5253. formControlClass = 'form-check-input';
  5254. }
  5255. }
  5256. if (state && typeof valid === 'undefined' && typeof invalid === 'undefined') {
  5257. if (state === 'danger') {
  5258. invalid = true;
  5259. } else if (state === 'success') {
  5260. valid = true;
  5261. }
  5262. }
  5263. if (attributes.size && isNotaNumber.test(attributes.size)) {
  5264. warnOnce('Please use the prop "bsSize" instead of the "size" to bootstrap\'s input sizing.');
  5265. bsSize = attributes.size;
  5266. delete attributes.size;
  5267. }
  5268. var classes = mapToCssModules(classnames(className, invalid && 'is-invalid', valid && 'is-valid', bsSize ? "form-control-" + bsSize : false, formControlClass), cssModule);
  5269. if (Tag === 'input' || tag && typeof tag === 'function') {
  5270. attributes.type = type;
  5271. }
  5272. if (attributes.children && !(plaintext || staticInput || type === 'select' || typeof Tag !== 'string' || Tag === 'select')) {
  5273. warnOnce("Input with a type of \"" + type + "\" cannot have children. Please use \"value\"/\"defaultValue\" instead.");
  5274. delete attributes.children;
  5275. }
  5276. return React__default.createElement(Tag, _extends({}, attributes, {
  5277. ref: innerRef,
  5278. className: classes
  5279. }));
  5280. };
  5281. return Input;
  5282. }(React__default.Component);
  5283. Input.propTypes = propTypes$R;
  5284. Input.defaultProps = defaultProps$O;
  5285. var propTypes$S = {
  5286. tag: tagPropType,
  5287. size: propTypes.string,
  5288. className: propTypes.string,
  5289. cssModule: propTypes.object
  5290. };
  5291. var defaultProps$P = {
  5292. tag: 'div'
  5293. };
  5294. var InputGroup = function InputGroup(props) {
  5295. var className = props.className,
  5296. cssModule = props.cssModule,
  5297. Tag = props.tag,
  5298. size = props.size,
  5299. attributes = _objectWithoutPropertiesLoose(props, ["className", "cssModule", "tag", "size"]);
  5300. var classes = mapToCssModules(classnames(className, 'input-group', size ? "input-group-" + size : null), cssModule);
  5301. return React__default.createElement(Tag, _extends({}, attributes, {
  5302. className: classes
  5303. }));
  5304. };
  5305. InputGroup.propTypes = propTypes$S;
  5306. InputGroup.defaultProps = defaultProps$P;
  5307. var propTypes$T = {
  5308. tag: tagPropType,
  5309. className: propTypes.string,
  5310. cssModule: propTypes.object
  5311. };
  5312. var defaultProps$Q = {
  5313. tag: 'span'
  5314. };
  5315. var InputGroupText = function InputGroupText(props) {
  5316. var className = props.className,
  5317. cssModule = props.cssModule,
  5318. Tag = props.tag,
  5319. attributes = _objectWithoutPropertiesLoose(props, ["className", "cssModule", "tag"]);
  5320. var classes = mapToCssModules(classnames(className, 'input-group-text'), cssModule);
  5321. return React__default.createElement(Tag, _extends({}, attributes, {
  5322. className: classes
  5323. }));
  5324. };
  5325. InputGroupText.propTypes = propTypes$T;
  5326. InputGroupText.defaultProps = defaultProps$Q;
  5327. var propTypes$U = {
  5328. tag: tagPropType,
  5329. addonType: propTypes.oneOf(['prepend', 'append']).isRequired,
  5330. children: propTypes.node,
  5331. className: propTypes.string,
  5332. cssModule: propTypes.object
  5333. };
  5334. var defaultProps$R = {
  5335. tag: 'div'
  5336. };
  5337. var InputGroupAddon = function InputGroupAddon(props) {
  5338. var className = props.className,
  5339. cssModule = props.cssModule,
  5340. Tag = props.tag,
  5341. addonType = props.addonType,
  5342. children = props.children,
  5343. attributes = _objectWithoutPropertiesLoose(props, ["className", "cssModule", "tag", "addonType", "children"]);
  5344. var classes = mapToCssModules(classnames(className, 'input-group-' + addonType), cssModule); // Convenience to assist with transition
  5345. if (typeof children === 'string') {
  5346. return React__default.createElement(Tag, _extends({}, attributes, {
  5347. className: classes
  5348. }), React__default.createElement(InputGroupText, {
  5349. children: children
  5350. }));
  5351. }
  5352. return React__default.createElement(Tag, _extends({}, attributes, {
  5353. className: classes,
  5354. children: children
  5355. }));
  5356. };
  5357. InputGroupAddon.propTypes = propTypes$U;
  5358. InputGroupAddon.defaultProps = defaultProps$R;
  5359. var propTypes$V = {
  5360. tag: tagPropType,
  5361. addonType: propTypes.oneOf(['prepend', 'append']).isRequired,
  5362. children: propTypes.node,
  5363. groupClassName: propTypes.string,
  5364. groupAttributes: propTypes.object,
  5365. className: propTypes.string,
  5366. cssModule: propTypes.object
  5367. };
  5368. var InputGroupButton = function InputGroupButton(props) {
  5369. warnOnce('The "InputGroupButton" component has been deprecated.\nPlease use component "InputGroupAddon".');
  5370. var children = props.children,
  5371. groupClassName = props.groupClassName,
  5372. groupAttributes = props.groupAttributes,
  5373. propsWithoutGroup = _objectWithoutPropertiesLoose(props, ["children", "groupClassName", "groupAttributes"]);
  5374. if (typeof children === 'string') {
  5375. var cssModule = propsWithoutGroup.cssModule,
  5376. tag = propsWithoutGroup.tag,
  5377. addonType = propsWithoutGroup.addonType,
  5378. attributes = _objectWithoutPropertiesLoose(propsWithoutGroup, ["cssModule", "tag", "addonType"]);
  5379. var allGroupAttributes = _extends({}, groupAttributes, {
  5380. cssModule: cssModule,
  5381. tag: tag,
  5382. addonType: addonType
  5383. });
  5384. return React__default.createElement(InputGroupAddon, _extends({}, allGroupAttributes, {
  5385. className: groupClassName
  5386. }), React__default.createElement(Button, _extends({}, attributes, {
  5387. children: children
  5388. })));
  5389. }
  5390. return React__default.createElement(InputGroupAddon, _extends({}, props, {
  5391. children: children
  5392. }));
  5393. };
  5394. InputGroupButton.propTypes = propTypes$V;
  5395. var propTypes$W = {
  5396. addonType: propTypes.oneOf(['prepend', 'append']).isRequired,
  5397. children: propTypes.node
  5398. };
  5399. var InputGroupButtonDropdown = function InputGroupButtonDropdown(props) {
  5400. return React__default.createElement(Dropdown, props);
  5401. };
  5402. InputGroupButtonDropdown.propTypes = propTypes$W;
  5403. var colWidths$1 = ['xs', 'sm', 'md', 'lg', 'xl'];
  5404. var stringOrNumberProp$1 = propTypes.oneOfType([propTypes.number, propTypes.string]);
  5405. var columnProps$1 = propTypes.oneOfType([propTypes.string, propTypes.number, propTypes.shape({
  5406. size: stringOrNumberProp$1,
  5407. push: deprecated(stringOrNumberProp$1, 'Please use the prop "order"'),
  5408. pull: deprecated(stringOrNumberProp$1, 'Please use the prop "order"'),
  5409. order: stringOrNumberProp$1,
  5410. offset: stringOrNumberProp$1
  5411. })]);
  5412. var propTypes$X = {
  5413. children: propTypes.node,
  5414. hidden: propTypes.bool,
  5415. check: propTypes.bool,
  5416. size: propTypes.string,
  5417. for: propTypes.string,
  5418. tag: tagPropType,
  5419. className: propTypes.string,
  5420. cssModule: propTypes.object,
  5421. xs: columnProps$1,
  5422. sm: columnProps$1,
  5423. md: columnProps$1,
  5424. lg: columnProps$1,
  5425. xl: columnProps$1,
  5426. widths: propTypes.array
  5427. };
  5428. var defaultProps$S = {
  5429. tag: 'label',
  5430. widths: colWidths$1
  5431. };
  5432. var getColumnSizeClass$1 = function getColumnSizeClass(isXs, colWidth, colSize) {
  5433. if (colSize === true || colSize === '') {
  5434. return isXs ? 'col' : "col-" + colWidth;
  5435. } else if (colSize === 'auto') {
  5436. return isXs ? 'col-auto' : "col-" + colWidth + "-auto";
  5437. }
  5438. return isXs ? "col-" + colSize : "col-" + colWidth + "-" + colSize;
  5439. };
  5440. var Label = function Label(props) {
  5441. var className = props.className,
  5442. cssModule = props.cssModule,
  5443. hidden = props.hidden,
  5444. widths = props.widths,
  5445. Tag = props.tag,
  5446. check = props.check,
  5447. size = props.size,
  5448. htmlFor = props.for,
  5449. attributes = _objectWithoutPropertiesLoose(props, ["className", "cssModule", "hidden", "widths", "tag", "check", "size", "for"]);
  5450. var colClasses = [];
  5451. widths.forEach(function (colWidth, i) {
  5452. var columnProp = props[colWidth];
  5453. delete attributes[colWidth];
  5454. if (!columnProp && columnProp !== '') {
  5455. return;
  5456. }
  5457. var isXs = !i;
  5458. var colClass;
  5459. if (lodash_isobject(columnProp)) {
  5460. var _classNames;
  5461. var colSizeInterfix = isXs ? '-' : "-" + colWidth + "-";
  5462. colClass = getColumnSizeClass$1(isXs, colWidth, columnProp.size);
  5463. colClasses.push(mapToCssModules(classnames((_classNames = {}, _classNames[colClass] = columnProp.size || columnProp.size === '', _classNames["order" + colSizeInterfix + columnProp.order] = columnProp.order || columnProp.order === 0, _classNames["offset" + colSizeInterfix + columnProp.offset] = columnProp.offset || columnProp.offset === 0, _classNames))), cssModule);
  5464. } else {
  5465. colClass = getColumnSizeClass$1(isXs, colWidth, columnProp);
  5466. colClasses.push(colClass);
  5467. }
  5468. });
  5469. var classes = mapToCssModules(classnames(className, hidden ? 'sr-only' : false, check ? 'form-check-label' : false, size ? "col-form-label-" + size : false, colClasses, colClasses.length ? 'col-form-label' : false), cssModule);
  5470. return React__default.createElement(Tag, _extends({
  5471. htmlFor: htmlFor
  5472. }, attributes, {
  5473. className: classes
  5474. }));
  5475. };
  5476. Label.propTypes = propTypes$X;
  5477. Label.defaultProps = defaultProps$S;
  5478. var propTypes$Y = {
  5479. body: propTypes.bool,
  5480. bottom: propTypes.bool,
  5481. children: propTypes.node,
  5482. className: propTypes.string,
  5483. cssModule: propTypes.object,
  5484. heading: propTypes.bool,
  5485. left: propTypes.bool,
  5486. list: propTypes.bool,
  5487. middle: propTypes.bool,
  5488. object: propTypes.bool,
  5489. right: propTypes.bool,
  5490. tag: tagPropType,
  5491. top: propTypes.bool
  5492. };
  5493. var Media = function Media(props) {
  5494. var body = props.body,
  5495. bottom = props.bottom,
  5496. className = props.className,
  5497. cssModule = props.cssModule,
  5498. heading = props.heading,
  5499. left = props.left,
  5500. list = props.list,
  5501. middle = props.middle,
  5502. object = props.object,
  5503. right = props.right,
  5504. tag = props.tag,
  5505. top = props.top,
  5506. attributes = _objectWithoutPropertiesLoose(props, ["body", "bottom", "className", "cssModule", "heading", "left", "list", "middle", "object", "right", "tag", "top"]);
  5507. var defaultTag;
  5508. if (heading) {
  5509. defaultTag = 'h4';
  5510. } else if (attributes.href) {
  5511. defaultTag = 'a';
  5512. } else if (attributes.src || object) {
  5513. defaultTag = 'img';
  5514. } else if (list) {
  5515. defaultTag = 'ul';
  5516. } else {
  5517. defaultTag = 'div';
  5518. }
  5519. var Tag = tag || defaultTag;
  5520. var classes = mapToCssModules(classnames(className, {
  5521. 'media-body': body,
  5522. 'media-heading': heading,
  5523. 'media-left': left,
  5524. 'media-right': right,
  5525. 'media-top': top,
  5526. 'media-bottom': bottom,
  5527. 'media-middle': middle,
  5528. 'media-object': object,
  5529. 'media-list': list,
  5530. media: !body && !heading && !left && !right && !top && !bottom && !middle && !object && !list
  5531. }), cssModule);
  5532. return React__default.createElement(Tag, _extends({}, attributes, {
  5533. className: classes
  5534. }));
  5535. };
  5536. Media.propTypes = propTypes$Y;
  5537. var propTypes$Z = {
  5538. children: propTypes.node,
  5539. className: propTypes.string,
  5540. listClassName: propTypes.string,
  5541. cssModule: propTypes.object,
  5542. size: propTypes.string,
  5543. tag: tagPropType,
  5544. listTag: tagPropType,
  5545. 'aria-label': propTypes.string
  5546. };
  5547. var defaultProps$T = {
  5548. tag: 'nav',
  5549. listTag: 'ul',
  5550. 'aria-label': 'pagination'
  5551. };
  5552. var Pagination = function Pagination(props) {
  5553. var _classNames;
  5554. var className = props.className,
  5555. listClassName = props.listClassName,
  5556. cssModule = props.cssModule,
  5557. size = props.size,
  5558. Tag = props.tag,
  5559. ListTag = props.listTag,
  5560. label = props['aria-label'],
  5561. attributes = _objectWithoutPropertiesLoose(props, ["className", "listClassName", "cssModule", "size", "tag", "listTag", "aria-label"]);
  5562. var classes = mapToCssModules(classnames(className), cssModule);
  5563. var listClasses = mapToCssModules(classnames(listClassName, 'pagination', (_classNames = {}, _classNames["pagination-" + size] = !!size, _classNames)), cssModule);
  5564. return React__default.createElement(Tag, {
  5565. className: classes,
  5566. "aria-label": label
  5567. }, React__default.createElement(ListTag, _extends({}, attributes, {
  5568. className: listClasses
  5569. })));
  5570. };
  5571. Pagination.propTypes = propTypes$Z;
  5572. Pagination.defaultProps = defaultProps$T;
  5573. var propTypes$_ = {
  5574. active: propTypes.bool,
  5575. children: propTypes.node,
  5576. className: propTypes.string,
  5577. cssModule: propTypes.object,
  5578. disabled: propTypes.bool,
  5579. tag: tagPropType
  5580. };
  5581. var defaultProps$U = {
  5582. tag: 'li'
  5583. };
  5584. var PaginationItem = function PaginationItem(props) {
  5585. var active = props.active,
  5586. className = props.className,
  5587. cssModule = props.cssModule,
  5588. disabled = props.disabled,
  5589. Tag = props.tag,
  5590. attributes = _objectWithoutPropertiesLoose(props, ["active", "className", "cssModule", "disabled", "tag"]);
  5591. var classes = mapToCssModules(classnames(className, 'page-item', {
  5592. active: active,
  5593. disabled: disabled
  5594. }), cssModule);
  5595. return React__default.createElement(Tag, _extends({}, attributes, {
  5596. className: classes
  5597. }));
  5598. };
  5599. PaginationItem.propTypes = propTypes$_;
  5600. PaginationItem.defaultProps = defaultProps$U;
  5601. var propTypes$10 = {
  5602. 'aria-label': propTypes.string,
  5603. children: propTypes.node,
  5604. className: propTypes.string,
  5605. cssModule: propTypes.object,
  5606. next: propTypes.bool,
  5607. previous: propTypes.bool,
  5608. tag: tagPropType
  5609. };
  5610. var defaultProps$V = {
  5611. tag: 'a'
  5612. };
  5613. var PaginationLink = function PaginationLink(props) {
  5614. var className = props.className,
  5615. cssModule = props.cssModule,
  5616. next = props.next,
  5617. previous = props.previous,
  5618. Tag = props.tag,
  5619. attributes = _objectWithoutPropertiesLoose(props, ["className", "cssModule", "next", "previous", "tag"]);
  5620. var classes = mapToCssModules(classnames(className, 'page-link'), cssModule);
  5621. var defaultAriaLabel;
  5622. if (previous) {
  5623. defaultAriaLabel = 'Previous';
  5624. } else if (next) {
  5625. defaultAriaLabel = 'Next';
  5626. }
  5627. var ariaLabel = props['aria-label'] || defaultAriaLabel;
  5628. var defaultCaret;
  5629. if (previous) {
  5630. defaultCaret = "\xAB";
  5631. } else if (next) {
  5632. defaultCaret = "\xBB";
  5633. }
  5634. var children = props.children;
  5635. if (children && Array.isArray(children) && children.length === 0) {
  5636. children = null;
  5637. }
  5638. if (!attributes.href && Tag === 'a') {
  5639. Tag = 'button';
  5640. }
  5641. if (previous || next) {
  5642. children = [React__default.createElement("span", {
  5643. "aria-hidden": "true",
  5644. key: "caret"
  5645. }, children || defaultCaret), React__default.createElement("span", {
  5646. className: "sr-only",
  5647. key: "sr"
  5648. }, ariaLabel)];
  5649. }
  5650. return React__default.createElement(Tag, _extends({}, attributes, {
  5651. className: classes,
  5652. "aria-label": ariaLabel
  5653. }), children);
  5654. };
  5655. PaginationLink.propTypes = propTypes$10;
  5656. PaginationLink.defaultProps = defaultProps$V;
  5657. var propTypes$11 = {
  5658. tag: tagPropType,
  5659. activeTab: propTypes.any,
  5660. className: propTypes.string,
  5661. cssModule: propTypes.object
  5662. };
  5663. var defaultProps$W = {
  5664. tag: 'div'
  5665. };
  5666. var childContextTypes$2 = {
  5667. activeTabId: propTypes.any
  5668. };
  5669. var TabContent =
  5670. /*#__PURE__*/
  5671. function (_Component) {
  5672. _inheritsLoose(TabContent, _Component);
  5673. TabContent.getDerivedStateFromProps = function getDerivedStateFromProps(nextProps, prevState) {
  5674. if (prevState.activeTab !== nextProps.activeTab) {
  5675. return {
  5676. activeTab: nextProps.activeTab
  5677. };
  5678. }
  5679. return null;
  5680. };
  5681. function TabContent(props) {
  5682. var _this;
  5683. _this = _Component.call(this, props) || this;
  5684. _this.state = {
  5685. activeTab: _this.props.activeTab
  5686. };
  5687. return _this;
  5688. }
  5689. var _proto = TabContent.prototype;
  5690. _proto.getChildContext = function getChildContext() {
  5691. return {
  5692. activeTabId: this.state.activeTab
  5693. };
  5694. };
  5695. _proto.render = function render() {
  5696. var _this$props = this.props,
  5697. className = _this$props.className,
  5698. cssModule = _this$props.cssModule,
  5699. Tag = _this$props.tag;
  5700. var attributes = omit(this.props, Object.keys(propTypes$11));
  5701. var classes = mapToCssModules(classnames('tab-content', className), cssModule);
  5702. return React__default.createElement(Tag, _extends({}, attributes, {
  5703. className: classes
  5704. }));
  5705. };
  5706. return TabContent;
  5707. }(React.Component);
  5708. polyfill(TabContent);
  5709. TabContent.propTypes = propTypes$11;
  5710. TabContent.defaultProps = defaultProps$W;
  5711. TabContent.childContextTypes = childContextTypes$2;
  5712. var propTypes$12 = {
  5713. tag: tagPropType,
  5714. className: propTypes.string,
  5715. cssModule: propTypes.object,
  5716. tabId: propTypes.any
  5717. };
  5718. var defaultProps$X = {
  5719. tag: 'div'
  5720. };
  5721. var contextTypes$3 = {
  5722. activeTabId: propTypes.any
  5723. };
  5724. function TabPane(props, context) {
  5725. var className = props.className,
  5726. cssModule = props.cssModule,
  5727. tabId = props.tabId,
  5728. Tag = props.tag,
  5729. attributes = _objectWithoutPropertiesLoose(props, ["className", "cssModule", "tabId", "tag"]);
  5730. var classes = mapToCssModules(classnames('tab-pane', className, {
  5731. active: tabId === context.activeTabId
  5732. }), cssModule);
  5733. return React__default.createElement(Tag, _extends({}, attributes, {
  5734. className: classes
  5735. }));
  5736. }
  5737. TabPane.propTypes = propTypes$12;
  5738. TabPane.defaultProps = defaultProps$X;
  5739. TabPane.contextTypes = contextTypes$3;
  5740. var propTypes$13 = {
  5741. tag: tagPropType,
  5742. fluid: propTypes.bool,
  5743. className: propTypes.string,
  5744. cssModule: propTypes.object
  5745. };
  5746. var defaultProps$Y = {
  5747. tag: 'div'
  5748. };
  5749. var Jumbotron = function Jumbotron(props) {
  5750. var className = props.className,
  5751. cssModule = props.cssModule,
  5752. Tag = props.tag,
  5753. fluid = props.fluid,
  5754. attributes = _objectWithoutPropertiesLoose(props, ["className", "cssModule", "tag", "fluid"]);
  5755. var classes = mapToCssModules(classnames(className, 'jumbotron', fluid ? 'jumbotron-fluid' : false), cssModule);
  5756. return React__default.createElement(Tag, _extends({}, attributes, {
  5757. className: classes
  5758. }));
  5759. };
  5760. Jumbotron.propTypes = propTypes$13;
  5761. Jumbotron.defaultProps = defaultProps$Y;
  5762. var propTypes$14 = {
  5763. children: propTypes.node,
  5764. className: propTypes.string,
  5765. closeClassName: propTypes.string,
  5766. closeAriaLabel: propTypes.string,
  5767. cssModule: propTypes.object,
  5768. color: propTypes.string,
  5769. fade: propTypes.bool,
  5770. isOpen: propTypes.bool,
  5771. toggle: propTypes.func,
  5772. tag: tagPropType,
  5773. transition: propTypes.shape(Fade.propTypes),
  5774. innerRef: propTypes.oneOfType([propTypes.object, propTypes.string, propTypes.func])
  5775. };
  5776. var defaultProps$Z = {
  5777. color: 'success',
  5778. isOpen: true,
  5779. tag: 'div',
  5780. closeAriaLabel: 'Close',
  5781. fade: true,
  5782. transition: _extends({}, Fade.defaultProps, {
  5783. unmountOnExit: true
  5784. })
  5785. };
  5786. function Alert(props) {
  5787. var className = props.className,
  5788. closeClassName = props.closeClassName,
  5789. closeAriaLabel = props.closeAriaLabel,
  5790. cssModule = props.cssModule,
  5791. Tag = props.tag,
  5792. color = props.color,
  5793. isOpen = props.isOpen,
  5794. toggle = props.toggle,
  5795. children = props.children,
  5796. transition = props.transition,
  5797. fade = props.fade,
  5798. innerRef = props.innerRef,
  5799. attributes = _objectWithoutPropertiesLoose(props, ["className", "closeClassName", "closeAriaLabel", "cssModule", "tag", "color", "isOpen", "toggle", "children", "transition", "fade", "innerRef"]);
  5800. var classes = mapToCssModules(classnames(className, 'alert', "alert-" + color, {
  5801. 'alert-dismissible': toggle
  5802. }), cssModule);
  5803. var closeClasses = mapToCssModules(classnames('close', closeClassName), cssModule);
  5804. var alertTransition = _extends({}, Fade.defaultProps, transition, {
  5805. baseClass: fade ? transition.baseClass : '',
  5806. timeout: fade ? transition.timeout : 0
  5807. });
  5808. return React__default.createElement(Fade, _extends({}, attributes, alertTransition, {
  5809. tag: Tag,
  5810. className: classes,
  5811. in: isOpen,
  5812. role: "alert",
  5813. innerRef: innerRef
  5814. }), toggle ? React__default.createElement("button", {
  5815. type: "button",
  5816. className: closeClasses,
  5817. "aria-label": closeAriaLabel,
  5818. onClick: toggle
  5819. }, React__default.createElement("span", {
  5820. "aria-hidden": "true"
  5821. }, "\xD7")) : null, children);
  5822. }
  5823. Alert.propTypes = propTypes$14;
  5824. Alert.defaultProps = defaultProps$Z;
  5825. var _transitionStatusToCl;
  5826. var propTypes$15 = _extends({}, reactTransitionGroup_1.propTypes, {
  5827. isOpen: propTypes.bool,
  5828. children: propTypes.oneOfType([propTypes.arrayOf(propTypes.node), propTypes.node]),
  5829. tag: tagPropType,
  5830. className: propTypes.node,
  5831. navbar: propTypes.bool,
  5832. cssModule: propTypes.object,
  5833. innerRef: propTypes.oneOfType([propTypes.func, propTypes.string, propTypes.object])
  5834. });
  5835. var defaultProps$_ = _extends({}, reactTransitionGroup_1.defaultProps, {
  5836. isOpen: false,
  5837. appear: false,
  5838. enter: true,
  5839. exit: true,
  5840. tag: 'div',
  5841. timeout: TransitionTimeouts.Collapse
  5842. });
  5843. var transitionStatusToClassHash = (_transitionStatusToCl = {}, _transitionStatusToCl[TransitionStatuses.ENTERING] = 'collapsing', _transitionStatusToCl[TransitionStatuses.ENTERED] = 'collapse show', _transitionStatusToCl[TransitionStatuses.EXITING] = 'collapsing', _transitionStatusToCl[TransitionStatuses.EXITED] = 'collapse', _transitionStatusToCl);
  5844. function getTransitionClass(status) {
  5845. return transitionStatusToClassHash[status] || 'collapse';
  5846. }
  5847. function getHeight(node) {
  5848. return node.scrollHeight;
  5849. }
  5850. var Collapse =
  5851. /*#__PURE__*/
  5852. function (_Component) {
  5853. _inheritsLoose(Collapse, _Component);
  5854. function Collapse(props) {
  5855. var _this;
  5856. _this = _Component.call(this, props) || this;
  5857. _this.state = {
  5858. height: null
  5859. };
  5860. ['onEntering', 'onEntered', 'onExit', 'onExiting', 'onExited'].forEach(function (name) {
  5861. _this[name] = _this[name].bind(_assertThisInitialized(_assertThisInitialized(_this)));
  5862. });
  5863. return _this;
  5864. }
  5865. var _proto = Collapse.prototype;
  5866. _proto.onEntering = function onEntering(node, isAppearing) {
  5867. this.setState({
  5868. height: getHeight(node)
  5869. });
  5870. this.props.onEntering(node, isAppearing);
  5871. };
  5872. _proto.onEntered = function onEntered(node, isAppearing) {
  5873. this.setState({
  5874. height: null
  5875. });
  5876. this.props.onEntered(node, isAppearing);
  5877. };
  5878. _proto.onExit = function onExit(node) {
  5879. this.setState({
  5880. height: getHeight(node)
  5881. });
  5882. this.props.onExit(node);
  5883. };
  5884. _proto.onExiting = function onExiting(node) {
  5885. // getting this variable triggers a reflow
  5886. var _unused = node.offsetHeight; // eslint-disable-line no-unused-vars
  5887. this.setState({
  5888. height: 0
  5889. });
  5890. this.props.onExiting(node);
  5891. };
  5892. _proto.onExited = function onExited(node) {
  5893. this.setState({
  5894. height: null
  5895. });
  5896. this.props.onExited(node);
  5897. };
  5898. _proto.render = function render() {
  5899. var _this2 = this;
  5900. var _this$props = this.props,
  5901. Tag = _this$props.tag,
  5902. isOpen = _this$props.isOpen,
  5903. className = _this$props.className,
  5904. navbar = _this$props.navbar,
  5905. cssModule = _this$props.cssModule,
  5906. children = _this$props.children,
  5907. innerRef = _this$props.innerRef,
  5908. otherProps = _objectWithoutPropertiesLoose(_this$props, ["tag", "isOpen", "className", "navbar", "cssModule", "children", "innerRef"]);
  5909. var height = this.state.height;
  5910. var transitionProps = pick(otherProps, TransitionPropTypeKeys);
  5911. var childProps = omit(otherProps, TransitionPropTypeKeys);
  5912. return React__default.createElement(reactTransitionGroup_1, _extends({}, transitionProps, {
  5913. in: isOpen,
  5914. onEntering: this.onEntering,
  5915. onEntered: this.onEntered,
  5916. onExit: this.onExit,
  5917. onExiting: this.onExiting,
  5918. onExited: this.onExited
  5919. }), function (status) {
  5920. var collapseClass = getTransitionClass(status);
  5921. var classes = mapToCssModules(classnames(className, collapseClass, navbar && 'navbar-collapse'), cssModule);
  5922. var style = height === null ? null : {
  5923. height: height
  5924. };
  5925. return React__default.createElement(Tag, _extends({}, childProps, {
  5926. style: _extends({}, childProps.style, style),
  5927. className: classes,
  5928. ref: _this2.props.innerRef
  5929. }), children);
  5930. });
  5931. };
  5932. return Collapse;
  5933. }(React.Component);
  5934. Collapse.propTypes = propTypes$15;
  5935. Collapse.defaultProps = defaultProps$_;
  5936. var propTypes$16 = {
  5937. tag: tagPropType,
  5938. active: propTypes.bool,
  5939. disabled: propTypes.bool,
  5940. color: propTypes.string,
  5941. action: propTypes.bool,
  5942. className: propTypes.any,
  5943. cssModule: propTypes.object
  5944. };
  5945. var defaultProps$10 = {
  5946. tag: 'li'
  5947. };
  5948. var handleDisabledOnClick = function handleDisabledOnClick(e) {
  5949. e.preventDefault();
  5950. };
  5951. var ListGroupItem = function ListGroupItem(props) {
  5952. var className = props.className,
  5953. cssModule = props.cssModule,
  5954. Tag = props.tag,
  5955. active = props.active,
  5956. disabled = props.disabled,
  5957. action = props.action,
  5958. color = props.color,
  5959. attributes = _objectWithoutPropertiesLoose(props, ["className", "cssModule", "tag", "active", "disabled", "action", "color"]);
  5960. var classes = mapToCssModules(classnames(className, active ? 'active' : false, disabled ? 'disabled' : false, action ? 'list-group-item-action' : false, color ? "list-group-item-" + color : false, 'list-group-item'), cssModule); // Prevent click event when disabled.
  5961. if (disabled) {
  5962. attributes.onClick = handleDisabledOnClick;
  5963. }
  5964. return React__default.createElement(Tag, _extends({}, attributes, {
  5965. className: classes
  5966. }));
  5967. };
  5968. ListGroupItem.propTypes = propTypes$16;
  5969. ListGroupItem.defaultProps = defaultProps$10;
  5970. var propTypes$17 = {
  5971. tag: tagPropType,
  5972. className: propTypes.any,
  5973. cssModule: propTypes.object
  5974. };
  5975. var defaultProps$11 = {
  5976. tag: 'h5'
  5977. };
  5978. var ListGroupItemHeading = function ListGroupItemHeading(props) {
  5979. var className = props.className,
  5980. cssModule = props.cssModule,
  5981. Tag = props.tag,
  5982. attributes = _objectWithoutPropertiesLoose(props, ["className", "cssModule", "tag"]);
  5983. var classes = mapToCssModules(classnames(className, 'list-group-item-heading'), cssModule);
  5984. return React__default.createElement(Tag, _extends({}, attributes, {
  5985. className: classes
  5986. }));
  5987. };
  5988. ListGroupItemHeading.propTypes = propTypes$17;
  5989. ListGroupItemHeading.defaultProps = defaultProps$11;
  5990. var propTypes$18 = {
  5991. tag: tagPropType,
  5992. className: propTypes.any,
  5993. cssModule: propTypes.object
  5994. };
  5995. var defaultProps$12 = {
  5996. tag: 'p'
  5997. };
  5998. var ListGroupItemText = function ListGroupItemText(props) {
  5999. var className = props.className,
  6000. cssModule = props.cssModule,
  6001. Tag = props.tag,
  6002. attributes = _objectWithoutPropertiesLoose(props, ["className", "cssModule", "tag"]);
  6003. var classes = mapToCssModules(classnames(className, 'list-group-item-text'), cssModule);
  6004. return React__default.createElement(Tag, _extends({}, attributes, {
  6005. className: classes
  6006. }));
  6007. };
  6008. ListGroupItemText.propTypes = propTypes$18;
  6009. ListGroupItemText.defaultProps = defaultProps$12;
  6010. var UncontrolledAlert =
  6011. /*#__PURE__*/
  6012. function (_Component) {
  6013. _inheritsLoose(UncontrolledAlert, _Component);
  6014. function UncontrolledAlert(props) {
  6015. var _this;
  6016. _this = _Component.call(this, props) || this;
  6017. _this.state = {
  6018. isOpen: true
  6019. };
  6020. _this.toggle = _this.toggle.bind(_assertThisInitialized(_assertThisInitialized(_this)));
  6021. return _this;
  6022. }
  6023. var _proto = UncontrolledAlert.prototype;
  6024. _proto.toggle = function toggle() {
  6025. this.setState({
  6026. isOpen: !this.state.isOpen
  6027. });
  6028. };
  6029. _proto.render = function render() {
  6030. return React__default.createElement(Alert, _extends({
  6031. isOpen: this.state.isOpen,
  6032. toggle: this.toggle
  6033. }, this.props));
  6034. };
  6035. return UncontrolledAlert;
  6036. }(React.Component);
  6037. var omitKeys$1 = ['defaultOpen'];
  6038. var UncontrolledButtonDropdown =
  6039. /*#__PURE__*/
  6040. function (_Component) {
  6041. _inheritsLoose(UncontrolledButtonDropdown, _Component);
  6042. function UncontrolledButtonDropdown(props) {
  6043. var _this;
  6044. _this = _Component.call(this, props) || this;
  6045. _this.state = {
  6046. isOpen: props.defaultOpen || false
  6047. };
  6048. _this.toggle = _this.toggle.bind(_assertThisInitialized(_assertThisInitialized(_this)));
  6049. return _this;
  6050. }
  6051. var _proto = UncontrolledButtonDropdown.prototype;
  6052. _proto.toggle = function toggle() {
  6053. this.setState({
  6054. isOpen: !this.state.isOpen
  6055. });
  6056. };
  6057. _proto.render = function render() {
  6058. return React__default.createElement(ButtonDropdown, _extends({
  6059. isOpen: this.state.isOpen,
  6060. toggle: this.toggle
  6061. }, omit(this.props, omitKeys$1)));
  6062. };
  6063. return UncontrolledButtonDropdown;
  6064. }(React.Component);
  6065. UncontrolledButtonDropdown.propTypes = _extends({
  6066. defaultOpen: propTypes.bool
  6067. }, ButtonDropdown.propTypes);
  6068. var omitKeys$2 = ['toggleEvents', 'defaultOpen'];
  6069. var propTypes$19 = {
  6070. defaultOpen: propTypes.bool,
  6071. toggler: propTypes.string.isRequired,
  6072. toggleEvents: propTypes.arrayOf(propTypes.string)
  6073. };
  6074. var defaultProps$13 = {
  6075. toggleEvents: defaultToggleEvents
  6076. };
  6077. var UncontrolledCollapse =
  6078. /*#__PURE__*/
  6079. function (_Component) {
  6080. _inheritsLoose(UncontrolledCollapse, _Component);
  6081. function UncontrolledCollapse(props) {
  6082. var _this;
  6083. _this = _Component.call(this, props) || this;
  6084. _this.togglers = null;
  6085. _this.removeEventListeners = null;
  6086. _this.toggle = _this.toggle.bind(_assertThisInitialized(_assertThisInitialized(_this)));
  6087. _this.state = {
  6088. isOpen: props.defaultOpen || false
  6089. };
  6090. return _this;
  6091. }
  6092. var _proto = UncontrolledCollapse.prototype;
  6093. _proto.componentDidMount = function componentDidMount() {
  6094. this.togglers = findDOMElements(this.props.toggler);
  6095. if (this.togglers.length) {
  6096. this.removeEventListeners = addMultipleEventListeners(this.togglers, this.toggle, this.props.toggleEvents);
  6097. }
  6098. };
  6099. _proto.componentWillUnmount = function componentWillUnmount() {
  6100. if (this.togglers.length && this.removeEventListeners) {
  6101. this.removeEventListeners();
  6102. }
  6103. };
  6104. _proto.toggle = function toggle(e) {
  6105. this.setState(function (_ref) {
  6106. var isOpen = _ref.isOpen;
  6107. return {
  6108. isOpen: !isOpen
  6109. };
  6110. });
  6111. e.preventDefault();
  6112. };
  6113. _proto.render = function render() {
  6114. return React__default.createElement(Collapse, _extends({
  6115. isOpen: this.state.isOpen
  6116. }, omit(this.props, omitKeys$2)));
  6117. };
  6118. return UncontrolledCollapse;
  6119. }(React.Component);
  6120. UncontrolledCollapse.propTypes = propTypes$19;
  6121. UncontrolledCollapse.defaultProps = defaultProps$13;
  6122. var omitKeys$3 = ['defaultOpen'];
  6123. var UncontrolledDropdown =
  6124. /*#__PURE__*/
  6125. function (_Component) {
  6126. _inheritsLoose(UncontrolledDropdown, _Component);
  6127. function UncontrolledDropdown(props) {
  6128. var _this;
  6129. _this = _Component.call(this, props) || this;
  6130. _this.state = {
  6131. isOpen: props.defaultOpen || false
  6132. };
  6133. _this.toggle = _this.toggle.bind(_assertThisInitialized(_assertThisInitialized(_this)));
  6134. return _this;
  6135. }
  6136. var _proto = UncontrolledDropdown.prototype;
  6137. _proto.toggle = function toggle() {
  6138. this.setState({
  6139. isOpen: !this.state.isOpen
  6140. });
  6141. };
  6142. _proto.render = function render() {
  6143. return React__default.createElement(Dropdown, _extends({
  6144. isOpen: this.state.isOpen,
  6145. toggle: this.toggle
  6146. }, omit(this.props, omitKeys$3)));
  6147. };
  6148. return UncontrolledDropdown;
  6149. }(React.Component);
  6150. UncontrolledDropdown.propTypes = _extends({
  6151. defaultOpen: propTypes.bool
  6152. }, Dropdown.propTypes);
  6153. var UncontrolledNavDropdown = function UncontrolledNavDropdown(props) {
  6154. warnOnce('The "UncontrolledNavDropdown" component has been deprecated.\nPlease use component "UncontrolledDropdown" with nav prop.');
  6155. return React__default.createElement(UncontrolledDropdown, _extends({
  6156. nav: true
  6157. }, props));
  6158. };
  6159. var omitKeys$4 = ['defaultOpen'];
  6160. var UncontrolledTooltip =
  6161. /*#__PURE__*/
  6162. function (_Component) {
  6163. _inheritsLoose(UncontrolledTooltip, _Component);
  6164. function UncontrolledTooltip(props) {
  6165. var _this;
  6166. _this = _Component.call(this, props) || this;
  6167. _this.state = {
  6168. isOpen: props.defaultOpen || false
  6169. };
  6170. _this.toggle = _this.toggle.bind(_assertThisInitialized(_assertThisInitialized(_this)));
  6171. return _this;
  6172. }
  6173. var _proto = UncontrolledTooltip.prototype;
  6174. _proto.toggle = function toggle() {
  6175. this.setState({
  6176. isOpen: !this.state.isOpen
  6177. });
  6178. };
  6179. _proto.render = function render() {
  6180. return React__default.createElement(Tooltip, _extends({
  6181. isOpen: this.state.isOpen,
  6182. toggle: this.toggle
  6183. }, omit(this.props, omitKeys$4)));
  6184. };
  6185. return UncontrolledTooltip;
  6186. }(React.Component);
  6187. UncontrolledTooltip.propTypes = _extends({
  6188. defaultOpen: propTypes.bool
  6189. }, Tooltip.propTypes);
  6190. var propTypes$1a = {
  6191. tag: tagPropType,
  6192. type: propTypes.string,
  6193. size: propTypes.string,
  6194. color: propTypes.string,
  6195. className: propTypes.string,
  6196. cssModule: propTypes.object,
  6197. children: propTypes.string
  6198. };
  6199. var defaultProps$14 = {
  6200. tag: 'div',
  6201. type: 'border',
  6202. children: 'Loading...'
  6203. };
  6204. var Spinner = function Spinner(props) {
  6205. var className = props.className,
  6206. cssModule = props.cssModule,
  6207. type = props.type,
  6208. size = props.size,
  6209. color = props.color,
  6210. children = props.children,
  6211. Tag = props.tag,
  6212. attributes = _objectWithoutPropertiesLoose(props, ["className", "cssModule", "type", "size", "color", "children", "tag"]);
  6213. var classes = mapToCssModules(classnames(className, size ? "spinner-" + type + "-" + size : false, "spinner-" + type, color ? "text-" + color : false), cssModule);
  6214. return React__default.createElement(Tag, _extends({
  6215. role: "status"
  6216. }, attributes, {
  6217. className: classes
  6218. }), children && React__default.createElement("span", {
  6219. className: mapToCssModules('sr-only', cssModule)
  6220. }, children));
  6221. };
  6222. Spinner.propTypes = propTypes$1a;
  6223. Spinner.defaultProps = defaultProps$14;
  6224. exports.Container = Container;
  6225. exports.Row = Row;
  6226. exports.Col = Col;
  6227. exports.Navbar = Navbar;
  6228. exports.NavbarBrand = NavbarBrand;
  6229. exports.NavbarToggler = NavbarToggler;
  6230. exports.Nav = Nav;
  6231. exports.NavItem = NavItem;
  6232. exports.NavDropdown = NavDropdown;
  6233. exports.NavLink = NavLink;
  6234. exports.Breadcrumb = Breadcrumb;
  6235. exports.BreadcrumbItem = BreadcrumbItem;
  6236. exports.Button = Button;
  6237. exports.ButtonDropdown = ButtonDropdown;
  6238. exports.ButtonGroup = ButtonGroup;
  6239. exports.ButtonToolbar = ButtonToolbar;
  6240. exports.Dropdown = Dropdown;
  6241. exports.DropdownItem = DropdownItem;
  6242. exports.DropdownMenu = DropdownMenu;
  6243. exports.DropdownToggle = DropdownToggle;
  6244. exports.Fade = Fade;
  6245. exports.Badge = Badge;
  6246. exports.Card = Card;
  6247. exports.CardGroup = CardGroup;
  6248. exports.CardDeck = CardDeck;
  6249. exports.CardColumns = CardColumns;
  6250. exports.CardBody = CardBody;
  6251. exports.CardBlock = CardBlock;
  6252. exports.CardLink = CardLink;
  6253. exports.CardFooter = CardFooter;
  6254. exports.CardHeader = CardHeader;
  6255. exports.CardImg = CardImg;
  6256. exports.CardImgOverlay = CardImgOverlay;
  6257. exports.Carousel = Carousel;
  6258. exports.UncontrolledCarousel = UncontrolledCarousel;
  6259. exports.CarouselControl = CarouselControl;
  6260. exports.CarouselItem = CarouselItem;
  6261. exports.CarouselIndicators = CarouselIndicators;
  6262. exports.CarouselCaption = CarouselCaption;
  6263. exports.CardSubtitle = CardSubtitle;
  6264. exports.CardText = CardText;
  6265. exports.CardTitle = CardTitle;
  6266. exports.CustomInput = CustomInput;
  6267. exports.PopperContent = PopperContent;
  6268. exports.PopperTargetHelper = PopperTargetHelper;
  6269. exports.Popover = Popover;
  6270. exports.UncontrolledPopover = UncontrolledPopover;
  6271. exports.PopoverHeader = PopoverHeader;
  6272. exports.PopoverTitle = PopoverTitle;
  6273. exports.PopoverBody = PopoverBody;
  6274. exports.PopoverContent = PopoverContent;
  6275. exports.Progress = Progress;
  6276. exports.Modal = Modal;
  6277. exports.ModalHeader = ModalHeader;
  6278. exports.ModalBody = ModalBody;
  6279. exports.ModalFooter = ModalFooter;
  6280. exports.Tooltip = Tooltip;
  6281. exports.Table = Table;
  6282. exports.ListGroup = ListGroup;
  6283. exports.Form = Form;
  6284. exports.FormFeedback = FormFeedback;
  6285. exports.FormGroup = FormGroup;
  6286. exports.FormText = FormText;
  6287. exports.Input = Input;
  6288. exports.InputGroup = InputGroup;
  6289. exports.InputGroupAddon = InputGroupAddon;
  6290. exports.InputGroupButton = InputGroupButton;
  6291. exports.InputGroupButtonDropdown = InputGroupButtonDropdown;
  6292. exports.InputGroupText = InputGroupText;
  6293. exports.Label = Label;
  6294. exports.Media = Media;
  6295. exports.Pagination = Pagination;
  6296. exports.PaginationItem = PaginationItem;
  6297. exports.PaginationLink = PaginationLink;
  6298. exports.TabContent = TabContent;
  6299. exports.TabPane = TabPane;
  6300. exports.Jumbotron = Jumbotron;
  6301. exports.Alert = Alert;
  6302. exports.Collapse = Collapse;
  6303. exports.ListGroupItem = ListGroupItem;
  6304. exports.ListGroupItemHeading = ListGroupItemHeading;
  6305. exports.ListGroupItemText = ListGroupItemText;
  6306. exports.UncontrolledAlert = UncontrolledAlert;
  6307. exports.UncontrolledButtonDropdown = UncontrolledButtonDropdown;
  6308. exports.UncontrolledCollapse = UncontrolledCollapse;
  6309. exports.UncontrolledDropdown = UncontrolledDropdown;
  6310. exports.UncontrolledNavDropdown = UncontrolledNavDropdown;
  6311. exports.UncontrolledTooltip = UncontrolledTooltip;
  6312. exports.Spinner = Spinner;
  6313. exports.Util = utils;
  6314. Object.defineProperty(exports, '__esModule', { value: true });
  6315. }));
  6316. //# sourceMappingURL=reactstrap.js.map