Ohm-Management - Projektarbeit B-ME
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

bootstrap-material-design.js 193KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697269826992700270127022703270427052706270727082709271027112712271327142715271627172718271927202721272227232724272527262727272827292730273127322733273427352736273727382739274027412742274327442745274627472748274927502751275227532754275527562757275827592760276127622763276427652766276727682769277027712772277327742775277627772778277927802781278227832784278527862787278827892790279127922793279427952796279727982799280028012802280328042805280628072808280928102811281228132814281528162817281828192820282128222823282428252826282728282829283028312832283328342835283628372838283928402841284228432844284528462847284828492850285128522853285428552856285728582859286028612862286328642865286628672868286928702871287228732874287528762877287828792880288128822883288428852886288728882889289028912892289328942895289628972898289929002901290229032904290529062907290829092910291129122913291429152916291729182919292029212922292329242925292629272928292929302931293229332934293529362937293829392940294129422943294429452946294729482949295029512952295329542955295629572958295929602961296229632964296529662967296829692970297129722973297429752976297729782979298029812982298329842985298629872988298929902991299229932994299529962997299829993000300130023003300430053006300730083009301030113012301330143015301630173018301930203021302230233024302530263027302830293030303130323033303430353036303730383039304030413042304330443045304630473048304930503051305230533054305530563057305830593060306130623063306430653066306730683069307030713072307330743075307630773078307930803081308230833084308530863087308830893090309130923093309430953096309730983099310031013102310331043105310631073108310931103111311231133114311531163117311831193120312131223123312431253126312731283129313031313132313331343135313631373138313931403141314231433144314531463147314831493150315131523153315431553156315731583159316031613162316331643165316631673168316931703171317231733174317531763177317831793180318131823183318431853186318731883189319031913192319331943195319631973198319932003201320232033204320532063207320832093210321132123213321432153216321732183219322032213222322332243225322632273228322932303231323232333234323532363237323832393240324132423243324432453246324732483249325032513252325332543255325632573258325932603261326232633264326532663267326832693270327132723273327432753276327732783279328032813282328332843285328632873288328932903291329232933294329532963297329832993300330133023303330433053306330733083309331033113312331333143315331633173318331933203321332233233324332533263327332833293330333133323333333433353336333733383339334033413342334333443345334633473348334933503351335233533354335533563357335833593360336133623363336433653366336733683369337033713372337333743375337633773378337933803381338233833384338533863387338833893390339133923393339433953396339733983399340034013402340334043405340634073408340934103411341234133414341534163417341834193420342134223423342434253426342734283429343034313432343334343435343634373438343934403441344234433444344534463447344834493450345134523453345434553456345734583459346034613462346334643465346634673468346934703471347234733474347534763477347834793480348134823483348434853486348734883489349034913492349334943495349634973498349935003501350235033504350535063507350835093510351135123513351435153516351735183519352035213522352335243525352635273528352935303531353235333534353535363537353835393540354135423543354435453546354735483549355035513552355335543555355635573558355935603561356235633564356535663567356835693570357135723573357435753576357735783579358035813582358335843585358635873588358935903591359235933594359535963597359835993600360136023603360436053606360736083609361036113612361336143615361636173618361936203621362236233624362536263627362836293630363136323633363436353636363736383639364036413642364336443645364636473648364936503651365236533654365536563657365836593660366136623663366436653666366736683669367036713672367336743675367636773678367936803681368236833684368536863687368836893690369136923693369436953696369736983699370037013702370337043705370637073708370937103711371237133714371537163717371837193720372137223723372437253726372737283729373037313732373337343735373637373738373937403741374237433744374537463747374837493750375137523753375437553756375737583759376037613762376337643765376637673768376937703771377237733774377537763777377837793780378137823783378437853786378737883789379037913792379337943795379637973798379938003801380238033804380538063807380838093810381138123813381438153816381738183819382038213822382338243825382638273828382938303831383238333834383538363837383838393840384138423843384438453846384738483849385038513852385338543855385638573858385938603861386238633864386538663867386838693870387138723873387438753876387738783879388038813882388338843885388638873888388938903891389238933894389538963897389838993900390139023903390439053906390739083909391039113912391339143915391639173918391939203921392239233924392539263927392839293930393139323933393439353936393739383939394039413942394339443945394639473948394939503951395239533954395539563957395839593960396139623963396439653966396739683969397039713972397339743975397639773978397939803981398239833984398539863987398839893990399139923993399439953996399739983999400040014002400340044005400640074008400940104011401240134014401540164017401840194020402140224023402440254026402740284029403040314032403340344035403640374038403940404041404240434044404540464047404840494050405140524053405440554056405740584059406040614062406340644065406640674068406940704071407240734074407540764077407840794080408140824083408440854086408740884089409040914092409340944095409640974098409941004101410241034104410541064107410841094110411141124113411441154116411741184119412041214122412341244125412641274128412941304131413241334134413541364137413841394140414141424143414441454146414741484149415041514152415341544155415641574158415941604161416241634164416541664167416841694170417141724173417441754176417741784179418041814182418341844185418641874188418941904191419241934194419541964197419841994200420142024203420442054206420742084209421042114212421342144215421642174218421942204221422242234224422542264227422842294230423142324233423442354236423742384239424042414242424342444245424642474248424942504251425242534254425542564257425842594260426142624263426442654266426742684269427042714272427342744275427642774278427942804281428242834284428542864287428842894290429142924293429442954296429742984299430043014302430343044305430643074308430943104311431243134314431543164317431843194320432143224323432443254326432743284329433043314332433343344335433643374338433943404341434243434344434543464347434843494350435143524353435443554356435743584359436043614362436343644365436643674368436943704371437243734374437543764377437843794380438143824383438443854386438743884389439043914392439343944395439643974398439944004401440244034404440544064407440844094410441144124413441444154416441744184419442044214422442344244425442644274428442944304431443244334434443544364437443844394440444144424443444444454446444744484449445044514452445344544455445644574458445944604461446244634464446544664467446844694470447144724473447444754476447744784479448044814482448344844485448644874488448944904491449244934494449544964497449844994500450145024503450445054506450745084509451045114512451345144515451645174518451945204521452245234524452545264527452845294530453145324533453445354536453745384539454045414542454345444545454645474548454945504551455245534554455545564557455845594560456145624563456445654566456745684569457045714572457345744575457645774578457945804581458245834584458545864587458845894590459145924593459445954596459745984599460046014602460346044605460646074608460946104611461246134614461546164617461846194620462146224623462446254626462746284629463046314632463346344635463646374638463946404641464246434644464546464647464846494650465146524653465446554656465746584659466046614662466346644665466646674668466946704671467246734674467546764677467846794680468146824683468446854686468746884689469046914692469346944695469646974698469947004701470247034704470547064707470847094710471147124713471447154716471747184719472047214722472347244725472647274728472947304731473247334734473547364737473847394740474147424743474447454746474747484749475047514752475347544755475647574758475947604761476247634764476547664767476847694770477147724773477447754776477747784779478047814782478347844785478647874788478947904791479247934794479547964797479847994800480148024803480448054806480748084809481048114812481348144815481648174818481948204821482248234824482548264827482848294830483148324833483448354836483748384839484048414842484348444845484648474848484948504851485248534854485548564857485848594860486148624863486448654866486748684869487048714872487348744875487648774878487948804881488248834884488548864887488848894890489148924893489448954896489748984899490049014902490349044905490649074908490949104911491249134914491549164917491849194920492149224923492449254926492749284929493049314932493349344935493649374938493949404941494249434944494549464947494849494950495149524953495449554956495749584959496049614962496349644965496649674968496949704971497249734974497549764977497849794980498149824983498449854986498749884989499049914992499349944995499649974998499950005001500250035004500550065007500850095010501150125013501450155016501750185019502050215022502350245025502650275028502950305031503250335034503550365037503850395040504150425043504450455046504750485049505050515052505350545055505650575058505950605061506250635064506550665067506850695070507150725073507450755076507750785079508050815082508350845085508650875088508950905091509250935094509550965097509850995100510151025103510451055106510751085109511051115112511351145115511651175118511951205121512251235124512551265127512851295130513151325133513451355136513751385139514051415142514351445145514651475148514951505151515251535154515551565157515851595160516151625163516451655166516751685169517051715172517351745175517651775178517951805181518251835184518551865187518851895190519151925193519451955196519751985199520052015202520352045205520652075208520952105211521252135214521552165217521852195220522152225223522452255226522752285229523052315232523352345235523652375238523952405241524252435244524552465247524852495250525152525253525452555256525752585259526052615262526352645265526652675268526952705271527252735274527552765277527852795280528152825283528452855286528752885289529052915292529352945295529652975298529953005301530253035304530553065307530853095310531153125313531453155316531753185319532053215322532353245325532653275328532953305331533253335334533553365337533853395340534153425343534453455346534753485349535053515352535353545355535653575358535953605361536253635364536553665367536853695370537153725373537453755376537753785379538053815382538353845385538653875388538953905391539253935394539553965397539853995400540154025403540454055406540754085409541054115412541354145415541654175418541954205421542254235424542554265427542854295430543154325433543454355436543754385439544054415442544354445445544654475448544954505451545254535454545554565457545854595460546154625463546454655466546754685469547054715472547354745475547654775478547954805481548254835484548554865487548854895490549154925493549454955496549754985499550055015502550355045505550655075508550955105511551255135514551555165517551855195520552155225523552455255526552755285529553055315532553355345535553655375538553955405541554255435544554555465547554855495550555155525553555455555556555755585559556055615562556355645565556655675568556955705571557255735574557555765577557855795580558155825583558455855586558755885589559055915592559355945595559655975598559956005601560256035604560556065607560856095610561156125613561456155616561756185619562056215622562356245625562656275628562956305631563256335634563556365637563856395640564156425643564456455646564756485649565056515652565356545655565656575658565956605661566256635664566556665667566856695670567156725673567456755676567756785679568056815682568356845685568656875688568956905691569256935694569556965697569856995700570157025703570457055706570757085709571057115712571357145715571657175718571957205721572257235724572557265727572857295730573157325733573457355736573757385739574057415742574357445745574657475748574957505751575257535754575557565757575857595760576157625763576457655766576757685769577057715772577357745775577657775778577957805781578257835784578557865787578857895790579157925793579457955796579757985799580058015802580358045805580658075808580958105811581258135814581558165817581858195820582158225823582458255826582758285829583058315832583358345835583658375838583958405841584258435844584558465847584858495850585158525853585458555856585758585859586058615862586358645865586658675868586958705871587258735874587558765877587858795880588158825883588458855886588758885889589058915892589358945895589658975898589959005901590259035904590559065907590859095910591159125913591459155916591759185919592059215922592359245925592659275928592959305931593259335934593559365937593859395940594159425943594459455946594759485949595059515952595359545955595659575958595959605961596259635964596559665967596859695970597159725973597459755976597759785979598059815982598359845985598659875988598959905991599259935994599559965997599859996000600160026003600460056006600760086009601060116012601360146015601660176018601960206021602260236024602560266027602860296030603160326033603460356036603760386039604060416042604360446045604660476048604960506051605260536054605560566057605860596060606160626063606460656066606760686069607060716072607360746075607660776078607960806081608260836084608560866087608860896090609160926093609460956096609760986099610061016102610361046105610661076108610961106111611261136114611561166117611861196120612161226123612461256126612761286129613061316132613361346135613661376138613961406141614261436144614561466147614861496150615161526153615461556156615761586159616061616162616361646165616661676168616961706171617261736174617561766177617861796180618161826183618461856186618761886189619061916192619361946195619661976198619962006201620262036204620562066207620862096210621162126213621462156216621762186219622062216222622362246225622662276228622962306231623262336234623562366237623862396240624162426243624462456246624762486249625062516252625362546255625662576258625962606261626262636264626562666267626862696270627162726273627462756276627762786279628062816282628362846285628662876288628962906291629262936294629562966297629862996300630163026303630463056306630763086309631063116312631363146315631663176318631963206321632263236324632563266327632863296330633163326333633463356336633763386339634063416342634363446345634663476348634963506351635263536354635563566357635863596360636163626363636463656366636763686369637063716372637363746375637663776378637963806381638263836384638563866387638863896390639163926393639463956396639763986399640064016402640364046405640664076408640964106411641264136414641564166417641864196420642164226423642464256426642764286429643064316432643364346435643664376438643964406441644264436444644564466447644864496450645164526453645464556456645764586459646064616462646364646465646664676468646964706471647264736474647564766477647864796480648164826483648464856486648764886489649064916492649364946495649664976498649965006501650265036504650565066507650865096510651165126513651465156516651765186519652065216522652365246525652665276528652965306531653265336534653565366537
  1. (function (global, factory) {
  2. typeof exports === 'object' && typeof module !== 'undefined' ? factory(require('jquery'), require('popper.js')) :
  3. typeof define === 'function' && define.amd ? define(['jquery', 'popper.js'], factory) :
  4. (factory(global.jQuery,global.Popper));
  5. }(this, (function ($,Popper$1) { 'use strict';
  6. $ = $ && $.hasOwnProperty('default') ? $['default'] : $;
  7. Popper$1 = Popper$1 && Popper$1.hasOwnProperty('default') ? Popper$1['default'] : Popper$1;
  8. function _defineProperties(target, props) {
  9. for (var i = 0; i < props.length; i++) {
  10. var descriptor = props[i];
  11. descriptor.enumerable = descriptor.enumerable || false;
  12. descriptor.configurable = true;
  13. if ("value" in descriptor) descriptor.writable = true;
  14. Object.defineProperty(target, descriptor.key, descriptor);
  15. }
  16. }
  17. function _createClass(Constructor, protoProps, staticProps) {
  18. if (protoProps) _defineProperties(Constructor.prototype, protoProps);
  19. if (staticProps) _defineProperties(Constructor, staticProps);
  20. return Constructor;
  21. }
  22. function _extends() {
  23. _extends = Object.assign || function (target) {
  24. for (var i = 1; i < arguments.length; i++) {
  25. var source = arguments[i];
  26. for (var key in source) {
  27. if (Object.prototype.hasOwnProperty.call(source, key)) {
  28. target[key] = source[key];
  29. }
  30. }
  31. }
  32. return target;
  33. };
  34. return _extends.apply(this, arguments);
  35. }
  36. function _inheritsLoose(subClass, superClass) {
  37. subClass.prototype = Object.create(superClass.prototype);
  38. subClass.prototype.constructor = subClass;
  39. subClass.__proto__ = superClass;
  40. }
  41. /**
  42. * --------------------------------------------------------------------------
  43. * Bootstrap (v4.0.0): util.js
  44. * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
  45. * --------------------------------------------------------------------------
  46. */
  47. var Util = function ($$$1) {
  48. /**
  49. * ------------------------------------------------------------------------
  50. * Private TransitionEnd Helpers
  51. * ------------------------------------------------------------------------
  52. */
  53. var transition = false;
  54. var MAX_UID = 1000000; // Shoutout AngusCroll (https://goo.gl/pxwQGp)
  55. function toType(obj) {
  56. return {}.toString.call(obj).match(/\s([a-zA-Z]+)/)[1].toLowerCase();
  57. }
  58. function getSpecialTransitionEndEvent() {
  59. return {
  60. bindType: transition.end,
  61. delegateType: transition.end,
  62. handle: function handle(event) {
  63. if ($$$1(event.target).is(this)) {
  64. return event.handleObj.handler.apply(this, arguments); // eslint-disable-line prefer-rest-params
  65. }
  66. return undefined; // eslint-disable-line no-undefined
  67. }
  68. };
  69. }
  70. function transitionEndTest() {
  71. if (typeof window !== 'undefined' && window.QUnit) {
  72. return false;
  73. }
  74. return {
  75. end: 'transitionend'
  76. };
  77. }
  78. function transitionEndEmulator(duration) {
  79. var _this = this;
  80. var called = false;
  81. $$$1(this).one(Util.TRANSITION_END, function () {
  82. called = true;
  83. });
  84. setTimeout(function () {
  85. if (!called) {
  86. Util.triggerTransitionEnd(_this);
  87. }
  88. }, duration);
  89. return this;
  90. }
  91. function setTransitionEndSupport() {
  92. transition = transitionEndTest();
  93. $$$1.fn.emulateTransitionEnd = transitionEndEmulator;
  94. if (Util.supportsTransitionEnd()) {
  95. $$$1.event.special[Util.TRANSITION_END] = getSpecialTransitionEndEvent();
  96. }
  97. }
  98. function escapeId(selector) {
  99. // We escape IDs in case of special selectors (selector = '#myId:something')
  100. // $.escapeSelector does not exist in jQuery < 3
  101. selector = typeof $$$1.escapeSelector === 'function' ? $$$1.escapeSelector(selector).substr(1) : selector.replace(/(:|\.|\[|\]|,|=|@)/g, '\\$1');
  102. return selector;
  103. }
  104. /**
  105. * --------------------------------------------------------------------------
  106. * Public Util Api
  107. * --------------------------------------------------------------------------
  108. */
  109. var Util = {
  110. TRANSITION_END: 'bsTransitionEnd',
  111. getUID: function getUID(prefix) {
  112. do {
  113. // eslint-disable-next-line no-bitwise
  114. prefix += ~~(Math.random() * MAX_UID); // "~~" acts like a faster Math.floor() here
  115. } while (document.getElementById(prefix));
  116. return prefix;
  117. },
  118. getSelectorFromElement: function getSelectorFromElement(element) {
  119. var selector = element.getAttribute('data-target');
  120. if (!selector || selector === '#') {
  121. selector = element.getAttribute('href') || '';
  122. } // If it's an ID
  123. if (selector.charAt(0) === '#') {
  124. selector = escapeId(selector);
  125. }
  126. try {
  127. var $selector = $$$1(document).find(selector);
  128. return $selector.length > 0 ? selector : null;
  129. } catch (err) {
  130. return null;
  131. }
  132. },
  133. reflow: function reflow(element) {
  134. return element.offsetHeight;
  135. },
  136. triggerTransitionEnd: function triggerTransitionEnd(element) {
  137. $$$1(element).trigger(transition.end);
  138. },
  139. supportsTransitionEnd: function supportsTransitionEnd() {
  140. return Boolean(transition);
  141. },
  142. isElement: function isElement(obj) {
  143. return (obj[0] || obj).nodeType;
  144. },
  145. typeCheckConfig: function typeCheckConfig(componentName, config, configTypes) {
  146. for (var property in configTypes) {
  147. if (Object.prototype.hasOwnProperty.call(configTypes, property)) {
  148. var expectedTypes = configTypes[property];
  149. var value = config[property];
  150. var valueType = value && Util.isElement(value) ? 'element' : toType(value);
  151. if (!new RegExp(expectedTypes).test(valueType)) {
  152. throw new Error(componentName.toUpperCase() + ": " + ("Option \"" + property + "\" provided type \"" + valueType + "\" ") + ("but expected type \"" + expectedTypes + "\"."));
  153. }
  154. }
  155. }
  156. }
  157. };
  158. setTransitionEndSupport();
  159. return Util;
  160. }($);
  161. /**
  162. * --------------------------------------------------------------------------
  163. * Bootstrap (v4.0.0): alert.js
  164. * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
  165. * --------------------------------------------------------------------------
  166. */
  167. var Alert = function ($$$1) {
  168. /**
  169. * ------------------------------------------------------------------------
  170. * Constants
  171. * ------------------------------------------------------------------------
  172. */
  173. var NAME = 'alert';
  174. var VERSION = '4.0.0';
  175. var DATA_KEY = 'bs.alert';
  176. var EVENT_KEY = "." + DATA_KEY;
  177. var DATA_API_KEY = '.data-api';
  178. var JQUERY_NO_CONFLICT = $$$1.fn[NAME];
  179. var TRANSITION_DURATION = 150;
  180. var Selector = {
  181. DISMISS: '[data-dismiss="alert"]'
  182. };
  183. var Event = {
  184. CLOSE: "close" + EVENT_KEY,
  185. CLOSED: "closed" + EVENT_KEY,
  186. CLICK_DATA_API: "click" + EVENT_KEY + DATA_API_KEY
  187. };
  188. var ClassName = {
  189. ALERT: 'alert',
  190. FADE: 'fade',
  191. SHOW: 'show'
  192. /**
  193. * ------------------------------------------------------------------------
  194. * Class Definition
  195. * ------------------------------------------------------------------------
  196. */
  197. };
  198. var Alert =
  199. /*#__PURE__*/
  200. function () {
  201. function Alert(element) {
  202. this._element = element;
  203. } // Getters
  204. var _proto = Alert.prototype;
  205. // Public
  206. _proto.close = function close(element) {
  207. element = element || this._element;
  208. var rootElement = this._getRootElement(element);
  209. var customEvent = this._triggerCloseEvent(rootElement);
  210. if (customEvent.isDefaultPrevented()) {
  211. return;
  212. }
  213. this._removeElement(rootElement);
  214. };
  215. _proto.dispose = function dispose() {
  216. $$$1.removeData(this._element, DATA_KEY);
  217. this._element = null;
  218. }; // Private
  219. _proto._getRootElement = function _getRootElement(element) {
  220. var selector = Util.getSelectorFromElement(element);
  221. var parent = false;
  222. if (selector) {
  223. parent = $$$1(selector)[0];
  224. }
  225. if (!parent) {
  226. parent = $$$1(element).closest("." + ClassName.ALERT)[0];
  227. }
  228. return parent;
  229. };
  230. _proto._triggerCloseEvent = function _triggerCloseEvent(element) {
  231. var closeEvent = $$$1.Event(Event.CLOSE);
  232. $$$1(element).trigger(closeEvent);
  233. return closeEvent;
  234. };
  235. _proto._removeElement = function _removeElement(element) {
  236. var _this = this;
  237. $$$1(element).removeClass(ClassName.SHOW);
  238. if (!Util.supportsTransitionEnd() || !$$$1(element).hasClass(ClassName.FADE)) {
  239. this._destroyElement(element);
  240. return;
  241. }
  242. $$$1(element).one(Util.TRANSITION_END, function (event) {
  243. return _this._destroyElement(element, event);
  244. }).emulateTransitionEnd(TRANSITION_DURATION);
  245. };
  246. _proto._destroyElement = function _destroyElement(element) {
  247. $$$1(element).detach().trigger(Event.CLOSED).remove();
  248. }; // Static
  249. Alert._jQueryInterface = function _jQueryInterface(config) {
  250. return this.each(function () {
  251. var $element = $$$1(this);
  252. var data = $element.data(DATA_KEY);
  253. if (!data) {
  254. data = new Alert(this);
  255. $element.data(DATA_KEY, data);
  256. }
  257. if (config === 'close') {
  258. data[config](this);
  259. }
  260. });
  261. };
  262. Alert._handleDismiss = function _handleDismiss(alertInstance) {
  263. return function (event) {
  264. if (event) {
  265. event.preventDefault();
  266. }
  267. alertInstance.close(this);
  268. };
  269. };
  270. _createClass(Alert, null, [{
  271. key: "VERSION",
  272. get: function get() {
  273. return VERSION;
  274. }
  275. }]);
  276. return Alert;
  277. }();
  278. /**
  279. * ------------------------------------------------------------------------
  280. * Data Api implementation
  281. * ------------------------------------------------------------------------
  282. */
  283. $$$1(document).on(Event.CLICK_DATA_API, Selector.DISMISS, Alert._handleDismiss(new Alert()));
  284. /**
  285. * ------------------------------------------------------------------------
  286. * jQuery
  287. * ------------------------------------------------------------------------
  288. */
  289. $$$1.fn[NAME] = Alert._jQueryInterface;
  290. $$$1.fn[NAME].Constructor = Alert;
  291. $$$1.fn[NAME].noConflict = function () {
  292. $$$1.fn[NAME] = JQUERY_NO_CONFLICT;
  293. return Alert._jQueryInterface;
  294. };
  295. return Alert;
  296. }($);
  297. /**
  298. * --------------------------------------------------------------------------
  299. * Bootstrap (v4.0.0): button.js
  300. * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
  301. * --------------------------------------------------------------------------
  302. */
  303. var Button = function ($$$1) {
  304. /**
  305. * ------------------------------------------------------------------------
  306. * Constants
  307. * ------------------------------------------------------------------------
  308. */
  309. var NAME = 'button';
  310. var VERSION = '4.0.0';
  311. var DATA_KEY = 'bs.button';
  312. var EVENT_KEY = "." + DATA_KEY;
  313. var DATA_API_KEY = '.data-api';
  314. var JQUERY_NO_CONFLICT = $$$1.fn[NAME];
  315. var ClassName = {
  316. ACTIVE: 'active',
  317. BUTTON: 'btn',
  318. FOCUS: 'focus'
  319. };
  320. var Selector = {
  321. DATA_TOGGLE_CARROT: '[data-toggle^="button"]',
  322. DATA_TOGGLE: '[data-toggle="buttons"]',
  323. INPUT: 'input',
  324. ACTIVE: '.active',
  325. BUTTON: '.btn'
  326. };
  327. var Event = {
  328. CLICK_DATA_API: "click" + EVENT_KEY + DATA_API_KEY,
  329. FOCUS_BLUR_DATA_API: "focus" + EVENT_KEY + DATA_API_KEY + " " + ("blur" + EVENT_KEY + DATA_API_KEY)
  330. /**
  331. * ------------------------------------------------------------------------
  332. * Class Definition
  333. * ------------------------------------------------------------------------
  334. */
  335. };
  336. var Button =
  337. /*#__PURE__*/
  338. function () {
  339. function Button(element) {
  340. this._element = element;
  341. } // Getters
  342. var _proto = Button.prototype;
  343. // Public
  344. _proto.toggle = function toggle() {
  345. var triggerChangeEvent = true;
  346. var addAriaPressed = true;
  347. var rootElement = $$$1(this._element).closest(Selector.DATA_TOGGLE)[0];
  348. if (rootElement) {
  349. var input = $$$1(this._element).find(Selector.INPUT)[0];
  350. if (input) {
  351. if (input.type === 'radio') {
  352. if (input.checked && $$$1(this._element).hasClass(ClassName.ACTIVE)) {
  353. triggerChangeEvent = false;
  354. } else {
  355. var activeElement = $$$1(rootElement).find(Selector.ACTIVE)[0];
  356. if (activeElement) {
  357. $$$1(activeElement).removeClass(ClassName.ACTIVE);
  358. }
  359. }
  360. }
  361. if (triggerChangeEvent) {
  362. if (input.hasAttribute('disabled') || rootElement.hasAttribute('disabled') || input.classList.contains('disabled') || rootElement.classList.contains('disabled')) {
  363. return;
  364. }
  365. input.checked = !$$$1(this._element).hasClass(ClassName.ACTIVE);
  366. $$$1(input).trigger('change');
  367. }
  368. input.focus();
  369. addAriaPressed = false;
  370. }
  371. }
  372. if (addAriaPressed) {
  373. this._element.setAttribute('aria-pressed', !$$$1(this._element).hasClass(ClassName.ACTIVE));
  374. }
  375. if (triggerChangeEvent) {
  376. $$$1(this._element).toggleClass(ClassName.ACTIVE);
  377. }
  378. };
  379. _proto.dispose = function dispose() {
  380. $$$1.removeData(this._element, DATA_KEY);
  381. this._element = null;
  382. }; // Static
  383. Button._jQueryInterface = function _jQueryInterface(config) {
  384. return this.each(function () {
  385. var data = $$$1(this).data(DATA_KEY);
  386. if (!data) {
  387. data = new Button(this);
  388. $$$1(this).data(DATA_KEY, data);
  389. }
  390. if (config === 'toggle') {
  391. data[config]();
  392. }
  393. });
  394. };
  395. _createClass(Button, null, [{
  396. key: "VERSION",
  397. get: function get() {
  398. return VERSION;
  399. }
  400. }]);
  401. return Button;
  402. }();
  403. /**
  404. * ------------------------------------------------------------------------
  405. * Data Api implementation
  406. * ------------------------------------------------------------------------
  407. */
  408. $$$1(document).on(Event.CLICK_DATA_API, Selector.DATA_TOGGLE_CARROT, function (event) {
  409. event.preventDefault();
  410. var button = event.target;
  411. if (!$$$1(button).hasClass(ClassName.BUTTON)) {
  412. button = $$$1(button).closest(Selector.BUTTON);
  413. }
  414. Button._jQueryInterface.call($$$1(button), 'toggle');
  415. }).on(Event.FOCUS_BLUR_DATA_API, Selector.DATA_TOGGLE_CARROT, function (event) {
  416. var button = $$$1(event.target).closest(Selector.BUTTON)[0];
  417. $$$1(button).toggleClass(ClassName.FOCUS, /^focus(in)?$/.test(event.type));
  418. });
  419. /**
  420. * ------------------------------------------------------------------------
  421. * jQuery
  422. * ------------------------------------------------------------------------
  423. */
  424. $$$1.fn[NAME] = Button._jQueryInterface;
  425. $$$1.fn[NAME].Constructor = Button;
  426. $$$1.fn[NAME].noConflict = function () {
  427. $$$1.fn[NAME] = JQUERY_NO_CONFLICT;
  428. return Button._jQueryInterface;
  429. };
  430. return Button;
  431. }($);
  432. /**
  433. * --------------------------------------------------------------------------
  434. * Bootstrap (v4.0.0): carousel.js
  435. * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
  436. * --------------------------------------------------------------------------
  437. */
  438. var Carousel = function ($$$1) {
  439. /**
  440. * ------------------------------------------------------------------------
  441. * Constants
  442. * ------------------------------------------------------------------------
  443. */
  444. var NAME = 'carousel';
  445. var VERSION = '4.0.0';
  446. var DATA_KEY = 'bs.carousel';
  447. var EVENT_KEY = "." + DATA_KEY;
  448. var DATA_API_KEY = '.data-api';
  449. var JQUERY_NO_CONFLICT = $$$1.fn[NAME];
  450. var TRANSITION_DURATION = 600;
  451. var ARROW_LEFT_KEYCODE = 37; // KeyboardEvent.which value for left arrow key
  452. var ARROW_RIGHT_KEYCODE = 39; // KeyboardEvent.which value for right arrow key
  453. var TOUCHEVENT_COMPAT_WAIT = 500; // Time for mouse compat events to fire after touch
  454. var Default = {
  455. interval: 5000,
  456. keyboard: true,
  457. slide: false,
  458. pause: 'hover',
  459. wrap: true
  460. };
  461. var DefaultType = {
  462. interval: '(number|boolean)',
  463. keyboard: 'boolean',
  464. slide: '(boolean|string)',
  465. pause: '(string|boolean)',
  466. wrap: 'boolean'
  467. };
  468. var Direction = {
  469. NEXT: 'next',
  470. PREV: 'prev',
  471. LEFT: 'left',
  472. RIGHT: 'right'
  473. };
  474. var Event = {
  475. SLIDE: "slide" + EVENT_KEY,
  476. SLID: "slid" + EVENT_KEY,
  477. KEYDOWN: "keydown" + EVENT_KEY,
  478. MOUSEENTER: "mouseenter" + EVENT_KEY,
  479. MOUSELEAVE: "mouseleave" + EVENT_KEY,
  480. TOUCHEND: "touchend" + EVENT_KEY,
  481. LOAD_DATA_API: "load" + EVENT_KEY + DATA_API_KEY,
  482. CLICK_DATA_API: "click" + EVENT_KEY + DATA_API_KEY
  483. };
  484. var ClassName = {
  485. CAROUSEL: 'carousel',
  486. ACTIVE: 'active',
  487. SLIDE: 'slide',
  488. RIGHT: 'carousel-item-right',
  489. LEFT: 'carousel-item-left',
  490. NEXT: 'carousel-item-next',
  491. PREV: 'carousel-item-prev',
  492. ITEM: 'carousel-item'
  493. };
  494. var Selector = {
  495. ACTIVE: '.active',
  496. ACTIVE_ITEM: '.active.carousel-item',
  497. ITEM: '.carousel-item',
  498. NEXT_PREV: '.carousel-item-next, .carousel-item-prev',
  499. INDICATORS: '.carousel-indicators',
  500. DATA_SLIDE: '[data-slide], [data-slide-to]',
  501. DATA_RIDE: '[data-ride="carousel"]'
  502. /**
  503. * ------------------------------------------------------------------------
  504. * Class Definition
  505. * ------------------------------------------------------------------------
  506. */
  507. };
  508. var Carousel =
  509. /*#__PURE__*/
  510. function () {
  511. function Carousel(element, config) {
  512. this._items = null;
  513. this._interval = null;
  514. this._activeElement = null;
  515. this._isPaused = false;
  516. this._isSliding = false;
  517. this.touchTimeout = null;
  518. this._config = this._getConfig(config);
  519. this._element = $$$1(element)[0];
  520. this._indicatorsElement = $$$1(this._element).find(Selector.INDICATORS)[0];
  521. this._addEventListeners();
  522. } // Getters
  523. var _proto = Carousel.prototype;
  524. // Public
  525. _proto.next = function next() {
  526. if (!this._isSliding) {
  527. this._slide(Direction.NEXT);
  528. }
  529. };
  530. _proto.nextWhenVisible = function nextWhenVisible() {
  531. // Don't call next when the page isn't visible
  532. // or the carousel or its parent isn't visible
  533. if (!document.hidden && $$$1(this._element).is(':visible') && $$$1(this._element).css('visibility') !== 'hidden') {
  534. this.next();
  535. }
  536. };
  537. _proto.prev = function prev() {
  538. if (!this._isSliding) {
  539. this._slide(Direction.PREV);
  540. }
  541. };
  542. _proto.pause = function pause(event) {
  543. if (!event) {
  544. this._isPaused = true;
  545. }
  546. if ($$$1(this._element).find(Selector.NEXT_PREV)[0] && Util.supportsTransitionEnd()) {
  547. Util.triggerTransitionEnd(this._element);
  548. this.cycle(true);
  549. }
  550. clearInterval(this._interval);
  551. this._interval = null;
  552. };
  553. _proto.cycle = function cycle(event) {
  554. if (!event) {
  555. this._isPaused = false;
  556. }
  557. if (this._interval) {
  558. clearInterval(this._interval);
  559. this._interval = null;
  560. }
  561. if (this._config.interval && !this._isPaused) {
  562. this._interval = setInterval((document.visibilityState ? this.nextWhenVisible : this.next).bind(this), this._config.interval);
  563. }
  564. };
  565. _proto.to = function to(index) {
  566. var _this = this;
  567. this._activeElement = $$$1(this._element).find(Selector.ACTIVE_ITEM)[0];
  568. var activeIndex = this._getItemIndex(this._activeElement);
  569. if (index > this._items.length - 1 || index < 0) {
  570. return;
  571. }
  572. if (this._isSliding) {
  573. $$$1(this._element).one(Event.SLID, function () {
  574. return _this.to(index);
  575. });
  576. return;
  577. }
  578. if (activeIndex === index) {
  579. this.pause();
  580. this.cycle();
  581. return;
  582. }
  583. var direction = index > activeIndex ? Direction.NEXT : Direction.PREV;
  584. this._slide(direction, this._items[index]);
  585. };
  586. _proto.dispose = function dispose() {
  587. $$$1(this._element).off(EVENT_KEY);
  588. $$$1.removeData(this._element, DATA_KEY);
  589. this._items = null;
  590. this._config = null;
  591. this._element = null;
  592. this._interval = null;
  593. this._isPaused = null;
  594. this._isSliding = null;
  595. this._activeElement = null;
  596. this._indicatorsElement = null;
  597. }; // Private
  598. _proto._getConfig = function _getConfig(config) {
  599. config = _extends({}, Default, config);
  600. Util.typeCheckConfig(NAME, config, DefaultType);
  601. return config;
  602. };
  603. _proto._addEventListeners = function _addEventListeners() {
  604. var _this2 = this;
  605. if (this._config.keyboard) {
  606. $$$1(this._element).on(Event.KEYDOWN, function (event) {
  607. return _this2._keydown(event);
  608. });
  609. }
  610. if (this._config.pause === 'hover') {
  611. $$$1(this._element).on(Event.MOUSEENTER, function (event) {
  612. return _this2.pause(event);
  613. }).on(Event.MOUSELEAVE, function (event) {
  614. return _this2.cycle(event);
  615. });
  616. if ('ontouchstart' in document.documentElement) {
  617. // If it's a touch-enabled device, mouseenter/leave are fired as
  618. // part of the mouse compatibility events on first tap - the carousel
  619. // would stop cycling until user tapped out of it;
  620. // here, we listen for touchend, explicitly pause the carousel
  621. // (as if it's the second time we tap on it, mouseenter compat event
  622. // is NOT fired) and after a timeout (to allow for mouse compatibility
  623. // events to fire) we explicitly restart cycling
  624. $$$1(this._element).on(Event.TOUCHEND, function () {
  625. _this2.pause();
  626. if (_this2.touchTimeout) {
  627. clearTimeout(_this2.touchTimeout);
  628. }
  629. _this2.touchTimeout = setTimeout(function (event) {
  630. return _this2.cycle(event);
  631. }, TOUCHEVENT_COMPAT_WAIT + _this2._config.interval);
  632. });
  633. }
  634. }
  635. };
  636. _proto._keydown = function _keydown(event) {
  637. if (/input|textarea/i.test(event.target.tagName)) {
  638. return;
  639. }
  640. switch (event.which) {
  641. case ARROW_LEFT_KEYCODE:
  642. event.preventDefault();
  643. this.prev();
  644. break;
  645. case ARROW_RIGHT_KEYCODE:
  646. event.preventDefault();
  647. this.next();
  648. break;
  649. default:
  650. }
  651. };
  652. _proto._getItemIndex = function _getItemIndex(element) {
  653. this._items = $$$1.makeArray($$$1(element).parent().find(Selector.ITEM));
  654. return this._items.indexOf(element);
  655. };
  656. _proto._getItemByDirection = function _getItemByDirection(direction, activeElement) {
  657. var isNextDirection = direction === Direction.NEXT;
  658. var isPrevDirection = direction === Direction.PREV;
  659. var activeIndex = this._getItemIndex(activeElement);
  660. var lastItemIndex = this._items.length - 1;
  661. var isGoingToWrap = isPrevDirection && activeIndex === 0 || isNextDirection && activeIndex === lastItemIndex;
  662. if (isGoingToWrap && !this._config.wrap) {
  663. return activeElement;
  664. }
  665. var delta = direction === Direction.PREV ? -1 : 1;
  666. var itemIndex = (activeIndex + delta) % this._items.length;
  667. return itemIndex === -1 ? this._items[this._items.length - 1] : this._items[itemIndex];
  668. };
  669. _proto._triggerSlideEvent = function _triggerSlideEvent(relatedTarget, eventDirectionName) {
  670. var targetIndex = this._getItemIndex(relatedTarget);
  671. var fromIndex = this._getItemIndex($$$1(this._element).find(Selector.ACTIVE_ITEM)[0]);
  672. var slideEvent = $$$1.Event(Event.SLIDE, {
  673. relatedTarget: relatedTarget,
  674. direction: eventDirectionName,
  675. from: fromIndex,
  676. to: targetIndex
  677. });
  678. $$$1(this._element).trigger(slideEvent);
  679. return slideEvent;
  680. };
  681. _proto._setActiveIndicatorElement = function _setActiveIndicatorElement(element) {
  682. if (this._indicatorsElement) {
  683. $$$1(this._indicatorsElement).find(Selector.ACTIVE).removeClass(ClassName.ACTIVE);
  684. var nextIndicator = this._indicatorsElement.children[this._getItemIndex(element)];
  685. if (nextIndicator) {
  686. $$$1(nextIndicator).addClass(ClassName.ACTIVE);
  687. }
  688. }
  689. };
  690. _proto._slide = function _slide(direction, element) {
  691. var _this3 = this;
  692. var activeElement = $$$1(this._element).find(Selector.ACTIVE_ITEM)[0];
  693. var activeElementIndex = this._getItemIndex(activeElement);
  694. var nextElement = element || activeElement && this._getItemByDirection(direction, activeElement);
  695. var nextElementIndex = this._getItemIndex(nextElement);
  696. var isCycling = Boolean(this._interval);
  697. var directionalClassName;
  698. var orderClassName;
  699. var eventDirectionName;
  700. if (direction === Direction.NEXT) {
  701. directionalClassName = ClassName.LEFT;
  702. orderClassName = ClassName.NEXT;
  703. eventDirectionName = Direction.LEFT;
  704. } else {
  705. directionalClassName = ClassName.RIGHT;
  706. orderClassName = ClassName.PREV;
  707. eventDirectionName = Direction.RIGHT;
  708. }
  709. if (nextElement && $$$1(nextElement).hasClass(ClassName.ACTIVE)) {
  710. this._isSliding = false;
  711. return;
  712. }
  713. var slideEvent = this._triggerSlideEvent(nextElement, eventDirectionName);
  714. if (slideEvent.isDefaultPrevented()) {
  715. return;
  716. }
  717. if (!activeElement || !nextElement) {
  718. // Some weirdness is happening, so we bail
  719. return;
  720. }
  721. this._isSliding = true;
  722. if (isCycling) {
  723. this.pause();
  724. }
  725. this._setActiveIndicatorElement(nextElement);
  726. var slidEvent = $$$1.Event(Event.SLID, {
  727. relatedTarget: nextElement,
  728. direction: eventDirectionName,
  729. from: activeElementIndex,
  730. to: nextElementIndex
  731. });
  732. if (Util.supportsTransitionEnd() && $$$1(this._element).hasClass(ClassName.SLIDE)) {
  733. $$$1(nextElement).addClass(orderClassName);
  734. Util.reflow(nextElement);
  735. $$$1(activeElement).addClass(directionalClassName);
  736. $$$1(nextElement).addClass(directionalClassName);
  737. $$$1(activeElement).one(Util.TRANSITION_END, function () {
  738. $$$1(nextElement).removeClass(directionalClassName + " " + orderClassName).addClass(ClassName.ACTIVE);
  739. $$$1(activeElement).removeClass(ClassName.ACTIVE + " " + orderClassName + " " + directionalClassName);
  740. _this3._isSliding = false;
  741. setTimeout(function () {
  742. return $$$1(_this3._element).trigger(slidEvent);
  743. }, 0);
  744. }).emulateTransitionEnd(TRANSITION_DURATION);
  745. } else {
  746. $$$1(activeElement).removeClass(ClassName.ACTIVE);
  747. $$$1(nextElement).addClass(ClassName.ACTIVE);
  748. this._isSliding = false;
  749. $$$1(this._element).trigger(slidEvent);
  750. }
  751. if (isCycling) {
  752. this.cycle();
  753. }
  754. }; // Static
  755. Carousel._jQueryInterface = function _jQueryInterface(config) {
  756. return this.each(function () {
  757. var data = $$$1(this).data(DATA_KEY);
  758. var _config = _extends({}, Default, $$$1(this).data());
  759. if (typeof config === 'object') {
  760. _config = _extends({}, _config, config);
  761. }
  762. var action = typeof config === 'string' ? config : _config.slide;
  763. if (!data) {
  764. data = new Carousel(this, _config);
  765. $$$1(this).data(DATA_KEY, data);
  766. }
  767. if (typeof config === 'number') {
  768. data.to(config);
  769. } else if (typeof action === 'string') {
  770. if (typeof data[action] === 'undefined') {
  771. throw new TypeError("No method named \"" + action + "\"");
  772. }
  773. data[action]();
  774. } else if (_config.interval) {
  775. data.pause();
  776. data.cycle();
  777. }
  778. });
  779. };
  780. Carousel._dataApiClickHandler = function _dataApiClickHandler(event) {
  781. var selector = Util.getSelectorFromElement(this);
  782. if (!selector) {
  783. return;
  784. }
  785. var target = $$$1(selector)[0];
  786. if (!target || !$$$1(target).hasClass(ClassName.CAROUSEL)) {
  787. return;
  788. }
  789. var config = _extends({}, $$$1(target).data(), $$$1(this).data());
  790. var slideIndex = this.getAttribute('data-slide-to');
  791. if (slideIndex) {
  792. config.interval = false;
  793. }
  794. Carousel._jQueryInterface.call($$$1(target), config);
  795. if (slideIndex) {
  796. $$$1(target).data(DATA_KEY).to(slideIndex);
  797. }
  798. event.preventDefault();
  799. };
  800. _createClass(Carousel, null, [{
  801. key: "VERSION",
  802. get: function get() {
  803. return VERSION;
  804. }
  805. }, {
  806. key: "Default",
  807. get: function get() {
  808. return Default;
  809. }
  810. }]);
  811. return Carousel;
  812. }();
  813. /**
  814. * ------------------------------------------------------------------------
  815. * Data Api implementation
  816. * ------------------------------------------------------------------------
  817. */
  818. $$$1(document).on(Event.CLICK_DATA_API, Selector.DATA_SLIDE, Carousel._dataApiClickHandler);
  819. $$$1(window).on(Event.LOAD_DATA_API, function () {
  820. $$$1(Selector.DATA_RIDE).each(function () {
  821. var $carousel = $$$1(this);
  822. Carousel._jQueryInterface.call($carousel, $carousel.data());
  823. });
  824. });
  825. /**
  826. * ------------------------------------------------------------------------
  827. * jQuery
  828. * ------------------------------------------------------------------------
  829. */
  830. $$$1.fn[NAME] = Carousel._jQueryInterface;
  831. $$$1.fn[NAME].Constructor = Carousel;
  832. $$$1.fn[NAME].noConflict = function () {
  833. $$$1.fn[NAME] = JQUERY_NO_CONFLICT;
  834. return Carousel._jQueryInterface;
  835. };
  836. return Carousel;
  837. }($);
  838. /**
  839. * --------------------------------------------------------------------------
  840. * Bootstrap (v4.0.0): collapse.js
  841. * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
  842. * --------------------------------------------------------------------------
  843. */
  844. var Collapse = function ($$$1) {
  845. /**
  846. * ------------------------------------------------------------------------
  847. * Constants
  848. * ------------------------------------------------------------------------
  849. */
  850. var NAME = 'collapse';
  851. var VERSION = '4.0.0';
  852. var DATA_KEY = 'bs.collapse';
  853. var EVENT_KEY = "." + DATA_KEY;
  854. var DATA_API_KEY = '.data-api';
  855. var JQUERY_NO_CONFLICT = $$$1.fn[NAME];
  856. var TRANSITION_DURATION = 600;
  857. var Default = {
  858. toggle: true,
  859. parent: ''
  860. };
  861. var DefaultType = {
  862. toggle: 'boolean',
  863. parent: '(string|element)'
  864. };
  865. var Event = {
  866. SHOW: "show" + EVENT_KEY,
  867. SHOWN: "shown" + EVENT_KEY,
  868. HIDE: "hide" + EVENT_KEY,
  869. HIDDEN: "hidden" + EVENT_KEY,
  870. CLICK_DATA_API: "click" + EVENT_KEY + DATA_API_KEY
  871. };
  872. var ClassName = {
  873. SHOW: 'show',
  874. COLLAPSE: 'collapse',
  875. COLLAPSING: 'collapsing',
  876. COLLAPSED: 'collapsed'
  877. };
  878. var Dimension = {
  879. WIDTH: 'width',
  880. HEIGHT: 'height'
  881. };
  882. var Selector = {
  883. ACTIVES: '.show, .collapsing',
  884. DATA_TOGGLE: '[data-toggle="collapse"]'
  885. /**
  886. * ------------------------------------------------------------------------
  887. * Class Definition
  888. * ------------------------------------------------------------------------
  889. */
  890. };
  891. var Collapse =
  892. /*#__PURE__*/
  893. function () {
  894. function Collapse(element, config) {
  895. this._isTransitioning = false;
  896. this._element = element;
  897. this._config = this._getConfig(config);
  898. this._triggerArray = $$$1.makeArray($$$1("[data-toggle=\"collapse\"][href=\"#" + element.id + "\"]," + ("[data-toggle=\"collapse\"][data-target=\"#" + element.id + "\"]")));
  899. var tabToggles = $$$1(Selector.DATA_TOGGLE);
  900. for (var i = 0; i < tabToggles.length; i++) {
  901. var elem = tabToggles[i];
  902. var selector = Util.getSelectorFromElement(elem);
  903. if (selector !== null && $$$1(selector).filter(element).length > 0) {
  904. this._selector = selector;
  905. this._triggerArray.push(elem);
  906. }
  907. }
  908. this._parent = this._config.parent ? this._getParent() : null;
  909. if (!this._config.parent) {
  910. this._addAriaAndCollapsedClass(this._element, this._triggerArray);
  911. }
  912. if (this._config.toggle) {
  913. this.toggle();
  914. }
  915. } // Getters
  916. var _proto = Collapse.prototype;
  917. // Public
  918. _proto.toggle = function toggle() {
  919. if ($$$1(this._element).hasClass(ClassName.SHOW)) {
  920. this.hide();
  921. } else {
  922. this.show();
  923. }
  924. };
  925. _proto.show = function show() {
  926. var _this = this;
  927. if (this._isTransitioning || $$$1(this._element).hasClass(ClassName.SHOW)) {
  928. return;
  929. }
  930. var actives;
  931. var activesData;
  932. if (this._parent) {
  933. actives = $$$1.makeArray($$$1(this._parent).find(Selector.ACTIVES).filter("[data-parent=\"" + this._config.parent + "\"]"));
  934. if (actives.length === 0) {
  935. actives = null;
  936. }
  937. }
  938. if (actives) {
  939. activesData = $$$1(actives).not(this._selector).data(DATA_KEY);
  940. if (activesData && activesData._isTransitioning) {
  941. return;
  942. }
  943. }
  944. var startEvent = $$$1.Event(Event.SHOW);
  945. $$$1(this._element).trigger(startEvent);
  946. if (startEvent.isDefaultPrevented()) {
  947. return;
  948. }
  949. if (actives) {
  950. Collapse._jQueryInterface.call($$$1(actives).not(this._selector), 'hide');
  951. if (!activesData) {
  952. $$$1(actives).data(DATA_KEY, null);
  953. }
  954. }
  955. var dimension = this._getDimension();
  956. $$$1(this._element).removeClass(ClassName.COLLAPSE).addClass(ClassName.COLLAPSING);
  957. this._element.style[dimension] = 0;
  958. if (this._triggerArray.length > 0) {
  959. $$$1(this._triggerArray).removeClass(ClassName.COLLAPSED).attr('aria-expanded', true);
  960. }
  961. this.setTransitioning(true);
  962. var complete = function complete() {
  963. $$$1(_this._element).removeClass(ClassName.COLLAPSING).addClass(ClassName.COLLAPSE).addClass(ClassName.SHOW);
  964. _this._element.style[dimension] = '';
  965. _this.setTransitioning(false);
  966. $$$1(_this._element).trigger(Event.SHOWN);
  967. };
  968. if (!Util.supportsTransitionEnd()) {
  969. complete();
  970. return;
  971. }
  972. var capitalizedDimension = dimension[0].toUpperCase() + dimension.slice(1);
  973. var scrollSize = "scroll" + capitalizedDimension;
  974. $$$1(this._element).one(Util.TRANSITION_END, complete).emulateTransitionEnd(TRANSITION_DURATION);
  975. this._element.style[dimension] = this._element[scrollSize] + "px";
  976. };
  977. _proto.hide = function hide() {
  978. var _this2 = this;
  979. if (this._isTransitioning || !$$$1(this._element).hasClass(ClassName.SHOW)) {
  980. return;
  981. }
  982. var startEvent = $$$1.Event(Event.HIDE);
  983. $$$1(this._element).trigger(startEvent);
  984. if (startEvent.isDefaultPrevented()) {
  985. return;
  986. }
  987. var dimension = this._getDimension();
  988. this._element.style[dimension] = this._element.getBoundingClientRect()[dimension] + "px";
  989. Util.reflow(this._element);
  990. $$$1(this._element).addClass(ClassName.COLLAPSING).removeClass(ClassName.COLLAPSE).removeClass(ClassName.SHOW);
  991. if (this._triggerArray.length > 0) {
  992. for (var i = 0; i < this._triggerArray.length; i++) {
  993. var trigger = this._triggerArray[i];
  994. var selector = Util.getSelectorFromElement(trigger);
  995. if (selector !== null) {
  996. var $elem = $$$1(selector);
  997. if (!$elem.hasClass(ClassName.SHOW)) {
  998. $$$1(trigger).addClass(ClassName.COLLAPSED).attr('aria-expanded', false);
  999. }
  1000. }
  1001. }
  1002. }
  1003. this.setTransitioning(true);
  1004. var complete = function complete() {
  1005. _this2.setTransitioning(false);
  1006. $$$1(_this2._element).removeClass(ClassName.COLLAPSING).addClass(ClassName.COLLAPSE).trigger(Event.HIDDEN);
  1007. };
  1008. this._element.style[dimension] = '';
  1009. if (!Util.supportsTransitionEnd()) {
  1010. complete();
  1011. return;
  1012. }
  1013. $$$1(this._element).one(Util.TRANSITION_END, complete).emulateTransitionEnd(TRANSITION_DURATION);
  1014. };
  1015. _proto.setTransitioning = function setTransitioning(isTransitioning) {
  1016. this._isTransitioning = isTransitioning;
  1017. };
  1018. _proto.dispose = function dispose() {
  1019. $$$1.removeData(this._element, DATA_KEY);
  1020. this._config = null;
  1021. this._parent = null;
  1022. this._element = null;
  1023. this._triggerArray = null;
  1024. this._isTransitioning = null;
  1025. }; // Private
  1026. _proto._getConfig = function _getConfig(config) {
  1027. config = _extends({}, Default, config);
  1028. config.toggle = Boolean(config.toggle); // Coerce string values
  1029. Util.typeCheckConfig(NAME, config, DefaultType);
  1030. return config;
  1031. };
  1032. _proto._getDimension = function _getDimension() {
  1033. var hasWidth = $$$1(this._element).hasClass(Dimension.WIDTH);
  1034. return hasWidth ? Dimension.WIDTH : Dimension.HEIGHT;
  1035. };
  1036. _proto._getParent = function _getParent() {
  1037. var _this3 = this;
  1038. var parent = null;
  1039. if (Util.isElement(this._config.parent)) {
  1040. parent = this._config.parent; // It's a jQuery object
  1041. if (typeof this._config.parent.jquery !== 'undefined') {
  1042. parent = this._config.parent[0];
  1043. }
  1044. } else {
  1045. parent = $$$1(this._config.parent)[0];
  1046. }
  1047. var selector = "[data-toggle=\"collapse\"][data-parent=\"" + this._config.parent + "\"]";
  1048. $$$1(parent).find(selector).each(function (i, element) {
  1049. _this3._addAriaAndCollapsedClass(Collapse._getTargetFromElement(element), [element]);
  1050. });
  1051. return parent;
  1052. };
  1053. _proto._addAriaAndCollapsedClass = function _addAriaAndCollapsedClass(element, triggerArray) {
  1054. if (element) {
  1055. var isOpen = $$$1(element).hasClass(ClassName.SHOW);
  1056. if (triggerArray.length > 0) {
  1057. $$$1(triggerArray).toggleClass(ClassName.COLLAPSED, !isOpen).attr('aria-expanded', isOpen);
  1058. }
  1059. }
  1060. }; // Static
  1061. Collapse._getTargetFromElement = function _getTargetFromElement(element) {
  1062. var selector = Util.getSelectorFromElement(element);
  1063. return selector ? $$$1(selector)[0] : null;
  1064. };
  1065. Collapse._jQueryInterface = function _jQueryInterface(config) {
  1066. return this.each(function () {
  1067. var $this = $$$1(this);
  1068. var data = $this.data(DATA_KEY);
  1069. var _config = _extends({}, Default, $this.data(), typeof config === 'object' && config);
  1070. if (!data && _config.toggle && /show|hide/.test(config)) {
  1071. _config.toggle = false;
  1072. }
  1073. if (!data) {
  1074. data = new Collapse(this, _config);
  1075. $this.data(DATA_KEY, data);
  1076. }
  1077. if (typeof config === 'string') {
  1078. if (typeof data[config] === 'undefined') {
  1079. throw new TypeError("No method named \"" + config + "\"");
  1080. }
  1081. data[config]();
  1082. }
  1083. });
  1084. };
  1085. _createClass(Collapse, null, [{
  1086. key: "VERSION",
  1087. get: function get() {
  1088. return VERSION;
  1089. }
  1090. }, {
  1091. key: "Default",
  1092. get: function get() {
  1093. return Default;
  1094. }
  1095. }]);
  1096. return Collapse;
  1097. }();
  1098. /**
  1099. * ------------------------------------------------------------------------
  1100. * Data Api implementation
  1101. * ------------------------------------------------------------------------
  1102. */
  1103. $$$1(document).on(Event.CLICK_DATA_API, Selector.DATA_TOGGLE, function (event) {
  1104. // preventDefault only for <a> elements (which change the URL) not inside the collapsible element
  1105. if (event.currentTarget.tagName === 'A') {
  1106. event.preventDefault();
  1107. }
  1108. var $trigger = $$$1(this);
  1109. var selector = Util.getSelectorFromElement(this);
  1110. $$$1(selector).each(function () {
  1111. var $target = $$$1(this);
  1112. var data = $target.data(DATA_KEY);
  1113. var config = data ? 'toggle' : $trigger.data();
  1114. Collapse._jQueryInterface.call($target, config);
  1115. });
  1116. });
  1117. /**
  1118. * ------------------------------------------------------------------------
  1119. * jQuery
  1120. * ------------------------------------------------------------------------
  1121. */
  1122. $$$1.fn[NAME] = Collapse._jQueryInterface;
  1123. $$$1.fn[NAME].Constructor = Collapse;
  1124. $$$1.fn[NAME].noConflict = function () {
  1125. $$$1.fn[NAME] = JQUERY_NO_CONFLICT;
  1126. return Collapse._jQueryInterface;
  1127. };
  1128. return Collapse;
  1129. }($);
  1130. /**
  1131. * --------------------------------------------------------------------------
  1132. * Bootstrap (v4.0.0): modal.js
  1133. * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
  1134. * --------------------------------------------------------------------------
  1135. */
  1136. var Modal = function ($$$1) {
  1137. /**
  1138. * ------------------------------------------------------------------------
  1139. * Constants
  1140. * ------------------------------------------------------------------------
  1141. */
  1142. var NAME = 'modal';
  1143. var VERSION = '4.0.0';
  1144. var DATA_KEY = 'bs.modal';
  1145. var EVENT_KEY = "." + DATA_KEY;
  1146. var DATA_API_KEY = '.data-api';
  1147. var JQUERY_NO_CONFLICT = $$$1.fn[NAME];
  1148. var TRANSITION_DURATION = 300;
  1149. var BACKDROP_TRANSITION_DURATION = 150;
  1150. var ESCAPE_KEYCODE = 27; // KeyboardEvent.which value for Escape (Esc) key
  1151. var Default = {
  1152. backdrop: true,
  1153. keyboard: true,
  1154. focus: true,
  1155. show: true
  1156. };
  1157. var DefaultType = {
  1158. backdrop: '(boolean|string)',
  1159. keyboard: 'boolean',
  1160. focus: 'boolean',
  1161. show: 'boolean'
  1162. };
  1163. var Event = {
  1164. HIDE: "hide" + EVENT_KEY,
  1165. HIDDEN: "hidden" + EVENT_KEY,
  1166. SHOW: "show" + EVENT_KEY,
  1167. SHOWN: "shown" + EVENT_KEY,
  1168. FOCUSIN: "focusin" + EVENT_KEY,
  1169. RESIZE: "resize" + EVENT_KEY,
  1170. CLICK_DISMISS: "click.dismiss" + EVENT_KEY,
  1171. KEYDOWN_DISMISS: "keydown.dismiss" + EVENT_KEY,
  1172. MOUSEUP_DISMISS: "mouseup.dismiss" + EVENT_KEY,
  1173. MOUSEDOWN_DISMISS: "mousedown.dismiss" + EVENT_KEY,
  1174. CLICK_DATA_API: "click" + EVENT_KEY + DATA_API_KEY
  1175. };
  1176. var ClassName = {
  1177. SCROLLBAR_MEASURER: 'modal-scrollbar-measure',
  1178. BACKDROP: 'modal-backdrop',
  1179. OPEN: 'modal-open',
  1180. FADE: 'fade',
  1181. SHOW: 'show'
  1182. };
  1183. var Selector = {
  1184. DIALOG: '.modal-dialog',
  1185. DATA_TOGGLE: '[data-toggle="modal"]',
  1186. DATA_DISMISS: '[data-dismiss="modal"]',
  1187. FIXED_CONTENT: '.fixed-top, .fixed-bottom, .is-fixed, .sticky-top',
  1188. STICKY_CONTENT: '.sticky-top',
  1189. NAVBAR_TOGGLER: '.navbar-toggler'
  1190. /**
  1191. * ------------------------------------------------------------------------
  1192. * Class Definition
  1193. * ------------------------------------------------------------------------
  1194. */
  1195. };
  1196. var Modal =
  1197. /*#__PURE__*/
  1198. function () {
  1199. function Modal(element, config) {
  1200. this._config = this._getConfig(config);
  1201. this._element = element;
  1202. this._dialog = $$$1(element).find(Selector.DIALOG)[0];
  1203. this._backdrop = null;
  1204. this._isShown = false;
  1205. this._isBodyOverflowing = false;
  1206. this._ignoreBackdropClick = false;
  1207. this._originalBodyPadding = 0;
  1208. this._scrollbarWidth = 0;
  1209. } // Getters
  1210. var _proto = Modal.prototype;
  1211. // Public
  1212. _proto.toggle = function toggle(relatedTarget) {
  1213. return this._isShown ? this.hide() : this.show(relatedTarget);
  1214. };
  1215. _proto.show = function show(relatedTarget) {
  1216. var _this = this;
  1217. if (this._isTransitioning || this._isShown) {
  1218. return;
  1219. }
  1220. if (Util.supportsTransitionEnd() && $$$1(this._element).hasClass(ClassName.FADE)) {
  1221. this._isTransitioning = true;
  1222. }
  1223. var showEvent = $$$1.Event(Event.SHOW, {
  1224. relatedTarget: relatedTarget
  1225. });
  1226. $$$1(this._element).trigger(showEvent);
  1227. if (this._isShown || showEvent.isDefaultPrevented()) {
  1228. return;
  1229. }
  1230. this._isShown = true;
  1231. this._checkScrollbar();
  1232. this._setScrollbar();
  1233. this._adjustDialog();
  1234. $$$1(document.body).addClass(ClassName.OPEN);
  1235. this._setEscapeEvent();
  1236. this._setResizeEvent();
  1237. $$$1(this._element).on(Event.CLICK_DISMISS, Selector.DATA_DISMISS, function (event) {
  1238. return _this.hide(event);
  1239. });
  1240. $$$1(this._dialog).on(Event.MOUSEDOWN_DISMISS, function () {
  1241. $$$1(_this._element).one(Event.MOUSEUP_DISMISS, function (event) {
  1242. if ($$$1(event.target).is(_this._element)) {
  1243. _this._ignoreBackdropClick = true;
  1244. }
  1245. });
  1246. });
  1247. this._showBackdrop(function () {
  1248. return _this._showElement(relatedTarget);
  1249. });
  1250. };
  1251. _proto.hide = function hide(event) {
  1252. var _this2 = this;
  1253. if (event) {
  1254. event.preventDefault();
  1255. }
  1256. if (this._isTransitioning || !this._isShown) {
  1257. return;
  1258. }
  1259. var hideEvent = $$$1.Event(Event.HIDE);
  1260. $$$1(this._element).trigger(hideEvent);
  1261. if (!this._isShown || hideEvent.isDefaultPrevented()) {
  1262. return;
  1263. }
  1264. this._isShown = false;
  1265. var transition = Util.supportsTransitionEnd() && $$$1(this._element).hasClass(ClassName.FADE);
  1266. if (transition) {
  1267. this._isTransitioning = true;
  1268. }
  1269. this._setEscapeEvent();
  1270. this._setResizeEvent();
  1271. $$$1(document).off(Event.FOCUSIN);
  1272. $$$1(this._element).removeClass(ClassName.SHOW);
  1273. $$$1(this._element).off(Event.CLICK_DISMISS);
  1274. $$$1(this._dialog).off(Event.MOUSEDOWN_DISMISS);
  1275. if (transition) {
  1276. $$$1(this._element).one(Util.TRANSITION_END, function (event) {
  1277. return _this2._hideModal(event);
  1278. }).emulateTransitionEnd(TRANSITION_DURATION);
  1279. } else {
  1280. this._hideModal();
  1281. }
  1282. };
  1283. _proto.dispose = function dispose() {
  1284. $$$1.removeData(this._element, DATA_KEY);
  1285. $$$1(window, document, this._element, this._backdrop).off(EVENT_KEY);
  1286. this._config = null;
  1287. this._element = null;
  1288. this._dialog = null;
  1289. this._backdrop = null;
  1290. this._isShown = null;
  1291. this._isBodyOverflowing = null;
  1292. this._ignoreBackdropClick = null;
  1293. this._scrollbarWidth = null;
  1294. };
  1295. _proto.handleUpdate = function handleUpdate() {
  1296. this._adjustDialog();
  1297. }; // Private
  1298. _proto._getConfig = function _getConfig(config) {
  1299. config = _extends({}, Default, config);
  1300. Util.typeCheckConfig(NAME, config, DefaultType);
  1301. return config;
  1302. };
  1303. _proto._showElement = function _showElement(relatedTarget) {
  1304. var _this3 = this;
  1305. var transition = Util.supportsTransitionEnd() && $$$1(this._element).hasClass(ClassName.FADE);
  1306. if (!this._element.parentNode || this._element.parentNode.nodeType !== Node.ELEMENT_NODE) {
  1307. // Don't move modal's DOM position
  1308. document.body.appendChild(this._element);
  1309. }
  1310. this._element.style.display = 'block';
  1311. this._element.removeAttribute('aria-hidden');
  1312. this._element.scrollTop = 0;
  1313. if (transition) {
  1314. Util.reflow(this._element);
  1315. }
  1316. $$$1(this._element).addClass(ClassName.SHOW);
  1317. if (this._config.focus) {
  1318. this._enforceFocus();
  1319. }
  1320. var shownEvent = $$$1.Event(Event.SHOWN, {
  1321. relatedTarget: relatedTarget
  1322. });
  1323. var transitionComplete = function transitionComplete() {
  1324. if (_this3._config.focus) {
  1325. _this3._element.focus();
  1326. }
  1327. _this3._isTransitioning = false;
  1328. $$$1(_this3._element).trigger(shownEvent);
  1329. };
  1330. if (transition) {
  1331. $$$1(this._dialog).one(Util.TRANSITION_END, transitionComplete).emulateTransitionEnd(TRANSITION_DURATION);
  1332. } else {
  1333. transitionComplete();
  1334. }
  1335. };
  1336. _proto._enforceFocus = function _enforceFocus() {
  1337. var _this4 = this;
  1338. $$$1(document).off(Event.FOCUSIN) // Guard against infinite focus loop
  1339. .on(Event.FOCUSIN, function (event) {
  1340. if (document !== event.target && _this4._element !== event.target && $$$1(_this4._element).has(event.target).length === 0) {
  1341. _this4._element.focus();
  1342. }
  1343. });
  1344. };
  1345. _proto._setEscapeEvent = function _setEscapeEvent() {
  1346. var _this5 = this;
  1347. if (this._isShown && this._config.keyboard) {
  1348. $$$1(this._element).on(Event.KEYDOWN_DISMISS, function (event) {
  1349. if (event.which === ESCAPE_KEYCODE) {
  1350. event.preventDefault();
  1351. _this5.hide();
  1352. }
  1353. });
  1354. } else if (!this._isShown) {
  1355. $$$1(this._element).off(Event.KEYDOWN_DISMISS);
  1356. }
  1357. };
  1358. _proto._setResizeEvent = function _setResizeEvent() {
  1359. var _this6 = this;
  1360. if (this._isShown) {
  1361. $$$1(window).on(Event.RESIZE, function (event) {
  1362. return _this6.handleUpdate(event);
  1363. });
  1364. } else {
  1365. $$$1(window).off(Event.RESIZE);
  1366. }
  1367. };
  1368. _proto._hideModal = function _hideModal() {
  1369. var _this7 = this;
  1370. this._element.style.display = 'none';
  1371. this._element.setAttribute('aria-hidden', true);
  1372. this._isTransitioning = false;
  1373. this._showBackdrop(function () {
  1374. $$$1(document.body).removeClass(ClassName.OPEN);
  1375. _this7._resetAdjustments();
  1376. _this7._resetScrollbar();
  1377. $$$1(_this7._element).trigger(Event.HIDDEN);
  1378. });
  1379. };
  1380. _proto._removeBackdrop = function _removeBackdrop() {
  1381. if (this._backdrop) {
  1382. $$$1(this._backdrop).remove();
  1383. this._backdrop = null;
  1384. }
  1385. };
  1386. _proto._showBackdrop = function _showBackdrop(callback) {
  1387. var _this8 = this;
  1388. var animate = $$$1(this._element).hasClass(ClassName.FADE) ? ClassName.FADE : '';
  1389. if (this._isShown && this._config.backdrop) {
  1390. var doAnimate = Util.supportsTransitionEnd() && animate;
  1391. this._backdrop = document.createElement('div');
  1392. this._backdrop.className = ClassName.BACKDROP;
  1393. if (animate) {
  1394. $$$1(this._backdrop).addClass(animate);
  1395. }
  1396. $$$1(this._backdrop).appendTo(document.body);
  1397. $$$1(this._element).on(Event.CLICK_DISMISS, function (event) {
  1398. if (_this8._ignoreBackdropClick) {
  1399. _this8._ignoreBackdropClick = false;
  1400. return;
  1401. }
  1402. if (event.target !== event.currentTarget) {
  1403. return;
  1404. }
  1405. if (_this8._config.backdrop === 'static') {
  1406. _this8._element.focus();
  1407. } else {
  1408. _this8.hide();
  1409. }
  1410. });
  1411. if (doAnimate) {
  1412. Util.reflow(this._backdrop);
  1413. }
  1414. $$$1(this._backdrop).addClass(ClassName.SHOW);
  1415. if (!callback) {
  1416. return;
  1417. }
  1418. if (!doAnimate) {
  1419. callback();
  1420. return;
  1421. }
  1422. $$$1(this._backdrop).one(Util.TRANSITION_END, callback).emulateTransitionEnd(BACKDROP_TRANSITION_DURATION);
  1423. } else if (!this._isShown && this._backdrop) {
  1424. $$$1(this._backdrop).removeClass(ClassName.SHOW);
  1425. var callbackRemove = function callbackRemove() {
  1426. _this8._removeBackdrop();
  1427. if (callback) {
  1428. callback();
  1429. }
  1430. };
  1431. if (Util.supportsTransitionEnd() && $$$1(this._element).hasClass(ClassName.FADE)) {
  1432. $$$1(this._backdrop).one(Util.TRANSITION_END, callbackRemove).emulateTransitionEnd(BACKDROP_TRANSITION_DURATION);
  1433. } else {
  1434. callbackRemove();
  1435. }
  1436. } else if (callback) {
  1437. callback();
  1438. }
  1439. }; // ----------------------------------------------------------------------
  1440. // the following methods are used to handle overflowing modals
  1441. // todo (fat): these should probably be refactored out of modal.js
  1442. // ----------------------------------------------------------------------
  1443. _proto._adjustDialog = function _adjustDialog() {
  1444. var isModalOverflowing = this._element.scrollHeight > document.documentElement.clientHeight;
  1445. if (!this._isBodyOverflowing && isModalOverflowing) {
  1446. this._element.style.paddingLeft = this._scrollbarWidth + "px";
  1447. }
  1448. if (this._isBodyOverflowing && !isModalOverflowing) {
  1449. this._element.style.paddingRight = this._scrollbarWidth + "px";
  1450. }
  1451. };
  1452. _proto._resetAdjustments = function _resetAdjustments() {
  1453. this._element.style.paddingLeft = '';
  1454. this._element.style.paddingRight = '';
  1455. };
  1456. _proto._checkScrollbar = function _checkScrollbar() {
  1457. var rect = document.body.getBoundingClientRect();
  1458. this._isBodyOverflowing = rect.left + rect.right < window.innerWidth;
  1459. this._scrollbarWidth = this._getScrollbarWidth();
  1460. };
  1461. _proto._setScrollbar = function _setScrollbar() {
  1462. var _this9 = this;
  1463. if (this._isBodyOverflowing) {
  1464. // Note: DOMNode.style.paddingRight returns the actual value or '' if not set
  1465. // while $(DOMNode).css('padding-right') returns the calculated value or 0 if not set
  1466. // Adjust fixed content padding
  1467. $$$1(Selector.FIXED_CONTENT).each(function (index, element) {
  1468. var actualPadding = $$$1(element)[0].style.paddingRight;
  1469. var calculatedPadding = $$$1(element).css('padding-right');
  1470. $$$1(element).data('padding-right', actualPadding).css('padding-right', parseFloat(calculatedPadding) + _this9._scrollbarWidth + "px");
  1471. }); // Adjust sticky content margin
  1472. $$$1(Selector.STICKY_CONTENT).each(function (index, element) {
  1473. var actualMargin = $$$1(element)[0].style.marginRight;
  1474. var calculatedMargin = $$$1(element).css('margin-right');
  1475. $$$1(element).data('margin-right', actualMargin).css('margin-right', parseFloat(calculatedMargin) - _this9._scrollbarWidth + "px");
  1476. }); // Adjust navbar-toggler margin
  1477. $$$1(Selector.NAVBAR_TOGGLER).each(function (index, element) {
  1478. var actualMargin = $$$1(element)[0].style.marginRight;
  1479. var calculatedMargin = $$$1(element).css('margin-right');
  1480. $$$1(element).data('margin-right', actualMargin).css('margin-right', parseFloat(calculatedMargin) + _this9._scrollbarWidth + "px");
  1481. }); // Adjust body padding
  1482. var actualPadding = document.body.style.paddingRight;
  1483. var calculatedPadding = $$$1('body').css('padding-right');
  1484. $$$1('body').data('padding-right', actualPadding).css('padding-right', parseFloat(calculatedPadding) + this._scrollbarWidth + "px");
  1485. }
  1486. };
  1487. _proto._resetScrollbar = function _resetScrollbar() {
  1488. // Restore fixed content padding
  1489. $$$1(Selector.FIXED_CONTENT).each(function (index, element) {
  1490. var padding = $$$1(element).data('padding-right');
  1491. if (typeof padding !== 'undefined') {
  1492. $$$1(element).css('padding-right', padding).removeData('padding-right');
  1493. }
  1494. }); // Restore sticky content and navbar-toggler margin
  1495. $$$1(Selector.STICKY_CONTENT + ", " + Selector.NAVBAR_TOGGLER).each(function (index, element) {
  1496. var margin = $$$1(element).data('margin-right');
  1497. if (typeof margin !== 'undefined') {
  1498. $$$1(element).css('margin-right', margin).removeData('margin-right');
  1499. }
  1500. }); // Restore body padding
  1501. var padding = $$$1('body').data('padding-right');
  1502. if (typeof padding !== 'undefined') {
  1503. $$$1('body').css('padding-right', padding).removeData('padding-right');
  1504. }
  1505. };
  1506. _proto._getScrollbarWidth = function _getScrollbarWidth() {
  1507. // thx d.walsh
  1508. var scrollDiv = document.createElement('div');
  1509. scrollDiv.className = ClassName.SCROLLBAR_MEASURER;
  1510. document.body.appendChild(scrollDiv);
  1511. var scrollbarWidth = scrollDiv.getBoundingClientRect().width - scrollDiv.clientWidth;
  1512. document.body.removeChild(scrollDiv);
  1513. return scrollbarWidth;
  1514. }; // Static
  1515. Modal._jQueryInterface = function _jQueryInterface(config, relatedTarget) {
  1516. return this.each(function () {
  1517. var data = $$$1(this).data(DATA_KEY);
  1518. var _config = _extends({}, Modal.Default, $$$1(this).data(), typeof config === 'object' && config);
  1519. if (!data) {
  1520. data = new Modal(this, _config);
  1521. $$$1(this).data(DATA_KEY, data);
  1522. }
  1523. if (typeof config === 'string') {
  1524. if (typeof data[config] === 'undefined') {
  1525. throw new TypeError("No method named \"" + config + "\"");
  1526. }
  1527. data[config](relatedTarget);
  1528. } else if (_config.show) {
  1529. data.show(relatedTarget);
  1530. }
  1531. });
  1532. };
  1533. _createClass(Modal, null, [{
  1534. key: "VERSION",
  1535. get: function get() {
  1536. return VERSION;
  1537. }
  1538. }, {
  1539. key: "Default",
  1540. get: function get() {
  1541. return Default;
  1542. }
  1543. }]);
  1544. return Modal;
  1545. }();
  1546. /**
  1547. * ------------------------------------------------------------------------
  1548. * Data Api implementation
  1549. * ------------------------------------------------------------------------
  1550. */
  1551. $$$1(document).on(Event.CLICK_DATA_API, Selector.DATA_TOGGLE, function (event) {
  1552. var _this10 = this;
  1553. var target;
  1554. var selector = Util.getSelectorFromElement(this);
  1555. if (selector) {
  1556. target = $$$1(selector)[0];
  1557. }
  1558. var config = $$$1(target).data(DATA_KEY) ? 'toggle' : _extends({}, $$$1(target).data(), $$$1(this).data());
  1559. if (this.tagName === 'A' || this.tagName === 'AREA') {
  1560. event.preventDefault();
  1561. }
  1562. var $target = $$$1(target).one(Event.SHOW, function (showEvent) {
  1563. if (showEvent.isDefaultPrevented()) {
  1564. // Only register focus restorer if modal will actually get shown
  1565. return;
  1566. }
  1567. $target.one(Event.HIDDEN, function () {
  1568. if ($$$1(_this10).is(':visible')) {
  1569. _this10.focus();
  1570. }
  1571. });
  1572. });
  1573. Modal._jQueryInterface.call($$$1(target), config, this);
  1574. });
  1575. /**
  1576. * ------------------------------------------------------------------------
  1577. * jQuery
  1578. * ------------------------------------------------------------------------
  1579. */
  1580. $$$1.fn[NAME] = Modal._jQueryInterface;
  1581. $$$1.fn[NAME].Constructor = Modal;
  1582. $$$1.fn[NAME].noConflict = function () {
  1583. $$$1.fn[NAME] = JQUERY_NO_CONFLICT;
  1584. return Modal._jQueryInterface;
  1585. };
  1586. return Modal;
  1587. }($);
  1588. /**
  1589. * --------------------------------------------------------------------------
  1590. * Bootstrap (v4.0.0): tooltip.js
  1591. * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
  1592. * --------------------------------------------------------------------------
  1593. */
  1594. var Tooltip = function ($$$1) {
  1595. /**
  1596. * ------------------------------------------------------------------------
  1597. * Constants
  1598. * ------------------------------------------------------------------------
  1599. */
  1600. var NAME = 'tooltip';
  1601. var VERSION = '4.0.0';
  1602. var DATA_KEY = 'bs.tooltip';
  1603. var EVENT_KEY = "." + DATA_KEY;
  1604. var JQUERY_NO_CONFLICT = $$$1.fn[NAME];
  1605. var TRANSITION_DURATION = 150;
  1606. var CLASS_PREFIX = 'bs-tooltip';
  1607. var BSCLS_PREFIX_REGEX = new RegExp("(^|\\s)" + CLASS_PREFIX + "\\S+", 'g');
  1608. var DefaultType = {
  1609. animation: 'boolean',
  1610. template: 'string',
  1611. title: '(string|element|function)',
  1612. trigger: 'string',
  1613. delay: '(number|object)',
  1614. html: 'boolean',
  1615. selector: '(string|boolean)',
  1616. placement: '(string|function)',
  1617. offset: '(number|string)',
  1618. container: '(string|element|boolean)',
  1619. fallbackPlacement: '(string|array)',
  1620. boundary: '(string|element)'
  1621. };
  1622. var AttachmentMap = {
  1623. AUTO: 'auto',
  1624. TOP: 'top',
  1625. RIGHT: 'right',
  1626. BOTTOM: 'bottom',
  1627. LEFT: 'left'
  1628. };
  1629. var Default = {
  1630. animation: true,
  1631. template: '<div class="tooltip" role="tooltip">' + '<div class="arrow"></div>' + '<div class="tooltip-inner"></div></div>',
  1632. trigger: 'hover focus',
  1633. title: '',
  1634. delay: 0,
  1635. html: false,
  1636. selector: false,
  1637. placement: 'top',
  1638. offset: 0,
  1639. container: false,
  1640. fallbackPlacement: 'flip',
  1641. boundary: 'scrollParent'
  1642. };
  1643. var HoverState = {
  1644. SHOW: 'show',
  1645. OUT: 'out'
  1646. };
  1647. var Event = {
  1648. HIDE: "hide" + EVENT_KEY,
  1649. HIDDEN: "hidden" + EVENT_KEY,
  1650. SHOW: "show" + EVENT_KEY,
  1651. SHOWN: "shown" + EVENT_KEY,
  1652. INSERTED: "inserted" + EVENT_KEY,
  1653. CLICK: "click" + EVENT_KEY,
  1654. FOCUSIN: "focusin" + EVENT_KEY,
  1655. FOCUSOUT: "focusout" + EVENT_KEY,
  1656. MOUSEENTER: "mouseenter" + EVENT_KEY,
  1657. MOUSELEAVE: "mouseleave" + EVENT_KEY
  1658. };
  1659. var ClassName = {
  1660. FADE: 'fade',
  1661. SHOW: 'show'
  1662. };
  1663. var Selector = {
  1664. TOOLTIP: '.tooltip',
  1665. TOOLTIP_INNER: '.tooltip-inner',
  1666. ARROW: '.arrow'
  1667. };
  1668. var Trigger = {
  1669. HOVER: 'hover',
  1670. FOCUS: 'focus',
  1671. CLICK: 'click',
  1672. MANUAL: 'manual'
  1673. /**
  1674. * ------------------------------------------------------------------------
  1675. * Class Definition
  1676. * ------------------------------------------------------------------------
  1677. */
  1678. };
  1679. var Tooltip =
  1680. /*#__PURE__*/
  1681. function () {
  1682. function Tooltip(element, config) {
  1683. /**
  1684. * Check for Popper dependency
  1685. * Popper - https://popper.js.org
  1686. */
  1687. if (typeof Popper$1 === 'undefined') {
  1688. throw new TypeError('Bootstrap tooltips require Popper.js (https://popper.js.org)');
  1689. } // private
  1690. this._isEnabled = true;
  1691. this._timeout = 0;
  1692. this._hoverState = '';
  1693. this._activeTrigger = {};
  1694. this._popper = null; // Protected
  1695. this.element = element;
  1696. this.config = this._getConfig(config);
  1697. this.tip = null;
  1698. this._setListeners();
  1699. } // Getters
  1700. var _proto = Tooltip.prototype;
  1701. // Public
  1702. _proto.enable = function enable() {
  1703. this._isEnabled = true;
  1704. };
  1705. _proto.disable = function disable() {
  1706. this._isEnabled = false;
  1707. };
  1708. _proto.toggleEnabled = function toggleEnabled() {
  1709. this._isEnabled = !this._isEnabled;
  1710. };
  1711. _proto.toggle = function toggle(event) {
  1712. if (!this._isEnabled) {
  1713. return;
  1714. }
  1715. if (event) {
  1716. var dataKey = this.constructor.DATA_KEY;
  1717. var context = $$$1(event.currentTarget).data(dataKey);
  1718. if (!context) {
  1719. context = new this.constructor(event.currentTarget, this._getDelegateConfig());
  1720. $$$1(event.currentTarget).data(dataKey, context);
  1721. }
  1722. context._activeTrigger.click = !context._activeTrigger.click;
  1723. if (context._isWithActiveTrigger()) {
  1724. context._enter(null, context);
  1725. } else {
  1726. context._leave(null, context);
  1727. }
  1728. } else {
  1729. if ($$$1(this.getTipElement()).hasClass(ClassName.SHOW)) {
  1730. this._leave(null, this);
  1731. return;
  1732. }
  1733. this._enter(null, this);
  1734. }
  1735. };
  1736. _proto.dispose = function dispose() {
  1737. clearTimeout(this._timeout);
  1738. $$$1.removeData(this.element, this.constructor.DATA_KEY);
  1739. $$$1(this.element).off(this.constructor.EVENT_KEY);
  1740. $$$1(this.element).closest('.modal').off('hide.bs.modal');
  1741. if (this.tip) {
  1742. $$$1(this.tip).remove();
  1743. }
  1744. this._isEnabled = null;
  1745. this._timeout = null;
  1746. this._hoverState = null;
  1747. this._activeTrigger = null;
  1748. if (this._popper !== null) {
  1749. this._popper.destroy();
  1750. }
  1751. this._popper = null;
  1752. this.element = null;
  1753. this.config = null;
  1754. this.tip = null;
  1755. };
  1756. _proto.show = function show() {
  1757. var _this = this;
  1758. if ($$$1(this.element).css('display') === 'none') {
  1759. throw new Error('Please use show on visible elements');
  1760. }
  1761. var showEvent = $$$1.Event(this.constructor.Event.SHOW);
  1762. if (this.isWithContent() && this._isEnabled) {
  1763. $$$1(this.element).trigger(showEvent);
  1764. var isInTheDom = $$$1.contains(this.element.ownerDocument.documentElement, this.element);
  1765. if (showEvent.isDefaultPrevented() || !isInTheDom) {
  1766. return;
  1767. }
  1768. var tip = this.getTipElement();
  1769. var tipId = Util.getUID(this.constructor.NAME);
  1770. tip.setAttribute('id', tipId);
  1771. this.element.setAttribute('aria-describedby', tipId);
  1772. this.setContent();
  1773. if (this.config.animation) {
  1774. $$$1(tip).addClass(ClassName.FADE);
  1775. }
  1776. var placement = typeof this.config.placement === 'function' ? this.config.placement.call(this, tip, this.element) : this.config.placement;
  1777. var attachment = this._getAttachment(placement);
  1778. this.addAttachmentClass(attachment);
  1779. var container = this.config.container === false ? document.body : $$$1(this.config.container);
  1780. $$$1(tip).data(this.constructor.DATA_KEY, this);
  1781. if (!$$$1.contains(this.element.ownerDocument.documentElement, this.tip)) {
  1782. $$$1(tip).appendTo(container);
  1783. }
  1784. $$$1(this.element).trigger(this.constructor.Event.INSERTED);
  1785. this._popper = new Popper$1(this.element, tip, {
  1786. placement: attachment,
  1787. modifiers: {
  1788. offset: {
  1789. offset: this.config.offset
  1790. },
  1791. flip: {
  1792. behavior: this.config.fallbackPlacement
  1793. },
  1794. arrow: {
  1795. element: Selector.ARROW
  1796. },
  1797. preventOverflow: {
  1798. boundariesElement: this.config.boundary
  1799. }
  1800. },
  1801. onCreate: function onCreate(data) {
  1802. if (data.originalPlacement !== data.placement) {
  1803. _this._handlePopperPlacementChange(data);
  1804. }
  1805. },
  1806. onUpdate: function onUpdate(data) {
  1807. _this._handlePopperPlacementChange(data);
  1808. }
  1809. });
  1810. $$$1(tip).addClass(ClassName.SHOW); // If this is a touch-enabled device we add extra
  1811. // empty mouseover listeners to the body's immediate children;
  1812. // only needed because of broken event delegation on iOS
  1813. // https://www.quirksmode.org/blog/archives/2014/02/mouse_event_bub.html
  1814. if ('ontouchstart' in document.documentElement) {
  1815. $$$1('body').children().on('mouseover', null, $$$1.noop);
  1816. }
  1817. var complete = function complete() {
  1818. if (_this.config.animation) {
  1819. _this._fixTransition();
  1820. }
  1821. var prevHoverState = _this._hoverState;
  1822. _this._hoverState = null;
  1823. $$$1(_this.element).trigger(_this.constructor.Event.SHOWN);
  1824. if (prevHoverState === HoverState.OUT) {
  1825. _this._leave(null, _this);
  1826. }
  1827. };
  1828. if (Util.supportsTransitionEnd() && $$$1(this.tip).hasClass(ClassName.FADE)) {
  1829. $$$1(this.tip).one(Util.TRANSITION_END, complete).emulateTransitionEnd(Tooltip._TRANSITION_DURATION);
  1830. } else {
  1831. complete();
  1832. }
  1833. }
  1834. };
  1835. _proto.hide = function hide(callback) {
  1836. var _this2 = this;
  1837. var tip = this.getTipElement();
  1838. var hideEvent = $$$1.Event(this.constructor.Event.HIDE);
  1839. var complete = function complete() {
  1840. if (_this2._hoverState !== HoverState.SHOW && tip.parentNode) {
  1841. tip.parentNode.removeChild(tip);
  1842. }
  1843. _this2._cleanTipClass();
  1844. _this2.element.removeAttribute('aria-describedby');
  1845. $$$1(_this2.element).trigger(_this2.constructor.Event.HIDDEN);
  1846. if (_this2._popper !== null) {
  1847. _this2._popper.destroy();
  1848. }
  1849. if (callback) {
  1850. callback();
  1851. }
  1852. };
  1853. $$$1(this.element).trigger(hideEvent);
  1854. if (hideEvent.isDefaultPrevented()) {
  1855. return;
  1856. }
  1857. $$$1(tip).removeClass(ClassName.SHOW); // If this is a touch-enabled device we remove the extra
  1858. // empty mouseover listeners we added for iOS support
  1859. if ('ontouchstart' in document.documentElement) {
  1860. $$$1('body').children().off('mouseover', null, $$$1.noop);
  1861. }
  1862. this._activeTrigger[Trigger.CLICK] = false;
  1863. this._activeTrigger[Trigger.FOCUS] = false;
  1864. this._activeTrigger[Trigger.HOVER] = false;
  1865. if (Util.supportsTransitionEnd() && $$$1(this.tip).hasClass(ClassName.FADE)) {
  1866. $$$1(tip).one(Util.TRANSITION_END, complete).emulateTransitionEnd(TRANSITION_DURATION);
  1867. } else {
  1868. complete();
  1869. }
  1870. this._hoverState = '';
  1871. };
  1872. _proto.update = function update() {
  1873. if (this._popper !== null) {
  1874. this._popper.scheduleUpdate();
  1875. }
  1876. }; // Protected
  1877. _proto.isWithContent = function isWithContent() {
  1878. return Boolean(this.getTitle());
  1879. };
  1880. _proto.addAttachmentClass = function addAttachmentClass(attachment) {
  1881. $$$1(this.getTipElement()).addClass(CLASS_PREFIX + "-" + attachment);
  1882. };
  1883. _proto.getTipElement = function getTipElement() {
  1884. this.tip = this.tip || $$$1(this.config.template)[0];
  1885. return this.tip;
  1886. };
  1887. _proto.setContent = function setContent() {
  1888. var $tip = $$$1(this.getTipElement());
  1889. this.setElementContent($tip.find(Selector.TOOLTIP_INNER), this.getTitle());
  1890. $tip.removeClass(ClassName.FADE + " " + ClassName.SHOW);
  1891. };
  1892. _proto.setElementContent = function setElementContent($element, content) {
  1893. var html = this.config.html;
  1894. if (typeof content === 'object' && (content.nodeType || content.jquery)) {
  1895. // Content is a DOM node or a jQuery
  1896. if (html) {
  1897. if (!$$$1(content).parent().is($element)) {
  1898. $element.empty().append(content);
  1899. }
  1900. } else {
  1901. $element.text($$$1(content).text());
  1902. }
  1903. } else {
  1904. $element[html ? 'html' : 'text'](content);
  1905. }
  1906. };
  1907. _proto.getTitle = function getTitle() {
  1908. var title = this.element.getAttribute('data-original-title');
  1909. if (!title) {
  1910. title = typeof this.config.title === 'function' ? this.config.title.call(this.element) : this.config.title;
  1911. }
  1912. return title;
  1913. }; // Private
  1914. _proto._getAttachment = function _getAttachment(placement) {
  1915. return AttachmentMap[placement.toUpperCase()];
  1916. };
  1917. _proto._setListeners = function _setListeners() {
  1918. var _this3 = this;
  1919. var triggers = this.config.trigger.split(' ');
  1920. triggers.forEach(function (trigger) {
  1921. if (trigger === 'click') {
  1922. $$$1(_this3.element).on(_this3.constructor.Event.CLICK, _this3.config.selector, function (event) {
  1923. return _this3.toggle(event);
  1924. });
  1925. } else if (trigger !== Trigger.MANUAL) {
  1926. var eventIn = trigger === Trigger.HOVER ? _this3.constructor.Event.MOUSEENTER : _this3.constructor.Event.FOCUSIN;
  1927. var eventOut = trigger === Trigger.HOVER ? _this3.constructor.Event.MOUSELEAVE : _this3.constructor.Event.FOCUSOUT;
  1928. $$$1(_this3.element).on(eventIn, _this3.config.selector, function (event) {
  1929. return _this3._enter(event);
  1930. }).on(eventOut, _this3.config.selector, function (event) {
  1931. return _this3._leave(event);
  1932. });
  1933. }
  1934. $$$1(_this3.element).closest('.modal').on('hide.bs.modal', function () {
  1935. return _this3.hide();
  1936. });
  1937. });
  1938. if (this.config.selector) {
  1939. this.config = _extends({}, this.config, {
  1940. trigger: 'manual',
  1941. selector: ''
  1942. });
  1943. } else {
  1944. this._fixTitle();
  1945. }
  1946. };
  1947. _proto._fixTitle = function _fixTitle() {
  1948. var titleType = typeof this.element.getAttribute('data-original-title');
  1949. if (this.element.getAttribute('title') || titleType !== 'string') {
  1950. this.element.setAttribute('data-original-title', this.element.getAttribute('title') || '');
  1951. this.element.setAttribute('title', '');
  1952. }
  1953. };
  1954. _proto._enter = function _enter(event, context) {
  1955. var dataKey = this.constructor.DATA_KEY;
  1956. context = context || $$$1(event.currentTarget).data(dataKey);
  1957. if (!context) {
  1958. context = new this.constructor(event.currentTarget, this._getDelegateConfig());
  1959. $$$1(event.currentTarget).data(dataKey, context);
  1960. }
  1961. if (event) {
  1962. context._activeTrigger[event.type === 'focusin' ? Trigger.FOCUS : Trigger.HOVER] = true;
  1963. }
  1964. if ($$$1(context.getTipElement()).hasClass(ClassName.SHOW) || context._hoverState === HoverState.SHOW) {
  1965. context._hoverState = HoverState.SHOW;
  1966. return;
  1967. }
  1968. clearTimeout(context._timeout);
  1969. context._hoverState = HoverState.SHOW;
  1970. if (!context.config.delay || !context.config.delay.show) {
  1971. context.show();
  1972. return;
  1973. }
  1974. context._timeout = setTimeout(function () {
  1975. if (context._hoverState === HoverState.SHOW) {
  1976. context.show();
  1977. }
  1978. }, context.config.delay.show);
  1979. };
  1980. _proto._leave = function _leave(event, context) {
  1981. var dataKey = this.constructor.DATA_KEY;
  1982. context = context || $$$1(event.currentTarget).data(dataKey);
  1983. if (!context) {
  1984. context = new this.constructor(event.currentTarget, this._getDelegateConfig());
  1985. $$$1(event.currentTarget).data(dataKey, context);
  1986. }
  1987. if (event) {
  1988. context._activeTrigger[event.type === 'focusout' ? Trigger.FOCUS : Trigger.HOVER] = false;
  1989. }
  1990. if (context._isWithActiveTrigger()) {
  1991. return;
  1992. }
  1993. clearTimeout(context._timeout);
  1994. context._hoverState = HoverState.OUT;
  1995. if (!context.config.delay || !context.config.delay.hide) {
  1996. context.hide();
  1997. return;
  1998. }
  1999. context._timeout = setTimeout(function () {
  2000. if (context._hoverState === HoverState.OUT) {
  2001. context.hide();
  2002. }
  2003. }, context.config.delay.hide);
  2004. };
  2005. _proto._isWithActiveTrigger = function _isWithActiveTrigger() {
  2006. for (var trigger in this._activeTrigger) {
  2007. if (this._activeTrigger[trigger]) {
  2008. return true;
  2009. }
  2010. }
  2011. return false;
  2012. };
  2013. _proto._getConfig = function _getConfig(config) {
  2014. config = _extends({}, this.constructor.Default, $$$1(this.element).data(), config);
  2015. if (typeof config.delay === 'number') {
  2016. config.delay = {
  2017. show: config.delay,
  2018. hide: config.delay
  2019. };
  2020. }
  2021. if (typeof config.title === 'number') {
  2022. config.title = config.title.toString();
  2023. }
  2024. if (typeof config.content === 'number') {
  2025. config.content = config.content.toString();
  2026. }
  2027. Util.typeCheckConfig(NAME, config, this.constructor.DefaultType);
  2028. return config;
  2029. };
  2030. _proto._getDelegateConfig = function _getDelegateConfig() {
  2031. var config = {};
  2032. if (this.config) {
  2033. for (var key in this.config) {
  2034. if (this.constructor.Default[key] !== this.config[key]) {
  2035. config[key] = this.config[key];
  2036. }
  2037. }
  2038. }
  2039. return config;
  2040. };
  2041. _proto._cleanTipClass = function _cleanTipClass() {
  2042. var $tip = $$$1(this.getTipElement());
  2043. var tabClass = $tip.attr('class').match(BSCLS_PREFIX_REGEX);
  2044. if (tabClass !== null && tabClass.length > 0) {
  2045. $tip.removeClass(tabClass.join(''));
  2046. }
  2047. };
  2048. _proto._handlePopperPlacementChange = function _handlePopperPlacementChange(data) {
  2049. this._cleanTipClass();
  2050. this.addAttachmentClass(this._getAttachment(data.placement));
  2051. };
  2052. _proto._fixTransition = function _fixTransition() {
  2053. var tip = this.getTipElement();
  2054. var initConfigAnimation = this.config.animation;
  2055. if (tip.getAttribute('x-placement') !== null) {
  2056. return;
  2057. }
  2058. $$$1(tip).removeClass(ClassName.FADE);
  2059. this.config.animation = false;
  2060. this.hide();
  2061. this.show();
  2062. this.config.animation = initConfigAnimation;
  2063. }; // Static
  2064. Tooltip._jQueryInterface = function _jQueryInterface(config) {
  2065. return this.each(function () {
  2066. var data = $$$1(this).data(DATA_KEY);
  2067. var _config = typeof config === 'object' && config;
  2068. if (!data && /dispose|hide/.test(config)) {
  2069. return;
  2070. }
  2071. if (!data) {
  2072. data = new Tooltip(this, _config);
  2073. $$$1(this).data(DATA_KEY, data);
  2074. }
  2075. if (typeof config === 'string') {
  2076. if (typeof data[config] === 'undefined') {
  2077. throw new TypeError("No method named \"" + config + "\"");
  2078. }
  2079. data[config]();
  2080. }
  2081. });
  2082. };
  2083. _createClass(Tooltip, null, [{
  2084. key: "VERSION",
  2085. get: function get() {
  2086. return VERSION;
  2087. }
  2088. }, {
  2089. key: "Default",
  2090. get: function get() {
  2091. return Default;
  2092. }
  2093. }, {
  2094. key: "NAME",
  2095. get: function get() {
  2096. return NAME;
  2097. }
  2098. }, {
  2099. key: "DATA_KEY",
  2100. get: function get() {
  2101. return DATA_KEY;
  2102. }
  2103. }, {
  2104. key: "Event",
  2105. get: function get() {
  2106. return Event;
  2107. }
  2108. }, {
  2109. key: "EVENT_KEY",
  2110. get: function get() {
  2111. return EVENT_KEY;
  2112. }
  2113. }, {
  2114. key: "DefaultType",
  2115. get: function get() {
  2116. return DefaultType;
  2117. }
  2118. }]);
  2119. return Tooltip;
  2120. }();
  2121. /**
  2122. * ------------------------------------------------------------------------
  2123. * jQuery
  2124. * ------------------------------------------------------------------------
  2125. */
  2126. $$$1.fn[NAME] = Tooltip._jQueryInterface;
  2127. $$$1.fn[NAME].Constructor = Tooltip;
  2128. $$$1.fn[NAME].noConflict = function () {
  2129. $$$1.fn[NAME] = JQUERY_NO_CONFLICT;
  2130. return Tooltip._jQueryInterface;
  2131. };
  2132. return Tooltip;
  2133. }($, Popper$1);
  2134. /**
  2135. * --------------------------------------------------------------------------
  2136. * Bootstrap (v4.0.0): popover.js
  2137. * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
  2138. * --------------------------------------------------------------------------
  2139. */
  2140. var Popover = function ($$$1) {
  2141. /**
  2142. * ------------------------------------------------------------------------
  2143. * Constants
  2144. * ------------------------------------------------------------------------
  2145. */
  2146. var NAME = 'popover';
  2147. var VERSION = '4.0.0';
  2148. var DATA_KEY = 'bs.popover';
  2149. var EVENT_KEY = "." + DATA_KEY;
  2150. var JQUERY_NO_CONFLICT = $$$1.fn[NAME];
  2151. var CLASS_PREFIX = 'bs-popover';
  2152. var BSCLS_PREFIX_REGEX = new RegExp("(^|\\s)" + CLASS_PREFIX + "\\S+", 'g');
  2153. var Default = _extends({}, Tooltip.Default, {
  2154. placement: 'right',
  2155. trigger: 'click',
  2156. content: '',
  2157. template: '<div class="popover" role="tooltip">' + '<div class="arrow"></div>' + '<h3 class="popover-header"></h3>' + '<div class="popover-body"></div></div>'
  2158. });
  2159. var DefaultType = _extends({}, Tooltip.DefaultType, {
  2160. content: '(string|element|function)'
  2161. });
  2162. var ClassName = {
  2163. FADE: 'fade',
  2164. SHOW: 'show'
  2165. };
  2166. var Selector = {
  2167. TITLE: '.popover-header',
  2168. CONTENT: '.popover-body'
  2169. };
  2170. var Event = {
  2171. HIDE: "hide" + EVENT_KEY,
  2172. HIDDEN: "hidden" + EVENT_KEY,
  2173. SHOW: "show" + EVENT_KEY,
  2174. SHOWN: "shown" + EVENT_KEY,
  2175. INSERTED: "inserted" + EVENT_KEY,
  2176. CLICK: "click" + EVENT_KEY,
  2177. FOCUSIN: "focusin" + EVENT_KEY,
  2178. FOCUSOUT: "focusout" + EVENT_KEY,
  2179. MOUSEENTER: "mouseenter" + EVENT_KEY,
  2180. MOUSELEAVE: "mouseleave" + EVENT_KEY
  2181. /**
  2182. * ------------------------------------------------------------------------
  2183. * Class Definition
  2184. * ------------------------------------------------------------------------
  2185. */
  2186. };
  2187. var Popover =
  2188. /*#__PURE__*/
  2189. function (_Tooltip) {
  2190. _inheritsLoose(Popover, _Tooltip);
  2191. function Popover() {
  2192. return _Tooltip.apply(this, arguments) || this;
  2193. }
  2194. var _proto = Popover.prototype;
  2195. // Overrides
  2196. _proto.isWithContent = function isWithContent() {
  2197. return this.getTitle() || this._getContent();
  2198. };
  2199. _proto.addAttachmentClass = function addAttachmentClass(attachment) {
  2200. $$$1(this.getTipElement()).addClass(CLASS_PREFIX + "-" + attachment);
  2201. };
  2202. _proto.getTipElement = function getTipElement() {
  2203. this.tip = this.tip || $$$1(this.config.template)[0];
  2204. return this.tip;
  2205. };
  2206. _proto.setContent = function setContent() {
  2207. var $tip = $$$1(this.getTipElement()); // We use append for html objects to maintain js events
  2208. this.setElementContent($tip.find(Selector.TITLE), this.getTitle());
  2209. var content = this._getContent();
  2210. if (typeof content === 'function') {
  2211. content = content.call(this.element);
  2212. }
  2213. this.setElementContent($tip.find(Selector.CONTENT), content);
  2214. $tip.removeClass(ClassName.FADE + " " + ClassName.SHOW);
  2215. }; // Private
  2216. _proto._getContent = function _getContent() {
  2217. return this.element.getAttribute('data-content') || this.config.content;
  2218. };
  2219. _proto._cleanTipClass = function _cleanTipClass() {
  2220. var $tip = $$$1(this.getTipElement());
  2221. var tabClass = $tip.attr('class').match(BSCLS_PREFIX_REGEX);
  2222. if (tabClass !== null && tabClass.length > 0) {
  2223. $tip.removeClass(tabClass.join(''));
  2224. }
  2225. }; // Static
  2226. Popover._jQueryInterface = function _jQueryInterface(config) {
  2227. return this.each(function () {
  2228. var data = $$$1(this).data(DATA_KEY);
  2229. var _config = typeof config === 'object' ? config : null;
  2230. if (!data && /destroy|hide/.test(config)) {
  2231. return;
  2232. }
  2233. if (!data) {
  2234. data = new Popover(this, _config);
  2235. $$$1(this).data(DATA_KEY, data);
  2236. }
  2237. if (typeof config === 'string') {
  2238. if (typeof data[config] === 'undefined') {
  2239. throw new TypeError("No method named \"" + config + "\"");
  2240. }
  2241. data[config]();
  2242. }
  2243. });
  2244. };
  2245. _createClass(Popover, null, [{
  2246. key: "VERSION",
  2247. // Getters
  2248. get: function get() {
  2249. return VERSION;
  2250. }
  2251. }, {
  2252. key: "Default",
  2253. get: function get() {
  2254. return Default;
  2255. }
  2256. }, {
  2257. key: "NAME",
  2258. get: function get() {
  2259. return NAME;
  2260. }
  2261. }, {
  2262. key: "DATA_KEY",
  2263. get: function get() {
  2264. return DATA_KEY;
  2265. }
  2266. }, {
  2267. key: "Event",
  2268. get: function get() {
  2269. return Event;
  2270. }
  2271. }, {
  2272. key: "EVENT_KEY",
  2273. get: function get() {
  2274. return EVENT_KEY;
  2275. }
  2276. }, {
  2277. key: "DefaultType",
  2278. get: function get() {
  2279. return DefaultType;
  2280. }
  2281. }]);
  2282. return Popover;
  2283. }(Tooltip);
  2284. /**
  2285. * ------------------------------------------------------------------------
  2286. * jQuery
  2287. * ------------------------------------------------------------------------
  2288. */
  2289. $$$1.fn[NAME] = Popover._jQueryInterface;
  2290. $$$1.fn[NAME].Constructor = Popover;
  2291. $$$1.fn[NAME].noConflict = function () {
  2292. $$$1.fn[NAME] = JQUERY_NO_CONFLICT;
  2293. return Popover._jQueryInterface;
  2294. };
  2295. return Popover;
  2296. }($);
  2297. /**
  2298. * --------------------------------------------------------------------------
  2299. * Bootstrap (v4.0.0): scrollspy.js
  2300. * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
  2301. * --------------------------------------------------------------------------
  2302. */
  2303. var ScrollSpy = function ($$$1) {
  2304. /**
  2305. * ------------------------------------------------------------------------
  2306. * Constants
  2307. * ------------------------------------------------------------------------
  2308. */
  2309. var NAME = 'scrollspy';
  2310. var VERSION = '4.0.0';
  2311. var DATA_KEY = 'bs.scrollspy';
  2312. var EVENT_KEY = "." + DATA_KEY;
  2313. var DATA_API_KEY = '.data-api';
  2314. var JQUERY_NO_CONFLICT = $$$1.fn[NAME];
  2315. var Default = {
  2316. offset: 10,
  2317. method: 'auto',
  2318. target: ''
  2319. };
  2320. var DefaultType = {
  2321. offset: 'number',
  2322. method: 'string',
  2323. target: '(string|element)'
  2324. };
  2325. var Event = {
  2326. ACTIVATE: "activate" + EVENT_KEY,
  2327. SCROLL: "scroll" + EVENT_KEY,
  2328. LOAD_DATA_API: "load" + EVENT_KEY + DATA_API_KEY
  2329. };
  2330. var ClassName = {
  2331. DROPDOWN_ITEM: 'dropdown-item',
  2332. DROPDOWN_MENU: 'dropdown-menu',
  2333. ACTIVE: 'active'
  2334. };
  2335. var Selector = {
  2336. DATA_SPY: '[data-spy="scroll"]',
  2337. ACTIVE: '.active',
  2338. NAV_LIST_GROUP: '.nav, .list-group',
  2339. NAV_LINKS: '.nav-link',
  2340. NAV_ITEMS: '.nav-item',
  2341. LIST_ITEMS: '.list-group-item',
  2342. DROPDOWN: '.dropdown',
  2343. DROPDOWN_ITEMS: '.dropdown-item',
  2344. DROPDOWN_TOGGLE: '.dropdown-toggle'
  2345. };
  2346. var OffsetMethod = {
  2347. OFFSET: 'offset',
  2348. POSITION: 'position'
  2349. /**
  2350. * ------------------------------------------------------------------------
  2351. * Class Definition
  2352. * ------------------------------------------------------------------------
  2353. */
  2354. };
  2355. var ScrollSpy =
  2356. /*#__PURE__*/
  2357. function () {
  2358. function ScrollSpy(element, config) {
  2359. var _this = this;
  2360. this._element = element;
  2361. this._scrollElement = element.tagName === 'BODY' ? window : element;
  2362. this._config = this._getConfig(config);
  2363. this._selector = this._config.target + " " + Selector.NAV_LINKS + "," + (this._config.target + " " + Selector.LIST_ITEMS + ",") + (this._config.target + " " + Selector.DROPDOWN_ITEMS);
  2364. this._offsets = [];
  2365. this._targets = [];
  2366. this._activeTarget = null;
  2367. this._scrollHeight = 0;
  2368. $$$1(this._scrollElement).on(Event.SCROLL, function (event) {
  2369. return _this._process(event);
  2370. });
  2371. this.refresh();
  2372. this._process();
  2373. } // Getters
  2374. var _proto = ScrollSpy.prototype;
  2375. // Public
  2376. _proto.refresh = function refresh() {
  2377. var _this2 = this;
  2378. var autoMethod = this._scrollElement === this._scrollElement.window ? OffsetMethod.OFFSET : OffsetMethod.POSITION;
  2379. var offsetMethod = this._config.method === 'auto' ? autoMethod : this._config.method;
  2380. var offsetBase = offsetMethod === OffsetMethod.POSITION ? this._getScrollTop() : 0;
  2381. this._offsets = [];
  2382. this._targets = [];
  2383. this._scrollHeight = this._getScrollHeight();
  2384. var targets = $$$1.makeArray($$$1(this._selector));
  2385. targets.map(function (element) {
  2386. var target;
  2387. var targetSelector = Util.getSelectorFromElement(element);
  2388. if (targetSelector) {
  2389. target = $$$1(targetSelector)[0];
  2390. }
  2391. if (target) {
  2392. var targetBCR = target.getBoundingClientRect();
  2393. if (targetBCR.width || targetBCR.height) {
  2394. // TODO (fat): remove sketch reliance on jQuery position/offset
  2395. return [$$$1(target)[offsetMethod]().top + offsetBase, targetSelector];
  2396. }
  2397. }
  2398. return null;
  2399. }).filter(function (item) {
  2400. return item;
  2401. }).sort(function (a, b) {
  2402. return a[0] - b[0];
  2403. }).forEach(function (item) {
  2404. _this2._offsets.push(item[0]);
  2405. _this2._targets.push(item[1]);
  2406. });
  2407. };
  2408. _proto.dispose = function dispose() {
  2409. $$$1.removeData(this._element, DATA_KEY);
  2410. $$$1(this._scrollElement).off(EVENT_KEY);
  2411. this._element = null;
  2412. this._scrollElement = null;
  2413. this._config = null;
  2414. this._selector = null;
  2415. this._offsets = null;
  2416. this._targets = null;
  2417. this._activeTarget = null;
  2418. this._scrollHeight = null;
  2419. }; // Private
  2420. _proto._getConfig = function _getConfig(config) {
  2421. config = _extends({}, Default, config);
  2422. if (typeof config.target !== 'string') {
  2423. var id = $$$1(config.target).attr('id');
  2424. if (!id) {
  2425. id = Util.getUID(NAME);
  2426. $$$1(config.target).attr('id', id);
  2427. }
  2428. config.target = "#" + id;
  2429. }
  2430. Util.typeCheckConfig(NAME, config, DefaultType);
  2431. return config;
  2432. };
  2433. _proto._getScrollTop = function _getScrollTop() {
  2434. return this._scrollElement === window ? this._scrollElement.pageYOffset : this._scrollElement.scrollTop;
  2435. };
  2436. _proto._getScrollHeight = function _getScrollHeight() {
  2437. return this._scrollElement.scrollHeight || Math.max(document.body.scrollHeight, document.documentElement.scrollHeight);
  2438. };
  2439. _proto._getOffsetHeight = function _getOffsetHeight() {
  2440. return this._scrollElement === window ? window.innerHeight : this._scrollElement.getBoundingClientRect().height;
  2441. };
  2442. _proto._process = function _process() {
  2443. var scrollTop = this._getScrollTop() + this._config.offset;
  2444. var scrollHeight = this._getScrollHeight();
  2445. var maxScroll = this._config.offset + scrollHeight - this._getOffsetHeight();
  2446. if (this._scrollHeight !== scrollHeight) {
  2447. this.refresh();
  2448. }
  2449. if (scrollTop >= maxScroll) {
  2450. var target = this._targets[this._targets.length - 1];
  2451. if (this._activeTarget !== target) {
  2452. this._activate(target);
  2453. }
  2454. return;
  2455. }
  2456. if (this._activeTarget && scrollTop < this._offsets[0] && this._offsets[0] > 0) {
  2457. this._activeTarget = null;
  2458. this._clear();
  2459. return;
  2460. }
  2461. for (var i = this._offsets.length; i--;) {
  2462. var isActiveTarget = this._activeTarget !== this._targets[i] && scrollTop >= this._offsets[i] && (typeof this._offsets[i + 1] === 'undefined' || scrollTop < this._offsets[i + 1]);
  2463. if (isActiveTarget) {
  2464. this._activate(this._targets[i]);
  2465. }
  2466. }
  2467. };
  2468. _proto._activate = function _activate(target) {
  2469. this._activeTarget = target;
  2470. this._clear();
  2471. var queries = this._selector.split(','); // eslint-disable-next-line arrow-body-style
  2472. queries = queries.map(function (selector) {
  2473. return selector + "[data-target=\"" + target + "\"]," + (selector + "[href=\"" + target + "\"]");
  2474. });
  2475. var $link = $$$1(queries.join(','));
  2476. if ($link.hasClass(ClassName.DROPDOWN_ITEM)) {
  2477. $link.closest(Selector.DROPDOWN).find(Selector.DROPDOWN_TOGGLE).addClass(ClassName.ACTIVE);
  2478. $link.addClass(ClassName.ACTIVE);
  2479. } else {
  2480. // Set triggered link as active
  2481. $link.addClass(ClassName.ACTIVE); // Set triggered links parents as active
  2482. // With both <ul> and <nav> markup a parent is the previous sibling of any nav ancestor
  2483. $link.parents(Selector.NAV_LIST_GROUP).prev(Selector.NAV_LINKS + ", " + Selector.LIST_ITEMS).addClass(ClassName.ACTIVE); // Handle special case when .nav-link is inside .nav-item
  2484. $link.parents(Selector.NAV_LIST_GROUP).prev(Selector.NAV_ITEMS).children(Selector.NAV_LINKS).addClass(ClassName.ACTIVE);
  2485. }
  2486. $$$1(this._scrollElement).trigger(Event.ACTIVATE, {
  2487. relatedTarget: target
  2488. });
  2489. };
  2490. _proto._clear = function _clear() {
  2491. $$$1(this._selector).filter(Selector.ACTIVE).removeClass(ClassName.ACTIVE);
  2492. }; // Static
  2493. ScrollSpy._jQueryInterface = function _jQueryInterface(config) {
  2494. return this.each(function () {
  2495. var data = $$$1(this).data(DATA_KEY);
  2496. var _config = typeof config === 'object' && config;
  2497. if (!data) {
  2498. data = new ScrollSpy(this, _config);
  2499. $$$1(this).data(DATA_KEY, data);
  2500. }
  2501. if (typeof config === 'string') {
  2502. if (typeof data[config] === 'undefined') {
  2503. throw new TypeError("No method named \"" + config + "\"");
  2504. }
  2505. data[config]();
  2506. }
  2507. });
  2508. };
  2509. _createClass(ScrollSpy, null, [{
  2510. key: "VERSION",
  2511. get: function get() {
  2512. return VERSION;
  2513. }
  2514. }, {
  2515. key: "Default",
  2516. get: function get() {
  2517. return Default;
  2518. }
  2519. }]);
  2520. return ScrollSpy;
  2521. }();
  2522. /**
  2523. * ------------------------------------------------------------------------
  2524. * Data Api implementation
  2525. * ------------------------------------------------------------------------
  2526. */
  2527. $$$1(window).on(Event.LOAD_DATA_API, function () {
  2528. var scrollSpys = $$$1.makeArray($$$1(Selector.DATA_SPY));
  2529. for (var i = scrollSpys.length; i--;) {
  2530. var $spy = $$$1(scrollSpys[i]);
  2531. ScrollSpy._jQueryInterface.call($spy, $spy.data());
  2532. }
  2533. });
  2534. /**
  2535. * ------------------------------------------------------------------------
  2536. * jQuery
  2537. * ------------------------------------------------------------------------
  2538. */
  2539. $$$1.fn[NAME] = ScrollSpy._jQueryInterface;
  2540. $$$1.fn[NAME].Constructor = ScrollSpy;
  2541. $$$1.fn[NAME].noConflict = function () {
  2542. $$$1.fn[NAME] = JQUERY_NO_CONFLICT;
  2543. return ScrollSpy._jQueryInterface;
  2544. };
  2545. return ScrollSpy;
  2546. }($);
  2547. /**
  2548. * --------------------------------------------------------------------------
  2549. * Bootstrap (v4.0.0): tab.js
  2550. * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
  2551. * --------------------------------------------------------------------------
  2552. */
  2553. var Tab = function ($$$1) {
  2554. /**
  2555. * ------------------------------------------------------------------------
  2556. * Constants
  2557. * ------------------------------------------------------------------------
  2558. */
  2559. var NAME = 'tab';
  2560. var VERSION = '4.0.0';
  2561. var DATA_KEY = 'bs.tab';
  2562. var EVENT_KEY = "." + DATA_KEY;
  2563. var DATA_API_KEY = '.data-api';
  2564. var JQUERY_NO_CONFLICT = $$$1.fn[NAME];
  2565. var TRANSITION_DURATION = 150;
  2566. var Event = {
  2567. HIDE: "hide" + EVENT_KEY,
  2568. HIDDEN: "hidden" + EVENT_KEY,
  2569. SHOW: "show" + EVENT_KEY,
  2570. SHOWN: "shown" + EVENT_KEY,
  2571. CLICK_DATA_API: "click" + EVENT_KEY + DATA_API_KEY
  2572. };
  2573. var ClassName = {
  2574. DROPDOWN_MENU: 'dropdown-menu',
  2575. ACTIVE: 'active',
  2576. DISABLED: 'disabled',
  2577. FADE: 'fade',
  2578. SHOW: 'show'
  2579. };
  2580. var Selector = {
  2581. DROPDOWN: '.dropdown',
  2582. NAV_LIST_GROUP: '.nav, .list-group',
  2583. ACTIVE: '.active',
  2584. ACTIVE_UL: '> li > .active',
  2585. DATA_TOGGLE: '[data-toggle="tab"], [data-toggle="pill"], [data-toggle="list"]',
  2586. DROPDOWN_TOGGLE: '.dropdown-toggle',
  2587. DROPDOWN_ACTIVE_CHILD: '> .dropdown-menu .active'
  2588. /**
  2589. * ------------------------------------------------------------------------
  2590. * Class Definition
  2591. * ------------------------------------------------------------------------
  2592. */
  2593. };
  2594. var Tab =
  2595. /*#__PURE__*/
  2596. function () {
  2597. function Tab(element) {
  2598. this._element = element;
  2599. } // Getters
  2600. var _proto = Tab.prototype;
  2601. // Public
  2602. _proto.show = function show() {
  2603. var _this = this;
  2604. if (this._element.parentNode && this._element.parentNode.nodeType === Node.ELEMENT_NODE && $$$1(this._element).hasClass(ClassName.ACTIVE) || $$$1(this._element).hasClass(ClassName.DISABLED)) {
  2605. return;
  2606. }
  2607. var target;
  2608. var previous;
  2609. var listElement = $$$1(this._element).closest(Selector.NAV_LIST_GROUP)[0];
  2610. var selector = Util.getSelectorFromElement(this._element);
  2611. if (listElement) {
  2612. var itemSelector = listElement.nodeName === 'UL' ? Selector.ACTIVE_UL : Selector.ACTIVE;
  2613. previous = $$$1.makeArray($$$1(listElement).find(itemSelector));
  2614. previous = previous[previous.length - 1];
  2615. }
  2616. var hideEvent = $$$1.Event(Event.HIDE, {
  2617. relatedTarget: this._element
  2618. });
  2619. var showEvent = $$$1.Event(Event.SHOW, {
  2620. relatedTarget: previous
  2621. });
  2622. if (previous) {
  2623. $$$1(previous).trigger(hideEvent);
  2624. }
  2625. $$$1(this._element).trigger(showEvent);
  2626. if (showEvent.isDefaultPrevented() || hideEvent.isDefaultPrevented()) {
  2627. return;
  2628. }
  2629. if (selector) {
  2630. target = $$$1(selector)[0];
  2631. }
  2632. this._activate(this._element, listElement);
  2633. var complete = function complete() {
  2634. var hiddenEvent = $$$1.Event(Event.HIDDEN, {
  2635. relatedTarget: _this._element
  2636. });
  2637. var shownEvent = $$$1.Event(Event.SHOWN, {
  2638. relatedTarget: previous
  2639. });
  2640. $$$1(previous).trigger(hiddenEvent);
  2641. $$$1(_this._element).trigger(shownEvent);
  2642. };
  2643. if (target) {
  2644. this._activate(target, target.parentNode, complete);
  2645. } else {
  2646. complete();
  2647. }
  2648. };
  2649. _proto.dispose = function dispose() {
  2650. $$$1.removeData(this._element, DATA_KEY);
  2651. this._element = null;
  2652. }; // Private
  2653. _proto._activate = function _activate(element, container, callback) {
  2654. var _this2 = this;
  2655. var activeElements;
  2656. if (container.nodeName === 'UL') {
  2657. activeElements = $$$1(container).find(Selector.ACTIVE_UL);
  2658. } else {
  2659. activeElements = $$$1(container).children(Selector.ACTIVE);
  2660. }
  2661. var active = activeElements[0];
  2662. var isTransitioning = callback && Util.supportsTransitionEnd() && active && $$$1(active).hasClass(ClassName.FADE);
  2663. var complete = function complete() {
  2664. return _this2._transitionComplete(element, active, callback);
  2665. };
  2666. if (active && isTransitioning) {
  2667. $$$1(active).one(Util.TRANSITION_END, complete).emulateTransitionEnd(TRANSITION_DURATION);
  2668. } else {
  2669. complete();
  2670. }
  2671. };
  2672. _proto._transitionComplete = function _transitionComplete(element, active, callback) {
  2673. if (active) {
  2674. $$$1(active).removeClass(ClassName.SHOW + " " + ClassName.ACTIVE);
  2675. var dropdownChild = $$$1(active.parentNode).find(Selector.DROPDOWN_ACTIVE_CHILD)[0];
  2676. if (dropdownChild) {
  2677. $$$1(dropdownChild).removeClass(ClassName.ACTIVE);
  2678. }
  2679. if (active.getAttribute('role') === 'tab') {
  2680. active.setAttribute('aria-selected', false);
  2681. }
  2682. }
  2683. $$$1(element).addClass(ClassName.ACTIVE);
  2684. if (element.getAttribute('role') === 'tab') {
  2685. element.setAttribute('aria-selected', true);
  2686. }
  2687. Util.reflow(element);
  2688. $$$1(element).addClass(ClassName.SHOW);
  2689. if (element.parentNode && $$$1(element.parentNode).hasClass(ClassName.DROPDOWN_MENU)) {
  2690. var dropdownElement = $$$1(element).closest(Selector.DROPDOWN)[0];
  2691. if (dropdownElement) {
  2692. $$$1(dropdownElement).find(Selector.DROPDOWN_TOGGLE).addClass(ClassName.ACTIVE);
  2693. }
  2694. element.setAttribute('aria-expanded', true);
  2695. }
  2696. if (callback) {
  2697. callback();
  2698. }
  2699. }; // Static
  2700. Tab._jQueryInterface = function _jQueryInterface(config) {
  2701. return this.each(function () {
  2702. var $this = $$$1(this);
  2703. var data = $this.data(DATA_KEY);
  2704. if (!data) {
  2705. data = new Tab(this);
  2706. $this.data(DATA_KEY, data);
  2707. }
  2708. if (typeof config === 'string') {
  2709. if (typeof data[config] === 'undefined') {
  2710. throw new TypeError("No method named \"" + config + "\"");
  2711. }
  2712. data[config]();
  2713. }
  2714. });
  2715. };
  2716. _createClass(Tab, null, [{
  2717. key: "VERSION",
  2718. get: function get() {
  2719. return VERSION;
  2720. }
  2721. }]);
  2722. return Tab;
  2723. }();
  2724. /**
  2725. * ------------------------------------------------------------------------
  2726. * Data Api implementation
  2727. * ------------------------------------------------------------------------
  2728. */
  2729. $$$1(document).on(Event.CLICK_DATA_API, Selector.DATA_TOGGLE, function (event) {
  2730. event.preventDefault();
  2731. Tab._jQueryInterface.call($$$1(this), 'show');
  2732. });
  2733. /**
  2734. * ------------------------------------------------------------------------
  2735. * jQuery
  2736. * ------------------------------------------------------------------------
  2737. */
  2738. $$$1.fn[NAME] = Tab._jQueryInterface;
  2739. $$$1.fn[NAME].Constructor = Tab;
  2740. $$$1.fn[NAME].noConflict = function () {
  2741. $$$1.fn[NAME] = JQUERY_NO_CONFLICT;
  2742. return Tab._jQueryInterface;
  2743. };
  2744. return Tab;
  2745. }($);
  2746. var Util$2 = function () {
  2747. /**
  2748. * ------------------------------------------------------------------------
  2749. * Private TransitionEnd Helpers
  2750. * ------------------------------------------------------------------------
  2751. */
  2752. var transitionEnd = false;
  2753. var _transitionEndSelector = "";
  2754. var TransitionEndEvent = {
  2755. WebkitTransition: "webkitTransitionEnd",
  2756. MozTransition: "transitionend",
  2757. OTransition: "oTransitionEnd otransitionend",
  2758. transition: "transitionend"
  2759. };
  2760. function transitionEndTest() {
  2761. if (window.QUnit) {
  2762. return false;
  2763. }
  2764. var el = document.createElement("bmd");
  2765. for (var name in TransitionEndEvent) {
  2766. if (el.style[name] !== undefined) {
  2767. return TransitionEndEvent[name]; // { end: TransitionEndEvent[name] }
  2768. }
  2769. }
  2770. return false;
  2771. }
  2772. function setTransitionEndSupport() {
  2773. transitionEnd = transitionEndTest(); // generate a concatenated transition end event selector
  2774. for (var name in TransitionEndEvent) {
  2775. _transitionEndSelector += " " + TransitionEndEvent[name];
  2776. }
  2777. }
  2778. /**
  2779. * --------------------------------------------------------------------------
  2780. * Public Util Api
  2781. * --------------------------------------------------------------------------
  2782. */
  2783. var Util = {
  2784. transitionEndSupported: function transitionEndSupported() {
  2785. return transitionEnd;
  2786. },
  2787. transitionEndSelector: function transitionEndSelector() {
  2788. return _transitionEndSelector;
  2789. },
  2790. isChar: function isChar(event) {
  2791. if (typeof event.which === "undefined") {
  2792. return true;
  2793. } else if (typeof event.which === "number" && event.which > 0) {
  2794. return !event.ctrlKey && !event.metaKey && !event.altKey && event.which !== 8 && // backspace
  2795. event.which !== 9 && // tab
  2796. event.which !== 13 && // enter
  2797. event.which !== 16 && // shift
  2798. event.which !== 17 && // ctrl
  2799. event.which !== 20 && // caps lock
  2800. event.which !== 27 // escape
  2801. ;
  2802. }
  2803. return false;
  2804. },
  2805. assert: function assert($element, invalidTest, message) {
  2806. if (invalidTest) {
  2807. if (!$element === undefined) {
  2808. $element.css("border", "1px solid red");
  2809. }
  2810. console.error(message, $element); // eslint-disable-line no-console
  2811. throw message;
  2812. }
  2813. },
  2814. describe: function describe($element) {
  2815. if ($element === undefined) {
  2816. return "undefined";
  2817. } else if ($element.length === 0) {
  2818. return "(no matching elements)";
  2819. }
  2820. return $element[0].outerHTML.split(">")[0] + ">";
  2821. }
  2822. };
  2823. setTransitionEndSupport();
  2824. return Util;
  2825. }(jQuery);
  2826. var Base = function ($$$1) {
  2827. var ClassName = {
  2828. BMD_FORM_GROUP: "bmd-form-group",
  2829. IS_FILLED: "is-filled",
  2830. IS_FOCUSED: "is-focused"
  2831. };
  2832. var Selector = {
  2833. BMD_FORM_GROUP: "." + ClassName.BMD_FORM_GROUP
  2834. };
  2835. var Default = {};
  2836. /**
  2837. * ------------------------------------------------------------------------
  2838. * Class Definition
  2839. * ------------------------------------------------------------------------
  2840. */
  2841. var Base =
  2842. /*#__PURE__*/
  2843. function () {
  2844. /**
  2845. *
  2846. * @param element
  2847. * @param config
  2848. * @param properties - anything that needs to be set as this[key] = value. Works around the need to call `super` before using `this`
  2849. */
  2850. function Base($element, config, properties) {
  2851. if (properties === void 0) {
  2852. properties = {};
  2853. }
  2854. this.$element = $element;
  2855. this.config = $$$1.extend(true, {}, Default, config); // set properties for use in the constructor initialization
  2856. for (var key in properties) {
  2857. this[key] = properties[key];
  2858. }
  2859. }
  2860. var _proto = Base.prototype;
  2861. _proto.dispose = function dispose(dataKey) {
  2862. this.$element.data(dataKey, null);
  2863. this.$element = null;
  2864. this.config = null;
  2865. }; // ------------------------------------------------------------------------
  2866. // protected
  2867. _proto.addFormGroupFocus = function addFormGroupFocus() {
  2868. if (!this.$element.prop("disabled")) {
  2869. this.$bmdFormGroup.addClass(ClassName.IS_FOCUSED);
  2870. }
  2871. };
  2872. _proto.removeFormGroupFocus = function removeFormGroupFocus() {
  2873. this.$bmdFormGroup.removeClass(ClassName.IS_FOCUSED);
  2874. };
  2875. _proto.removeIsFilled = function removeIsFilled() {
  2876. this.$bmdFormGroup.removeClass(ClassName.IS_FILLED);
  2877. };
  2878. _proto.addIsFilled = function addIsFilled() {
  2879. this.$bmdFormGroup.addClass(ClassName.IS_FILLED);
  2880. }; // Find bmd-form-group
  2881. _proto.findMdbFormGroup = function findMdbFormGroup(raiseError) {
  2882. if (raiseError === void 0) {
  2883. raiseError = true;
  2884. }
  2885. var mfg = this.$element.closest(Selector.BMD_FORM_GROUP);
  2886. if (mfg.length === 0 && raiseError) {
  2887. $$$1.error("Failed to find " + Selector.BMD_FORM_GROUP + " for " + Util$2.describe(this.$element));
  2888. }
  2889. return mfg;
  2890. }; // ------------------------------------------------------------------------
  2891. // private
  2892. // ------------------------------------------------------------------------
  2893. // static
  2894. return Base;
  2895. }();
  2896. return Base;
  2897. }(jQuery);
  2898. var BaseInput = function ($$$1) {
  2899. var ClassName = {
  2900. FORM_GROUP: "form-group",
  2901. BMD_FORM_GROUP: "bmd-form-group",
  2902. BMD_LABEL: "bmd-label",
  2903. BMD_LABEL_STATIC: "bmd-label-static",
  2904. BMD_LABEL_PLACEHOLDER: "bmd-label-placeholder",
  2905. BMD_LABEL_FLOATING: "bmd-label-floating",
  2906. HAS_DANGER: "has-danger",
  2907. IS_FILLED: "is-filled",
  2908. IS_FOCUSED: "is-focused",
  2909. INPUT_GROUP: "input-group"
  2910. };
  2911. var Selector = {
  2912. FORM_GROUP: "." + ClassName.FORM_GROUP,
  2913. BMD_FORM_GROUP: "." + ClassName.BMD_FORM_GROUP,
  2914. BMD_LABEL_WILDCARD: "label[class^='" + ClassName.BMD_LABEL + "'], label[class*=' " + ClassName.BMD_LABEL + "']" // match any label variant if specified
  2915. };
  2916. var Default = {
  2917. validate: false,
  2918. formGroup: {
  2919. required: false
  2920. },
  2921. bmdFormGroup: {
  2922. template: "<span class='" + ClassName.BMD_FORM_GROUP + "'></span>",
  2923. create: true,
  2924. // create a wrapper if form-group not found
  2925. required: true // not recommended to turn this off, only used for inline components
  2926. },
  2927. label: {
  2928. required: false,
  2929. // Prioritized find order for resolving the label to be used as an bmd-label if not specified in the markup
  2930. // - a function(thisComponent); or
  2931. // - a string selector used like $bmdFormGroup.find(selector)
  2932. //
  2933. // Note this only runs if $bmdFormGroup.find(Selector.BMD_LABEL_WILDCARD) fails to find a label (as authored in the markup)
  2934. //
  2935. selectors: [".form-control-label", // in the case of horizontal or inline forms, this will be marked
  2936. "> label" // usual case for text inputs, first child. Deeper would find toggle labels so don't do that.
  2937. ],
  2938. className: ClassName.BMD_LABEL_STATIC
  2939. },
  2940. requiredClasses: [],
  2941. invalidComponentMatches: [],
  2942. convertInputSizeVariations: true
  2943. };
  2944. var FormControlSizeMarkers = {
  2945. "form-control-lg": "bmd-form-group-lg",
  2946. "form-control-sm": "bmd-form-group-sm"
  2947. };
  2948. /**
  2949. * ------------------------------------------------------------------------
  2950. * Class Definition
  2951. * ------------------------------------------------------------------------
  2952. */
  2953. var BaseInput =
  2954. /*#__PURE__*/
  2955. function (_Base) {
  2956. _inheritsLoose(BaseInput, _Base);
  2957. /**
  2958. *
  2959. * @param element
  2960. * @param config
  2961. * @param properties - anything that needs to be set as this[key] = value. Works around the need to call `super` before using `this`
  2962. */
  2963. function BaseInput($element, config, properties) {
  2964. var _this;
  2965. if (properties === void 0) {
  2966. properties = {};
  2967. }
  2968. _this = _Base.call(this, $element, $$$1.extend(true, {}, Default, config), properties) || this; // Enforce no overlap between components to prevent side effects
  2969. _this._rejectInvalidComponentMatches(); // Enforce expected structure (if any)
  2970. _this.rejectWithoutRequiredStructure(); // Enforce required classes for a consistent rendering
  2971. _this._rejectWithoutRequiredClasses(); // Resolve the form-group first, it will be used for bmd-form-group if possible
  2972. // note: different components have different rules
  2973. _this.$formGroup = _this.findFormGroup(_this.config.formGroup.required); // Will add bmd-form-group to form-group or create an bmd-form-group
  2974. // Performance Note: for those forms that are really performance driven, create the markup with the .bmd-form-group to avoid
  2975. // rendering changes once added.
  2976. _this.$bmdFormGroup = _this.resolveMdbFormGroup(); // Resolve and mark the bmdLabel if necessary as defined by the config
  2977. _this.$bmdLabel = _this.resolveMdbLabel(); // Signal to the bmd-form-group that a form-control-* variation is being used
  2978. _this.resolveMdbFormGroupSizing();
  2979. _this.addFocusListener();
  2980. _this.addChangeListener();
  2981. if (_this.$element.val() != "") {
  2982. _this.addIsFilled();
  2983. }
  2984. return _this;
  2985. }
  2986. var _proto = BaseInput.prototype;
  2987. _proto.dispose = function dispose(dataKey) {
  2988. _Base.prototype.dispose.call(this, dataKey);
  2989. this.$bmdFormGroup = null;
  2990. this.$formGroup = null;
  2991. }; // ------------------------------------------------------------------------
  2992. // protected
  2993. _proto.rejectWithoutRequiredStructure = function rejectWithoutRequiredStructure() {// implement
  2994. };
  2995. _proto.addFocusListener = function addFocusListener() {
  2996. var _this2 = this;
  2997. this.$element.on("focus", function () {
  2998. _this2.addFormGroupFocus();
  2999. }).on("blur", function () {
  3000. _this2.removeFormGroupFocus();
  3001. });
  3002. };
  3003. _proto.addChangeListener = function addChangeListener() {
  3004. var _this3 = this;
  3005. this.$element.on("keydown paste", function (event) {
  3006. if (Util$2.isChar(event)) {
  3007. _this3.addIsFilled();
  3008. }
  3009. }).on("keyup change", function () {
  3010. // make sure empty is added back when there is a programmatic value change.
  3011. // NOTE: programmatic changing of value using $.val() must trigger the change event i.e. $.val('x').trigger('change')
  3012. if (_this3.isEmpty()) {
  3013. _this3.removeIsFilled();
  3014. } else {
  3015. _this3.addIsFilled();
  3016. }
  3017. if (_this3.config.validate) {
  3018. // Validation events do not bubble, so they must be attached directly to the text: http://jsfiddle.net/PEpRM/1/
  3019. // Further, even the bind method is being caught, but since we are already calling #checkValidity here, just alter
  3020. // the form-group on change.
  3021. //
  3022. // NOTE: I'm not sure we should be intervening regarding validation, this seems better as a README and snippet of code.
  3023. // BUT, I've left it here for backwards compatibility.
  3024. var isValid = typeof _this3.$element[0].checkValidity === "undefined" || _this3.$element[0].checkValidity();
  3025. if (isValid) {
  3026. _this3.removeHasDanger();
  3027. } else {
  3028. _this3.addHasDanger();
  3029. }
  3030. }
  3031. });
  3032. };
  3033. _proto.addHasDanger = function addHasDanger() {
  3034. this.$bmdFormGroup.addClass(ClassName.HAS_DANGER);
  3035. };
  3036. _proto.removeHasDanger = function removeHasDanger() {
  3037. this.$bmdFormGroup.removeClass(ClassName.HAS_DANGER);
  3038. };
  3039. _proto.isEmpty = function isEmpty() {
  3040. return this.$element.val() === null || this.$element.val() === undefined || this.$element.val() === "";
  3041. }; // Will add bmd-form-group to form-group or create a bmd-form-group if necessary
  3042. _proto.resolveMdbFormGroup = function resolveMdbFormGroup() {
  3043. var mfg = this.findMdbFormGroup(false);
  3044. if (mfg === undefined || mfg.length === 0) {
  3045. if (this.config.bmdFormGroup.create && (this.$formGroup === undefined || this.$formGroup.length === 0)) {
  3046. // If a form-group doesn't exist (not recommended), take a guess and wrap the element (assuming no label).
  3047. // note: it's possible to make this smarter, but I need to see valid cases before adding any complexity.
  3048. // this may be an input-group, wrap that instead
  3049. if (this.outerElement().parent().hasClass(ClassName.INPUT_GROUP)) {
  3050. this.outerElement().parent().wrap(this.config.bmdFormGroup.template);
  3051. } else {
  3052. this.outerElement().wrap(this.config.bmdFormGroup.template);
  3053. }
  3054. } else {
  3055. // a form-group does exist, add our marker class to it
  3056. this.$formGroup.addClass(ClassName.BMD_FORM_GROUP); // OLD: may want to implement this after all, see how the styling turns out, but using an existing form-group is less manipulation of the dom and therefore preferable
  3057. // A form-group does exist, so add an bmd-form-group wrapping it's internal contents
  3058. //fg.wrapInner(this.config.bmdFormGroup.template)
  3059. }
  3060. mfg = this.findMdbFormGroup(this.config.bmdFormGroup.required);
  3061. }
  3062. return mfg;
  3063. }; // Demarcation element (e.g. first child of a form-group)
  3064. // Subclasses such as file inputs may have different structures
  3065. _proto.outerElement = function outerElement() {
  3066. return this.$element;
  3067. }; // Will add bmd-label to bmd-form-group if not already specified
  3068. _proto.resolveMdbLabel = function resolveMdbLabel() {
  3069. var label = this.$bmdFormGroup.find(Selector.BMD_LABEL_WILDCARD);
  3070. if (label === undefined || label.length === 0) {
  3071. // we need to find it based on the configured selectors
  3072. label = this.findMdbLabel(this.config.label.required);
  3073. if (label === undefined || label.length === 0) {// no label found, and finder did not require one
  3074. } else {
  3075. // a candidate label was found, add the configured default class name
  3076. label.addClass(this.config.label.className);
  3077. }
  3078. }
  3079. return label;
  3080. }; // Find bmd-label variant based on the config selectors
  3081. _proto.findMdbLabel = function findMdbLabel(raiseError) {
  3082. if (raiseError === void 0) {
  3083. raiseError = true;
  3084. }
  3085. var label = null; // use the specified selector order
  3086. for (var _iterator = this.config.label.selectors, _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : _iterator[Symbol.iterator]();;) {
  3087. var _ref;
  3088. if (_isArray) {
  3089. if (_i >= _iterator.length) break;
  3090. _ref = _iterator[_i++];
  3091. } else {
  3092. _i = _iterator.next();
  3093. if (_i.done) break;
  3094. _ref = _i.value;
  3095. }
  3096. var _selector = _ref;
  3097. if ($$$1.isFunction(_selector)) {
  3098. label = _selector(this);
  3099. } else {
  3100. label = this.$bmdFormGroup.find(_selector);
  3101. }
  3102. if (label !== undefined && label.length > 0) {
  3103. break;
  3104. }
  3105. }
  3106. if (label.length === 0 && raiseError) {
  3107. $$$1.error("Failed to find " + Selector.BMD_LABEL_WILDCARD + " within form-group for " + Util$2.describe(this.$element));
  3108. }
  3109. return label;
  3110. }; // Find bmd-form-group
  3111. _proto.findFormGroup = function findFormGroup(raiseError) {
  3112. if (raiseError === void 0) {
  3113. raiseError = true;
  3114. }
  3115. var fg = this.$element.closest(Selector.FORM_GROUP);
  3116. if (fg.length === 0 && raiseError) {
  3117. $$$1.error("Failed to find " + Selector.FORM_GROUP + " for " + Util$2.describe(this.$element));
  3118. }
  3119. return fg;
  3120. }; // Due to the interconnected nature of labels/inputs/help-blocks, signal the bmd-form-group-* size variation based on
  3121. // a found form-control-* size
  3122. _proto.resolveMdbFormGroupSizing = function resolveMdbFormGroupSizing() {
  3123. if (!this.config.convertInputSizeVariations) {
  3124. return;
  3125. } // Modification - Change text-sm/lg to form-group-sm/lg instead (preferred standard and simpler css/less variants)
  3126. for (var inputSize in FormControlSizeMarkers) {
  3127. if (this.$element.hasClass(inputSize)) {
  3128. //this.$element.removeClass(inputSize)
  3129. this.$bmdFormGroup.addClass(FormControlSizeMarkers[inputSize]);
  3130. }
  3131. }
  3132. }; // ------------------------------------------------------------------------
  3133. // private
  3134. _proto._rejectInvalidComponentMatches = function _rejectInvalidComponentMatches() {
  3135. for (var _iterator2 = this.config.invalidComponentMatches, _isArray2 = Array.isArray(_iterator2), _i2 = 0, _iterator2 = _isArray2 ? _iterator2 : _iterator2[Symbol.iterator]();;) {
  3136. var _ref2;
  3137. if (_isArray2) {
  3138. if (_i2 >= _iterator2.length) break;
  3139. _ref2 = _iterator2[_i2++];
  3140. } else {
  3141. _i2 = _iterator2.next();
  3142. if (_i2.done) break;
  3143. _ref2 = _i2.value;
  3144. }
  3145. var _otherComponent = _ref2;
  3146. _otherComponent.rejectMatch(this.constructor.name, this.$element);
  3147. }
  3148. };
  3149. _proto._rejectWithoutRequiredClasses = function _rejectWithoutRequiredClasses() {
  3150. for (var _iterator3 = this.config.requiredClasses, _isArray3 = Array.isArray(_iterator3), _i3 = 0, _iterator3 = _isArray3 ? _iterator3 : _iterator3[Symbol.iterator]();;) {
  3151. var _ref3;
  3152. if (_isArray3) {
  3153. if (_i3 >= _iterator3.length) break;
  3154. _ref3 = _iterator3[_i3++];
  3155. } else {
  3156. _i3 = _iterator3.next();
  3157. if (_i3.done) break;
  3158. _ref3 = _i3.value;
  3159. }
  3160. var _requiredClass = _ref3;
  3161. if (_requiredClass.indexOf("||") !== -1) {
  3162. var oneOf = _requiredClass.split("||");
  3163. for (var _iterator4 = oneOf, _isArray4 = Array.isArray(_iterator4), _i4 = 0, _iterator4 = _isArray4 ? _iterator4 : _iterator4[Symbol.iterator]();;) {
  3164. var _ref4;
  3165. if (_isArray4) {
  3166. if (_i4 >= _iterator4.length) break;
  3167. _ref4 = _iterator4[_i4++];
  3168. } else {
  3169. _i4 = _iterator4.next();
  3170. if (_i4.done) break;
  3171. _ref4 = _i4.value;
  3172. }
  3173. var _requiredClass3 = _ref4;
  3174. if (this.$element.hasClass(_requiredClass3)) {
  3175. break;
  3176. }
  3177. }
  3178. } else if (this.$element.hasClass(_requiredClass)) {
  3179. }
  3180. }
  3181. }; // ------------------------------------------------------------------------
  3182. // static
  3183. return BaseInput;
  3184. }(Base);
  3185. return BaseInput;
  3186. }(jQuery);
  3187. var BaseSelection = function ($$$1) {
  3188. /**
  3189. * ------------------------------------------------------------------------
  3190. * Constants
  3191. * ------------------------------------------------------------------------
  3192. */
  3193. var Default = {
  3194. label: {
  3195. required: false // Prioritized find order for resolving the label to be used as an bmd-label if not specified in the markup
  3196. // - a function(thisComponent); or
  3197. // - a string selector used like $bmdFormGroup.find(selector)
  3198. //
  3199. // Note this only runs if $bmdFormGroup.find(Selector.BMD_LABEL_WILDCARD) fails to find a label (as authored in the markup)
  3200. //
  3201. //selectors: [
  3202. // `.form-control-label`, // in the case of horizontal or inline forms, this will be marked
  3203. // `> label` // usual case for text inputs
  3204. //]
  3205. }
  3206. };
  3207. var Selector = {
  3208. LABEL: "label"
  3209. };
  3210. /**
  3211. * ------------------------------------------------------------------------
  3212. * Class Definition
  3213. * ------------------------------------------------------------------------
  3214. */
  3215. var BaseSelection =
  3216. /*#__PURE__*/
  3217. function (_BaseInput) {
  3218. _inheritsLoose(BaseSelection, _BaseInput);
  3219. function BaseSelection($element, config, properties) {
  3220. var _this;
  3221. // properties = {inputType: checkbox, outerClass: checkbox-inline}
  3222. // '.checkbox|switch|radio > label > input[type=checkbox|radio]'
  3223. // '.${this.outerClass} > label > input[type=${this.inputType}]'
  3224. _this = _BaseInput.call(this, $element, $$$1.extend(true, {}, Default, config), properties) || this;
  3225. _this.decorateMarkup();
  3226. return _this;
  3227. } // ------------------------------------------------------------------------
  3228. // protected
  3229. var _proto = BaseSelection.prototype;
  3230. _proto.decorateMarkup = function decorateMarkup() {
  3231. var $decorator = $$$1(this.config.template);
  3232. this.$element.after($decorator); // initialize ripples after decorator has been inserted into DOM
  3233. if (this.config.ripples !== false) {
  3234. $decorator.bmdRipples();
  3235. }
  3236. }; // Demarcation element (e.g. first child of a form-group)
  3237. _proto.outerElement = function outerElement() {
  3238. // .checkbox|switch|radio > label > input[type=checkbox|radio]
  3239. // label.checkbox-inline > input[type=checkbox|radio]
  3240. // .${this.outerClass} > label > input[type=${this.inputType}]
  3241. return this.$element.parent().closest("." + this.outerClass);
  3242. };
  3243. _proto.rejectWithoutRequiredStructure = function rejectWithoutRequiredStructure() {
  3244. // '.checkbox|switch|radio > label > input[type=checkbox|radio]'
  3245. // '.${this.outerClass} > label > input[type=${this.inputType}]'
  3246. Util$2.assert(this.$element, !this.$element.parent().prop("tagName") === "label", this.constructor.name + "'s " + Util$2.describe(this.$element) + " parent element should be <label>.");
  3247. Util$2.assert(this.$element, !this.outerElement().hasClass(this.outerClass), this.constructor.name + "'s " + Util$2.describe(this.$element) + " outer element should have class " + this.outerClass + ".");
  3248. };
  3249. _proto.addFocusListener = function addFocusListener() {
  3250. var _this2 = this;
  3251. // checkboxes didn't appear to bubble to the document, so we'll bind these directly
  3252. this.$element.closest(Selector.LABEL).hover(function () {
  3253. _this2.addFormGroupFocus();
  3254. }, function () {
  3255. _this2.removeFormGroupFocus();
  3256. });
  3257. };
  3258. _proto.addChangeListener = function addChangeListener() {
  3259. var _this3 = this;
  3260. this.$element.change(function () {
  3261. _this3.$element.blur();
  3262. });
  3263. }; // ------------------------------------------------------------------------
  3264. // private
  3265. return BaseSelection;
  3266. }(BaseInput);
  3267. return BaseSelection;
  3268. }(jQuery);
  3269. //import File from './file'
  3270. //import Radio from './radio'
  3271. //import Textarea from './textarea'
  3272. //import Select from './select'
  3273. var Checkbox = function ($$$1) {
  3274. /**
  3275. * ------------------------------------------------------------------------
  3276. * Constants
  3277. * ------------------------------------------------------------------------
  3278. */
  3279. var NAME = "checkbox";
  3280. var DATA_KEY = "bmd." + NAME;
  3281. var JQUERY_NAME = "bmd" + (NAME.charAt(0).toUpperCase() + NAME.slice(1));
  3282. var JQUERY_NO_CONFLICT = $$$1.fn[JQUERY_NAME];
  3283. var Default = {
  3284. template: "<span class='checkbox-decorator'><span class='check'></span></span>"
  3285. };
  3286. /**
  3287. * ------------------------------------------------------------------------
  3288. * Class Definition
  3289. * ------------------------------------------------------------------------
  3290. */
  3291. var Checkbox =
  3292. /*#__PURE__*/
  3293. function (_BaseSelection) {
  3294. _inheritsLoose(Checkbox, _BaseSelection);
  3295. function Checkbox($element, config, properties) {
  3296. if (properties === void 0) {
  3297. properties = {
  3298. inputType: NAME,
  3299. outerClass: NAME
  3300. };
  3301. }
  3302. return _BaseSelection.call(this, $element, $$$1.extend(true, //{invalidComponentMatches: [File, Radio, Text, Textarea, Select]},
  3303. Default, config), properties) || this;
  3304. }
  3305. var _proto = Checkbox.prototype;
  3306. _proto.dispose = function dispose(dataKey) {
  3307. if (dataKey === void 0) {
  3308. dataKey = DATA_KEY;
  3309. }
  3310. _BaseSelection.prototype.dispose.call(this, dataKey);
  3311. };
  3312. Checkbox.matches = function matches($element) {
  3313. // '.checkbox > label > input[type=checkbox]'
  3314. if ($element.attr("type") === "checkbox") {
  3315. return true;
  3316. }
  3317. return false;
  3318. };
  3319. Checkbox.rejectMatch = function rejectMatch(component, $element) {
  3320. Util$2.assert(this.$element, this.matches($element), component + " component element " + Util$2.describe($element) + " is invalid for type='checkbox'.");
  3321. }; // ------------------------------------------------------------------------
  3322. // protected
  3323. // ------------------------------------------------------------------------
  3324. // protected
  3325. // ------------------------------------------------------------------------
  3326. // private
  3327. // ------------------------------------------------------------------------
  3328. // static
  3329. Checkbox._jQueryInterface = function _jQueryInterface(config) {
  3330. return this.each(function () {
  3331. var $element = $$$1(this);
  3332. var data = $element.data(DATA_KEY);
  3333. if (!data) {
  3334. data = new Checkbox($element, config);
  3335. $element.data(DATA_KEY, data);
  3336. }
  3337. });
  3338. };
  3339. return Checkbox;
  3340. }(BaseSelection);
  3341. /**
  3342. * ------------------------------------------------------------------------
  3343. * jQuery
  3344. * ------------------------------------------------------------------------
  3345. */
  3346. $$$1.fn[JQUERY_NAME] = Checkbox._jQueryInterface;
  3347. $$$1.fn[JQUERY_NAME].Constructor = Checkbox;
  3348. $$$1.fn[JQUERY_NAME].noConflict = function () {
  3349. $$$1.fn[JQUERY_NAME] = JQUERY_NO_CONFLICT;
  3350. return Checkbox._jQueryInterface;
  3351. };
  3352. return Checkbox;
  3353. }(jQuery);
  3354. var CheckboxInline = function ($$$1) {
  3355. /**
  3356. * ------------------------------------------------------------------------
  3357. * Constants
  3358. * ------------------------------------------------------------------------
  3359. */
  3360. var NAME = "checkboxInline";
  3361. var DATA_KEY = "bmd." + NAME;
  3362. var JQUERY_NAME = "bmd" + (NAME.charAt(0).toUpperCase() + NAME.slice(1));
  3363. var JQUERY_NO_CONFLICT = $$$1.fn[JQUERY_NAME];
  3364. var Default = {
  3365. bmdFormGroup: {
  3366. create: false,
  3367. // no bmd-form-group creation if form-group not present. It messes with the layout.
  3368. required: false
  3369. }
  3370. };
  3371. /**
  3372. * ------------------------------------------------------------------------
  3373. * Class Definition
  3374. * ------------------------------------------------------------------------
  3375. */
  3376. var CheckboxInline =
  3377. /*#__PURE__*/
  3378. function (_Checkbox) {
  3379. _inheritsLoose(CheckboxInline, _Checkbox);
  3380. function CheckboxInline($element, config, properties) {
  3381. if (properties === void 0) {
  3382. properties = {
  3383. inputType: "checkbox",
  3384. outerClass: "checkbox-inline"
  3385. };
  3386. }
  3387. return _Checkbox.call(this, $element, $$$1.extend(true, {}, Default, config), properties) || this;
  3388. }
  3389. var _proto = CheckboxInline.prototype;
  3390. _proto.dispose = function dispose() {
  3391. _Checkbox.prototype.dispose.call(this, DATA_KEY);
  3392. }; //static matches($element) {
  3393. // // '.checkbox-inline > input[type=checkbox]'
  3394. // if ($element.attr('type') === 'checkbox') {
  3395. // return true
  3396. // }
  3397. // return false
  3398. //}
  3399. //
  3400. //static rejectMatch(component, $element) {
  3401. // Util.assert(this.$element, this.matches($element), `${component} component element ${Util.describe($element)} is invalid for type='checkbox'.`)
  3402. //}
  3403. // ------------------------------------------------------------------------
  3404. // protected
  3405. // ------------------------------------------------------------------------
  3406. // protected
  3407. // ------------------------------------------------------------------------
  3408. // private
  3409. // ------------------------------------------------------------------------
  3410. // static
  3411. CheckboxInline._jQueryInterface = function _jQueryInterface(config) {
  3412. return this.each(function () {
  3413. var $element = $$$1(this);
  3414. var data = $element.data(DATA_KEY);
  3415. if (!data) {
  3416. data = new CheckboxInline($element, config);
  3417. $element.data(DATA_KEY, data);
  3418. }
  3419. });
  3420. };
  3421. return CheckboxInline;
  3422. }(Checkbox);
  3423. /**
  3424. * ------------------------------------------------------------------------
  3425. * jQuery
  3426. * ------------------------------------------------------------------------
  3427. */
  3428. $$$1.fn[JQUERY_NAME] = CheckboxInline._jQueryInterface;
  3429. $$$1.fn[JQUERY_NAME].Constructor = CheckboxInline;
  3430. $$$1.fn[JQUERY_NAME].noConflict = function () {
  3431. $$$1.fn[JQUERY_NAME] = JQUERY_NO_CONFLICT;
  3432. return CheckboxInline._jQueryInterface;
  3433. };
  3434. return CheckboxInline;
  3435. }(jQuery);
  3436. var CollapseInline = function ($$$1) {
  3437. /**
  3438. * ------------------------------------------------------------------------
  3439. * Constants
  3440. * ------------------------------------------------------------------------
  3441. */
  3442. var NAME = "collapseInline";
  3443. var DATA_KEY = "bmd." + NAME;
  3444. var JQUERY_NAME = "bmd" + (NAME.charAt(0).toUpperCase() + NAME.slice(1));
  3445. var JQUERY_NO_CONFLICT = $$$1.fn[JQUERY_NAME];
  3446. var Selector = {
  3447. ANY_INPUT: "input, select, textarea"
  3448. };
  3449. var ClassName = {
  3450. IN: "in",
  3451. COLLAPSE: "collapse",
  3452. COLLAPSING: "collapsing",
  3453. COLLAPSED: "collapsed",
  3454. WIDTH: "width"
  3455. };
  3456. var Default = {};
  3457. /**
  3458. * ------------------------------------------------------------------------
  3459. * Class Definition
  3460. * ------------------------------------------------------------------------
  3461. */
  3462. var CollapseInline =
  3463. /*#__PURE__*/
  3464. function (_Base) {
  3465. _inheritsLoose(CollapseInline, _Base);
  3466. // $element is expected to be the trigger
  3467. // i.e. <button class="btn bmd-btn-icon" for="search" data-toggle="collapse" data-target="#search-field" aria-expanded="false" aria-controls="search-field">
  3468. function CollapseInline($element, config) {
  3469. var _this;
  3470. _this = _Base.call(this, $element, $$$1.extend(true, {}, Default, config)) || this;
  3471. _this.$bmdFormGroup = _this.findMdbFormGroup(true);
  3472. var collapseSelector = $element.data("target");
  3473. _this.$collapse = $$$1(collapseSelector);
  3474. Util$2.assert($element, _this.$collapse.length === 0, "Cannot find collapse target for " + Util$2.describe($element));
  3475. Util$2.assert(_this.$collapse, !_this.$collapse.hasClass(ClassName.COLLAPSE), Util$2.describe(_this.$collapse) + " is expected to have the '" + ClassName.COLLAPSE + "' class. It is being targeted by " + Util$2.describe($element)); // find the first input for focusing
  3476. var $inputs = _this.$bmdFormGroup.find(Selector.ANY_INPUT);
  3477. if ($inputs.length > 0) {
  3478. _this.$input = $inputs.first();
  3479. } // automatically add the marker class to collapse width instead of height - nice convenience because it is easily forgotten
  3480. if (!_this.$collapse.hasClass(ClassName.WIDTH)) {
  3481. _this.$collapse.addClass(ClassName.WIDTH);
  3482. }
  3483. if (_this.$input) {
  3484. // add a listener to set focus
  3485. _this.$collapse.on("shown.bs.collapse", function () {
  3486. _this.$input.focus();
  3487. }); // add a listener to collapse field
  3488. _this.$input.blur(function () {
  3489. _this.$collapse.collapse("hide");
  3490. });
  3491. }
  3492. return _this;
  3493. }
  3494. var _proto = CollapseInline.prototype;
  3495. _proto.dispose = function dispose() {
  3496. _Base.prototype.dispose.call(this, DATA_KEY);
  3497. this.$bmdFormGroup = null;
  3498. this.$collapse = null;
  3499. this.$input = null;
  3500. }; // ------------------------------------------------------------------------
  3501. // private
  3502. // ------------------------------------------------------------------------
  3503. // static
  3504. CollapseInline._jQueryInterface = function _jQueryInterface(config) {
  3505. return this.each(function () {
  3506. var $element = $$$1(this);
  3507. var data = $element.data(DATA_KEY);
  3508. if (!data) {
  3509. data = new CollapseInline($element, config);
  3510. $element.data(DATA_KEY, data);
  3511. }
  3512. });
  3513. };
  3514. return CollapseInline;
  3515. }(Base);
  3516. /**
  3517. * ------------------------------------------------------------------------
  3518. * jQuery
  3519. * ------------------------------------------------------------------------
  3520. */
  3521. $$$1.fn[JQUERY_NAME] = CollapseInline._jQueryInterface;
  3522. $$$1.fn[JQUERY_NAME].Constructor = CollapseInline;
  3523. $$$1.fn[JQUERY_NAME].noConflict = function () {
  3524. $$$1.fn[JQUERY_NAME] = JQUERY_NO_CONFLICT;
  3525. return CollapseInline._jQueryInterface;
  3526. };
  3527. return CollapseInline;
  3528. }(jQuery);
  3529. //import Radio from './radio'
  3530. //import Switch from './switch'
  3531. //import Text from './text'
  3532. //import Textarea from './textarea'
  3533. //import Select from './select'
  3534. var File = function ($$$1) {
  3535. /**
  3536. * ------------------------------------------------------------------------
  3537. * Constants
  3538. * ------------------------------------------------------------------------
  3539. */
  3540. var NAME = "file";
  3541. var DATA_KEY = "bmd." + NAME;
  3542. var JQUERY_NAME = "bmd" + (NAME.charAt(0).toUpperCase() + NAME.slice(1));
  3543. var JQUERY_NO_CONFLICT = $$$1.fn[JQUERY_NAME];
  3544. var Default = {};
  3545. var ClassName = {
  3546. FILE: NAME,
  3547. IS_FILE: "is-file"
  3548. };
  3549. var Selector = {
  3550. FILENAMES: "input.form-control[readonly]"
  3551. };
  3552. /**
  3553. * ------------------------------------------------------------------------
  3554. * Class Definition
  3555. * ------------------------------------------------------------------------
  3556. */
  3557. var File =
  3558. /*#__PURE__*/
  3559. function (_BaseInput) {
  3560. _inheritsLoose(File, _BaseInput);
  3561. function File($element, config) {
  3562. var _this;
  3563. _this = _BaseInput.call(this, $element, $$$1.extend(true, //{invalidComponentMatches: [Checkbox, Radio, Text, Textarea, Select, Switch]},
  3564. Default, config)) || this;
  3565. _this.$bmdFormGroup.addClass(ClassName.IS_FILE);
  3566. return _this;
  3567. }
  3568. var _proto = File.prototype;
  3569. _proto.dispose = function dispose() {
  3570. _BaseInput.prototype.dispose.call(this, DATA_KEY);
  3571. };
  3572. File.matches = function matches($element) {
  3573. if ($element.attr("type") === "file") {
  3574. return true;
  3575. }
  3576. return false;
  3577. };
  3578. File.rejectMatch = function rejectMatch(component, $element) {
  3579. Util$2.assert(this.$element, this.matches($element), component + " component element " + Util$2.describe($element) + " is invalid for type='file'.");
  3580. }; // ------------------------------------------------------------------------
  3581. // protected
  3582. // Demarcation element (e.g. first child of a form-group)
  3583. _proto.outerElement = function outerElement() {
  3584. // label.file > input[type=file]
  3585. return this.$element.parent().closest("." + ClassName.FILE);
  3586. };
  3587. _proto.rejectWithoutRequiredStructure = function rejectWithoutRequiredStructure() {
  3588. // label.file > input[type=file]
  3589. Util$2.assert(this.$element, !this.outerElement().prop("tagName") === "label", this.constructor.name + "'s " + Util$2.describe(this.$element) + " parent element " + Util$2.describe(this.outerElement()) + " should be <label>.");
  3590. Util$2.assert(this.$element, !this.outerElement().hasClass(ClassName.FILE), this.constructor.name + "'s " + Util$2.describe(this.$element) + " parent element " + Util$2.describe(this.outerElement()) + " should have class ." + ClassName.FILE + ".");
  3591. };
  3592. _proto.addFocusListener = function addFocusListener() {
  3593. var _this2 = this;
  3594. this.$bmdFormGroup.on("focus", function () {
  3595. _this2.addFormGroupFocus();
  3596. }).on("blur", function () {
  3597. _this2.removeFormGroupFocus();
  3598. });
  3599. };
  3600. _proto.addChangeListener = function addChangeListener() {
  3601. var _this3 = this;
  3602. // set the fileinput readonly field with the name of the file
  3603. this.$element.on("change", function () {
  3604. var value = "";
  3605. $$$1.each(_this3.$element.files, function (i, file) {
  3606. value += file.name + " , ";
  3607. });
  3608. value = value.substring(0, value.length - 2);
  3609. if (value) {
  3610. _this3.addIsFilled();
  3611. } else {
  3612. _this3.removeIsFilled();
  3613. }
  3614. _this3.$bmdFormGroup.find(Selector.FILENAMES).val(value);
  3615. });
  3616. }; // ------------------------------------------------------------------------
  3617. // private
  3618. // ------------------------------------------------------------------------
  3619. // static
  3620. File._jQueryInterface = function _jQueryInterface(config) {
  3621. return this.each(function () {
  3622. var $element = $$$1(this);
  3623. var data = $element.data(DATA_KEY);
  3624. if (!data) {
  3625. data = new File($element, config);
  3626. $element.data(DATA_KEY, data);
  3627. }
  3628. });
  3629. };
  3630. return File;
  3631. }(BaseInput);
  3632. /**
  3633. * ------------------------------------------------------------------------
  3634. * jQuery
  3635. * ------------------------------------------------------------------------
  3636. */
  3637. $$$1.fn[JQUERY_NAME] = File._jQueryInterface;
  3638. $$$1.fn[JQUERY_NAME].Constructor = File;
  3639. $$$1.fn[JQUERY_NAME].noConflict = function () {
  3640. $$$1.fn[JQUERY_NAME] = JQUERY_NO_CONFLICT;
  3641. return File._jQueryInterface;
  3642. };
  3643. return File;
  3644. }(jQuery);
  3645. //import File from './file'
  3646. //import Checkbox from './checkbox'
  3647. //import Switch from './switch'
  3648. var Radio = function ($$$1) {
  3649. /**
  3650. * ------------------------------------------------------------------------
  3651. * Constants
  3652. * ------------------------------------------------------------------------
  3653. */
  3654. var NAME = "radio";
  3655. var DATA_KEY = "bmd." + NAME;
  3656. var JQUERY_NAME = "bmd" + (NAME.charAt(0).toUpperCase() + NAME.slice(1));
  3657. var JQUERY_NO_CONFLICT = $$$1.fn[JQUERY_NAME];
  3658. var Default = {
  3659. template: "<span class='bmd-radio'></span>"
  3660. };
  3661. /**
  3662. * ------------------------------------------------------------------------
  3663. * Class Definition
  3664. * ------------------------------------------------------------------------
  3665. */
  3666. var Radio =
  3667. /*#__PURE__*/
  3668. function (_BaseSelection) {
  3669. _inheritsLoose(Radio, _BaseSelection);
  3670. function Radio($element, config, properties) {
  3671. if (properties === void 0) {
  3672. properties = {
  3673. inputType: NAME,
  3674. outerClass: NAME
  3675. };
  3676. }
  3677. return _BaseSelection.call(this, $element, $$$1.extend(true, //{invalidComponentMatches: [Checkbox, File, Switch, Text]},
  3678. Default, config), properties) || this;
  3679. }
  3680. var _proto = Radio.prototype;
  3681. _proto.dispose = function dispose(dataKey) {
  3682. if (dataKey === void 0) {
  3683. dataKey = DATA_KEY;
  3684. }
  3685. _BaseSelection.prototype.dispose.call(this, dataKey);
  3686. };
  3687. Radio.matches = function matches($element) {
  3688. // '.radio > label > input[type=radio]'
  3689. if ($element.attr("type") === "radio") {
  3690. return true;
  3691. }
  3692. return false;
  3693. };
  3694. Radio.rejectMatch = function rejectMatch(component, $element) {
  3695. Util$2.assert(this.$element, this.matches($element), component + " component element " + Util$2.describe($element) + " is invalid for type='radio'.");
  3696. }; // ------------------------------------------------------------------------
  3697. // protected
  3698. //decorateMarkup() {
  3699. // this.$element.after(this.config.template)
  3700. //}
  3701. // ------------------------------------------------------------------------
  3702. // private
  3703. // ------------------------------------------------------------------------
  3704. // static
  3705. Radio._jQueryInterface = function _jQueryInterface(config) {
  3706. return this.each(function () {
  3707. var $element = $$$1(this);
  3708. var data = $element.data(DATA_KEY);
  3709. if (!data) {
  3710. data = new Radio($element, config);
  3711. $element.data(DATA_KEY, data);
  3712. }
  3713. });
  3714. };
  3715. return Radio;
  3716. }(BaseSelection);
  3717. /**
  3718. * ------------------------------------------------------------------------
  3719. * jQuery
  3720. * ------------------------------------------------------------------------
  3721. */
  3722. $$$1.fn[JQUERY_NAME] = Radio._jQueryInterface;
  3723. $$$1.fn[JQUERY_NAME].Constructor = Radio;
  3724. $$$1.fn[JQUERY_NAME].noConflict = function () {
  3725. $$$1.fn[JQUERY_NAME] = JQUERY_NO_CONFLICT;
  3726. return Radio._jQueryInterface;
  3727. };
  3728. return Radio;
  3729. }(jQuery);
  3730. var RadioInline = function ($$$1) {
  3731. /**
  3732. * ------------------------------------------------------------------------
  3733. * Constants
  3734. * ------------------------------------------------------------------------
  3735. */
  3736. var NAME = "radioInline";
  3737. var DATA_KEY = "bmd." + NAME;
  3738. var JQUERY_NAME = "bmd" + (NAME.charAt(0).toUpperCase() + NAME.slice(1));
  3739. var JQUERY_NO_CONFLICT = $$$1.fn[JQUERY_NAME];
  3740. var Default = {
  3741. bmdFormGroup: {
  3742. create: false,
  3743. // no bmd-form-group creation if form-group not present. It messes with the layout.
  3744. required: false
  3745. }
  3746. };
  3747. /**
  3748. * ------------------------------------------------------------------------
  3749. * Class Definition
  3750. * ------------------------------------------------------------------------
  3751. */
  3752. var RadioInline =
  3753. /*#__PURE__*/
  3754. function (_Radio) {
  3755. _inheritsLoose(RadioInline, _Radio);
  3756. function RadioInline($element, config, properties) {
  3757. if (properties === void 0) {
  3758. properties = {
  3759. inputType: "radio",
  3760. outerClass: "radio-inline"
  3761. };
  3762. }
  3763. return _Radio.call(this, $element, $$$1.extend(true, {}, Default, config), properties) || this;
  3764. }
  3765. var _proto = RadioInline.prototype;
  3766. _proto.dispose = function dispose() {
  3767. _Radio.prototype.dispose.call(this, DATA_KEY);
  3768. }; // ------------------------------------------------------------------------
  3769. // protected
  3770. // ------------------------------------------------------------------------
  3771. // protected
  3772. // ------------------------------------------------------------------------
  3773. // private
  3774. // ------------------------------------------------------------------------
  3775. // static
  3776. RadioInline._jQueryInterface = function _jQueryInterface(config) {
  3777. return this.each(function () {
  3778. var $element = $$$1(this);
  3779. var data = $element.data(DATA_KEY);
  3780. if (!data) {
  3781. data = new RadioInline($element, config);
  3782. $element.data(DATA_KEY, data);
  3783. }
  3784. });
  3785. };
  3786. return RadioInline;
  3787. }(Radio);
  3788. /**
  3789. * ------------------------------------------------------------------------
  3790. * jQuery
  3791. * ------------------------------------------------------------------------
  3792. */
  3793. $$$1.fn[JQUERY_NAME] = RadioInline._jQueryInterface;
  3794. $$$1.fn[JQUERY_NAME].Constructor = RadioInline;
  3795. $$$1.fn[JQUERY_NAME].noConflict = function () {
  3796. $$$1.fn[JQUERY_NAME] = JQUERY_NO_CONFLICT;
  3797. return RadioInline._jQueryInterface;
  3798. };
  3799. return RadioInline;
  3800. }(jQuery);
  3801. var BaseFormControl = function ($$$1) {
  3802. /**
  3803. * ------------------------------------------------------------------------
  3804. * Constants
  3805. * ------------------------------------------------------------------------
  3806. */
  3807. var Default = {
  3808. requiredClasses: ["form-control"]
  3809. };
  3810. /**
  3811. * ------------------------------------------------------------------------
  3812. * Class Definition
  3813. * ------------------------------------------------------------------------
  3814. */
  3815. var BaseFormControl =
  3816. /*#__PURE__*/
  3817. function (_BaseInput) {
  3818. _inheritsLoose(BaseFormControl, _BaseInput);
  3819. function BaseFormControl($element, config) {
  3820. var _this;
  3821. _this = _BaseInput.call(this, $element, $$$1.extend(true, Default, config)) || this; // Initially mark as empty
  3822. if (_this.isEmpty()) {
  3823. _this.removeIsFilled();
  3824. }
  3825. return _this;
  3826. }
  3827. return BaseFormControl;
  3828. }(BaseInput);
  3829. return BaseFormControl;
  3830. }(jQuery);
  3831. //import File from './file'
  3832. //import Radio from './radio'
  3833. //import Switch from './switch'
  3834. //import Text from './text'
  3835. //import Textarea from './textarea'
  3836. var Select = function ($$$1) {
  3837. /**
  3838. * ------------------------------------------------------------------------
  3839. * Constants
  3840. * ------------------------------------------------------------------------
  3841. */
  3842. var NAME = "select";
  3843. var DATA_KEY = "bmd." + NAME;
  3844. var JQUERY_NAME = "bmd" + (NAME.charAt(0).toUpperCase() + NAME.slice(1));
  3845. var JQUERY_NO_CONFLICT = $$$1.fn[JQUERY_NAME];
  3846. var Default = {
  3847. requiredClasses: ["form-control||custom-select"]
  3848. };
  3849. /**
  3850. * ------------------------------------------------------------------------
  3851. * Class Definition
  3852. * ------------------------------------------------------------------------
  3853. */
  3854. var Select =
  3855. /*#__PURE__*/
  3856. function (_BaseFormControl) {
  3857. _inheritsLoose(Select, _BaseFormControl);
  3858. function Select($element, config) {
  3859. var _this;
  3860. _this = _BaseFormControl.call(this, $element, $$$1.extend(true, //{invalidComponentMatches: [Checkbox, File, Radio, Switch, Text, Textarea]},
  3861. Default, config)) || this; // floating labels will cover the options, so trigger them to be above (if used)
  3862. _this.addIsFilled();
  3863. return _this;
  3864. }
  3865. var _proto = Select.prototype;
  3866. _proto.dispose = function dispose() {
  3867. _BaseFormControl.prototype.dispose.call(this, DATA_KEY);
  3868. };
  3869. Select.matches = function matches($element) {
  3870. if ($element.prop("tagName") === "select") {
  3871. return true;
  3872. }
  3873. return false;
  3874. };
  3875. Select.rejectMatch = function rejectMatch(component, $element) {
  3876. Util$2.assert(this.$element, this.matches($element), component + " component element " + Util$2.describe($element) + " is invalid for <select>.");
  3877. }; // ------------------------------------------------------------------------
  3878. // protected
  3879. // ------------------------------------------------------------------------
  3880. // private
  3881. // ------------------------------------------------------------------------
  3882. // static
  3883. Select._jQueryInterface = function _jQueryInterface(config) {
  3884. return this.each(function () {
  3885. var $element = $$$1(this);
  3886. var data = $element.data(DATA_KEY);
  3887. if (!data) {
  3888. data = new Select($element, config);
  3889. $element.data(DATA_KEY, data);
  3890. }
  3891. });
  3892. };
  3893. return Select;
  3894. }(BaseFormControl);
  3895. /**
  3896. * ------------------------------------------------------------------------
  3897. * jQuery
  3898. * ------------------------------------------------------------------------
  3899. */
  3900. $$$1.fn[JQUERY_NAME] = Select._jQueryInterface;
  3901. $$$1.fn[JQUERY_NAME].Constructor = Select;
  3902. $$$1.fn[JQUERY_NAME].noConflict = function () {
  3903. $$$1.fn[JQUERY_NAME] = JQUERY_NO_CONFLICT;
  3904. return Select._jQueryInterface;
  3905. };
  3906. return Select;
  3907. }(jQuery);
  3908. var Switch = function ($$$1) {
  3909. /**
  3910. * ------------------------------------------------------------------------
  3911. * Constants
  3912. * ------------------------------------------------------------------------
  3913. */
  3914. var NAME = "switch";
  3915. var DATA_KEY = "bmd." + NAME;
  3916. var JQUERY_NAME = "bmd" + (NAME.charAt(0).toUpperCase() + NAME.slice(1));
  3917. var JQUERY_NO_CONFLICT = $$$1.fn[JQUERY_NAME];
  3918. var Default = {
  3919. template: "<span class='bmd-switch-track'></span>"
  3920. };
  3921. /**
  3922. * ------------------------------------------------------------------------
  3923. * Class Definition
  3924. * ------------------------------------------------------------------------
  3925. */
  3926. var Switch =
  3927. /*#__PURE__*/
  3928. function (_Checkbox) {
  3929. _inheritsLoose(Switch, _Checkbox);
  3930. function Switch($element, config, properties) {
  3931. if (properties === void 0) {
  3932. properties = {
  3933. inputType: "checkbox",
  3934. outerClass: "switch"
  3935. };
  3936. }
  3937. return _Checkbox.call(this, $element, $$$1.extend(true, {}, Default, config), properties) || this; // selector: '.switch > label > input[type=checkbox]'
  3938. }
  3939. var _proto = Switch.prototype;
  3940. _proto.dispose = function dispose() {
  3941. _Checkbox.prototype.dispose.call(this, DATA_KEY);
  3942. }; // ------------------------------------------------------------------------
  3943. // protected
  3944. // ------------------------------------------------------------------------
  3945. // private
  3946. // ------------------------------------------------------------------------
  3947. // static
  3948. Switch._jQueryInterface = function _jQueryInterface(config) {
  3949. return this.each(function () {
  3950. var $element = $$$1(this);
  3951. var data = $element.data(DATA_KEY);
  3952. if (!data) {
  3953. data = new Switch($element, config);
  3954. $element.data(DATA_KEY, data);
  3955. }
  3956. });
  3957. };
  3958. return Switch;
  3959. }(Checkbox);
  3960. /**
  3961. * ------------------------------------------------------------------------
  3962. * jQuery
  3963. * ------------------------------------------------------------------------
  3964. */
  3965. $$$1.fn[JQUERY_NAME] = Switch._jQueryInterface;
  3966. $$$1.fn[JQUERY_NAME].Constructor = Switch;
  3967. $$$1.fn[JQUERY_NAME].noConflict = function () {
  3968. $$$1.fn[JQUERY_NAME] = JQUERY_NO_CONFLICT;
  3969. return Switch._jQueryInterface;
  3970. };
  3971. return Switch;
  3972. }(jQuery);
  3973. //import File from './file'
  3974. //import Radio from './radio'
  3975. //import Switch from './switch'
  3976. //import Textarea from './textarea'
  3977. //import Select from './select'
  3978. var Text = function ($$$1) {
  3979. /**
  3980. * ------------------------------------------------------------------------
  3981. * Constants
  3982. * ------------------------------------------------------------------------
  3983. */
  3984. var NAME = "text";
  3985. var DATA_KEY = "bmd." + NAME;
  3986. var JQUERY_NAME = "bmd" + (NAME.charAt(0).toUpperCase() + NAME.slice(1));
  3987. var JQUERY_NO_CONFLICT = $$$1.fn[JQUERY_NAME];
  3988. var Default = {};
  3989. /**
  3990. * ------------------------------------------------------------------------
  3991. * Class Definition
  3992. * ------------------------------------------------------------------------
  3993. */
  3994. var Text =
  3995. /*#__PURE__*/
  3996. function (_BaseFormControl) {
  3997. _inheritsLoose(Text, _BaseFormControl);
  3998. function Text($element, config) {
  3999. return _BaseFormControl.call(this, $element, $$$1.extend(true, //{invalidComponentMatches: [Checkbox, File, Radio, Switch, Select, Textarea]},
  4000. Default, config)) || this;
  4001. }
  4002. var _proto = Text.prototype;
  4003. _proto.dispose = function dispose(dataKey) {
  4004. if (dataKey === void 0) {
  4005. dataKey = DATA_KEY;
  4006. }
  4007. _BaseFormControl.prototype.dispose.call(this, dataKey);
  4008. };
  4009. Text.matches = function matches($element) {
  4010. if ($element.attr("type") === "text") {
  4011. return true;
  4012. }
  4013. return false;
  4014. };
  4015. Text.rejectMatch = function rejectMatch(component, $element) {
  4016. Util$2.assert(this.$element, this.matches($element), component + " component element " + Util$2.describe($element) + " is invalid for type='text'.");
  4017. }; // ------------------------------------------------------------------------
  4018. // protected
  4019. // ------------------------------------------------------------------------
  4020. // private
  4021. // ------------------------------------------------------------------------
  4022. // static
  4023. Text._jQueryInterface = function _jQueryInterface(config) {
  4024. return this.each(function () {
  4025. var $element = $$$1(this);
  4026. var data = $element.data(DATA_KEY);
  4027. if (!data) {
  4028. data = new Text($element, config);
  4029. $element.data(DATA_KEY, data);
  4030. }
  4031. });
  4032. };
  4033. return Text;
  4034. }(BaseFormControl);
  4035. /**
  4036. * ------------------------------------------------------------------------
  4037. * jQuery
  4038. * ------------------------------------------------------------------------
  4039. */
  4040. $$$1.fn[JQUERY_NAME] = Text._jQueryInterface;
  4041. $$$1.fn[JQUERY_NAME].Constructor = Text;
  4042. $$$1.fn[JQUERY_NAME].noConflict = function () {
  4043. $$$1.fn[JQUERY_NAME] = JQUERY_NO_CONFLICT;
  4044. return Text._jQueryInterface;
  4045. };
  4046. return Text;
  4047. }(jQuery);
  4048. //import File from './file'
  4049. //import Radio from './radio'
  4050. //import Switch from './switch'
  4051. //import Text from './text'
  4052. //import Select from './select'
  4053. var Textarea = function ($$$1) {
  4054. /**
  4055. * ------------------------------------------------------------------------
  4056. * Constants
  4057. * ------------------------------------------------------------------------
  4058. */
  4059. var NAME = "textarea";
  4060. var DATA_KEY = "bmd." + NAME;
  4061. var JQUERY_NAME = "bmd" + (NAME.charAt(0).toUpperCase() + NAME.slice(1));
  4062. var JQUERY_NO_CONFLICT = $$$1.fn[JQUERY_NAME];
  4063. var Default = {};
  4064. /**
  4065. * ------------------------------------------------------------------------
  4066. * Class Definition
  4067. * ------------------------------------------------------------------------
  4068. */
  4069. var Textarea =
  4070. /*#__PURE__*/
  4071. function (_BaseFormControl) {
  4072. _inheritsLoose(Textarea, _BaseFormControl);
  4073. function Textarea($element, config) {
  4074. return _BaseFormControl.call(this, $element, $$$1.extend(true, //{invalidComponentMatches: [Checkbox, File, Radio, Text, Select, Switch]},
  4075. Default, config)) || this;
  4076. }
  4077. var _proto = Textarea.prototype;
  4078. _proto.dispose = function dispose() {
  4079. _BaseFormControl.prototype.dispose.call(this, DATA_KEY);
  4080. };
  4081. Textarea.matches = function matches($element) {
  4082. if ($element.prop("tagName") === "textarea") {
  4083. return true;
  4084. }
  4085. return false;
  4086. };
  4087. Textarea.rejectMatch = function rejectMatch(component, $element) {
  4088. Util$2.assert(this.$element, this.matches($element), component + " component element " + Util$2.describe($element) + " is invalid for <textarea>.");
  4089. }; // ------------------------------------------------------------------------
  4090. // protected
  4091. // ------------------------------------------------------------------------
  4092. // private
  4093. // ------------------------------------------------------------------------
  4094. // static
  4095. Textarea._jQueryInterface = function _jQueryInterface(config) {
  4096. return this.each(function () {
  4097. var $element = $$$1(this);
  4098. var data = $element.data(DATA_KEY);
  4099. if (!data) {
  4100. data = new Textarea($element, config);
  4101. $element.data(DATA_KEY, data);
  4102. }
  4103. });
  4104. };
  4105. return Textarea;
  4106. }(BaseFormControl);
  4107. /**
  4108. * ------------------------------------------------------------------------
  4109. * jQuery
  4110. * ------------------------------------------------------------------------
  4111. */
  4112. $$$1.fn[JQUERY_NAME] = Textarea._jQueryInterface;
  4113. $$$1.fn[JQUERY_NAME].Constructor = Textarea;
  4114. $$$1.fn[JQUERY_NAME].noConflict = function () {
  4115. $$$1.fn[JQUERY_NAME] = JQUERY_NO_CONFLICT;
  4116. return Textarea._jQueryInterface;
  4117. };
  4118. return Textarea;
  4119. }(jQuery);
  4120. /* global Popper */
  4121. /**
  4122. * This is a copy of the Bootstrap's original dropdown.js, with the only addition
  4123. * of two new classes: 'showing' and 'hiding', used to handle animaitons.
  4124. */
  4125. /**
  4126. * --------------------------------------------------------------------------
  4127. * Bootstrap (v4.1.0): dropdown.js
  4128. * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
  4129. * --------------------------------------------------------------------------
  4130. */
  4131. var Dropdown = function ($$$1) {
  4132. /**
  4133. * Check for Popper dependency
  4134. * Popper - https://popper.js.org
  4135. */
  4136. if (typeof Popper === 'undefined') {
  4137. throw new Error('Bootstrap dropdown require Popper.js (https://popper.js.org)');
  4138. }
  4139. /**
  4140. * ------------------------------------------------------------------------
  4141. * Constants
  4142. * ------------------------------------------------------------------------
  4143. */
  4144. var NAME = 'dropdown';
  4145. var VERSION = '4.1.0';
  4146. var DATA_KEY = 'bs.dropdown';
  4147. var EVENT_KEY = "." + DATA_KEY;
  4148. var DATA_API_KEY = '.data-api';
  4149. var JQUERY_NO_CONFLICT = $$$1.fn[NAME];
  4150. var ESCAPE_KEYCODE = 27; // KeyboardEvent.which value for Escape (Esc) key
  4151. var SPACE_KEYCODE = 32; // KeyboardEvent.which value for space key
  4152. var TAB_KEYCODE = 9; // KeyboardEvent.which value for tab key
  4153. var ARROW_UP_KEYCODE = 38; // KeyboardEvent.which value for up arrow key
  4154. var ARROW_DOWN_KEYCODE = 40; // KeyboardEvent.which value for down arrow key
  4155. var RIGHT_MOUSE_BUTTON_WHICH = 3; // MouseEvent.which value for the right button (assuming a right-handed mouse)
  4156. var REGEXP_KEYDOWN = new RegExp(ARROW_UP_KEYCODE + "|" + ARROW_DOWN_KEYCODE + "|" + ESCAPE_KEYCODE);
  4157. var Event = {
  4158. HIDE: "hide" + EVENT_KEY,
  4159. HIDDEN: "hidden" + EVENT_KEY,
  4160. SHOW: "show" + EVENT_KEY,
  4161. SHOWN: "shown" + EVENT_KEY,
  4162. CLICK: "click" + EVENT_KEY,
  4163. CLICK_DATA_API: "click" + EVENT_KEY + DATA_API_KEY,
  4164. KEYDOWN_DATA_API: "keydown" + EVENT_KEY + DATA_API_KEY,
  4165. KEYUP_DATA_API: "keyup" + EVENT_KEY + DATA_API_KEY,
  4166. TRANSITION_END: 'transitionend webkitTransitionEnd oTransitionEnd animationend webkitAnimationEnd oAnimationEnd'
  4167. };
  4168. var ClassName = {
  4169. DISABLED: 'disabled',
  4170. SHOW: 'show',
  4171. SHOWING: 'showing',
  4172. HIDING: 'hiding',
  4173. DROPUP: 'dropup',
  4174. MENURIGHT: 'dropdown-menu-right',
  4175. MENULEFT: 'dropdown-menu-left'
  4176. };
  4177. var Selector = {
  4178. DATA_TOGGLE: '[data-toggle="dropdown"]',
  4179. FORM_CHILD: '.dropdown form',
  4180. MENU: '.dropdown-menu',
  4181. NAVBAR_NAV: '.navbar-nav',
  4182. VISIBLE_ITEMS: '.dropdown-menu .dropdown-item:not(.disabled)'
  4183. };
  4184. var AttachmentMap = {
  4185. TOP: 'top-start',
  4186. TOPEND: 'top-end',
  4187. BOTTOM: 'bottom-start',
  4188. BOTTOMEND: 'bottom-end'
  4189. };
  4190. var Default = {
  4191. placement: AttachmentMap.BOTTOM,
  4192. offset: 0,
  4193. flip: true
  4194. };
  4195. var DefaultType = {
  4196. placement: 'string',
  4197. offset: '(number|string)',
  4198. flip: 'boolean'
  4199. /**
  4200. * ------------------------------------------------------------------------
  4201. * Class Definition
  4202. * ------------------------------------------------------------------------
  4203. */
  4204. };
  4205. var Dropdown =
  4206. /*#__PURE__*/
  4207. function () {
  4208. function Dropdown(element, config) {
  4209. this._element = element;
  4210. this._popper = null;
  4211. this._config = this._getConfig(config);
  4212. this._menu = this._getMenuElement();
  4213. this._inNavbar = this._detectNavbar();
  4214. this._addEventListeners();
  4215. } // getters
  4216. var _proto = Dropdown.prototype;
  4217. // public
  4218. _proto.toggle = function toggle() {
  4219. var _this = this;
  4220. if (this._element.disabled || $$$1(this._element).hasClass(ClassName.DISABLED)) {
  4221. return;
  4222. }
  4223. var parent = Dropdown._getParentFromElement(this._element);
  4224. var isActive = $$$1(this._menu).hasClass(ClassName.SHOW);
  4225. Dropdown._clearMenus();
  4226. if (isActive) {
  4227. return;
  4228. }
  4229. var relatedTarget = {
  4230. relatedTarget: this._element
  4231. };
  4232. var showEvent = $$$1.Event(Event.SHOW, relatedTarget);
  4233. $$$1(parent).trigger(showEvent);
  4234. if (showEvent.isDefaultPrevented()) {
  4235. return;
  4236. }
  4237. var element = this._element; // for dropup with alignment we use the parent as popper container
  4238. if ($$$1(parent).hasClass(ClassName.DROPUP)) {
  4239. if ($$$1(this._menu).hasClass(ClassName.MENULEFT) || $$$1(this._menu).hasClass(ClassName.MENURIGHT)) {
  4240. element = parent;
  4241. }
  4242. }
  4243. this._popper = new Popper(element, this._menu, this._getPopperConfig()); // if this is a touch-enabled device we add extra
  4244. // empty mouseover listeners to the body's immediate children;
  4245. // only needed because of broken event delegation on iOS
  4246. // https://www.quirksmode.org/blog/archives/2014/02/mouse_event_bub.html
  4247. if ('ontouchstart' in document.documentElement && !$$$1(parent).closest(Selector.NAVBAR_NAV).length) {
  4248. $$$1('body').children().on('mouseover', null, $$$1.noop);
  4249. }
  4250. this._element.focus();
  4251. this._element.setAttribute('aria-expanded', true);
  4252. $$$1(this._menu).one(Event.TRANSITION_END, function () {
  4253. $$$1(parent).trigger($$$1.Event(Event.SHOWN, relatedTarget));
  4254. $$$1(_this._menu).removeClass(ClassName.SHOWING);
  4255. });
  4256. $$$1(this._menu).addClass(ClassName.SHOW + " " + ClassName.SHOWING);
  4257. $$$1(parent).addClass(ClassName.SHOW);
  4258. };
  4259. _proto.dispose = function dispose() {
  4260. $$$1.removeData(this._element, DATA_KEY);
  4261. $$$1(this._element).off(EVENT_KEY);
  4262. this._element = null;
  4263. this._menu = null;
  4264. if (this._popper !== null) {
  4265. this._popper.destroy();
  4266. }
  4267. this._popper = null;
  4268. };
  4269. _proto.update = function update() {
  4270. this._inNavbar = this._detectNavbar();
  4271. if (this._popper !== null) {
  4272. this._popper.scheduleUpdate();
  4273. }
  4274. }; // private
  4275. _proto._addEventListeners = function _addEventListeners() {
  4276. var _this2 = this;
  4277. $$$1(this._element).on(Event.CLICK, function (event) {
  4278. event.preventDefault();
  4279. event.stopPropagation();
  4280. _this2.toggle();
  4281. });
  4282. };
  4283. _proto._getConfig = function _getConfig(config) {
  4284. var elementData = $$$1(this._element).data();
  4285. if (elementData.placement !== undefined) {
  4286. elementData.placement = AttachmentMap[elementData.placement.toUpperCase()];
  4287. }
  4288. config = $$$1.extend({}, this.constructor.Default, $$$1(this._element).data(), config);
  4289. Util.typeCheckConfig(NAME, config, this.constructor.DefaultType);
  4290. return config;
  4291. };
  4292. _proto._getMenuElement = function _getMenuElement() {
  4293. if (!this._menu) {
  4294. var parent = Dropdown._getParentFromElement(this._element);
  4295. this._menu = $$$1(parent).find(Selector.MENU)[0];
  4296. }
  4297. return this._menu;
  4298. };
  4299. _proto._getPlacement = function _getPlacement() {
  4300. var $parentDropdown = $$$1(this._element).parent();
  4301. var placement = this._config.placement; // Handle dropup
  4302. if ($parentDropdown.hasClass(ClassName.DROPUP) || this._config.placement === AttachmentMap.TOP) {
  4303. placement = AttachmentMap.TOP;
  4304. if ($$$1(this._menu).hasClass(ClassName.MENURIGHT)) {
  4305. placement = AttachmentMap.TOPEND;
  4306. }
  4307. } else if ($$$1(this._menu).hasClass(ClassName.MENURIGHT)) {
  4308. placement = AttachmentMap.BOTTOMEND;
  4309. }
  4310. return placement;
  4311. };
  4312. _proto._detectNavbar = function _detectNavbar() {
  4313. return $$$1(this._element).closest('.navbar').length > 0;
  4314. };
  4315. _proto._getPopperConfig = function _getPopperConfig() {
  4316. var popperConfig = {
  4317. placement: this._getPlacement(),
  4318. modifiers: {
  4319. offset: {
  4320. offset: this._config.offset
  4321. },
  4322. flip: {
  4323. enabled: this._config.flip
  4324. }
  4325. } // Disable Popper.js for Dropdown in Navbar
  4326. };
  4327. if (this._inNavbar) {
  4328. popperConfig.modifiers.applyStyle = {
  4329. enabled: !this._inNavbar
  4330. };
  4331. }
  4332. return popperConfig;
  4333. }; // static
  4334. Dropdown._jQueryInterface = function _jQueryInterface(config) {
  4335. return this.each(function () {
  4336. var data = $$$1(this).data(DATA_KEY);
  4337. var _config = typeof config === 'object' ? config : null;
  4338. if (!data) {
  4339. data = new Dropdown(this, _config);
  4340. $$$1(this).data(DATA_KEY, data);
  4341. }
  4342. if (typeof config === 'string') {
  4343. if (data[config] === undefined) {
  4344. throw new Error("No method named \"" + config + "\"");
  4345. }
  4346. data[config]();
  4347. }
  4348. });
  4349. };
  4350. Dropdown._clearMenus = function _clearMenus(event) {
  4351. if (event && (event.which === RIGHT_MOUSE_BUTTON_WHICH || event.type === 'keyup' && event.which !== TAB_KEYCODE)) {
  4352. return;
  4353. }
  4354. var toggles = $$$1.makeArray($$$1(Selector.DATA_TOGGLE));
  4355. var _loop = function _loop(i) {
  4356. var parent = Dropdown._getParentFromElement(toggles[i]);
  4357. var context = $$$1(toggles[i]).data(DATA_KEY);
  4358. var relatedTarget = {
  4359. relatedTarget: toggles[i]
  4360. };
  4361. if (!context) {
  4362. return "continue";
  4363. }
  4364. var dropdownMenu = context._menu;
  4365. if (!$$$1(parent).hasClass(ClassName.SHOW)) {
  4366. return "continue";
  4367. }
  4368. if (event && (event.type === 'click' && /input|textarea/i.test(event.target.tagName) || event.type === 'keyup' && event.which === TAB_KEYCODE) && $$$1.contains(parent, event.target)) {
  4369. return "continue";
  4370. }
  4371. var hideEvent = $$$1.Event(Event.HIDE, relatedTarget);
  4372. $$$1(parent).trigger(hideEvent);
  4373. if (hideEvent.isDefaultPrevented()) {
  4374. return "continue";
  4375. } // if this is a touch-enabled device we remove the extra
  4376. // empty mouseover listeners we added for iOS support
  4377. if ('ontouchstart' in document.documentElement) {
  4378. $$$1('body').children().off('mouseover', null, $$$1.noop);
  4379. }
  4380. toggles[i].setAttribute('aria-expanded', 'false');
  4381. $$$1(dropdownMenu).addClass(ClassName.HIDING).removeClass(ClassName.SHOW);
  4382. $$$1(parent).removeClass(ClassName.SHOW);
  4383. $$$1(dropdownMenu).one(Event.TRANSITION_END, function () {
  4384. $$$1(parent).trigger($$$1.Event(Event.HIDDEN, relatedTarget));
  4385. $$$1(dropdownMenu).removeClass(ClassName.HIDING);
  4386. });
  4387. };
  4388. for (var i = 0; i < toggles.length; i++) {
  4389. var _ret = _loop(i);
  4390. if (_ret === "continue") continue;
  4391. }
  4392. };
  4393. Dropdown._getParentFromElement = function _getParentFromElement(element) {
  4394. var parent;
  4395. var selector = Util.getSelectorFromElement(element);
  4396. if (selector) {
  4397. parent = $$$1(selector)[0];
  4398. }
  4399. return parent || element.parentNode;
  4400. };
  4401. Dropdown._dataApiKeydownHandler = function _dataApiKeydownHandler(event) {
  4402. if (!REGEXP_KEYDOWN.test(event.which) || /button/i.test(event.target.tagName) && event.which === SPACE_KEYCODE || /input|textarea/i.test(event.target.tagName)) {
  4403. return;
  4404. }
  4405. event.preventDefault();
  4406. event.stopPropagation();
  4407. if (this.disabled || $$$1(this).hasClass(ClassName.DISABLED)) {
  4408. return;
  4409. }
  4410. var parent = Dropdown._getParentFromElement(this);
  4411. var isActive = $$$1(parent).hasClass(ClassName.SHOW);
  4412. if (!isActive && (event.which !== ESCAPE_KEYCODE || event.which !== SPACE_KEYCODE) || isActive && (event.which === ESCAPE_KEYCODE || event.which === SPACE_KEYCODE)) {
  4413. if (event.which === ESCAPE_KEYCODE) {
  4414. var toggle = $$$1(parent).find(Selector.DATA_TOGGLE)[0];
  4415. $$$1(toggle).trigger('focus');
  4416. }
  4417. $$$1(this).trigger('click');
  4418. return;
  4419. }
  4420. var items = $$$1(parent).find(Selector.VISIBLE_ITEMS).get();
  4421. if (!items.length) {
  4422. return;
  4423. }
  4424. var index = items.indexOf(event.target);
  4425. if (event.which === ARROW_UP_KEYCODE && index > 0) {
  4426. // up
  4427. index--;
  4428. }
  4429. if (event.which === ARROW_DOWN_KEYCODE && index < items.length - 1) {
  4430. // down
  4431. index++;
  4432. }
  4433. if (index < 0) {
  4434. index = 0;
  4435. }
  4436. items[index].focus();
  4437. };
  4438. _createClass(Dropdown, null, [{
  4439. key: "VERSION",
  4440. get: function get() {
  4441. return VERSION;
  4442. }
  4443. }, {
  4444. key: "Default",
  4445. get: function get() {
  4446. return Default;
  4447. }
  4448. }, {
  4449. key: "DefaultType",
  4450. get: function get() {
  4451. return DefaultType;
  4452. }
  4453. }]);
  4454. return Dropdown;
  4455. }();
  4456. /**
  4457. * ------------------------------------------------------------------------
  4458. * Data Api implementation
  4459. * ------------------------------------------------------------------------
  4460. */
  4461. $$$1(document).on(Event.KEYDOWN_DATA_API, Selector.DATA_TOGGLE, Dropdown._dataApiKeydownHandler).on(Event.KEYDOWN_DATA_API, Selector.MENU, Dropdown._dataApiKeydownHandler).on(Event.CLICK_DATA_API + " " + Event.KEYUP_DATA_API, Dropdown._clearMenus).on(Event.CLICK_DATA_API, Selector.DATA_TOGGLE, function (event) {
  4462. event.preventDefault();
  4463. event.stopPropagation();
  4464. Dropdown._jQueryInterface.call($$$1(this), 'toggle');
  4465. }).on(Event.CLICK_DATA_API, Selector.FORM_CHILD, function (e) {
  4466. e.stopPropagation();
  4467. });
  4468. /**
  4469. * ------------------------------------------------------------------------
  4470. * jQuery
  4471. * ------------------------------------------------------------------------
  4472. */
  4473. $$$1.fn[NAME] = Dropdown._jQueryInterface;
  4474. $$$1.fn[NAME].Constructor = Dropdown;
  4475. $$$1.fn[NAME].noConflict = function () {
  4476. $$$1.fn[NAME] = JQUERY_NO_CONFLICT;
  4477. return Dropdown._jQueryInterface;
  4478. };
  4479. return Dropdown;
  4480. }(jQuery);
  4481. var BaseLayout = function ($$$1) {
  4482. var ClassName = {
  4483. CANVAS: "bmd-layout-canvas",
  4484. CONTAINER: "bmd-layout-container",
  4485. BACKDROP: "bmd-layout-backdrop"
  4486. };
  4487. var Selector = {
  4488. CANVAS: "." + ClassName.CANVAS,
  4489. CONTAINER: "." + ClassName.CONTAINER,
  4490. BACKDROP: "." + ClassName.BACKDROP
  4491. };
  4492. var Default = {
  4493. canvas: {
  4494. create: true,
  4495. required: true,
  4496. template: "<div class=\"" + ClassName.CANVAS + "\"></div>"
  4497. },
  4498. backdrop: {
  4499. create: true,
  4500. required: true,
  4501. template: "<div class=\"" + ClassName.BACKDROP + "\"></div>"
  4502. }
  4503. };
  4504. /**
  4505. * ------------------------------------------------------------------------
  4506. * Class Definition
  4507. * ------------------------------------------------------------------------
  4508. */
  4509. var BaseLayout =
  4510. /*#__PURE__*/
  4511. function (_Base) {
  4512. _inheritsLoose(BaseLayout, _Base);
  4513. function BaseLayout($element, config, properties) {
  4514. var _this;
  4515. if (properties === void 0) {
  4516. properties = {};
  4517. }
  4518. _this = _Base.call(this, $element, $$$1.extend(true, {}, Default, config), properties) || this;
  4519. _this.$container = _this.findContainer(true);
  4520. _this.$backdrop = _this.resolveBackdrop();
  4521. _this.resolveCanvas();
  4522. return _this;
  4523. }
  4524. var _proto = BaseLayout.prototype;
  4525. _proto.dispose = function dispose(dataKey) {
  4526. _Base.prototype.dispose.call(this, dataKey);
  4527. this.$container = null;
  4528. this.$backdrop = null;
  4529. }; // ------------------------------------------------------------------------
  4530. // protected
  4531. // Will wrap container in bmd-layout-canvas if necessary
  4532. _proto.resolveCanvas = function resolveCanvas() {
  4533. var bd = this.findCanvas(false);
  4534. if (bd === undefined || bd.length === 0) {
  4535. if (this.config.canvas.create) {
  4536. this.$container.wrap(this.config.canvas.template);
  4537. }
  4538. bd = this.findCanvas(this.config.canvas.required);
  4539. }
  4540. return bd;
  4541. }; // Find closest bmd-layout-container based on the given context
  4542. _proto.findCanvas = function findCanvas(raiseError, context) {
  4543. if (raiseError === void 0) {
  4544. raiseError = true;
  4545. }
  4546. if (context === void 0) {
  4547. context = this.$container;
  4548. }
  4549. var canvas = context.closest(Selector.CANVAS);
  4550. if (canvas.length === 0 && raiseError) {
  4551. $$$1.error("Failed to find " + Selector.CANVAS + " for " + Util$2.describe(context));
  4552. }
  4553. return canvas;
  4554. }; // Will add bmd-layout-backdrop to bmd-layout-container if necessary
  4555. _proto.resolveBackdrop = function resolveBackdrop() {
  4556. var bd = this.findBackdrop(false);
  4557. if (bd === undefined || bd.length === 0) {
  4558. if (this.config.backdrop.create) {
  4559. this.$container.append(this.config.backdrop.template);
  4560. }
  4561. bd = this.findBackdrop(this.config.backdrop.required);
  4562. }
  4563. return bd;
  4564. }; // Find closest bmd-layout-container based on the given context
  4565. _proto.findBackdrop = function findBackdrop(raiseError, context) {
  4566. if (raiseError === void 0) {
  4567. raiseError = true;
  4568. }
  4569. if (context === void 0) {
  4570. context = this.$container;
  4571. }
  4572. var backdrop = context.find("> " + Selector.BACKDROP);
  4573. if (backdrop.length === 0 && raiseError) {
  4574. $$$1.error("Failed to find " + Selector.BACKDROP + " for " + Util$2.describe(context));
  4575. }
  4576. return backdrop;
  4577. }; // Find closest bmd-layout-container based on the given context
  4578. _proto.findContainer = function findContainer(raiseError, context) {
  4579. if (raiseError === void 0) {
  4580. raiseError = true;
  4581. }
  4582. if (context === void 0) {
  4583. context = this.$element;
  4584. }
  4585. var container = context.closest(Selector.CONTAINER);
  4586. if (container.length === 0 && raiseError) {
  4587. $$$1.error("Failed to find " + Selector.CONTAINER + " for " + Util$2.describe(context));
  4588. }
  4589. return container;
  4590. }; // ------------------------------------------------------------------------
  4591. // private
  4592. // ------------------------------------------------------------------------
  4593. // static
  4594. return BaseLayout;
  4595. }(Base);
  4596. return BaseLayout;
  4597. }(jQuery);
  4598. var Drawer = function ($$$1) {
  4599. /**
  4600. * ------------------------------------------------------------------------
  4601. * Constants
  4602. * ------------------------------------------------------------------------
  4603. */
  4604. var NAME = "drawer";
  4605. var DATA_KEY = "bmd." + NAME;
  4606. var JQUERY_NAME = "bmd" + (NAME.charAt(0).toUpperCase() + NAME.slice(1));
  4607. var JQUERY_NO_CONFLICT = $$$1.fn[JQUERY_NAME];
  4608. var Keycodes = {
  4609. ESCAPE: 27 //ENTER: 13,
  4610. //SPACE: 32
  4611. };
  4612. var ClassName = {
  4613. IN: "in",
  4614. DRAWER_IN: "bmd-drawer-in",
  4615. DRAWER_OUT: "bmd-drawer-out",
  4616. DRAWER: "bmd-layout-drawer",
  4617. CONTAINER: "bmd-layout-container"
  4618. };
  4619. var Default = {
  4620. focusSelector: "a, button, input"
  4621. };
  4622. /**
  4623. * ------------------------------------------------------------------------
  4624. * Class Definition
  4625. * ------------------------------------------------------------------------
  4626. */
  4627. var Drawer =
  4628. /*#__PURE__*/
  4629. function (_BaseLayout) {
  4630. _inheritsLoose(Drawer, _BaseLayout);
  4631. // $element is expected to be the trigger
  4632. // i.e. <button class="btn bmd-btn-icon" for="search" data-toggle="drawer" data-target="#my-side-nav-drawer" aria-expanded="false" aria-controls="my-side-nav-drawer">
  4633. function Drawer($element, config) {
  4634. var _this;
  4635. _this = _BaseLayout.call(this, $element, $$$1.extend(true, {}, Default, config)) || this;
  4636. _this.$toggles = $$$1("[data-toggle=\"drawer\"][href=\"#" + _this.$element[0].id + "\"], [data-toggle=\"drawer\"][data-target=\"#" + _this.$element[0].id + "\"]");
  4637. _this._addAria(); // click or escape on the backdrop closes the drawer
  4638. _this.$backdrop.keydown(function (ev) {
  4639. if (ev.which === Keycodes.ESCAPE) {
  4640. _this.hide();
  4641. }
  4642. }).click(function () {
  4643. _this.hide();
  4644. }); // escape on the drawer closes it
  4645. _this.$element.keydown(function (ev) {
  4646. if (ev.which === Keycodes.ESCAPE) {
  4647. _this.hide();
  4648. }
  4649. }); // any toggle button clicks
  4650. _this.$toggles.click(function () {
  4651. _this.toggle();
  4652. });
  4653. return _this;
  4654. }
  4655. var _proto = Drawer.prototype;
  4656. _proto.dispose = function dispose() {
  4657. _BaseLayout.prototype.dispose.call(this, DATA_KEY);
  4658. this.$toggles = null;
  4659. };
  4660. _proto.toggle = function toggle() {
  4661. if (this._isOpen()) {
  4662. this.hide();
  4663. } else {
  4664. this.show();
  4665. }
  4666. };
  4667. _proto.show = function show() {
  4668. if (this._isForcedClosed() || this._isOpen()) {
  4669. return;
  4670. }
  4671. this.$toggles.attr("aria-expanded", true);
  4672. this.$element.attr("aria-expanded", true);
  4673. this.$element.attr("aria-hidden", false); // focus on the first focusable item
  4674. var $focusOn = this.$element.find(this.config.focusSelector);
  4675. if ($focusOn.length > 0) {
  4676. $focusOn.first().focus();
  4677. }
  4678. this.$container.addClass(ClassName.DRAWER_IN); // backdrop is responsively styled based on bmd-drawer-overlay, therefore style is none of our concern, simply add the marker class and let the scss determine if it should be displayed or not.
  4679. this.$backdrop.addClass(ClassName.IN);
  4680. };
  4681. _proto.hide = function hide() {
  4682. if (!this._isOpen()) {
  4683. return;
  4684. }
  4685. this.$toggles.attr("aria-expanded", false);
  4686. this.$element.attr("aria-expanded", false);
  4687. this.$element.attr("aria-hidden", true);
  4688. this.$container.removeClass(ClassName.DRAWER_IN);
  4689. this.$backdrop.removeClass(ClassName.IN);
  4690. }; // ------------------------------------------------------------------------
  4691. // private
  4692. _proto._isOpen = function _isOpen() {
  4693. return this.$container.hasClass(ClassName.DRAWER_IN);
  4694. };
  4695. _proto._isForcedClosed = function _isForcedClosed() {
  4696. return this.$container.hasClass(ClassName.DRAWER_OUT);
  4697. };
  4698. _proto._addAria = function _addAria() {
  4699. var isOpen = this._isOpen();
  4700. this.$element.attr("aria-expanded", isOpen);
  4701. this.$element.attr("aria-hidden", isOpen);
  4702. if (this.$toggles.length) {
  4703. this.$toggles.attr("aria-expanded", isOpen);
  4704. }
  4705. }; // ------------------------------------------------------------------------
  4706. // static
  4707. Drawer._jQueryInterface = function _jQueryInterface(config) {
  4708. return this.each(function () {
  4709. var $element = $$$1(this);
  4710. var data = $element.data(DATA_KEY);
  4711. if (!data) {
  4712. data = new Drawer($element, config);
  4713. $element.data(DATA_KEY, data);
  4714. }
  4715. });
  4716. };
  4717. return Drawer;
  4718. }(BaseLayout);
  4719. /**
  4720. * ------------------------------------------------------------------------
  4721. * jQuery
  4722. * ------------------------------------------------------------------------
  4723. */
  4724. $$$1.fn[JQUERY_NAME] = Drawer._jQueryInterface;
  4725. $$$1.fn[JQUERY_NAME].Constructor = Drawer;
  4726. $$$1.fn[JQUERY_NAME].noConflict = function () {
  4727. $$$1.fn[JQUERY_NAME] = JQUERY_NO_CONFLICT;
  4728. return Drawer._jQueryInterface;
  4729. };
  4730. return Drawer;
  4731. }(jQuery);
  4732. var Ripples = function ($$$1) {
  4733. /**
  4734. * ------------------------------------------------------------------------
  4735. * Constants
  4736. * ------------------------------------------------------------------------
  4737. */
  4738. var NAME = "ripples";
  4739. var DATA_KEY = "bmd." + NAME;
  4740. var JQUERY_NAME = "bmd" + (NAME.charAt(0).toUpperCase() + NAME.slice(1));
  4741. var JQUERY_NO_CONFLICT = $$$1.fn[JQUERY_NAME];
  4742. var ClassName = {
  4743. CONTAINER: "ripple-container",
  4744. DECORATOR: "ripple-decorator"
  4745. };
  4746. var Selector = {
  4747. CONTAINER: "." + ClassName.CONTAINER,
  4748. DECORATOR: "." + ClassName.DECORATOR //,
  4749. };
  4750. var Default = {
  4751. container: {
  4752. template: "<div class='" + ClassName.CONTAINER + "'></div>"
  4753. },
  4754. decorator: {
  4755. template: "<div class='" + ClassName.DECORATOR + "'></div>"
  4756. },
  4757. trigger: {
  4758. start: "mousedown touchstart",
  4759. end: "mouseup mouseleave touchend"
  4760. },
  4761. touchUserAgentRegex: /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i,
  4762. duration: 500
  4763. };
  4764. /**
  4765. * ------------------------------------------------------------------------
  4766. * Class Definition
  4767. * ------------------------------------------------------------------------
  4768. */
  4769. var Ripples =
  4770. /*#__PURE__*/
  4771. function () {
  4772. function Ripples($element, config) {
  4773. var _this = this;
  4774. this.$element = $element; // console.log(`Adding ripples to ${Util.describe(this.$element)}`) // eslint-disable-line no-console
  4775. this.config = $$$1.extend(true, {}, Default, config); // attach initial listener
  4776. this.$element.on(this.config.trigger.start, function (event) {
  4777. _this._onStartRipple(event);
  4778. });
  4779. }
  4780. var _proto = Ripples.prototype;
  4781. _proto.dispose = function dispose() {
  4782. this.$element.data(DATA_KEY, null);
  4783. this.$element = null;
  4784. this.$container = null;
  4785. this.$decorator = null;
  4786. this.config = null;
  4787. }; // ------------------------------------------------------------------------
  4788. // private
  4789. _proto._onStartRipple = function _onStartRipple(event) {
  4790. var _this2 = this;
  4791. // Verify if the user is just touching on a device and return if so
  4792. if (this._isTouch() && event.type === "mousedown") {
  4793. return;
  4794. } // Find or create the ripple container element
  4795. this._findOrCreateContainer(); // Get relY and relX positions of the container element
  4796. var relY = this._getRelY(event);
  4797. var relX = this._getRelX(event); // If relY and/or relX are false, return the event
  4798. if (!relY && !relX) {
  4799. return;
  4800. } // set the location and color each time (even if element is cached)
  4801. this.$decorator.css({
  4802. left: relX,
  4803. top: relY,
  4804. "background-color": this._getRipplesColor()
  4805. }); // Make sure the ripple has the styles applied (ugly hack but it works)
  4806. this._forceStyleApplication(); // Turn on the ripple animation
  4807. this.rippleOn(); // Call the rippleEnd function when the transition 'on' ends
  4808. setTimeout(function () {
  4809. _this2.rippleEnd();
  4810. }, this.config.duration); // Detect when the user leaves the element to cleanup if not already done?
  4811. this.$element.on(this.config.trigger.end, function () {
  4812. if (_this2.$decorator) {
  4813. // guard against race condition/mouse attack
  4814. _this2.$decorator.data("mousedown", "off");
  4815. if (_this2.$decorator.data("animating") === "off") {
  4816. _this2.rippleOut();
  4817. }
  4818. }
  4819. });
  4820. };
  4821. _proto._findOrCreateContainer = function _findOrCreateContainer() {
  4822. if (!this.$container || !this.$container.length > 0) {
  4823. this.$element.append(this.config.container.template);
  4824. this.$container = this.$element.find(Selector.CONTAINER);
  4825. } // always add the rippleElement, it is always removed
  4826. this.$container.append(this.config.decorator.template);
  4827. this.$decorator = this.$container.find(Selector.DECORATOR);
  4828. }; // Make sure the ripple has the styles applied (ugly hack but it works)
  4829. _proto._forceStyleApplication = function _forceStyleApplication() {
  4830. return window.getComputedStyle(this.$decorator[0]).opacity;
  4831. };
  4832. /**
  4833. * Get the relX
  4834. */
  4835. _proto._getRelX = function _getRelX(event) {
  4836. var wrapperOffset = this.$container.offset();
  4837. var result = null;
  4838. if (!this._isTouch()) {
  4839. // Get the mouse position relative to the ripple wrapper
  4840. result = event.pageX - wrapperOffset.left;
  4841. } else {
  4842. // Make sure the user is using only one finger and then get the touch
  4843. // position relative to the ripple wrapper
  4844. event = event.originalEvent;
  4845. if (event.touches.length === 1) {
  4846. result = event.touches[0].pageX - wrapperOffset.left;
  4847. } else {
  4848. result = false;
  4849. }
  4850. }
  4851. return result;
  4852. };
  4853. /**
  4854. * Get the relY
  4855. */
  4856. _proto._getRelY = function _getRelY(event) {
  4857. var containerOffset = this.$container.offset();
  4858. var result = null;
  4859. if (!this._isTouch()) {
  4860. /**
  4861. * Get the mouse position relative to the ripple wrapper
  4862. */
  4863. result = event.pageY - containerOffset.top;
  4864. } else {
  4865. /**
  4866. * Make sure the user is using only one finger and then get the touch
  4867. * position relative to the ripple wrapper
  4868. */
  4869. event = event.originalEvent;
  4870. if (event.touches.length === 1) {
  4871. result = event.touches[0].pageY - containerOffset.top;
  4872. } else {
  4873. result = false;
  4874. }
  4875. }
  4876. return result;
  4877. };
  4878. /**
  4879. * Get the ripple color
  4880. */
  4881. _proto._getRipplesColor = function _getRipplesColor() {
  4882. var color = this.$element.data("ripple-color") ? this.$element.data("ripple-color") : window.getComputedStyle(this.$element[0]).color;
  4883. return color;
  4884. };
  4885. /**
  4886. * Verify if the client is using a mobile device
  4887. */
  4888. _proto._isTouch = function _isTouch() {
  4889. return this.config.touchUserAgentRegex.test(navigator.userAgent);
  4890. };
  4891. /**
  4892. * End the animation of the ripple
  4893. */
  4894. _proto.rippleEnd = function rippleEnd() {
  4895. if (this.$decorator) {
  4896. // guard against race condition/mouse attack
  4897. this.$decorator.data("animating", "off");
  4898. if (this.$decorator.data("mousedown") === "off") {
  4899. this.rippleOut(this.$decorator);
  4900. }
  4901. }
  4902. };
  4903. /**
  4904. * Turn off the ripple effect
  4905. */
  4906. _proto.rippleOut = function rippleOut() {
  4907. var _this3 = this;
  4908. this.$decorator.off();
  4909. if (Util$2.transitionEndSupported()) {
  4910. this.$decorator.addClass("ripple-out");
  4911. } else {
  4912. this.$decorator.animate({
  4913. opacity: 0
  4914. }, 100, function () {
  4915. _this3.$decorator.trigger("transitionend");
  4916. });
  4917. }
  4918. this.$decorator.on(Util$2.transitionEndSelector(), function () {
  4919. if (_this3.$decorator) {
  4920. _this3.$decorator.remove();
  4921. _this3.$decorator = null;
  4922. }
  4923. });
  4924. };
  4925. /**
  4926. * Turn on the ripple effect
  4927. */
  4928. _proto.rippleOn = function rippleOn() {
  4929. var _this4 = this;
  4930. var size = this._getNewSize();
  4931. if (Util$2.transitionEndSupported()) {
  4932. this.$decorator.css({
  4933. "-ms-transform": "scale(" + size + ")",
  4934. "-moz-transform": "scale(" + size + ")",
  4935. "-webkit-transform": "scale(" + size + ")",
  4936. transform: "scale(" + size + ")"
  4937. }).addClass("ripple-on").data("animating", "on").data("mousedown", "on");
  4938. } else {
  4939. this.$decorator.animate({
  4940. width: Math.max(this.$element.outerWidth(), this.$element.outerHeight()) * 2,
  4941. height: Math.max(this.$element.outerWidth(), this.$element.outerHeight()) * 2,
  4942. "margin-left": Math.max(this.$element.outerWidth(), this.$element.outerHeight()) * -1,
  4943. "margin-top": Math.max(this.$element.outerWidth(), this.$element.outerHeight()) * -1,
  4944. opacity: 0.2
  4945. }, this.config.duration, function () {
  4946. _this4.$decorator.trigger("transitionend");
  4947. });
  4948. }
  4949. };
  4950. /**
  4951. * Get the new size based on the element height/width and the ripple width
  4952. */
  4953. _proto._getNewSize = function _getNewSize() {
  4954. return Math.max(this.$element.outerWidth(), this.$element.outerHeight()) / this.$decorator.outerWidth() * 2.5;
  4955. }; // ------------------------------------------------------------------------
  4956. // static
  4957. Ripples._jQueryInterface = function _jQueryInterface(config) {
  4958. return this.each(function () {
  4959. var $element = $$$1(this);
  4960. var data = $element.data(DATA_KEY);
  4961. if (!data) {
  4962. data = new Ripples($element, config);
  4963. $element.data(DATA_KEY, data);
  4964. }
  4965. });
  4966. };
  4967. return Ripples;
  4968. }();
  4969. /**
  4970. * ------------------------------------------------------------------------
  4971. * jQuery
  4972. * ------------------------------------------------------------------------
  4973. */
  4974. $$$1.fn[JQUERY_NAME] = Ripples._jQueryInterface;
  4975. $$$1.fn[JQUERY_NAME].Constructor = Ripples;
  4976. $$$1.fn[JQUERY_NAME].noConflict = function () {
  4977. $$$1.fn[JQUERY_NAME] = JQUERY_NO_CONFLICT;
  4978. return Ripples._jQueryInterface;
  4979. };
  4980. return Ripples;
  4981. }(jQuery);
  4982. var Autofill = function ($$$1) {
  4983. /**
  4984. * ------------------------------------------------------------------------
  4985. * Constants
  4986. * ------------------------------------------------------------------------
  4987. */
  4988. var NAME = "autofill";
  4989. var DATA_KEY = "bmd." + NAME;
  4990. var JQUERY_NAME = "bmd" + (NAME.charAt(0).toUpperCase() + NAME.slice(1));
  4991. var JQUERY_NO_CONFLICT = $$$1.fn[JQUERY_NAME];
  4992. var Default = {};
  4993. /**
  4994. * ------------------------------------------------------------------------
  4995. * Class Definition
  4996. * ------------------------------------------------------------------------
  4997. */
  4998. var Autofill =
  4999. /*#__PURE__*/
  5000. function (_Base) {
  5001. _inheritsLoose(Autofill, _Base);
  5002. function Autofill($element, config) {
  5003. var _this;
  5004. _this = _Base.call(this, $element, $$$1.extend(true, {}, Default, config)) || this;
  5005. _this._watchLoading();
  5006. _this._attachEventHandlers();
  5007. return _this;
  5008. }
  5009. var _proto = Autofill.prototype;
  5010. _proto.dispose = function dispose() {
  5011. _Base.prototype.dispose.call(this, DATA_KEY);
  5012. }; // ------------------------------------------------------------------------
  5013. // private
  5014. _proto._watchLoading = function _watchLoading() {
  5015. var _this2 = this;
  5016. // After 10 seconds we are quite sure all the needed inputs are autofilled then we can stop checking them
  5017. setTimeout(function () {
  5018. clearInterval(_this2._onLoading);
  5019. }, 10000);
  5020. }; // This part of code will detect autofill when the page is loading (username and password inputs for example)
  5021. _proto._onLoading = function _onLoading() {
  5022. setInterval(function () {
  5023. $$$1("input[type!=checkbox]").each(function (index, element) {
  5024. var $element = $$$1(element);
  5025. if ($element.val() && $element.val() !== $element.attr("value")) {
  5026. $element.trigger("change");
  5027. }
  5028. });
  5029. }, 100);
  5030. };
  5031. _proto._attachEventHandlers = function _attachEventHandlers() {
  5032. // Listen on inputs of the focused form
  5033. // (because user can select from the autofill dropdown only when the input has focus)
  5034. var focused = null;
  5035. $$$1(document).on("focus", "input", function (event) {
  5036. var $inputs = $$$1(event.currentTarget).closest("form").find("input").not("[type=file]");
  5037. focused = setInterval(function () {
  5038. $inputs.each(function (index, element) {
  5039. var $element = $$$1(element);
  5040. if ($element.val() !== $element.attr("value")) {
  5041. $element.trigger("change");
  5042. }
  5043. });
  5044. }, 100);
  5045. }).on("blur", ".form-group input", function () {
  5046. clearInterval(focused);
  5047. });
  5048. }; // ------------------------------------------------------------------------
  5049. // static
  5050. Autofill._jQueryInterface = function _jQueryInterface(config) {
  5051. return this.each(function () {
  5052. var $element = $$$1(this);
  5053. var data = $element.data(DATA_KEY);
  5054. if (!data) {
  5055. data = new Autofill($element, config);
  5056. $element.data(DATA_KEY, data);
  5057. }
  5058. });
  5059. };
  5060. return Autofill;
  5061. }(Base);
  5062. /**
  5063. * ------------------------------------------------------------------------
  5064. * jQuery
  5065. * ------------------------------------------------------------------------
  5066. */
  5067. $$$1.fn[JQUERY_NAME] = Autofill._jQueryInterface;
  5068. $$$1.fn[JQUERY_NAME].Constructor = Autofill;
  5069. $$$1.fn[JQUERY_NAME].noConflict = function () {
  5070. $$$1.fn[JQUERY_NAME] = JQUERY_NO_CONFLICT;
  5071. return Autofill._jQueryInterface;
  5072. };
  5073. return Autofill;
  5074. }(jQuery);
  5075. /* globals Popper */
  5076. Popper.Defaults.modifiers.computeStyle.gpuAcceleration = false;
  5077. /**
  5078. * $.bootstrapMaterialDesign(config) is a macro class to configure the components generally
  5079. * used in Material Design for Bootstrap. You may pass overrides to the configurations
  5080. * which will be passed into each component, or you may omit use of this class and
  5081. * configure each component separately.
  5082. */
  5083. var BootstrapMaterialDesign = function ($$$1) {
  5084. /**
  5085. * ------------------------------------------------------------------------
  5086. * Constants
  5087. * ------------------------------------------------------------------------
  5088. */
  5089. var NAME = "bootstrapMaterialDesign";
  5090. var DATA_KEY = "bmd." + NAME;
  5091. var JQUERY_NAME = NAME; // retain this full name since it is long enough not to conflict
  5092. var JQUERY_NO_CONFLICT = $$$1.fn[JQUERY_NAME];
  5093. /**
  5094. * Global configuration:
  5095. * The global configuration hash will be mixed in to each components' config.
  5096. * e.g. calling $.bootstrapMaterialDesign({global: { validate: true } }) would pass `validate:true` to every component
  5097. *
  5098. *
  5099. * Component configuration:
  5100. * - selector: may be a string or an array. Any array will be joined with a comma to generate the selector
  5101. * - disable any component by defining it as false with an override. e.g. $.bootstrapMaterialDesign({ autofill: false })
  5102. *
  5103. * @see each individual component for more configuration settings.
  5104. */
  5105. var Default = {
  5106. global: {
  5107. validate: false,
  5108. label: {
  5109. className: "bmd-label-static" // default style of label to be used if not specified in the html markup
  5110. }
  5111. },
  5112. autofill: {
  5113. selector: "body"
  5114. },
  5115. checkbox: {
  5116. selector: ".checkbox > label > input[type=checkbox]"
  5117. },
  5118. checkboxInline: {
  5119. selector: "label.checkbox-inline > input[type=checkbox]"
  5120. },
  5121. collapseInline: {
  5122. selector: '.bmd-collapse-inline [data-toggle="collapse"]'
  5123. },
  5124. drawer: {
  5125. selector: ".bmd-layout-drawer"
  5126. },
  5127. file: {
  5128. selector: "input[type=file]"
  5129. },
  5130. radio: {
  5131. selector: ".radio > label > input[type=radio]"
  5132. },
  5133. radioInline: {
  5134. selector: "label.radio-inline > input[type=radio]"
  5135. },
  5136. ripples: {
  5137. //selector: ['.btn:not(.btn-link):not(.ripple-none)'] // testing only
  5138. selector: [".btn:not(.btn-link):not(.ripple-none)", ".card-image:not(.ripple-none)", ".navbar a:not(.ripple-none)", ".dropdown-menu a:not(.ripple-none)", ".nav-tabs a:not(.ripple-none)", ".pagination li:not(.active):not(.disabled) a:not(.ripple-none)", ".ripple" // generic marker class to add ripple to elements
  5139. ]
  5140. },
  5141. select: {
  5142. selector: ["select"]
  5143. },
  5144. switch: {
  5145. selector: ".switch > label > input[type=checkbox]"
  5146. },
  5147. text: {
  5148. // omit inputs we have specialized components to handle - we need to match text, email, etc. The easiest way to do this appears to be just omit the ones we don't want to match and let the rest fall through to this.
  5149. selector: ["input:not([type=hidden]):not([type=checkbox]):not([type=radio]):not([type=file]):not([type=button]):not([type=submit]):not([type=reset])"]
  5150. },
  5151. textarea: {
  5152. selector: ["textarea"]
  5153. },
  5154. arrive: true,
  5155. // create an ordered component list for instantiation
  5156. instantiation: ["ripples", "checkbox", "checkboxInline", "collapseInline", "drawer", //'file',
  5157. "radio", "radioInline", "switch", "text", "textarea", "select", "autofill"]
  5158. };
  5159. /**
  5160. * ------------------------------------------------------------------------
  5161. * Class Definition
  5162. * ------------------------------------------------------------------------
  5163. */
  5164. var BootstrapMaterialDesign =
  5165. /*#__PURE__*/
  5166. function () {
  5167. function BootstrapMaterialDesign($element, config) {
  5168. var _this = this;
  5169. this.$element = $element;
  5170. this.config = $$$1.extend(true, {}, Default, config);
  5171. var $document = $$$1(document);
  5172. var _loop = function _loop(component) {
  5173. // the component's config fragment is passed in directly, allowing users to override
  5174. var componentConfig = _this.config[component]; // check to make sure component config is enabled (not `false`)
  5175. if (componentConfig) {
  5176. // assemble the selector as it may be an array
  5177. var selector = _this._resolveSelector(componentConfig); // mix in global options
  5178. componentConfig = $$$1.extend(true, {}, _this.config.global, componentConfig); // create the jquery fn name e.g. 'bmdText' for 'text'
  5179. var componentName = "" + (component.charAt(0).toUpperCase() + component.slice(1));
  5180. var jqueryFn = "bmd" + componentName;
  5181. try {
  5182. // safely instantiate component on selector elements with config, report errors and move on.
  5183. // console.debug(`instantiating: $('${selector}')[${jqueryFn}](${componentConfig})`) // eslint-disable-line no-console
  5184. $$$1(selector)[jqueryFn](componentConfig); // add to arrive if present and enabled
  5185. if (document.arrive && _this.config.arrive) {
  5186. $document.arrive(selector, function () {
  5187. // eslint-disable-line no-loop-func
  5188. $$$1(this)[jqueryFn](componentConfig);
  5189. });
  5190. }
  5191. } catch (e) {
  5192. var message = "Failed to instantiate component: $('" + selector + "')[" + jqueryFn + "](" + componentConfig + ")";
  5193. console.error(message, e, "\nSelected elements: ", $$$1(selector)); // eslint-disable-line no-console
  5194. throw e;
  5195. }
  5196. }
  5197. };
  5198. for (var _iterator = this.config.instantiation, _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : _iterator[Symbol.iterator]();;) {
  5199. var _ref;
  5200. if (_isArray) {
  5201. if (_i >= _iterator.length) break;
  5202. _ref = _iterator[_i++];
  5203. } else {
  5204. _i = _iterator.next();
  5205. if (_i.done) break;
  5206. _ref = _i.value;
  5207. }
  5208. var component = _ref;
  5209. _loop(component);
  5210. }
  5211. }
  5212. var _proto = BootstrapMaterialDesign.prototype;
  5213. _proto.dispose = function dispose() {
  5214. this.$element.data(DATA_KEY, null);
  5215. this.$element = null;
  5216. this.config = null;
  5217. }; // ------------------------------------------------------------------------
  5218. // private
  5219. _proto._resolveSelector = function _resolveSelector(componentConfig) {
  5220. var selector = componentConfig.selector;
  5221. if (Array.isArray(selector)) {
  5222. selector = selector.join(", ");
  5223. }
  5224. return selector;
  5225. }; // ------------------------------------------------------------------------
  5226. // static
  5227. BootstrapMaterialDesign._jQueryInterface = function _jQueryInterface(config) {
  5228. return this.each(function () {
  5229. var $element = $$$1(this);
  5230. var data = $element.data(DATA_KEY);
  5231. if (!data) {
  5232. data = new BootstrapMaterialDesign($element, config);
  5233. $element.data(DATA_KEY, data);
  5234. }
  5235. });
  5236. };
  5237. return BootstrapMaterialDesign;
  5238. }();
  5239. /**
  5240. * ------------------------------------------------------------------------
  5241. * jQuery
  5242. * ------------------------------------------------------------------------
  5243. */
  5244. $$$1.fn[JQUERY_NAME] = BootstrapMaterialDesign._jQueryInterface;
  5245. $$$1.fn[JQUERY_NAME].Constructor = BootstrapMaterialDesign;
  5246. $$$1.fn[JQUERY_NAME].noConflict = function () {
  5247. $$$1.fn[JQUERY_NAME] = JQUERY_NO_CONFLICT;
  5248. return BootstrapMaterialDesign._jQueryInterface;
  5249. };
  5250. return BootstrapMaterialDesign;
  5251. }(jQuery);
  5252. /*
  5253. * This is the main entry point.
  5254. *
  5255. * You can import other modules here, including external packages. When bundling using rollup you can mark those modules as external and have them excluded or, if they have a jsnext:main entry in their package.json (like this package does), let rollup bundle them into your dist file.
  5256. *
  5257. * at your application entry point. This is necessary for browsers that do not yet support some ES2015 runtime necessities such as Symbol. We do this in `index-iife.js` for our iife rollup bundle.
  5258. */
  5259. // Bootstrap components
  5260. })));
  5261. //# sourceMappingURL=bootstrap-material-design.js.map