the bola v2 website
選択できるのは25トピックまでです。 トピックは、先頭が英数字で、英数字とダッシュ('-')を使用した35文字以内のものにしてください。

main.js 322KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635263626372638263926402641264226432644264526462647264826492650265126522653265426552656265726582659266026612662266326642665266626672668266926702671267226732674267526762677267826792680268126822683268426852686268726882689269026912692269326942695269626972698269927002701270227032704270527062707270827092710271127122713271427152716271727182719272027212722272327242725272627272728272927302731273227332734273527362737273827392740274127422743274427452746274727482749275027512752275327542755275627572758275927602761276227632764276527662767276827692770277127722773277427752776277727782779278027812782278327842785278627872788278927902791279227932794279527962797279827992800280128022803280428052806280728082809281028112812281328142815281628172818281928202821282228232824282528262827282828292830283128322833283428352836283728382839284028412842284328442845284628472848284928502851285228532854285528562857285828592860286128622863286428652866286728682869287028712872287328742875287628772878287928802881288228832884288528862887288828892890289128922893289428952896289728982899290029012902290329042905290629072908290929102911291229132914291529162917291829192920292129222923292429252926292729282929293029312932293329342935293629372938293929402941294229432944294529462947294829492950295129522953295429552956295729582959296029612962296329642965296629672968296929702971297229732974297529762977297829792980298129822983298429852986298729882989299029912992299329942995299629972998299930003001300230033004300530063007300830093010301130123013301430153016301730183019302030213022302330243025302630273028302930303031303230333034303530363037303830393040304130423043304430453046304730483049305030513052305330543055305630573058305930603061306230633064306530663067306830693070307130723073307430753076307730783079308030813082308330843085308630873088308930903091309230933094309530963097309830993100310131023103310431053106310731083109311031113112311331143115311631173118311931203121312231233124312531263127312831293130313131323133313431353136313731383139314031413142314331443145314631473148314931503151315231533154315531563157315831593160316131623163316431653166316731683169317031713172317331743175317631773178317931803181318231833184318531863187318831893190319131923193319431953196319731983199320032013202320332043205320632073208320932103211321232133214321532163217321832193220322132223223322432253226322732283229323032313232323332343235323632373238323932403241324232433244324532463247324832493250325132523253325432553256325732583259326032613262326332643265326632673268326932703271327232733274327532763277327832793280328132823283328432853286328732883289329032913292329332943295329632973298329933003301330233033304330533063307330833093310331133123313331433153316331733183319332033213322332333243325332633273328332933303331333233333334333533363337333833393340334133423343334433453346334733483349335033513352335333543355335633573358335933603361336233633364336533663367336833693370337133723373337433753376337733783379338033813382338333843385338633873388338933903391339233933394339533963397339833993400340134023403340434053406340734083409341034113412341334143415341634173418341934203421342234233424342534263427342834293430343134323433343434353436343734383439344034413442344334443445344634473448344934503451345234533454345534563457345834593460346134623463346434653466346734683469347034713472347334743475347634773478347934803481348234833484348534863487348834893490349134923493349434953496349734983499350035013502350335043505350635073508350935103511351235133514351535163517351835193520352135223523352435253526352735283529353035313532353335343535353635373538353935403541354235433544354535463547354835493550355135523553355435553556355735583559356035613562356335643565356635673568356935703571357235733574357535763577357835793580358135823583358435853586358735883589359035913592359335943595359635973598359936003601360236033604360536063607360836093610361136123613361436153616361736183619362036213622362336243625362636273628362936303631363236333634363536363637363836393640364136423643364436453646364736483649365036513652365336543655365636573658365936603661366236633664366536663667366836693670367136723673367436753676367736783679368036813682368336843685368636873688368936903691369236933694369536963697369836993700370137023703370437053706370737083709371037113712371337143715371637173718371937203721372237233724372537263727372837293730373137323733373437353736373737383739374037413742374337443745374637473748374937503751375237533754375537563757375837593760376137623763376437653766376737683769377037713772377337743775377637773778377937803781378237833784378537863787378837893790379137923793379437953796379737983799380038013802380338043805380638073808380938103811381238133814381538163817381838193820382138223823382438253826382738283829383038313832383338343835383638373838383938403841384238433844384538463847384838493850385138523853385438553856385738583859386038613862386338643865386638673868386938703871387238733874387538763877387838793880388138823883388438853886388738883889389038913892389338943895389638973898389939003901390239033904390539063907390839093910391139123913391439153916391739183919392039213922392339243925392639273928392939303931393239333934393539363937393839393940394139423943394439453946394739483949395039513952395339543955395639573958395939603961396239633964396539663967396839693970397139723973397439753976397739783979398039813982398339843985398639873988398939903991399239933994399539963997399839994000400140024003400440054006400740084009401040114012401340144015401640174018401940204021402240234024402540264027402840294030403140324033403440354036403740384039404040414042404340444045404640474048404940504051405240534054405540564057405840594060406140624063406440654066406740684069407040714072407340744075407640774078407940804081408240834084408540864087408840894090409140924093409440954096409740984099410041014102410341044105410641074108410941104111411241134114411541164117411841194120412141224123412441254126412741284129413041314132413341344135413641374138413941404141414241434144414541464147414841494150415141524153415441554156415741584159416041614162416341644165416641674168416941704171417241734174417541764177417841794180418141824183418441854186418741884189419041914192419341944195419641974198419942004201420242034204420542064207420842094210421142124213421442154216421742184219422042214222422342244225422642274228422942304231423242334234423542364237423842394240424142424243424442454246424742484249425042514252425342544255425642574258425942604261426242634264426542664267426842694270427142724273427442754276427742784279428042814282428342844285428642874288428942904291429242934294429542964297429842994300430143024303430443054306430743084309431043114312431343144315431643174318431943204321432243234324432543264327432843294330433143324333433443354336433743384339434043414342434343444345434643474348434943504351435243534354435543564357435843594360436143624363436443654366436743684369437043714372437343744375437643774378437943804381438243834384438543864387438843894390439143924393439443954396439743984399440044014402440344044405440644074408440944104411441244134414441544164417441844194420442144224423442444254426442744284429443044314432443344344435443644374438443944404441444244434444444544464447444844494450445144524453445444554456445744584459446044614462446344644465446644674468446944704471447244734474447544764477447844794480448144824483448444854486448744884489449044914492449344944495449644974498449945004501450245034504450545064507450845094510451145124513451445154516451745184519452045214522452345244525452645274528452945304531453245334534453545364537453845394540454145424543454445454546454745484549455045514552455345544555455645574558455945604561456245634564456545664567456845694570457145724573457445754576457745784579458045814582458345844585458645874588458945904591459245934594459545964597459845994600460146024603460446054606460746084609461046114612461346144615461646174618461946204621462246234624462546264627462846294630463146324633463446354636463746384639464046414642464346444645464646474648464946504651465246534654465546564657465846594660466146624663466446654666466746684669467046714672467346744675467646774678467946804681468246834684468546864687468846894690469146924693469446954696469746984699470047014702470347044705470647074708470947104711471247134714471547164717471847194720472147224723472447254726472747284729473047314732473347344735473647374738473947404741474247434744474547464747474847494750475147524753475447554756475747584759476047614762476347644765476647674768476947704771477247734774477547764777477847794780478147824783478447854786478747884789479047914792479347944795479647974798479948004801480248034804480548064807480848094810481148124813481448154816481748184819482048214822482348244825482648274828482948304831483248334834483548364837483848394840484148424843484448454846484748484849485048514852485348544855485648574858485948604861486248634864486548664867486848694870487148724873487448754876487748784879488048814882488348844885488648874888488948904891489248934894489548964897489848994900490149024903490449054906490749084909491049114912491349144915491649174918491949204921492249234924492549264927492849294930493149324933493449354936493749384939494049414942494349444945494649474948494949504951495249534954495549564957495849594960496149624963496449654966496749684969497049714972497349744975497649774978497949804981498249834984498549864987498849894990499149924993499449954996499749984999500050015002500350045005500650075008500950105011501250135014501550165017501850195020502150225023502450255026502750285029503050315032503350345035503650375038503950405041504250435044504550465047504850495050505150525053505450555056505750585059506050615062506350645065506650675068506950705071507250735074507550765077507850795080508150825083508450855086508750885089509050915092509350945095509650975098509951005101510251035104510551065107510851095110511151125113511451155116511751185119512051215122512351245125512651275128512951305131513251335134513551365137513851395140514151425143514451455146514751485149515051515152515351545155515651575158515951605161516251635164516551665167516851695170517151725173517451755176517751785179518051815182518351845185518651875188518951905191519251935194519551965197519851995200520152025203520452055206520752085209521052115212521352145215521652175218521952205221522252235224522552265227522852295230523152325233523452355236523752385239524052415242524352445245524652475248524952505251525252535254525552565257525852595260526152625263526452655266526752685269527052715272527352745275527652775278527952805281528252835284528552865287528852895290529152925293529452955296529752985299530053015302530353045305530653075308530953105311531253135314531553165317531853195320532153225323532453255326532753285329533053315332533353345335533653375338533953405341534253435344534553465347534853495350535153525353535453555356535753585359536053615362536353645365536653675368536953705371537253735374537553765377537853795380538153825383538453855386538753885389539053915392539353945395539653975398539954005401540254035404540554065407540854095410541154125413541454155416541754185419542054215422542354245425542654275428542954305431543254335434543554365437543854395440544154425443544454455446544754485449545054515452545354545455545654575458545954605461546254635464546554665467546854695470547154725473547454755476547754785479548054815482548354845485548654875488548954905491549254935494549554965497549854995500550155025503550455055506550755085509551055115512551355145515551655175518551955205521552255235524552555265527552855295530553155325533553455355536553755385539554055415542554355445545554655475548554955505551555255535554555555565557555855595560556155625563556455655566556755685569557055715572557355745575557655775578557955805581558255835584558555865587558855895590559155925593559455955596559755985599560056015602560356045605560656075608560956105611561256135614561556165617561856195620562156225623562456255626562756285629563056315632563356345635563656375638563956405641564256435644564556465647564856495650565156525653565456555656565756585659566056615662566356645665566656675668566956705671567256735674567556765677567856795680568156825683568456855686568756885689569056915692569356945695569656975698569957005701570257035704570557065707570857095710571157125713571457155716571757185719572057215722572357245725572657275728572957305731573257335734573557365737573857395740574157425743574457455746574757485749575057515752575357545755575657575758575957605761576257635764576557665767576857695770577157725773577457755776577757785779578057815782578357845785578657875788578957905791579257935794579557965797579857995800580158025803580458055806580758085809581058115812581358145815581658175818581958205821582258235824582558265827582858295830583158325833583458355836583758385839584058415842584358445845584658475848584958505851585258535854585558565857585858595860586158625863586458655866586758685869587058715872587358745875587658775878587958805881588258835884588558865887588858895890589158925893589458955896589758985899590059015902590359045905590659075908590959105911591259135914591559165917591859195920592159225923592459255926592759285929593059315932593359345935593659375938593959405941594259435944594559465947594859495950595159525953595459555956595759585959596059615962596359645965596659675968596959705971597259735974597559765977597859795980598159825983598459855986598759885989599059915992599359945995599659975998599960006001600260036004600560066007600860096010601160126013601460156016601760186019602060216022602360246025602660276028602960306031603260336034603560366037603860396040604160426043604460456046604760486049605060516052605360546055605660576058605960606061606260636064606560666067606860696070607160726073607460756076607760786079608060816082608360846085608660876088608960906091609260936094609560966097609860996100610161026103610461056106610761086109611061116112611361146115611661176118611961206121612261236124612561266127612861296130613161326133613461356136613761386139614061416142614361446145614661476148614961506151615261536154615561566157615861596160616161626163616461656166616761686169617061716172617361746175617661776178617961806181618261836184618561866187618861896190619161926193619461956196619761986199620062016202620362046205620662076208620962106211621262136214621562166217621862196220622162226223622462256226622762286229623062316232623362346235623662376238623962406241624262436244624562466247624862496250625162526253625462556256625762586259626062616262626362646265626662676268626962706271627262736274627562766277627862796280628162826283628462856286628762886289629062916292629362946295629662976298629963006301630263036304630563066307630863096310631163126313631463156316631763186319632063216322632363246325632663276328632963306331633263336334633563366337633863396340634163426343634463456346634763486349635063516352635363546355635663576358635963606361636263636364636563666367636863696370637163726373637463756376637763786379638063816382638363846385638663876388638963906391639263936394639563966397639863996400640164026403640464056406640764086409641064116412641364146415641664176418641964206421642264236424642564266427642864296430643164326433643464356436643764386439644064416442644364446445644664476448644964506451645264536454645564566457645864596460646164626463646464656466646764686469647064716472647364746475647664776478647964806481648264836484648564866487648864896490649164926493649464956496649764986499650065016502650365046505650665076508650965106511651265136514651565166517651865196520652165226523652465256526652765286529653065316532653365346535653665376538653965406541654265436544654565466547654865496550655165526553655465556556655765586559656065616562656365646565656665676568656965706571657265736574657565766577657865796580658165826583658465856586658765886589659065916592659365946595659665976598659966006601660266036604660566066607660866096610661166126613661466156616661766186619662066216622662366246625662666276628662966306631663266336634663566366637663866396640664166426643664466456646664766486649665066516652665366546655665666576658665966606661666266636664666566666667666866696670667166726673667466756676667766786679668066816682668366846685668666876688668966906691669266936694669566966697669866996700670167026703670467056706670767086709671067116712671367146715671667176718671967206721672267236724672567266727672867296730673167326733673467356736673767386739674067416742674367446745674667476748674967506751675267536754675567566757675867596760676167626763676467656766676767686769677067716772677367746775677667776778677967806781678267836784678567866787678867896790679167926793679467956796679767986799680068016802680368046805680668076808680968106811681268136814681568166817681868196820682168226823682468256826682768286829683068316832683368346835683668376838683968406841684268436844684568466847684868496850685168526853685468556856685768586859686068616862686368646865686668676868686968706871687268736874687568766877687868796880688168826883688468856886688768886889689068916892689368946895689668976898689969006901690269036904690569066907690869096910691169126913691469156916691769186919692069216922692369246925692669276928692969306931693269336934693569366937693869396940694169426943694469456946694769486949695069516952695369546955695669576958695969606961696269636964696569666967696869696970697169726973697469756976697769786979698069816982698369846985698669876988698969906991699269936994699569966997699869997000700170027003700470057006700770087009701070117012701370147015701670177018701970207021702270237024702570267027702870297030703170327033703470357036703770387039704070417042704370447045704670477048704970507051705270537054705570567057705870597060706170627063706470657066706770687069707070717072707370747075707670777078707970807081708270837084708570867087708870897090709170927093709470957096709770987099710071017102710371047105710671077108710971107111711271137114711571167117711871197120712171227123712471257126712771287129713071317132713371347135713671377138713971407141714271437144714571467147714871497150715171527153715471557156715771587159716071617162716371647165716671677168716971707171717271737174717571767177717871797180718171827183718471857186718771887189719071917192719371947195719671977198719972007201720272037204720572067207720872097210721172127213721472157216721772187219722072217222722372247225722672277228722972307231723272337234723572367237723872397240724172427243724472457246724772487249725072517252725372547255725672577258725972607261726272637264726572667267726872697270727172727273727472757276727772787279728072817282728372847285728672877288728972907291729272937294729572967297729872997300730173027303730473057306730773087309731073117312731373147315731673177318731973207321732273237324732573267327732873297330733173327333733473357336733773387339734073417342734373447345734673477348734973507351735273537354735573567357735873597360736173627363736473657366736773687369737073717372737373747375737673777378737973807381738273837384738573867387738873897390739173927393739473957396739773987399740074017402740374047405740674077408740974107411741274137414741574167417741874197420742174227423742474257426742774287429743074317432743374347435743674377438743974407441744274437444744574467447744874497450745174527453745474557456745774587459746074617462746374647465746674677468746974707471747274737474747574767477747874797480748174827483748474857486748774887489749074917492749374947495749674977498749975007501750275037504750575067507750875097510751175127513751475157516751775187519752075217522752375247525752675277528752975307531753275337534753575367537753875397540754175427543754475457546754775487549755075517552755375547555755675577558755975607561756275637564756575667567756875697570757175727573757475757576757775787579758075817582758375847585758675877588758975907591759275937594759575967597759875997600760176027603760476057606760776087609761076117612761376147615761676177618761976207621762276237624762576267627762876297630763176327633763476357636763776387639764076417642764376447645764676477648764976507651765276537654765576567657765876597660766176627663766476657666766776687669767076717672767376747675767676777678767976807681768276837684768576867687768876897690769176927693769476957696769776987699770077017702770377047705770677077708770977107711771277137714771577167717771877197720772177227723772477257726772777287729773077317732773377347735773677377738773977407741774277437744774577467747774877497750775177527753775477557756775777587759776077617762776377647765776677677768776977707771777277737774777577767777777877797780778177827783778477857786778777887789779077917792779377947795779677977798779978007801780278037804780578067807780878097810781178127813781478157816781778187819782078217822782378247825782678277828782978307831783278337834783578367837783878397840784178427843784478457846784778487849785078517852785378547855785678577858785978607861786278637864786578667867786878697870787178727873787478757876787778787879788078817882788378847885788678877888788978907891789278937894789578967897789878997900790179027903790479057906790779087909791079117912791379147915791679177918791979207921792279237924792579267927792879297930793179327933793479357936793779387939794079417942794379447945794679477948794979507951795279537954795579567957795879597960796179627963796479657966796779687969797079717972797379747975797679777978797979807981798279837984798579867987798879897990799179927993799479957996799779987999800080018002800380048005800680078008800980108011801280138014801580168017801880198020802180228023802480258026802780288029803080318032803380348035803680378038803980408041804280438044804580468047804880498050805180528053805480558056805780588059806080618062806380648065806680678068806980708071807280738074807580768077807880798080808180828083808480858086808780888089809080918092809380948095809680978098809981008101810281038104810581068107810881098110811181128113811481158116811781188119812081218122812381248125812681278128812981308131813281338134813581368137813881398140814181428143814481458146814781488149815081518152815381548155815681578158815981608161816281638164816581668167816881698170817181728173817481758176817781788179818081818182818381848185818681878188818981908191819281938194819581968197819881998200820182028203820482058206820782088209821082118212821382148215821682178218821982208221822282238224822582268227822882298230823182328233823482358236823782388239824082418242824382448245824682478248824982508251825282538254825582568257825882598260826182628263826482658266826782688269827082718272827382748275827682778278827982808281828282838284828582868287828882898290829182928293829482958296829782988299830083018302830383048305830683078308830983108311831283138314831583168317831883198320832183228323832483258326832783288329833083318332833383348335833683378338833983408341834283438344834583468347834883498350835183528353835483558356835783588359836083618362836383648365836683678368836983708371837283738374837583768377837883798380838183828383838483858386838783888389839083918392839383948395839683978398839984008401840284038404840584068407840884098410841184128413841484158416841784188419842084218422842384248425842684278428842984308431843284338434843584368437843884398440844184428443844484458446844784488449845084518452845384548455845684578458845984608461846284638464846584668467846884698470847184728473847484758476847784788479848084818482848384848485848684878488848984908491849284938494849584968497849884998500850185028503850485058506850785088509851085118512851385148515851685178518851985208521852285238524852585268527852885298530853185328533853485358536853785388539854085418542854385448545854685478548854985508551855285538554855585568557855885598560856185628563856485658566856785688569857085718572857385748575857685778578857985808581858285838584858585868587858885898590859185928593859485958596859785988599860086018602860386048605860686078608860986108611861286138614861586168617861886198620862186228623862486258626862786288629863086318632863386348635863686378638863986408641864286438644864586468647864886498650865186528653865486558656865786588659866086618662866386648665866686678668866986708671867286738674867586768677867886798680868186828683868486858686868786888689869086918692869386948695869686978698869987008701870287038704870587068707870887098710871187128713871487158716871787188719872087218722872387248725872687278728872987308731873287338734873587368737873887398740874187428743874487458746874787488749875087518752875387548755875687578758875987608761876287638764876587668767876887698770877187728773877487758776877787788779878087818782878387848785878687878788878987908791879287938794879587968797879887998800880188028803880488058806880788088809881088118812881388148815881688178818881988208821882288238824882588268827882888298830883188328833883488358836883788388839884088418842884388448845884688478848884988508851885288538854885588568857885888598860886188628863886488658866886788688869887088718872887388748875887688778878887988808881888288838884888588868887888888898890889188928893889488958896889788988899890089018902890389048905890689078908890989108911891289138914891589168917891889198920892189228923892489258926892789288929893089318932893389348935893689378938893989408941894289438944894589468947894889498950895189528953895489558956895789588959896089618962896389648965896689678968896989708971897289738974897589768977897889798980898189828983898489858986898789888989899089918992899389948995899689978998899990009001900290039004900590069007900890099010901190129013901490159016901790189019902090219022902390249025902690279028902990309031903290339034903590369037903890399040904190429043904490459046904790489049905090519052905390549055905690579058905990609061906290639064906590669067906890699070907190729073907490759076907790789079908090819082908390849085908690879088908990909091909290939094909590969097909890999100910191029103910491059106910791089109911091119112911391149115911691179118911991209121912291239124912591269127912891299130913191329133913491359136913791389139914091419142914391449145914691479148914991509151915291539154915591569157915891599160916191629163916491659166916791689169917091719172917391749175917691779178917991809181918291839184918591869187918891899190919191929193919491959196919791989199920092019202920392049205920692079208920992109211921292139214921592169217921892199220922192229223922492259226922792289229923092319232923392349235923692379238923992409241924292439244924592469247924892499250925192529253925492559256925792589259926092619262926392649265926692679268926992709271927292739274927592769277927892799280928192829283928492859286928792889289929092919292929392949295929692979298929993009301930293039304930593069307930893099310931193129313931493159316931793189319932093219322932393249325932693279328932993309331933293339334933593369337933893399340934193429343934493459346934793489349935093519352935393549355935693579358935993609361936293639364936593669367936893699370937193729373937493759376937793789379938093819382938393849385938693879388938993909391939293939394939593969397939893999400940194029403940494059406940794089409941094119412941394149415941694179418941994209421942294239424942594269427942894299430943194329433943494359436943794389439944094419442944394449445944694479448944994509451945294539454945594569457945894599460946194629463946494659466946794689469947094719472947394749475947694779478947994809481948294839484948594869487948894899490949194929493949494959496949794989499950095019502950395049505950695079508950995109511951295139514951595169517951895199520952195229523952495259526952795289529953095319532953395349535953695379538953995409541954295439544954595469547954895499550955195529553955495559556955795589559956095619562956395649565956695679568956995709571957295739574957595769577957895799580958195829583958495859586958795889589959095919592959395949595959695979598959996009601960296039604960596069607960896099610961196129613961496159616961796189619962096219622962396249625962696279628962996309631963296339634963596369637963896399640964196429643964496459646964796489649965096519652965396549655965696579658965996609661966296639664966596669667966896699670967196729673967496759676967796789679968096819682968396849685968696879688968996909691969296939694969596969697969896999700970197029703970497059706970797089709971097119712971397149715971697179718971997209721972297239724972597269727972897299730973197329733973497359736973797389739974097419742974397449745974697479748974997509751975297539754975597569757975897599760976197629763976497659766976797689769977097719772977397749775977697779778977997809781978297839784978597869787978897899790979197929793979497959796979797989799980098019802980398049805980698079808980998109811981298139814981598169817981898199820982198229823982498259826982798289829983098319832983398349835983698379838983998409841984298439844984598469847984898499850985198529853985498559856985798589859986098619862986398649865986698679868986998709871987298739874987598769877987898799880988198829883988498859886988798889889989098919892989398949895989698979898989999009901990299039904990599069907990899099910991199129913991499159916991799189919992099219922992399249925992699279928992999309931993299339934993599369937993899399940994199429943994499459946994799489949995099519952995399549955995699579958995999609961996299639964996599669967996899699970997199729973997499759976997799789979998099819982998399849985998699879988998999909991999299939994999599969997999899991000010001100021000310004100051000610007100081000910010100111001210013100141001510016100171001810019100201002110022100231002410025100261002710028100291003010031100321003310034100351003610037100381003910040100411004210043100441004510046100471004810049100501005110052100531005410055100561005710058100591006010061100621006310064100651006610067100681006910070100711007210073100741007510076100771007810079100801008110082100831008410085100861008710088100891009010091100921009310094100951009610097100981009910100101011010210103101041010510106101071010810109101101011110112101131011410115101161011710118101191012010121101221012310124101251012610127101281012910130101311013210133101341013510136101371013810139101401014110142101431014410145101461014710148101491015010151101521015310154101551015610157101581015910160101611016210163101641016510166101671016810169101701017110172101731017410175101761017710178101791018010181101821018310184101851018610187101881018910190101911019210193101941019510196101971019810199102001020110202102031020410205102061020710208102091021010211102121021310214102151021610217102181021910220102211022210223102241022510226102271022810229102301023110232102331023410235102361023710238102391024010241102421024310244102451024610247102481024910250102511025210253102541025510256102571025810259102601026110262102631026410265102661026710268102691027010271102721027310274102751027610277102781027910280102811028210283102841028510286102871028810289102901029110292102931029410295102961029710298102991030010301103021030310304103051030610307103081030910310103111031210313103141031510316103171031810319103201032110322103231032410325103261032710328103291033010331103321033310334103351033610337103381033910340103411034210343103441034510346103471034810349103501035110352103531035410355103561035710358103591036010361103621036310364103651036610367103681036910370103711037210373103741037510376103771037810379103801038110382103831038410385103861038710388103891039010391103921039310394103951039610397103981039910400104011040210403104041040510406104071040810409104101041110412104131041410415104161041710418104191042010421104221042310424104251042610427104281042910430104311043210433104341043510436104371043810439104401044110442104431044410445104461044710448104491045010451104521045310454104551045610457104581045910460104611046210463104641046510466104671046810469104701047110472104731047410475104761047710478104791048010481104821048310484104851048610487104881048910490104911049210493104941049510496104971049810499105001050110502105031050410505105061050710508105091051010511105121051310514105151051610517105181051910520105211052210523105241052510526105271052810529105301053110532105331053410535105361053710538105391054010541105421054310544105451054610547105481054910550105511055210553105541055510556105571055810559105601056110562105631056410565105661056710568105691057010571105721057310574105751057610577105781057910580105811058210583105841058510586105871058810589105901059110592105931059410595105961059710598105991060010601106021060310604106051060610607106081060910610106111061210613106141061510616106171061810619106201062110622106231062410625106261062710628106291063010631106321063310634106351063610637106381063910640106411064210643106441064510646106471064810649106501065110652106531065410655106561065710658106591066010661106621066310664106651066610667106681066910670106711067210673106741067510676106771067810679106801068110682106831068410685106861068710688106891069010691106921069310694106951069610697106981069910700107011070210703107041070510706107071070810709107101071110712107131071410715107161071710718107191072010721107221072310724107251072610727107281072910730107311073210733107341073510736107371073810739107401074110742107431074410745107461074710748107491075010751107521075310754107551075610757107581075910760107611076210763107641076510766107671076810769107701077110772107731077410775107761077710778107791078010781107821078310784107851078610787107881078910790107911079210793107941079510796107971079810799108001080110802108031080410805108061080710808108091081010811108121081310814108151081610817108181081910820108211082210823108241082510826108271082810829108301083110832108331083410835108361083710838108391084010841108421084310844108451084610847108481084910850108511085210853108541085510856108571085810859108601086110862108631086410865108661086710868108691087010871108721087310874108751087610877108781087910880108811088210883108841088510886108871088810889108901089110892108931089410895108961089710898108991090010901109021090310904109051090610907109081090910910109111091210913109141091510916109171091810919109201092110922109231092410925109261092710928109291093010931109321093310934109351093610937109381093910940109411094210943109441094510946109471094810949109501095110952109531095410955109561095710958109591096010961109621096310964109651096610967109681096910970109711097210973109741097510976109771097810979109801098110982109831098410985109861098710988109891099010991109921099310994109951099610997109981099911000110011100211003110041100511006110071100811009110101101111012110131101411015110161101711018110191102011021110221102311024110251102611027110281102911030110311103211033110341103511036110371103811039110401104111042110431104411045110461104711048110491105011051110521105311054110551105611057110581105911060110611106211063110641106511066110671106811069110701107111072110731107411075110761107711078110791108011081110821108311084110851108611087110881108911090110911109211093110941109511096110971109811099111001110111102111031110411105111061110711108111091111011111111121111311114111151111611117111181111911120111211112211123111241112511126111271112811129111301113111132111331113411135111361113711138111391114011141111421114311144111451114611147111481114911150111511115211153111541115511156111571115811159111601116111162111631116411165111661116711168111691117011171111721117311174111751117611177111781117911180111811118211183111841118511186111871118811189111901119111192111931119411195111961119711198111991120011201112021120311204112051120611207112081120911210112111121211213112141121511216112171121811219112201122111222112231122411225112261122711228112291123011231112321123311234112351123611237112381123911240112411124211243112441124511246112471124811249112501125111252112531125411255112561125711258112591126011261112621126311264112651126611267112681126911270112711127211273112741127511276112771127811279112801128111282112831128411285112861128711288112891129011291112921129311294112951129611297112981129911300113011130211303113041130511306113071130811309113101131111312113131131411315113161131711318113191132011321113221132311324113251132611327113281132911330113311133211333113341133511336113371133811339113401134111342113431134411345113461134711348113491135011351113521135311354113551135611357113581135911360113611136211363113641136511366113671136811369113701137111372113731137411375113761137711378113791138011381113821138311384113851138611387113881138911390113911139211393113941139511396113971139811399114001140111402114031140411405114061140711408114091141011411114121141311414114151141611417114181141911420114211142211423114241142511426114271142811429114301143111432114331143411435114361143711438114391144011441114421144311444114451144611447114481144911450114511145211453114541145511456114571145811459114601146111462114631146411465114661146711468114691147011471114721147311474114751147611477114781147911480114811148211483114841148511486114871148811489114901149111492114931149411495114961149711498114991150011501115021150311504115051150611507115081150911510115111151211513115141151511516115171151811519115201152111522115231152411525115261152711528115291153011531115321153311534115351153611537115381153911540115411154211543115441154511546115471154811549115501155111552115531155411555115561155711558115591156011561115621156311564115651156611567115681156911570115711157211573115741157511576115771157811579115801158111582115831158411585115861158711588115891159011591115921159311594115951159611597115981159911600116011160211603116041160511606116071160811609116101161111612116131161411615116161161711618116191162011621116221162311624116251162611627116281162911630116311163211633116341163511636116371163811639116401164111642116431164411645116461164711648116491165011651116521165311654116551165611657116581165911660116611166211663116641166511666116671166811669116701167111672116731167411675116761167711678116791168011681116821168311684116851168611687116881168911690116911169211693116941169511696116971169811699117001170111702117031170411705117061170711708117091171011711117121171311714117151171611717117181171911720117211172211723117241172511726117271172811729117301173111732117331173411735117361173711738117391174011741117421174311744
  1. /******/ (() => { // webpackBootstrap
  2. /******/ var __webpack_modules__ = ({
  3. /***/ "./node_modules/aos/dist/aos.js":
  4. /*!**************************************!*\
  5. !*** ./node_modules/aos/dist/aos.js ***!
  6. \**************************************/
  7. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  8. !function(e,t){ true?module.exports=t():0}(this,function(){"use strict";var e="undefined"!=typeof window?window:"undefined"!=typeof __webpack_require__.g?__webpack_require__.g:"undefined"!=typeof self?self:{},t="Expected a function",n=NaN,o="[object Symbol]",i=/^\s+|\s+$/g,a=/^[-+]0x[0-9a-f]+$/i,r=/^0b[01]+$/i,c=/^0o[0-7]+$/i,s=parseInt,u="object"==typeof e&&e&&e.Object===Object&&e,d="object"==typeof self&&self&&self.Object===Object&&self,l=u||d||Function("return this")(),f=Object.prototype.toString,m=Math.max,p=Math.min,b=function(){return l.Date.now()};function v(e,n,o){var i,a,r,c,s,u,d=0,l=!1,f=!1,v=!0;if("function"!=typeof e)throw new TypeError(t);function y(t){var n=i,o=a;return i=a=void 0,d=t,c=e.apply(o,n)}function h(e){var t=e-u;return void 0===u||t>=n||t<0||f&&e-d>=r}function k(){var e=b();if(h(e))return x(e);s=setTimeout(k,function(e){var t=n-(e-u);return f?p(t,r-(e-d)):t}(e))}function x(e){return s=void 0,v&&i?y(e):(i=a=void 0,c)}function O(){var e=b(),t=h(e);if(i=arguments,a=this,u=e,t){if(void 0===s)return function(e){return d=e,s=setTimeout(k,n),l?y(e):c}(u);if(f)return s=setTimeout(k,n),y(u)}return void 0===s&&(s=setTimeout(k,n)),c}return n=w(n)||0,g(o)&&(l=!!o.leading,r=(f="maxWait"in o)?m(w(o.maxWait)||0,n):r,v="trailing"in o?!!o.trailing:v),O.cancel=function(){void 0!==s&&clearTimeout(s),d=0,i=u=a=s=void 0},O.flush=function(){return void 0===s?c:x(b())},O}function g(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function w(e){if("number"==typeof e)return e;if(function(e){return"symbol"==typeof e||function(e){return!!e&&"object"==typeof e}(e)&&f.call(e)==o}(e))return n;if(g(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=g(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=e.replace(i,"");var u=r.test(e);return u||c.test(e)?s(e.slice(2),u?2:8):a.test(e)?n:+e}var y=function(e,n,o){var i=!0,a=!0;if("function"!=typeof e)throw new TypeError(t);return g(o)&&(i="leading"in o?!!o.leading:i,a="trailing"in o?!!o.trailing:a),v(e,n,{leading:i,maxWait:n,trailing:a})},h="Expected a function",k=NaN,x="[object Symbol]",O=/^\s+|\s+$/g,j=/^[-+]0x[0-9a-f]+$/i,E=/^0b[01]+$/i,N=/^0o[0-7]+$/i,z=parseInt,C="object"==typeof e&&e&&e.Object===Object&&e,A="object"==typeof self&&self&&self.Object===Object&&self,q=C||A||Function("return this")(),L=Object.prototype.toString,T=Math.max,M=Math.min,S=function(){return q.Date.now()};function D(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function H(e){if("number"==typeof e)return e;if(function(e){return"symbol"==typeof e||function(e){return!!e&&"object"==typeof e}(e)&&L.call(e)==x}(e))return k;if(D(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=D(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=e.replace(O,"");var n=E.test(e);return n||N.test(e)?z(e.slice(2),n?2:8):j.test(e)?k:+e}var $=function(e,t,n){var o,i,a,r,c,s,u=0,d=!1,l=!1,f=!0;if("function"!=typeof e)throw new TypeError(h);function m(t){var n=o,a=i;return o=i=void 0,u=t,r=e.apply(a,n)}function p(e){var n=e-s;return void 0===s||n>=t||n<0||l&&e-u>=a}function b(){var e=S();if(p(e))return v(e);c=setTimeout(b,function(e){var n=t-(e-s);return l?M(n,a-(e-u)):n}(e))}function v(e){return c=void 0,f&&o?m(e):(o=i=void 0,r)}function g(){var e=S(),n=p(e);if(o=arguments,i=this,s=e,n){if(void 0===c)return function(e){return u=e,c=setTimeout(b,t),d?m(e):r}(s);if(l)return c=setTimeout(b,t),m(s)}return void 0===c&&(c=setTimeout(b,t)),r}return t=H(t)||0,D(n)&&(d=!!n.leading,a=(l="maxWait"in n)?T(H(n.maxWait)||0,t):a,f="trailing"in n?!!n.trailing:f),g.cancel=function(){void 0!==c&&clearTimeout(c),u=0,o=s=i=c=void 0},g.flush=function(){return void 0===c?r:v(S())},g},W=function(){};function P(e){e&&e.forEach(function(e){var t=Array.prototype.slice.call(e.addedNodes),n=Array.prototype.slice.call(e.removedNodes);if(function e(t){var n=void 0,o=void 0;for(n=0;n<t.length;n+=1){if((o=t[n]).dataset&&o.dataset.aos)return!0;if(o.children&&e(o.children))return!0}return!1}(t.concat(n)))return W()})}function Y(){return window.MutationObserver||window.WebKitMutationObserver||window.MozMutationObserver}var _={isSupported:function(){return!!Y()},ready:function(e,t){var n=window.document,o=new(Y())(P);W=t,o.observe(n.documentElement,{childList:!0,subtree:!0,removedNodes:!0})}},B=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")},F=function(){function e(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(t,n,o){return n&&e(t.prototype,n),o&&e(t,o),t}}(),I=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(e[o]=n[o])}return e},K=/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino/i,G=/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\-(n|u)|c55\/|capi|ccwa|cdm\-|cell|chtm|cldc|cmd\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\-s|devi|dica|dmob|do(c|p)o|ds(12|\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\-|_)|g1 u|g560|gene|gf\-5|g\-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd\-(m|p|t)|hei\-|hi(pt|ta)|hp( i|ip)|hs\-c|ht(c(\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\-(20|go|ma)|i230|iac( |\-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc\-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|\-[a-w])|libw|lynx|m1\-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m\-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\-2|po(ck|rt|se)|prox|psio|pt\-g|qa\-a|qc(07|12|21|32|60|\-[2-7]|i\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\-|oo|p\-)|sdk\/|se(c(\-|0|1)|47|mc|nd|ri)|sgh\-|shar|sie(\-|m)|sk\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\-|v\-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\-|tdg\-|tel(i|m)|tim\-|t\-mo|to(pl|sh)|ts(70|m\-|m3|m5)|tx\-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas\-|your|zeto|zte\-/i,J=/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino|android|ipad|playbook|silk/i,Q=/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\-(n|u)|c55\/|capi|ccwa|cdm\-|cell|chtm|cldc|cmd\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\-s|devi|dica|dmob|do(c|p)o|ds(12|\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\-|_)|g1 u|g560|gene|gf\-5|g\-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd\-(m|p|t)|hei\-|hi(pt|ta)|hp( i|ip)|hs\-c|ht(c(\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\-(20|go|ma)|i230|iac( |\-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc\-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|\-[a-w])|libw|lynx|m1\-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m\-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\-2|po(ck|rt|se)|prox|psio|pt\-g|qa\-a|qc(07|12|21|32|60|\-[2-7]|i\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\-|oo|p\-)|sdk\/|se(c(\-|0|1)|47|mc|nd|ri)|sgh\-|shar|sie(\-|m)|sk\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\-|v\-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\-|tdg\-|tel(i|m)|tim\-|t\-mo|to(pl|sh)|ts(70|m\-|m3|m5)|tx\-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas\-|your|zeto|zte\-/i;function R(){return navigator.userAgent||navigator.vendor||window.opera||""}var U=new(function(){function e(){B(this,e)}return F(e,[{key:"phone",value:function(){var e=R();return!(!K.test(e)&&!G.test(e.substr(0,4)))}},{key:"mobile",value:function(){var e=R();return!(!J.test(e)&&!Q.test(e.substr(0,4)))}},{key:"tablet",value:function(){return this.mobile()&&!this.phone()}},{key:"ie11",value:function(){return"-ms-scroll-limit"in document.documentElement.style&&"-ms-ime-align"in document.documentElement.style}}]),e}()),V=function(e,t){var n=void 0;return U.ie11()?(n=document.createEvent("CustomEvent")).initCustomEvent(e,!0,!0,{detail:t}):n=new CustomEvent(e,{detail:t}),document.dispatchEvent(n)},X=function(e){return e.forEach(function(e,t){return function(e,t){var n=e.options,o=e.position,i=e.node,a=(e.data,function(){e.animated&&(function(e,t){t&&t.forEach(function(t){return e.classList.remove(t)})}(i,n.animatedClassNames),V("aos:out",i),e.options.id&&V("aos:in:"+e.options.id,i),e.animated=!1)});n.mirror&&t>=o.out&&!n.once?a():t>=o.in?e.animated||(function(e,t){t&&t.forEach(function(t){return e.classList.add(t)})}(i,n.animatedClassNames),V("aos:in",i),e.options.id&&V("aos:in:"+e.options.id,i),e.animated=!0):e.animated&&!n.once&&a()}(e,window.pageYOffset)})},Z=function(e){for(var t=0,n=0;e&&!isNaN(e.offsetLeft)&&!isNaN(e.offsetTop);)t+=e.offsetLeft-("BODY"!=e.tagName?e.scrollLeft:0),n+=e.offsetTop-("BODY"!=e.tagName?e.scrollTop:0),e=e.offsetParent;return{top:n,left:t}},ee=function(e,t,n){var o=e.getAttribute("data-aos-"+t);if(void 0!==o){if("true"===o)return!0;if("false"===o)return!1}return o||n},te=function(e,t){return e.forEach(function(e,n){var o=ee(e.node,"mirror",t.mirror),i=ee(e.node,"once",t.once),a=ee(e.node,"id"),r=t.useClassNames&&e.node.getAttribute("data-aos"),c=[t.animatedClassName].concat(r?r.split(" "):[]).filter(function(e){return"string"==typeof e});t.initClassName&&e.node.classList.add(t.initClassName),e.position={in:function(e,t,n){var o=window.innerHeight,i=ee(e,"anchor"),a=ee(e,"anchor-placement"),r=Number(ee(e,"offset",a?0:t)),c=a||n,s=e;i&&document.querySelectorAll(i)&&(s=document.querySelectorAll(i)[0]);var u=Z(s).top-o;switch(c){case"top-bottom":break;case"center-bottom":u+=s.offsetHeight/2;break;case"bottom-bottom":u+=s.offsetHeight;break;case"top-center":u+=o/2;break;case"center-center":u+=o/2+s.offsetHeight/2;break;case"bottom-center":u+=o/2+s.offsetHeight;break;case"top-top":u+=o;break;case"bottom-top":u+=o+s.offsetHeight;break;case"center-top":u+=o+s.offsetHeight/2}return u+r}(e.node,t.offset,t.anchorPlacement),out:o&&function(e,t){window.innerHeight;var n=ee(e,"anchor"),o=ee(e,"offset",t),i=e;return n&&document.querySelectorAll(n)&&(i=document.querySelectorAll(n)[0]),Z(i).top+i.offsetHeight-o}(e.node,t.offset)},e.options={once:i,mirror:o,animatedClassNames:c,id:a}}),e},ne=function(){var e=document.querySelectorAll("[data-aos]");return Array.prototype.map.call(e,function(e){return{node:e}})},oe=[],ie=!1,ae={offset:120,delay:0,easing:"ease",duration:400,disable:!1,once:!1,mirror:!1,anchorPlacement:"top-bottom",startEvent:"DOMContentLoaded",animatedClassName:"aos-animate",initClassName:"aos-init",useClassNames:!1,disableMutationObserver:!1,throttleDelay:99,debounceDelay:50},re=function(){return document.all&&!window.atob},ce=function(){arguments.length>0&&void 0!==arguments[0]&&arguments[0]&&(ie=!0),ie&&(oe=te(oe,ae),X(oe),window.addEventListener("scroll",y(function(){X(oe,ae.once)},ae.throttleDelay)))},se=function(){if(oe=ne(),de(ae.disable)||re())return ue();ce()},ue=function(){oe.forEach(function(e,t){e.node.removeAttribute("data-aos"),e.node.removeAttribute("data-aos-easing"),e.node.removeAttribute("data-aos-duration"),e.node.removeAttribute("data-aos-delay"),ae.initClassName&&e.node.classList.remove(ae.initClassName),ae.animatedClassName&&e.node.classList.remove(ae.animatedClassName)})},de=function(e){return!0===e||"mobile"===e&&U.mobile()||"phone"===e&&U.phone()||"tablet"===e&&U.tablet()||"function"==typeof e&&!0===e()};return{init:function(e){return ae=I(ae,e),oe=ne(),ae.disableMutationObserver||_.isSupported()||(console.info('\n aos: MutationObserver is not supported on this browser,\n code mutations observing has been disabled.\n You may have to call "refreshHard()" by yourself.\n '),ae.disableMutationObserver=!0),ae.disableMutationObserver||_.ready("[data-aos]",se),de(ae.disable)||re()?ue():(document.querySelector("body").setAttribute("data-aos-easing",ae.easing),document.querySelector("body").setAttribute("data-aos-duration",ae.duration),document.querySelector("body").setAttribute("data-aos-delay",ae.delay),-1===["DOMContentLoaded","load"].indexOf(ae.startEvent)?document.addEventListener(ae.startEvent,function(){ce(!0)}):window.addEventListener("load",function(){ce(!0)}),"DOMContentLoaded"===ae.startEvent&&["complete","interactive"].indexOf(document.readyState)>-1&&ce(!0),window.addEventListener("resize",$(ce,ae.debounceDelay,!0)),window.addEventListener("orientationchange",$(ce,ae.debounceDelay,!0)),oe)},refresh:ce,refreshHard:se}});
  9. /***/ }),
  10. /***/ "./node_modules/jquery/dist/jquery.js":
  11. /*!********************************************!*\
  12. !*** ./node_modules/jquery/dist/jquery.js ***!
  13. \********************************************/
  14. /***/ (function(module, exports) {
  15. var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/*!
  16. * jQuery JavaScript Library v3.7.1
  17. * https://jquery.com/
  18. *
  19. * Copyright OpenJS Foundation and other contributors
  20. * Released under the MIT license
  21. * https://jquery.org/license
  22. *
  23. * Date: 2023-08-28T13:37Z
  24. */
  25. ( function( global, factory ) {
  26. "use strict";
  27. if ( true && typeof module.exports === "object" ) {
  28. // For CommonJS and CommonJS-like environments where a proper `window`
  29. // is present, execute the factory and get jQuery.
  30. // For environments that do not have a `window` with a `document`
  31. // (such as Node.js), expose a factory as module.exports.
  32. // This accentuates the need for the creation of a real `window`.
  33. // e.g. var jQuery = require("jquery")(window);
  34. // See ticket trac-14549 for more info.
  35. module.exports = global.document ?
  36. factory( global, true ) :
  37. function( w ) {
  38. if ( !w.document ) {
  39. throw new Error( "jQuery requires a window with a document" );
  40. }
  41. return factory( w );
  42. };
  43. } else {
  44. factory( global );
  45. }
  46. // Pass this if window is not defined yet
  47. } )( typeof window !== "undefined" ? window : this, function( window, noGlobal ) {
  48. // Edge <= 12 - 13+, Firefox <=18 - 45+, IE 10 - 11, Safari 5.1 - 9+, iOS 6 - 9.1
  49. // throw exceptions when non-strict code (e.g., ASP.NET 4.5) accesses strict mode
  50. // arguments.callee.caller (trac-13335). But as of jQuery 3.0 (2016), strict mode should be common
  51. // enough that all such attempts are guarded in a try block.
  52. "use strict";
  53. var arr = [];
  54. var getProto = Object.getPrototypeOf;
  55. var slice = arr.slice;
  56. var flat = arr.flat ? function( array ) {
  57. return arr.flat.call( array );
  58. } : function( array ) {
  59. return arr.concat.apply( [], array );
  60. };
  61. var push = arr.push;
  62. var indexOf = arr.indexOf;
  63. var class2type = {};
  64. var toString = class2type.toString;
  65. var hasOwn = class2type.hasOwnProperty;
  66. var fnToString = hasOwn.toString;
  67. var ObjectFunctionString = fnToString.call( Object );
  68. var support = {};
  69. var isFunction = function isFunction( obj ) {
  70. // Support: Chrome <=57, Firefox <=52
  71. // In some browsers, typeof returns "function" for HTML <object> elements
  72. // (i.e., `typeof document.createElement( "object" ) === "function"`).
  73. // We don't want to classify *any* DOM node as a function.
  74. // Support: QtWeb <=3.8.5, WebKit <=534.34, wkhtmltopdf tool <=0.12.5
  75. // Plus for old WebKit, typeof returns "function" for HTML collections
  76. // (e.g., `typeof document.getElementsByTagName("div") === "function"`). (gh-4756)
  77. return typeof obj === "function" && typeof obj.nodeType !== "number" &&
  78. typeof obj.item !== "function";
  79. };
  80. var isWindow = function isWindow( obj ) {
  81. return obj != null && obj === obj.window;
  82. };
  83. var document = window.document;
  84. var preservedScriptAttributes = {
  85. type: true,
  86. src: true,
  87. nonce: true,
  88. noModule: true
  89. };
  90. function DOMEval( code, node, doc ) {
  91. doc = doc || document;
  92. var i, val,
  93. script = doc.createElement( "script" );
  94. script.text = code;
  95. if ( node ) {
  96. for ( i in preservedScriptAttributes ) {
  97. // Support: Firefox 64+, Edge 18+
  98. // Some browsers don't support the "nonce" property on scripts.
  99. // On the other hand, just using `getAttribute` is not enough as
  100. // the `nonce` attribute is reset to an empty string whenever it
  101. // becomes browsing-context connected.
  102. // See https://github.com/whatwg/html/issues/2369
  103. // See https://html.spec.whatwg.org/#nonce-attributes
  104. // The `node.getAttribute` check was added for the sake of
  105. // `jQuery.globalEval` so that it can fake a nonce-containing node
  106. // via an object.
  107. val = node[ i ] || node.getAttribute && node.getAttribute( i );
  108. if ( val ) {
  109. script.setAttribute( i, val );
  110. }
  111. }
  112. }
  113. doc.head.appendChild( script ).parentNode.removeChild( script );
  114. }
  115. function toType( obj ) {
  116. if ( obj == null ) {
  117. return obj + "";
  118. }
  119. // Support: Android <=2.3 only (functionish RegExp)
  120. return typeof obj === "object" || typeof obj === "function" ?
  121. class2type[ toString.call( obj ) ] || "object" :
  122. typeof obj;
  123. }
  124. /* global Symbol */
  125. // Defining this global in .eslintrc.json would create a danger of using the global
  126. // unguarded in another place, it seems safer to define global only for this module
  127. var version = "3.7.1",
  128. rhtmlSuffix = /HTML$/i,
  129. // Define a local copy of jQuery
  130. jQuery = function( selector, context ) {
  131. // The jQuery object is actually just the init constructor 'enhanced'
  132. // Need init if jQuery is called (just allow error to be thrown if not included)
  133. return new jQuery.fn.init( selector, context );
  134. };
  135. jQuery.fn = jQuery.prototype = {
  136. // The current version of jQuery being used
  137. jquery: version,
  138. constructor: jQuery,
  139. // The default length of a jQuery object is 0
  140. length: 0,
  141. toArray: function() {
  142. return slice.call( this );
  143. },
  144. // Get the Nth element in the matched element set OR
  145. // Get the whole matched element set as a clean array
  146. get: function( num ) {
  147. // Return all the elements in a clean array
  148. if ( num == null ) {
  149. return slice.call( this );
  150. }
  151. // Return just the one element from the set
  152. return num < 0 ? this[ num + this.length ] : this[ num ];
  153. },
  154. // Take an array of elements and push it onto the stack
  155. // (returning the new matched element set)
  156. pushStack: function( elems ) {
  157. // Build a new jQuery matched element set
  158. var ret = jQuery.merge( this.constructor(), elems );
  159. // Add the old object onto the stack (as a reference)
  160. ret.prevObject = this;
  161. // Return the newly-formed element set
  162. return ret;
  163. },
  164. // Execute a callback for every element in the matched set.
  165. each: function( callback ) {
  166. return jQuery.each( this, callback );
  167. },
  168. map: function( callback ) {
  169. return this.pushStack( jQuery.map( this, function( elem, i ) {
  170. return callback.call( elem, i, elem );
  171. } ) );
  172. },
  173. slice: function() {
  174. return this.pushStack( slice.apply( this, arguments ) );
  175. },
  176. first: function() {
  177. return this.eq( 0 );
  178. },
  179. last: function() {
  180. return this.eq( -1 );
  181. },
  182. even: function() {
  183. return this.pushStack( jQuery.grep( this, function( _elem, i ) {
  184. return ( i + 1 ) % 2;
  185. } ) );
  186. },
  187. odd: function() {
  188. return this.pushStack( jQuery.grep( this, function( _elem, i ) {
  189. return i % 2;
  190. } ) );
  191. },
  192. eq: function( i ) {
  193. var len = this.length,
  194. j = +i + ( i < 0 ? len : 0 );
  195. return this.pushStack( j >= 0 && j < len ? [ this[ j ] ] : [] );
  196. },
  197. end: function() {
  198. return this.prevObject || this.constructor();
  199. },
  200. // For internal use only.
  201. // Behaves like an Array's method, not like a jQuery method.
  202. push: push,
  203. sort: arr.sort,
  204. splice: arr.splice
  205. };
  206. jQuery.extend = jQuery.fn.extend = function() {
  207. var options, name, src, copy, copyIsArray, clone,
  208. target = arguments[ 0 ] || {},
  209. i = 1,
  210. length = arguments.length,
  211. deep = false;
  212. // Handle a deep copy situation
  213. if ( typeof target === "boolean" ) {
  214. deep = target;
  215. // Skip the boolean and the target
  216. target = arguments[ i ] || {};
  217. i++;
  218. }
  219. // Handle case when target is a string or something (possible in deep copy)
  220. if ( typeof target !== "object" && !isFunction( target ) ) {
  221. target = {};
  222. }
  223. // Extend jQuery itself if only one argument is passed
  224. if ( i === length ) {
  225. target = this;
  226. i--;
  227. }
  228. for ( ; i < length; i++ ) {
  229. // Only deal with non-null/undefined values
  230. if ( ( options = arguments[ i ] ) != null ) {
  231. // Extend the base object
  232. for ( name in options ) {
  233. copy = options[ name ];
  234. // Prevent Object.prototype pollution
  235. // Prevent never-ending loop
  236. if ( name === "__proto__" || target === copy ) {
  237. continue;
  238. }
  239. // Recurse if we're merging plain objects or arrays
  240. if ( deep && copy && ( jQuery.isPlainObject( copy ) ||
  241. ( copyIsArray = Array.isArray( copy ) ) ) ) {
  242. src = target[ name ];
  243. // Ensure proper type for the source value
  244. if ( copyIsArray && !Array.isArray( src ) ) {
  245. clone = [];
  246. } else if ( !copyIsArray && !jQuery.isPlainObject( src ) ) {
  247. clone = {};
  248. } else {
  249. clone = src;
  250. }
  251. copyIsArray = false;
  252. // Never move original objects, clone them
  253. target[ name ] = jQuery.extend( deep, clone, copy );
  254. // Don't bring in undefined values
  255. } else if ( copy !== undefined ) {
  256. target[ name ] = copy;
  257. }
  258. }
  259. }
  260. }
  261. // Return the modified object
  262. return target;
  263. };
  264. jQuery.extend( {
  265. // Unique for each copy of jQuery on the page
  266. expando: "jQuery" + ( version + Math.random() ).replace( /\D/g, "" ),
  267. // Assume jQuery is ready without the ready module
  268. isReady: true,
  269. error: function( msg ) {
  270. throw new Error( msg );
  271. },
  272. noop: function() {},
  273. isPlainObject: function( obj ) {
  274. var proto, Ctor;
  275. // Detect obvious negatives
  276. // Use toString instead of jQuery.type to catch host objects
  277. if ( !obj || toString.call( obj ) !== "[object Object]" ) {
  278. return false;
  279. }
  280. proto = getProto( obj );
  281. // Objects with no prototype (e.g., `Object.create( null )`) are plain
  282. if ( !proto ) {
  283. return true;
  284. }
  285. // Objects with prototype are plain iff they were constructed by a global Object function
  286. Ctor = hasOwn.call( proto, "constructor" ) && proto.constructor;
  287. return typeof Ctor === "function" && fnToString.call( Ctor ) === ObjectFunctionString;
  288. },
  289. isEmptyObject: function( obj ) {
  290. var name;
  291. for ( name in obj ) {
  292. return false;
  293. }
  294. return true;
  295. },
  296. // Evaluates a script in a provided context; falls back to the global one
  297. // if not specified.
  298. globalEval: function( code, options, doc ) {
  299. DOMEval( code, { nonce: options && options.nonce }, doc );
  300. },
  301. each: function( obj, callback ) {
  302. var length, i = 0;
  303. if ( isArrayLike( obj ) ) {
  304. length = obj.length;
  305. for ( ; i < length; i++ ) {
  306. if ( callback.call( obj[ i ], i, obj[ i ] ) === false ) {
  307. break;
  308. }
  309. }
  310. } else {
  311. for ( i in obj ) {
  312. if ( callback.call( obj[ i ], i, obj[ i ] ) === false ) {
  313. break;
  314. }
  315. }
  316. }
  317. return obj;
  318. },
  319. // Retrieve the text value of an array of DOM nodes
  320. text: function( elem ) {
  321. var node,
  322. ret = "",
  323. i = 0,
  324. nodeType = elem.nodeType;
  325. if ( !nodeType ) {
  326. // If no nodeType, this is expected to be an array
  327. while ( ( node = elem[ i++ ] ) ) {
  328. // Do not traverse comment nodes
  329. ret += jQuery.text( node );
  330. }
  331. }
  332. if ( nodeType === 1 || nodeType === 11 ) {
  333. return elem.textContent;
  334. }
  335. if ( nodeType === 9 ) {
  336. return elem.documentElement.textContent;
  337. }
  338. if ( nodeType === 3 || nodeType === 4 ) {
  339. return elem.nodeValue;
  340. }
  341. // Do not include comment or processing instruction nodes
  342. return ret;
  343. },
  344. // results is for internal usage only
  345. makeArray: function( arr, results ) {
  346. var ret = results || [];
  347. if ( arr != null ) {
  348. if ( isArrayLike( Object( arr ) ) ) {
  349. jQuery.merge( ret,
  350. typeof arr === "string" ?
  351. [ arr ] : arr
  352. );
  353. } else {
  354. push.call( ret, arr );
  355. }
  356. }
  357. return ret;
  358. },
  359. inArray: function( elem, arr, i ) {
  360. return arr == null ? -1 : indexOf.call( arr, elem, i );
  361. },
  362. isXMLDoc: function( elem ) {
  363. var namespace = elem && elem.namespaceURI,
  364. docElem = elem && ( elem.ownerDocument || elem ).documentElement;
  365. // Assume HTML when documentElement doesn't yet exist, such as inside
  366. // document fragments.
  367. return !rhtmlSuffix.test( namespace || docElem && docElem.nodeName || "HTML" );
  368. },
  369. // Support: Android <=4.0 only, PhantomJS 1 only
  370. // push.apply(_, arraylike) throws on ancient WebKit
  371. merge: function( first, second ) {
  372. var len = +second.length,
  373. j = 0,
  374. i = first.length;
  375. for ( ; j < len; j++ ) {
  376. first[ i++ ] = second[ j ];
  377. }
  378. first.length = i;
  379. return first;
  380. },
  381. grep: function( elems, callback, invert ) {
  382. var callbackInverse,
  383. matches = [],
  384. i = 0,
  385. length = elems.length,
  386. callbackExpect = !invert;
  387. // Go through the array, only saving the items
  388. // that pass the validator function
  389. for ( ; i < length; i++ ) {
  390. callbackInverse = !callback( elems[ i ], i );
  391. if ( callbackInverse !== callbackExpect ) {
  392. matches.push( elems[ i ] );
  393. }
  394. }
  395. return matches;
  396. },
  397. // arg is for internal usage only
  398. map: function( elems, callback, arg ) {
  399. var length, value,
  400. i = 0,
  401. ret = [];
  402. // Go through the array, translating each of the items to their new values
  403. if ( isArrayLike( elems ) ) {
  404. length = elems.length;
  405. for ( ; i < length; i++ ) {
  406. value = callback( elems[ i ], i, arg );
  407. if ( value != null ) {
  408. ret.push( value );
  409. }
  410. }
  411. // Go through every key on the object,
  412. } else {
  413. for ( i in elems ) {
  414. value = callback( elems[ i ], i, arg );
  415. if ( value != null ) {
  416. ret.push( value );
  417. }
  418. }
  419. }
  420. // Flatten any nested arrays
  421. return flat( ret );
  422. },
  423. // A global GUID counter for objects
  424. guid: 1,
  425. // jQuery.support is not used in Core but other projects attach their
  426. // properties to it so it needs to exist.
  427. support: support
  428. } );
  429. if ( typeof Symbol === "function" ) {
  430. jQuery.fn[ Symbol.iterator ] = arr[ Symbol.iterator ];
  431. }
  432. // Populate the class2type map
  433. jQuery.each( "Boolean Number String Function Array Date RegExp Object Error Symbol".split( " " ),
  434. function( _i, name ) {
  435. class2type[ "[object " + name + "]" ] = name.toLowerCase();
  436. } );
  437. function isArrayLike( obj ) {
  438. // Support: real iOS 8.2 only (not reproducible in simulator)
  439. // `in` check used to prevent JIT error (gh-2145)
  440. // hasOwn isn't used here due to false negatives
  441. // regarding Nodelist length in IE
  442. var length = !!obj && "length" in obj && obj.length,
  443. type = toType( obj );
  444. if ( isFunction( obj ) || isWindow( obj ) ) {
  445. return false;
  446. }
  447. return type === "array" || length === 0 ||
  448. typeof length === "number" && length > 0 && ( length - 1 ) in obj;
  449. }
  450. function nodeName( elem, name ) {
  451. return elem.nodeName && elem.nodeName.toLowerCase() === name.toLowerCase();
  452. }
  453. var pop = arr.pop;
  454. var sort = arr.sort;
  455. var splice = arr.splice;
  456. var whitespace = "[\\x20\\t\\r\\n\\f]";
  457. var rtrimCSS = new RegExp(
  458. "^" + whitespace + "+|((?:^|[^\\\\])(?:\\\\.)*)" + whitespace + "+$",
  459. "g"
  460. );
  461. // Note: an element does not contain itself
  462. jQuery.contains = function( a, b ) {
  463. var bup = b && b.parentNode;
  464. return a === bup || !!( bup && bup.nodeType === 1 && (
  465. // Support: IE 9 - 11+
  466. // IE doesn't have `contains` on SVG.
  467. a.contains ?
  468. a.contains( bup ) :
  469. a.compareDocumentPosition && a.compareDocumentPosition( bup ) & 16
  470. ) );
  471. };
  472. // CSS string/identifier serialization
  473. // https://drafts.csswg.org/cssom/#common-serializing-idioms
  474. var rcssescape = /([\0-\x1f\x7f]|^-?\d)|^-$|[^\x80-\uFFFF\w-]/g;
  475. function fcssescape( ch, asCodePoint ) {
  476. if ( asCodePoint ) {
  477. // U+0000 NULL becomes U+FFFD REPLACEMENT CHARACTER
  478. if ( ch === "\0" ) {
  479. return "\uFFFD";
  480. }
  481. // Control characters and (dependent upon position) numbers get escaped as code points
  482. return ch.slice( 0, -1 ) + "\\" + ch.charCodeAt( ch.length - 1 ).toString( 16 ) + " ";
  483. }
  484. // Other potentially-special ASCII characters get backslash-escaped
  485. return "\\" + ch;
  486. }
  487. jQuery.escapeSelector = function( sel ) {
  488. return ( sel + "" ).replace( rcssescape, fcssescape );
  489. };
  490. var preferredDoc = document,
  491. pushNative = push;
  492. ( function() {
  493. var i,
  494. Expr,
  495. outermostContext,
  496. sortInput,
  497. hasDuplicate,
  498. push = pushNative,
  499. // Local document vars
  500. document,
  501. documentElement,
  502. documentIsHTML,
  503. rbuggyQSA,
  504. matches,
  505. // Instance-specific data
  506. expando = jQuery.expando,
  507. dirruns = 0,
  508. done = 0,
  509. classCache = createCache(),
  510. tokenCache = createCache(),
  511. compilerCache = createCache(),
  512. nonnativeSelectorCache = createCache(),
  513. sortOrder = function( a, b ) {
  514. if ( a === b ) {
  515. hasDuplicate = true;
  516. }
  517. return 0;
  518. },
  519. booleans = "checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|" +
  520. "loop|multiple|open|readonly|required|scoped",
  521. // Regular expressions
  522. // https://www.w3.org/TR/css-syntax-3/#ident-token-diagram
  523. identifier = "(?:\\\\[\\da-fA-F]{1,6}" + whitespace +
  524. "?|\\\\[^\\r\\n\\f]|[\\w-]|[^\0-\\x7f])+",
  525. // Attribute selectors: https://www.w3.org/TR/selectors/#attribute-selectors
  526. attributes = "\\[" + whitespace + "*(" + identifier + ")(?:" + whitespace +
  527. // Operator (capture 2)
  528. "*([*^$|!~]?=)" + whitespace +
  529. // "Attribute values must be CSS identifiers [capture 5] or strings [capture 3 or capture 4]"
  530. "*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|(" + identifier + "))|)" +
  531. whitespace + "*\\]",
  532. pseudos = ":(" + identifier + ")(?:\\((" +
  533. // To reduce the number of selectors needing tokenize in the preFilter, prefer arguments:
  534. // 1. quoted (capture 3; capture 4 or capture 5)
  535. "('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|" +
  536. // 2. simple (capture 6)
  537. "((?:\\\\.|[^\\\\()[\\]]|" + attributes + ")*)|" +
  538. // 3. anything else (capture 2)
  539. ".*" +
  540. ")\\)|)",
  541. // Leading and non-escaped trailing whitespace, capturing some non-whitespace characters preceding the latter
  542. rwhitespace = new RegExp( whitespace + "+", "g" ),
  543. rcomma = new RegExp( "^" + whitespace + "*," + whitespace + "*" ),
  544. rleadingCombinator = new RegExp( "^" + whitespace + "*([>+~]|" + whitespace + ")" +
  545. whitespace + "*" ),
  546. rdescend = new RegExp( whitespace + "|>" ),
  547. rpseudo = new RegExp( pseudos ),
  548. ridentifier = new RegExp( "^" + identifier + "$" ),
  549. matchExpr = {
  550. ID: new RegExp( "^#(" + identifier + ")" ),
  551. CLASS: new RegExp( "^\\.(" + identifier + ")" ),
  552. TAG: new RegExp( "^(" + identifier + "|[*])" ),
  553. ATTR: new RegExp( "^" + attributes ),
  554. PSEUDO: new RegExp( "^" + pseudos ),
  555. CHILD: new RegExp(
  556. "^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\(" +
  557. whitespace + "*(even|odd|(([+-]|)(\\d*)n|)" + whitespace + "*(?:([+-]|)" +
  558. whitespace + "*(\\d+)|))" + whitespace + "*\\)|)", "i" ),
  559. bool: new RegExp( "^(?:" + booleans + ")$", "i" ),
  560. // For use in libraries implementing .is()
  561. // We use this for POS matching in `select`
  562. needsContext: new RegExp( "^" + whitespace +
  563. "*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\(" + whitespace +
  564. "*((?:-\\d)?\\d*)" + whitespace + "*\\)|)(?=[^-]|$)", "i" )
  565. },
  566. rinputs = /^(?:input|select|textarea|button)$/i,
  567. rheader = /^h\d$/i,
  568. // Easily-parseable/retrievable ID or TAG or CLASS selectors
  569. rquickExpr = /^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,
  570. rsibling = /[+~]/,
  571. // CSS escapes
  572. // https://www.w3.org/TR/CSS21/syndata.html#escaped-characters
  573. runescape = new RegExp( "\\\\[\\da-fA-F]{1,6}" + whitespace +
  574. "?|\\\\([^\\r\\n\\f])", "g" ),
  575. funescape = function( escape, nonHex ) {
  576. var high = "0x" + escape.slice( 1 ) - 0x10000;
  577. if ( nonHex ) {
  578. // Strip the backslash prefix from a non-hex escape sequence
  579. return nonHex;
  580. }
  581. // Replace a hexadecimal escape sequence with the encoded Unicode code point
  582. // Support: IE <=11+
  583. // For values outside the Basic Multilingual Plane (BMP), manually construct a
  584. // surrogate pair
  585. return high < 0 ?
  586. String.fromCharCode( high + 0x10000 ) :
  587. String.fromCharCode( high >> 10 | 0xD800, high & 0x3FF | 0xDC00 );
  588. },
  589. // Used for iframes; see `setDocument`.
  590. // Support: IE 9 - 11+, Edge 12 - 18+
  591. // Removing the function wrapper causes a "Permission Denied"
  592. // error in IE/Edge.
  593. unloadHandler = function() {
  594. setDocument();
  595. },
  596. inDisabledFieldset = addCombinator(
  597. function( elem ) {
  598. return elem.disabled === true && nodeName( elem, "fieldset" );
  599. },
  600. { dir: "parentNode", next: "legend" }
  601. );
  602. // Support: IE <=9 only
  603. // Accessing document.activeElement can throw unexpectedly
  604. // https://bugs.jquery.com/ticket/13393
  605. function safeActiveElement() {
  606. try {
  607. return document.activeElement;
  608. } catch ( err ) { }
  609. }
  610. // Optimize for push.apply( _, NodeList )
  611. try {
  612. push.apply(
  613. ( arr = slice.call( preferredDoc.childNodes ) ),
  614. preferredDoc.childNodes
  615. );
  616. // Support: Android <=4.0
  617. // Detect silently failing push.apply
  618. // eslint-disable-next-line no-unused-expressions
  619. arr[ preferredDoc.childNodes.length ].nodeType;
  620. } catch ( e ) {
  621. push = {
  622. apply: function( target, els ) {
  623. pushNative.apply( target, slice.call( els ) );
  624. },
  625. call: function( target ) {
  626. pushNative.apply( target, slice.call( arguments, 1 ) );
  627. }
  628. };
  629. }
  630. function find( selector, context, results, seed ) {
  631. var m, i, elem, nid, match, groups, newSelector,
  632. newContext = context && context.ownerDocument,
  633. // nodeType defaults to 9, since context defaults to document
  634. nodeType = context ? context.nodeType : 9;
  635. results = results || [];
  636. // Return early from calls with invalid selector or context
  637. if ( typeof selector !== "string" || !selector ||
  638. nodeType !== 1 && nodeType !== 9 && nodeType !== 11 ) {
  639. return results;
  640. }
  641. // Try to shortcut find operations (as opposed to filters) in HTML documents
  642. if ( !seed ) {
  643. setDocument( context );
  644. context = context || document;
  645. if ( documentIsHTML ) {
  646. // If the selector is sufficiently simple, try using a "get*By*" DOM method
  647. // (excepting DocumentFragment context, where the methods don't exist)
  648. if ( nodeType !== 11 && ( match = rquickExpr.exec( selector ) ) ) {
  649. // ID selector
  650. if ( ( m = match[ 1 ] ) ) {
  651. // Document context
  652. if ( nodeType === 9 ) {
  653. if ( ( elem = context.getElementById( m ) ) ) {
  654. // Support: IE 9 only
  655. // getElementById can match elements by name instead of ID
  656. if ( elem.id === m ) {
  657. push.call( results, elem );
  658. return results;
  659. }
  660. } else {
  661. return results;
  662. }
  663. // Element context
  664. } else {
  665. // Support: IE 9 only
  666. // getElementById can match elements by name instead of ID
  667. if ( newContext && ( elem = newContext.getElementById( m ) ) &&
  668. find.contains( context, elem ) &&
  669. elem.id === m ) {
  670. push.call( results, elem );
  671. return results;
  672. }
  673. }
  674. // Type selector
  675. } else if ( match[ 2 ] ) {
  676. push.apply( results, context.getElementsByTagName( selector ) );
  677. return results;
  678. // Class selector
  679. } else if ( ( m = match[ 3 ] ) && context.getElementsByClassName ) {
  680. push.apply( results, context.getElementsByClassName( m ) );
  681. return results;
  682. }
  683. }
  684. // Take advantage of querySelectorAll
  685. if ( !nonnativeSelectorCache[ selector + " " ] &&
  686. ( !rbuggyQSA || !rbuggyQSA.test( selector ) ) ) {
  687. newSelector = selector;
  688. newContext = context;
  689. // qSA considers elements outside a scoping root when evaluating child or
  690. // descendant combinators, which is not what we want.
  691. // In such cases, we work around the behavior by prefixing every selector in the
  692. // list with an ID selector referencing the scope context.
  693. // The technique has to be used as well when a leading combinator is used
  694. // as such selectors are not recognized by querySelectorAll.
  695. // Thanks to Andrew Dupont for this technique.
  696. if ( nodeType === 1 &&
  697. ( rdescend.test( selector ) || rleadingCombinator.test( selector ) ) ) {
  698. // Expand context for sibling selectors
  699. newContext = rsibling.test( selector ) && testContext( context.parentNode ) ||
  700. context;
  701. // We can use :scope instead of the ID hack if the browser
  702. // supports it & if we're not changing the context.
  703. // Support: IE 11+, Edge 17 - 18+
  704. // IE/Edge sometimes throw a "Permission denied" error when
  705. // strict-comparing two documents; shallow comparisons work.
  706. // eslint-disable-next-line eqeqeq
  707. if ( newContext != context || !support.scope ) {
  708. // Capture the context ID, setting it first if necessary
  709. if ( ( nid = context.getAttribute( "id" ) ) ) {
  710. nid = jQuery.escapeSelector( nid );
  711. } else {
  712. context.setAttribute( "id", ( nid = expando ) );
  713. }
  714. }
  715. // Prefix every selector in the list
  716. groups = tokenize( selector );
  717. i = groups.length;
  718. while ( i-- ) {
  719. groups[ i ] = ( nid ? "#" + nid : ":scope" ) + " " +
  720. toSelector( groups[ i ] );
  721. }
  722. newSelector = groups.join( "," );
  723. }
  724. try {
  725. push.apply( results,
  726. newContext.querySelectorAll( newSelector )
  727. );
  728. return results;
  729. } catch ( qsaError ) {
  730. nonnativeSelectorCache( selector, true );
  731. } finally {
  732. if ( nid === expando ) {
  733. context.removeAttribute( "id" );
  734. }
  735. }
  736. }
  737. }
  738. }
  739. // All others
  740. return select( selector.replace( rtrimCSS, "$1" ), context, results, seed );
  741. }
  742. /**
  743. * Create key-value caches of limited size
  744. * @returns {function(string, object)} Returns the Object data after storing it on itself with
  745. * property name the (space-suffixed) string and (if the cache is larger than Expr.cacheLength)
  746. * deleting the oldest entry
  747. */
  748. function createCache() {
  749. var keys = [];
  750. function cache( key, value ) {
  751. // Use (key + " ") to avoid collision with native prototype properties
  752. // (see https://github.com/jquery/sizzle/issues/157)
  753. if ( keys.push( key + " " ) > Expr.cacheLength ) {
  754. // Only keep the most recent entries
  755. delete cache[ keys.shift() ];
  756. }
  757. return ( cache[ key + " " ] = value );
  758. }
  759. return cache;
  760. }
  761. /**
  762. * Mark a function for special use by jQuery selector module
  763. * @param {Function} fn The function to mark
  764. */
  765. function markFunction( fn ) {
  766. fn[ expando ] = true;
  767. return fn;
  768. }
  769. /**
  770. * Support testing using an element
  771. * @param {Function} fn Passed the created element and returns a boolean result
  772. */
  773. function assert( fn ) {
  774. var el = document.createElement( "fieldset" );
  775. try {
  776. return !!fn( el );
  777. } catch ( e ) {
  778. return false;
  779. } finally {
  780. // Remove from its parent by default
  781. if ( el.parentNode ) {
  782. el.parentNode.removeChild( el );
  783. }
  784. // release memory in IE
  785. el = null;
  786. }
  787. }
  788. /**
  789. * Returns a function to use in pseudos for input types
  790. * @param {String} type
  791. */
  792. function createInputPseudo( type ) {
  793. return function( elem ) {
  794. return nodeName( elem, "input" ) && elem.type === type;
  795. };
  796. }
  797. /**
  798. * Returns a function to use in pseudos for buttons
  799. * @param {String} type
  800. */
  801. function createButtonPseudo( type ) {
  802. return function( elem ) {
  803. return ( nodeName( elem, "input" ) || nodeName( elem, "button" ) ) &&
  804. elem.type === type;
  805. };
  806. }
  807. /**
  808. * Returns a function to use in pseudos for :enabled/:disabled
  809. * @param {Boolean} disabled true for :disabled; false for :enabled
  810. */
  811. function createDisabledPseudo( disabled ) {
  812. // Known :disabled false positives: fieldset[disabled] > legend:nth-of-type(n+2) :can-disable
  813. return function( elem ) {
  814. // Only certain elements can match :enabled or :disabled
  815. // https://html.spec.whatwg.org/multipage/scripting.html#selector-enabled
  816. // https://html.spec.whatwg.org/multipage/scripting.html#selector-disabled
  817. if ( "form" in elem ) {
  818. // Check for inherited disabledness on relevant non-disabled elements:
  819. // * listed form-associated elements in a disabled fieldset
  820. // https://html.spec.whatwg.org/multipage/forms.html#category-listed
  821. // https://html.spec.whatwg.org/multipage/forms.html#concept-fe-disabled
  822. // * option elements in a disabled optgroup
  823. // https://html.spec.whatwg.org/multipage/forms.html#concept-option-disabled
  824. // All such elements have a "form" property.
  825. if ( elem.parentNode && elem.disabled === false ) {
  826. // Option elements defer to a parent optgroup if present
  827. if ( "label" in elem ) {
  828. if ( "label" in elem.parentNode ) {
  829. return elem.parentNode.disabled === disabled;
  830. } else {
  831. return elem.disabled === disabled;
  832. }
  833. }
  834. // Support: IE 6 - 11+
  835. // Use the isDisabled shortcut property to check for disabled fieldset ancestors
  836. return elem.isDisabled === disabled ||
  837. // Where there is no isDisabled, check manually
  838. elem.isDisabled !== !disabled &&
  839. inDisabledFieldset( elem ) === disabled;
  840. }
  841. return elem.disabled === disabled;
  842. // Try to winnow out elements that can't be disabled before trusting the disabled property.
  843. // Some victims get caught in our net (label, legend, menu, track), but it shouldn't
  844. // even exist on them, let alone have a boolean value.
  845. } else if ( "label" in elem ) {
  846. return elem.disabled === disabled;
  847. }
  848. // Remaining elements are neither :enabled nor :disabled
  849. return false;
  850. };
  851. }
  852. /**
  853. * Returns a function to use in pseudos for positionals
  854. * @param {Function} fn
  855. */
  856. function createPositionalPseudo( fn ) {
  857. return markFunction( function( argument ) {
  858. argument = +argument;
  859. return markFunction( function( seed, matches ) {
  860. var j,
  861. matchIndexes = fn( [], seed.length, argument ),
  862. i = matchIndexes.length;
  863. // Match elements found at the specified indexes
  864. while ( i-- ) {
  865. if ( seed[ ( j = matchIndexes[ i ] ) ] ) {
  866. seed[ j ] = !( matches[ j ] = seed[ j ] );
  867. }
  868. }
  869. } );
  870. } );
  871. }
  872. /**
  873. * Checks a node for validity as a jQuery selector context
  874. * @param {Element|Object=} context
  875. * @returns {Element|Object|Boolean} The input node if acceptable, otherwise a falsy value
  876. */
  877. function testContext( context ) {
  878. return context && typeof context.getElementsByTagName !== "undefined" && context;
  879. }
  880. /**
  881. * Sets document-related variables once based on the current document
  882. * @param {Element|Object} [node] An element or document object to use to set the document
  883. * @returns {Object} Returns the current document
  884. */
  885. function setDocument( node ) {
  886. var subWindow,
  887. doc = node ? node.ownerDocument || node : preferredDoc;
  888. // Return early if doc is invalid or already selected
  889. // Support: IE 11+, Edge 17 - 18+
  890. // IE/Edge sometimes throw a "Permission denied" error when strict-comparing
  891. // two documents; shallow comparisons work.
  892. // eslint-disable-next-line eqeqeq
  893. if ( doc == document || doc.nodeType !== 9 || !doc.documentElement ) {
  894. return document;
  895. }
  896. // Update global variables
  897. document = doc;
  898. documentElement = document.documentElement;
  899. documentIsHTML = !jQuery.isXMLDoc( document );
  900. // Support: iOS 7 only, IE 9 - 11+
  901. // Older browsers didn't support unprefixed `matches`.
  902. matches = documentElement.matches ||
  903. documentElement.webkitMatchesSelector ||
  904. documentElement.msMatchesSelector;
  905. // Support: IE 9 - 11+, Edge 12 - 18+
  906. // Accessing iframe documents after unload throws "permission denied" errors
  907. // (see trac-13936).
  908. // Limit the fix to IE & Edge Legacy; despite Edge 15+ implementing `matches`,
  909. // all IE 9+ and Edge Legacy versions implement `msMatchesSelector` as well.
  910. if ( documentElement.msMatchesSelector &&
  911. // Support: IE 11+, Edge 17 - 18+
  912. // IE/Edge sometimes throw a "Permission denied" error when strict-comparing
  913. // two documents; shallow comparisons work.
  914. // eslint-disable-next-line eqeqeq
  915. preferredDoc != document &&
  916. ( subWindow = document.defaultView ) && subWindow.top !== subWindow ) {
  917. // Support: IE 9 - 11+, Edge 12 - 18+
  918. subWindow.addEventListener( "unload", unloadHandler );
  919. }
  920. // Support: IE <10
  921. // Check if getElementById returns elements by name
  922. // The broken getElementById methods don't pick up programmatically-set names,
  923. // so use a roundabout getElementsByName test
  924. support.getById = assert( function( el ) {
  925. documentElement.appendChild( el ).id = jQuery.expando;
  926. return !document.getElementsByName ||
  927. !document.getElementsByName( jQuery.expando ).length;
  928. } );
  929. // Support: IE 9 only
  930. // Check to see if it's possible to do matchesSelector
  931. // on a disconnected node.
  932. support.disconnectedMatch = assert( function( el ) {
  933. return matches.call( el, "*" );
  934. } );
  935. // Support: IE 9 - 11+, Edge 12 - 18+
  936. // IE/Edge don't support the :scope pseudo-class.
  937. support.scope = assert( function() {
  938. return document.querySelectorAll( ":scope" );
  939. } );
  940. // Support: Chrome 105 - 111 only, Safari 15.4 - 16.3 only
  941. // Make sure the `:has()` argument is parsed unforgivingly.
  942. // We include `*` in the test to detect buggy implementations that are
  943. // _selectively_ forgiving (specifically when the list includes at least
  944. // one valid selector).
  945. // Note that we treat complete lack of support for `:has()` as if it were
  946. // spec-compliant support, which is fine because use of `:has()` in such
  947. // environments will fail in the qSA path and fall back to jQuery traversal
  948. // anyway.
  949. support.cssHas = assert( function() {
  950. try {
  951. document.querySelector( ":has(*,:jqfake)" );
  952. return false;
  953. } catch ( e ) {
  954. return true;
  955. }
  956. } );
  957. // ID filter and find
  958. if ( support.getById ) {
  959. Expr.filter.ID = function( id ) {
  960. var attrId = id.replace( runescape, funescape );
  961. return function( elem ) {
  962. return elem.getAttribute( "id" ) === attrId;
  963. };
  964. };
  965. Expr.find.ID = function( id, context ) {
  966. if ( typeof context.getElementById !== "undefined" && documentIsHTML ) {
  967. var elem = context.getElementById( id );
  968. return elem ? [ elem ] : [];
  969. }
  970. };
  971. } else {
  972. Expr.filter.ID = function( id ) {
  973. var attrId = id.replace( runescape, funescape );
  974. return function( elem ) {
  975. var node = typeof elem.getAttributeNode !== "undefined" &&
  976. elem.getAttributeNode( "id" );
  977. return node && node.value === attrId;
  978. };
  979. };
  980. // Support: IE 6 - 7 only
  981. // getElementById is not reliable as a find shortcut
  982. Expr.find.ID = function( id, context ) {
  983. if ( typeof context.getElementById !== "undefined" && documentIsHTML ) {
  984. var node, i, elems,
  985. elem = context.getElementById( id );
  986. if ( elem ) {
  987. // Verify the id attribute
  988. node = elem.getAttributeNode( "id" );
  989. if ( node && node.value === id ) {
  990. return [ elem ];
  991. }
  992. // Fall back on getElementsByName
  993. elems = context.getElementsByName( id );
  994. i = 0;
  995. while ( ( elem = elems[ i++ ] ) ) {
  996. node = elem.getAttributeNode( "id" );
  997. if ( node && node.value === id ) {
  998. return [ elem ];
  999. }
  1000. }
  1001. }
  1002. return [];
  1003. }
  1004. };
  1005. }
  1006. // Tag
  1007. Expr.find.TAG = function( tag, context ) {
  1008. if ( typeof context.getElementsByTagName !== "undefined" ) {
  1009. return context.getElementsByTagName( tag );
  1010. // DocumentFragment nodes don't have gEBTN
  1011. } else {
  1012. return context.querySelectorAll( tag );
  1013. }
  1014. };
  1015. // Class
  1016. Expr.find.CLASS = function( className, context ) {
  1017. if ( typeof context.getElementsByClassName !== "undefined" && documentIsHTML ) {
  1018. return context.getElementsByClassName( className );
  1019. }
  1020. };
  1021. /* QSA/matchesSelector
  1022. ---------------------------------------------------------------------- */
  1023. // QSA and matchesSelector support
  1024. rbuggyQSA = [];
  1025. // Build QSA regex
  1026. // Regex strategy adopted from Diego Perini
  1027. assert( function( el ) {
  1028. var input;
  1029. documentElement.appendChild( el ).innerHTML =
  1030. "<a id='" + expando + "' href='' disabled='disabled'></a>" +
  1031. "<select id='" + expando + "-\r\\' disabled='disabled'>" +
  1032. "<option selected=''></option></select>";
  1033. // Support: iOS <=7 - 8 only
  1034. // Boolean attributes and "value" are not treated correctly in some XML documents
  1035. if ( !el.querySelectorAll( "[selected]" ).length ) {
  1036. rbuggyQSA.push( "\\[" + whitespace + "*(?:value|" + booleans + ")" );
  1037. }
  1038. // Support: iOS <=7 - 8 only
  1039. if ( !el.querySelectorAll( "[id~=" + expando + "-]" ).length ) {
  1040. rbuggyQSA.push( "~=" );
  1041. }
  1042. // Support: iOS 8 only
  1043. // https://bugs.webkit.org/show_bug.cgi?id=136851
  1044. // In-page `selector#id sibling-combinator selector` fails
  1045. if ( !el.querySelectorAll( "a#" + expando + "+*" ).length ) {
  1046. rbuggyQSA.push( ".#.+[+~]" );
  1047. }
  1048. // Support: Chrome <=105+, Firefox <=104+, Safari <=15.4+
  1049. // In some of the document kinds, these selectors wouldn't work natively.
  1050. // This is probably OK but for backwards compatibility we want to maintain
  1051. // handling them through jQuery traversal in jQuery 3.x.
  1052. if ( !el.querySelectorAll( ":checked" ).length ) {
  1053. rbuggyQSA.push( ":checked" );
  1054. }
  1055. // Support: Windows 8 Native Apps
  1056. // The type and name attributes are restricted during .innerHTML assignment
  1057. input = document.createElement( "input" );
  1058. input.setAttribute( "type", "hidden" );
  1059. el.appendChild( input ).setAttribute( "name", "D" );
  1060. // Support: IE 9 - 11+
  1061. // IE's :disabled selector does not pick up the children of disabled fieldsets
  1062. // Support: Chrome <=105+, Firefox <=104+, Safari <=15.4+
  1063. // In some of the document kinds, these selectors wouldn't work natively.
  1064. // This is probably OK but for backwards compatibility we want to maintain
  1065. // handling them through jQuery traversal in jQuery 3.x.
  1066. documentElement.appendChild( el ).disabled = true;
  1067. if ( el.querySelectorAll( ":disabled" ).length !== 2 ) {
  1068. rbuggyQSA.push( ":enabled", ":disabled" );
  1069. }
  1070. // Support: IE 11+, Edge 15 - 18+
  1071. // IE 11/Edge don't find elements on a `[name='']` query in some cases.
  1072. // Adding a temporary attribute to the document before the selection works
  1073. // around the issue.
  1074. // Interestingly, IE 10 & older don't seem to have the issue.
  1075. input = document.createElement( "input" );
  1076. input.setAttribute( "name", "" );
  1077. el.appendChild( input );
  1078. if ( !el.querySelectorAll( "[name='']" ).length ) {
  1079. rbuggyQSA.push( "\\[" + whitespace + "*name" + whitespace + "*=" +
  1080. whitespace + "*(?:''|\"\")" );
  1081. }
  1082. } );
  1083. if ( !support.cssHas ) {
  1084. // Support: Chrome 105 - 110+, Safari 15.4 - 16.3+
  1085. // Our regular `try-catch` mechanism fails to detect natively-unsupported
  1086. // pseudo-classes inside `:has()` (such as `:has(:contains("Foo"))`)
  1087. // in browsers that parse the `:has()` argument as a forgiving selector list.
  1088. // https://drafts.csswg.org/selectors/#relational now requires the argument
  1089. // to be parsed unforgivingly, but browsers have not yet fully adjusted.
  1090. rbuggyQSA.push( ":has" );
  1091. }
  1092. rbuggyQSA = rbuggyQSA.length && new RegExp( rbuggyQSA.join( "|" ) );
  1093. /* Sorting
  1094. ---------------------------------------------------------------------- */
  1095. // Document order sorting
  1096. sortOrder = function( a, b ) {
  1097. // Flag for duplicate removal
  1098. if ( a === b ) {
  1099. hasDuplicate = true;
  1100. return 0;
  1101. }
  1102. // Sort on method existence if only one input has compareDocumentPosition
  1103. var compare = !a.compareDocumentPosition - !b.compareDocumentPosition;
  1104. if ( compare ) {
  1105. return compare;
  1106. }
  1107. // Calculate position if both inputs belong to the same document
  1108. // Support: IE 11+, Edge 17 - 18+
  1109. // IE/Edge sometimes throw a "Permission denied" error when strict-comparing
  1110. // two documents; shallow comparisons work.
  1111. // eslint-disable-next-line eqeqeq
  1112. compare = ( a.ownerDocument || a ) == ( b.ownerDocument || b ) ?
  1113. a.compareDocumentPosition( b ) :
  1114. // Otherwise we know they are disconnected
  1115. 1;
  1116. // Disconnected nodes
  1117. if ( compare & 1 ||
  1118. ( !support.sortDetached && b.compareDocumentPosition( a ) === compare ) ) {
  1119. // Choose the first element that is related to our preferred document
  1120. // Support: IE 11+, Edge 17 - 18+
  1121. // IE/Edge sometimes throw a "Permission denied" error when strict-comparing
  1122. // two documents; shallow comparisons work.
  1123. // eslint-disable-next-line eqeqeq
  1124. if ( a === document || a.ownerDocument == preferredDoc &&
  1125. find.contains( preferredDoc, a ) ) {
  1126. return -1;
  1127. }
  1128. // Support: IE 11+, Edge 17 - 18+
  1129. // IE/Edge sometimes throw a "Permission denied" error when strict-comparing
  1130. // two documents; shallow comparisons work.
  1131. // eslint-disable-next-line eqeqeq
  1132. if ( b === document || b.ownerDocument == preferredDoc &&
  1133. find.contains( preferredDoc, b ) ) {
  1134. return 1;
  1135. }
  1136. // Maintain original order
  1137. return sortInput ?
  1138. ( indexOf.call( sortInput, a ) - indexOf.call( sortInput, b ) ) :
  1139. 0;
  1140. }
  1141. return compare & 4 ? -1 : 1;
  1142. };
  1143. return document;
  1144. }
  1145. find.matches = function( expr, elements ) {
  1146. return find( expr, null, null, elements );
  1147. };
  1148. find.matchesSelector = function( elem, expr ) {
  1149. setDocument( elem );
  1150. if ( documentIsHTML &&
  1151. !nonnativeSelectorCache[ expr + " " ] &&
  1152. ( !rbuggyQSA || !rbuggyQSA.test( expr ) ) ) {
  1153. try {
  1154. var ret = matches.call( elem, expr );
  1155. // IE 9's matchesSelector returns false on disconnected nodes
  1156. if ( ret || support.disconnectedMatch ||
  1157. // As well, disconnected nodes are said to be in a document
  1158. // fragment in IE 9
  1159. elem.document && elem.document.nodeType !== 11 ) {
  1160. return ret;
  1161. }
  1162. } catch ( e ) {
  1163. nonnativeSelectorCache( expr, true );
  1164. }
  1165. }
  1166. return find( expr, document, null, [ elem ] ).length > 0;
  1167. };
  1168. find.contains = function( context, elem ) {
  1169. // Set document vars if needed
  1170. // Support: IE 11+, Edge 17 - 18+
  1171. // IE/Edge sometimes throw a "Permission denied" error when strict-comparing
  1172. // two documents; shallow comparisons work.
  1173. // eslint-disable-next-line eqeqeq
  1174. if ( ( context.ownerDocument || context ) != document ) {
  1175. setDocument( context );
  1176. }
  1177. return jQuery.contains( context, elem );
  1178. };
  1179. find.attr = function( elem, name ) {
  1180. // Set document vars if needed
  1181. // Support: IE 11+, Edge 17 - 18+
  1182. // IE/Edge sometimes throw a "Permission denied" error when strict-comparing
  1183. // two documents; shallow comparisons work.
  1184. // eslint-disable-next-line eqeqeq
  1185. if ( ( elem.ownerDocument || elem ) != document ) {
  1186. setDocument( elem );
  1187. }
  1188. var fn = Expr.attrHandle[ name.toLowerCase() ],
  1189. // Don't get fooled by Object.prototype properties (see trac-13807)
  1190. val = fn && hasOwn.call( Expr.attrHandle, name.toLowerCase() ) ?
  1191. fn( elem, name, !documentIsHTML ) :
  1192. undefined;
  1193. if ( val !== undefined ) {
  1194. return val;
  1195. }
  1196. return elem.getAttribute( name );
  1197. };
  1198. find.error = function( msg ) {
  1199. throw new Error( "Syntax error, unrecognized expression: " + msg );
  1200. };
  1201. /**
  1202. * Document sorting and removing duplicates
  1203. * @param {ArrayLike} results
  1204. */
  1205. jQuery.uniqueSort = function( results ) {
  1206. var elem,
  1207. duplicates = [],
  1208. j = 0,
  1209. i = 0;
  1210. // Unless we *know* we can detect duplicates, assume their presence
  1211. //
  1212. // Support: Android <=4.0+
  1213. // Testing for detecting duplicates is unpredictable so instead assume we can't
  1214. // depend on duplicate detection in all browsers without a stable sort.
  1215. hasDuplicate = !support.sortStable;
  1216. sortInput = !support.sortStable && slice.call( results, 0 );
  1217. sort.call( results, sortOrder );
  1218. if ( hasDuplicate ) {
  1219. while ( ( elem = results[ i++ ] ) ) {
  1220. if ( elem === results[ i ] ) {
  1221. j = duplicates.push( i );
  1222. }
  1223. }
  1224. while ( j-- ) {
  1225. splice.call( results, duplicates[ j ], 1 );
  1226. }
  1227. }
  1228. // Clear input after sorting to release objects
  1229. // See https://github.com/jquery/sizzle/pull/225
  1230. sortInput = null;
  1231. return results;
  1232. };
  1233. jQuery.fn.uniqueSort = function() {
  1234. return this.pushStack( jQuery.uniqueSort( slice.apply( this ) ) );
  1235. };
  1236. Expr = jQuery.expr = {
  1237. // Can be adjusted by the user
  1238. cacheLength: 50,
  1239. createPseudo: markFunction,
  1240. match: matchExpr,
  1241. attrHandle: {},
  1242. find: {},
  1243. relative: {
  1244. ">": { dir: "parentNode", first: true },
  1245. " ": { dir: "parentNode" },
  1246. "+": { dir: "previousSibling", first: true },
  1247. "~": { dir: "previousSibling" }
  1248. },
  1249. preFilter: {
  1250. ATTR: function( match ) {
  1251. match[ 1 ] = match[ 1 ].replace( runescape, funescape );
  1252. // Move the given value to match[3] whether quoted or unquoted
  1253. match[ 3 ] = ( match[ 3 ] || match[ 4 ] || match[ 5 ] || "" )
  1254. .replace( runescape, funescape );
  1255. if ( match[ 2 ] === "~=" ) {
  1256. match[ 3 ] = " " + match[ 3 ] + " ";
  1257. }
  1258. return match.slice( 0, 4 );
  1259. },
  1260. CHILD: function( match ) {
  1261. /* matches from matchExpr["CHILD"]
  1262. 1 type (only|nth|...)
  1263. 2 what (child|of-type)
  1264. 3 argument (even|odd|\d*|\d*n([+-]\d+)?|...)
  1265. 4 xn-component of xn+y argument ([+-]?\d*n|)
  1266. 5 sign of xn-component
  1267. 6 x of xn-component
  1268. 7 sign of y-component
  1269. 8 y of y-component
  1270. */
  1271. match[ 1 ] = match[ 1 ].toLowerCase();
  1272. if ( match[ 1 ].slice( 0, 3 ) === "nth" ) {
  1273. // nth-* requires argument
  1274. if ( !match[ 3 ] ) {
  1275. find.error( match[ 0 ] );
  1276. }
  1277. // numeric x and y parameters for Expr.filter.CHILD
  1278. // remember that false/true cast respectively to 0/1
  1279. match[ 4 ] = +( match[ 4 ] ?
  1280. match[ 5 ] + ( match[ 6 ] || 1 ) :
  1281. 2 * ( match[ 3 ] === "even" || match[ 3 ] === "odd" )
  1282. );
  1283. match[ 5 ] = +( ( match[ 7 ] + match[ 8 ] ) || match[ 3 ] === "odd" );
  1284. // other types prohibit arguments
  1285. } else if ( match[ 3 ] ) {
  1286. find.error( match[ 0 ] );
  1287. }
  1288. return match;
  1289. },
  1290. PSEUDO: function( match ) {
  1291. var excess,
  1292. unquoted = !match[ 6 ] && match[ 2 ];
  1293. if ( matchExpr.CHILD.test( match[ 0 ] ) ) {
  1294. return null;
  1295. }
  1296. // Accept quoted arguments as-is
  1297. if ( match[ 3 ] ) {
  1298. match[ 2 ] = match[ 4 ] || match[ 5 ] || "";
  1299. // Strip excess characters from unquoted arguments
  1300. } else if ( unquoted && rpseudo.test( unquoted ) &&
  1301. // Get excess from tokenize (recursively)
  1302. ( excess = tokenize( unquoted, true ) ) &&
  1303. // advance to the next closing parenthesis
  1304. ( excess = unquoted.indexOf( ")", unquoted.length - excess ) - unquoted.length ) ) {
  1305. // excess is a negative index
  1306. match[ 0 ] = match[ 0 ].slice( 0, excess );
  1307. match[ 2 ] = unquoted.slice( 0, excess );
  1308. }
  1309. // Return only captures needed by the pseudo filter method (type and argument)
  1310. return match.slice( 0, 3 );
  1311. }
  1312. },
  1313. filter: {
  1314. TAG: function( nodeNameSelector ) {
  1315. var expectedNodeName = nodeNameSelector.replace( runescape, funescape ).toLowerCase();
  1316. return nodeNameSelector === "*" ?
  1317. function() {
  1318. return true;
  1319. } :
  1320. function( elem ) {
  1321. return nodeName( elem, expectedNodeName );
  1322. };
  1323. },
  1324. CLASS: function( className ) {
  1325. var pattern = classCache[ className + " " ];
  1326. return pattern ||
  1327. ( pattern = new RegExp( "(^|" + whitespace + ")" + className +
  1328. "(" + whitespace + "|$)" ) ) &&
  1329. classCache( className, function( elem ) {
  1330. return pattern.test(
  1331. typeof elem.className === "string" && elem.className ||
  1332. typeof elem.getAttribute !== "undefined" &&
  1333. elem.getAttribute( "class" ) ||
  1334. ""
  1335. );
  1336. } );
  1337. },
  1338. ATTR: function( name, operator, check ) {
  1339. return function( elem ) {
  1340. var result = find.attr( elem, name );
  1341. if ( result == null ) {
  1342. return operator === "!=";
  1343. }
  1344. if ( !operator ) {
  1345. return true;
  1346. }
  1347. result += "";
  1348. if ( operator === "=" ) {
  1349. return result === check;
  1350. }
  1351. if ( operator === "!=" ) {
  1352. return result !== check;
  1353. }
  1354. if ( operator === "^=" ) {
  1355. return check && result.indexOf( check ) === 0;
  1356. }
  1357. if ( operator === "*=" ) {
  1358. return check && result.indexOf( check ) > -1;
  1359. }
  1360. if ( operator === "$=" ) {
  1361. return check && result.slice( -check.length ) === check;
  1362. }
  1363. if ( operator === "~=" ) {
  1364. return ( " " + result.replace( rwhitespace, " " ) + " " )
  1365. .indexOf( check ) > -1;
  1366. }
  1367. if ( operator === "|=" ) {
  1368. return result === check || result.slice( 0, check.length + 1 ) === check + "-";
  1369. }
  1370. return false;
  1371. };
  1372. },
  1373. CHILD: function( type, what, _argument, first, last ) {
  1374. var simple = type.slice( 0, 3 ) !== "nth",
  1375. forward = type.slice( -4 ) !== "last",
  1376. ofType = what === "of-type";
  1377. return first === 1 && last === 0 ?
  1378. // Shortcut for :nth-*(n)
  1379. function( elem ) {
  1380. return !!elem.parentNode;
  1381. } :
  1382. function( elem, _context, xml ) {
  1383. var cache, outerCache, node, nodeIndex, start,
  1384. dir = simple !== forward ? "nextSibling" : "previousSibling",
  1385. parent = elem.parentNode,
  1386. name = ofType && elem.nodeName.toLowerCase(),
  1387. useCache = !xml && !ofType,
  1388. diff = false;
  1389. if ( parent ) {
  1390. // :(first|last|only)-(child|of-type)
  1391. if ( simple ) {
  1392. while ( dir ) {
  1393. node = elem;
  1394. while ( ( node = node[ dir ] ) ) {
  1395. if ( ofType ?
  1396. nodeName( node, name ) :
  1397. node.nodeType === 1 ) {
  1398. return false;
  1399. }
  1400. }
  1401. // Reverse direction for :only-* (if we haven't yet done so)
  1402. start = dir = type === "only" && !start && "nextSibling";
  1403. }
  1404. return true;
  1405. }
  1406. start = [ forward ? parent.firstChild : parent.lastChild ];
  1407. // non-xml :nth-child(...) stores cache data on `parent`
  1408. if ( forward && useCache ) {
  1409. // Seek `elem` from a previously-cached index
  1410. outerCache = parent[ expando ] || ( parent[ expando ] = {} );
  1411. cache = outerCache[ type ] || [];
  1412. nodeIndex = cache[ 0 ] === dirruns && cache[ 1 ];
  1413. diff = nodeIndex && cache[ 2 ];
  1414. node = nodeIndex && parent.childNodes[ nodeIndex ];
  1415. while ( ( node = ++nodeIndex && node && node[ dir ] ||
  1416. // Fallback to seeking `elem` from the start
  1417. ( diff = nodeIndex = 0 ) || start.pop() ) ) {
  1418. // When found, cache indexes on `parent` and break
  1419. if ( node.nodeType === 1 && ++diff && node === elem ) {
  1420. outerCache[ type ] = [ dirruns, nodeIndex, diff ];
  1421. break;
  1422. }
  1423. }
  1424. } else {
  1425. // Use previously-cached element index if available
  1426. if ( useCache ) {
  1427. outerCache = elem[ expando ] || ( elem[ expando ] = {} );
  1428. cache = outerCache[ type ] || [];
  1429. nodeIndex = cache[ 0 ] === dirruns && cache[ 1 ];
  1430. diff = nodeIndex;
  1431. }
  1432. // xml :nth-child(...)
  1433. // or :nth-last-child(...) or :nth(-last)?-of-type(...)
  1434. if ( diff === false ) {
  1435. // Use the same loop as above to seek `elem` from the start
  1436. while ( ( node = ++nodeIndex && node && node[ dir ] ||
  1437. ( diff = nodeIndex = 0 ) || start.pop() ) ) {
  1438. if ( ( ofType ?
  1439. nodeName( node, name ) :
  1440. node.nodeType === 1 ) &&
  1441. ++diff ) {
  1442. // Cache the index of each encountered element
  1443. if ( useCache ) {
  1444. outerCache = node[ expando ] ||
  1445. ( node[ expando ] = {} );
  1446. outerCache[ type ] = [ dirruns, diff ];
  1447. }
  1448. if ( node === elem ) {
  1449. break;
  1450. }
  1451. }
  1452. }
  1453. }
  1454. }
  1455. // Incorporate the offset, then check against cycle size
  1456. diff -= last;
  1457. return diff === first || ( diff % first === 0 && diff / first >= 0 );
  1458. }
  1459. };
  1460. },
  1461. PSEUDO: function( pseudo, argument ) {
  1462. // pseudo-class names are case-insensitive
  1463. // https://www.w3.org/TR/selectors/#pseudo-classes
  1464. // Prioritize by case sensitivity in case custom pseudos are added with uppercase letters
  1465. // Remember that setFilters inherits from pseudos
  1466. var args,
  1467. fn = Expr.pseudos[ pseudo ] || Expr.setFilters[ pseudo.toLowerCase() ] ||
  1468. find.error( "unsupported pseudo: " + pseudo );
  1469. // The user may use createPseudo to indicate that
  1470. // arguments are needed to create the filter function
  1471. // just as jQuery does
  1472. if ( fn[ expando ] ) {
  1473. return fn( argument );
  1474. }
  1475. // But maintain support for old signatures
  1476. if ( fn.length > 1 ) {
  1477. args = [ pseudo, pseudo, "", argument ];
  1478. return Expr.setFilters.hasOwnProperty( pseudo.toLowerCase() ) ?
  1479. markFunction( function( seed, matches ) {
  1480. var idx,
  1481. matched = fn( seed, argument ),
  1482. i = matched.length;
  1483. while ( i-- ) {
  1484. idx = indexOf.call( seed, matched[ i ] );
  1485. seed[ idx ] = !( matches[ idx ] = matched[ i ] );
  1486. }
  1487. } ) :
  1488. function( elem ) {
  1489. return fn( elem, 0, args );
  1490. };
  1491. }
  1492. return fn;
  1493. }
  1494. },
  1495. pseudos: {
  1496. // Potentially complex pseudos
  1497. not: markFunction( function( selector ) {
  1498. // Trim the selector passed to compile
  1499. // to avoid treating leading and trailing
  1500. // spaces as combinators
  1501. var input = [],
  1502. results = [],
  1503. matcher = compile( selector.replace( rtrimCSS, "$1" ) );
  1504. return matcher[ expando ] ?
  1505. markFunction( function( seed, matches, _context, xml ) {
  1506. var elem,
  1507. unmatched = matcher( seed, null, xml, [] ),
  1508. i = seed.length;
  1509. // Match elements unmatched by `matcher`
  1510. while ( i-- ) {
  1511. if ( ( elem = unmatched[ i ] ) ) {
  1512. seed[ i ] = !( matches[ i ] = elem );
  1513. }
  1514. }
  1515. } ) :
  1516. function( elem, _context, xml ) {
  1517. input[ 0 ] = elem;
  1518. matcher( input, null, xml, results );
  1519. // Don't keep the element
  1520. // (see https://github.com/jquery/sizzle/issues/299)
  1521. input[ 0 ] = null;
  1522. return !results.pop();
  1523. };
  1524. } ),
  1525. has: markFunction( function( selector ) {
  1526. return function( elem ) {
  1527. return find( selector, elem ).length > 0;
  1528. };
  1529. } ),
  1530. contains: markFunction( function( text ) {
  1531. text = text.replace( runescape, funescape );
  1532. return function( elem ) {
  1533. return ( elem.textContent || jQuery.text( elem ) ).indexOf( text ) > -1;
  1534. };
  1535. } ),
  1536. // "Whether an element is represented by a :lang() selector
  1537. // is based solely on the element's language value
  1538. // being equal to the identifier C,
  1539. // or beginning with the identifier C immediately followed by "-".
  1540. // The matching of C against the element's language value is performed case-insensitively.
  1541. // The identifier C does not have to be a valid language name."
  1542. // https://www.w3.org/TR/selectors/#lang-pseudo
  1543. lang: markFunction( function( lang ) {
  1544. // lang value must be a valid identifier
  1545. if ( !ridentifier.test( lang || "" ) ) {
  1546. find.error( "unsupported lang: " + lang );
  1547. }
  1548. lang = lang.replace( runescape, funescape ).toLowerCase();
  1549. return function( elem ) {
  1550. var elemLang;
  1551. do {
  1552. if ( ( elemLang = documentIsHTML ?
  1553. elem.lang :
  1554. elem.getAttribute( "xml:lang" ) || elem.getAttribute( "lang" ) ) ) {
  1555. elemLang = elemLang.toLowerCase();
  1556. return elemLang === lang || elemLang.indexOf( lang + "-" ) === 0;
  1557. }
  1558. } while ( ( elem = elem.parentNode ) && elem.nodeType === 1 );
  1559. return false;
  1560. };
  1561. } ),
  1562. // Miscellaneous
  1563. target: function( elem ) {
  1564. var hash = window.location && window.location.hash;
  1565. return hash && hash.slice( 1 ) === elem.id;
  1566. },
  1567. root: function( elem ) {
  1568. return elem === documentElement;
  1569. },
  1570. focus: function( elem ) {
  1571. return elem === safeActiveElement() &&
  1572. document.hasFocus() &&
  1573. !!( elem.type || elem.href || ~elem.tabIndex );
  1574. },
  1575. // Boolean properties
  1576. enabled: createDisabledPseudo( false ),
  1577. disabled: createDisabledPseudo( true ),
  1578. checked: function( elem ) {
  1579. // In CSS3, :checked should return both checked and selected elements
  1580. // https://www.w3.org/TR/2011/REC-css3-selectors-20110929/#checked
  1581. return ( nodeName( elem, "input" ) && !!elem.checked ) ||
  1582. ( nodeName( elem, "option" ) && !!elem.selected );
  1583. },
  1584. selected: function( elem ) {
  1585. // Support: IE <=11+
  1586. // Accessing the selectedIndex property
  1587. // forces the browser to treat the default option as
  1588. // selected when in an optgroup.
  1589. if ( elem.parentNode ) {
  1590. // eslint-disable-next-line no-unused-expressions
  1591. elem.parentNode.selectedIndex;
  1592. }
  1593. return elem.selected === true;
  1594. },
  1595. // Contents
  1596. empty: function( elem ) {
  1597. // https://www.w3.org/TR/selectors/#empty-pseudo
  1598. // :empty is negated by element (1) or content nodes (text: 3; cdata: 4; entity ref: 5),
  1599. // but not by others (comment: 8; processing instruction: 7; etc.)
  1600. // nodeType < 6 works because attributes (2) do not appear as children
  1601. for ( elem = elem.firstChild; elem; elem = elem.nextSibling ) {
  1602. if ( elem.nodeType < 6 ) {
  1603. return false;
  1604. }
  1605. }
  1606. return true;
  1607. },
  1608. parent: function( elem ) {
  1609. return !Expr.pseudos.empty( elem );
  1610. },
  1611. // Element/input types
  1612. header: function( elem ) {
  1613. return rheader.test( elem.nodeName );
  1614. },
  1615. input: function( elem ) {
  1616. return rinputs.test( elem.nodeName );
  1617. },
  1618. button: function( elem ) {
  1619. return nodeName( elem, "input" ) && elem.type === "button" ||
  1620. nodeName( elem, "button" );
  1621. },
  1622. text: function( elem ) {
  1623. var attr;
  1624. return nodeName( elem, "input" ) && elem.type === "text" &&
  1625. // Support: IE <10 only
  1626. // New HTML5 attribute values (e.g., "search") appear
  1627. // with elem.type === "text"
  1628. ( ( attr = elem.getAttribute( "type" ) ) == null ||
  1629. attr.toLowerCase() === "text" );
  1630. },
  1631. // Position-in-collection
  1632. first: createPositionalPseudo( function() {
  1633. return [ 0 ];
  1634. } ),
  1635. last: createPositionalPseudo( function( _matchIndexes, length ) {
  1636. return [ length - 1 ];
  1637. } ),
  1638. eq: createPositionalPseudo( function( _matchIndexes, length, argument ) {
  1639. return [ argument < 0 ? argument + length : argument ];
  1640. } ),
  1641. even: createPositionalPseudo( function( matchIndexes, length ) {
  1642. var i = 0;
  1643. for ( ; i < length; i += 2 ) {
  1644. matchIndexes.push( i );
  1645. }
  1646. return matchIndexes;
  1647. } ),
  1648. odd: createPositionalPseudo( function( matchIndexes, length ) {
  1649. var i = 1;
  1650. for ( ; i < length; i += 2 ) {
  1651. matchIndexes.push( i );
  1652. }
  1653. return matchIndexes;
  1654. } ),
  1655. lt: createPositionalPseudo( function( matchIndexes, length, argument ) {
  1656. var i;
  1657. if ( argument < 0 ) {
  1658. i = argument + length;
  1659. } else if ( argument > length ) {
  1660. i = length;
  1661. } else {
  1662. i = argument;
  1663. }
  1664. for ( ; --i >= 0; ) {
  1665. matchIndexes.push( i );
  1666. }
  1667. return matchIndexes;
  1668. } ),
  1669. gt: createPositionalPseudo( function( matchIndexes, length, argument ) {
  1670. var i = argument < 0 ? argument + length : argument;
  1671. for ( ; ++i < length; ) {
  1672. matchIndexes.push( i );
  1673. }
  1674. return matchIndexes;
  1675. } )
  1676. }
  1677. };
  1678. Expr.pseudos.nth = Expr.pseudos.eq;
  1679. // Add button/input type pseudos
  1680. for ( i in { radio: true, checkbox: true, file: true, password: true, image: true } ) {
  1681. Expr.pseudos[ i ] = createInputPseudo( i );
  1682. }
  1683. for ( i in { submit: true, reset: true } ) {
  1684. Expr.pseudos[ i ] = createButtonPseudo( i );
  1685. }
  1686. // Easy API for creating new setFilters
  1687. function setFilters() {}
  1688. setFilters.prototype = Expr.filters = Expr.pseudos;
  1689. Expr.setFilters = new setFilters();
  1690. function tokenize( selector, parseOnly ) {
  1691. var matched, match, tokens, type,
  1692. soFar, groups, preFilters,
  1693. cached = tokenCache[ selector + " " ];
  1694. if ( cached ) {
  1695. return parseOnly ? 0 : cached.slice( 0 );
  1696. }
  1697. soFar = selector;
  1698. groups = [];
  1699. preFilters = Expr.preFilter;
  1700. while ( soFar ) {
  1701. // Comma and first run
  1702. if ( !matched || ( match = rcomma.exec( soFar ) ) ) {
  1703. if ( match ) {
  1704. // Don't consume trailing commas as valid
  1705. soFar = soFar.slice( match[ 0 ].length ) || soFar;
  1706. }
  1707. groups.push( ( tokens = [] ) );
  1708. }
  1709. matched = false;
  1710. // Combinators
  1711. if ( ( match = rleadingCombinator.exec( soFar ) ) ) {
  1712. matched = match.shift();
  1713. tokens.push( {
  1714. value: matched,
  1715. // Cast descendant combinators to space
  1716. type: match[ 0 ].replace( rtrimCSS, " " )
  1717. } );
  1718. soFar = soFar.slice( matched.length );
  1719. }
  1720. // Filters
  1721. for ( type in Expr.filter ) {
  1722. if ( ( match = matchExpr[ type ].exec( soFar ) ) && ( !preFilters[ type ] ||
  1723. ( match = preFilters[ type ]( match ) ) ) ) {
  1724. matched = match.shift();
  1725. tokens.push( {
  1726. value: matched,
  1727. type: type,
  1728. matches: match
  1729. } );
  1730. soFar = soFar.slice( matched.length );
  1731. }
  1732. }
  1733. if ( !matched ) {
  1734. break;
  1735. }
  1736. }
  1737. // Return the length of the invalid excess
  1738. // if we're just parsing
  1739. // Otherwise, throw an error or return tokens
  1740. if ( parseOnly ) {
  1741. return soFar.length;
  1742. }
  1743. return soFar ?
  1744. find.error( selector ) :
  1745. // Cache the tokens
  1746. tokenCache( selector, groups ).slice( 0 );
  1747. }
  1748. function toSelector( tokens ) {
  1749. var i = 0,
  1750. len = tokens.length,
  1751. selector = "";
  1752. for ( ; i < len; i++ ) {
  1753. selector += tokens[ i ].value;
  1754. }
  1755. return selector;
  1756. }
  1757. function addCombinator( matcher, combinator, base ) {
  1758. var dir = combinator.dir,
  1759. skip = combinator.next,
  1760. key = skip || dir,
  1761. checkNonElements = base && key === "parentNode",
  1762. doneName = done++;
  1763. return combinator.first ?
  1764. // Check against closest ancestor/preceding element
  1765. function( elem, context, xml ) {
  1766. while ( ( elem = elem[ dir ] ) ) {
  1767. if ( elem.nodeType === 1 || checkNonElements ) {
  1768. return matcher( elem, context, xml );
  1769. }
  1770. }
  1771. return false;
  1772. } :
  1773. // Check against all ancestor/preceding elements
  1774. function( elem, context, xml ) {
  1775. var oldCache, outerCache,
  1776. newCache = [ dirruns, doneName ];
  1777. // We can't set arbitrary data on XML nodes, so they don't benefit from combinator caching
  1778. if ( xml ) {
  1779. while ( ( elem = elem[ dir ] ) ) {
  1780. if ( elem.nodeType === 1 || checkNonElements ) {
  1781. if ( matcher( elem, context, xml ) ) {
  1782. return true;
  1783. }
  1784. }
  1785. }
  1786. } else {
  1787. while ( ( elem = elem[ dir ] ) ) {
  1788. if ( elem.nodeType === 1 || checkNonElements ) {
  1789. outerCache = elem[ expando ] || ( elem[ expando ] = {} );
  1790. if ( skip && nodeName( elem, skip ) ) {
  1791. elem = elem[ dir ] || elem;
  1792. } else if ( ( oldCache = outerCache[ key ] ) &&
  1793. oldCache[ 0 ] === dirruns && oldCache[ 1 ] === doneName ) {
  1794. // Assign to newCache so results back-propagate to previous elements
  1795. return ( newCache[ 2 ] = oldCache[ 2 ] );
  1796. } else {
  1797. // Reuse newcache so results back-propagate to previous elements
  1798. outerCache[ key ] = newCache;
  1799. // A match means we're done; a fail means we have to keep checking
  1800. if ( ( newCache[ 2 ] = matcher( elem, context, xml ) ) ) {
  1801. return true;
  1802. }
  1803. }
  1804. }
  1805. }
  1806. }
  1807. return false;
  1808. };
  1809. }
  1810. function elementMatcher( matchers ) {
  1811. return matchers.length > 1 ?
  1812. function( elem, context, xml ) {
  1813. var i = matchers.length;
  1814. while ( i-- ) {
  1815. if ( !matchers[ i ]( elem, context, xml ) ) {
  1816. return false;
  1817. }
  1818. }
  1819. return true;
  1820. } :
  1821. matchers[ 0 ];
  1822. }
  1823. function multipleContexts( selector, contexts, results ) {
  1824. var i = 0,
  1825. len = contexts.length;
  1826. for ( ; i < len; i++ ) {
  1827. find( selector, contexts[ i ], results );
  1828. }
  1829. return results;
  1830. }
  1831. function condense( unmatched, map, filter, context, xml ) {
  1832. var elem,
  1833. newUnmatched = [],
  1834. i = 0,
  1835. len = unmatched.length,
  1836. mapped = map != null;
  1837. for ( ; i < len; i++ ) {
  1838. if ( ( elem = unmatched[ i ] ) ) {
  1839. if ( !filter || filter( elem, context, xml ) ) {
  1840. newUnmatched.push( elem );
  1841. if ( mapped ) {
  1842. map.push( i );
  1843. }
  1844. }
  1845. }
  1846. }
  1847. return newUnmatched;
  1848. }
  1849. function setMatcher( preFilter, selector, matcher, postFilter, postFinder, postSelector ) {
  1850. if ( postFilter && !postFilter[ expando ] ) {
  1851. postFilter = setMatcher( postFilter );
  1852. }
  1853. if ( postFinder && !postFinder[ expando ] ) {
  1854. postFinder = setMatcher( postFinder, postSelector );
  1855. }
  1856. return markFunction( function( seed, results, context, xml ) {
  1857. var temp, i, elem, matcherOut,
  1858. preMap = [],
  1859. postMap = [],
  1860. preexisting = results.length,
  1861. // Get initial elements from seed or context
  1862. elems = seed ||
  1863. multipleContexts( selector || "*",
  1864. context.nodeType ? [ context ] : context, [] ),
  1865. // Prefilter to get matcher input, preserving a map for seed-results synchronization
  1866. matcherIn = preFilter && ( seed || !selector ) ?
  1867. condense( elems, preMap, preFilter, context, xml ) :
  1868. elems;
  1869. if ( matcher ) {
  1870. // If we have a postFinder, or filtered seed, or non-seed postFilter
  1871. // or preexisting results,
  1872. matcherOut = postFinder || ( seed ? preFilter : preexisting || postFilter ) ?
  1873. // ...intermediate processing is necessary
  1874. [] :
  1875. // ...otherwise use results directly
  1876. results;
  1877. // Find primary matches
  1878. matcher( matcherIn, matcherOut, context, xml );
  1879. } else {
  1880. matcherOut = matcherIn;
  1881. }
  1882. // Apply postFilter
  1883. if ( postFilter ) {
  1884. temp = condense( matcherOut, postMap );
  1885. postFilter( temp, [], context, xml );
  1886. // Un-match failing elements by moving them back to matcherIn
  1887. i = temp.length;
  1888. while ( i-- ) {
  1889. if ( ( elem = temp[ i ] ) ) {
  1890. matcherOut[ postMap[ i ] ] = !( matcherIn[ postMap[ i ] ] = elem );
  1891. }
  1892. }
  1893. }
  1894. if ( seed ) {
  1895. if ( postFinder || preFilter ) {
  1896. if ( postFinder ) {
  1897. // Get the final matcherOut by condensing this intermediate into postFinder contexts
  1898. temp = [];
  1899. i = matcherOut.length;
  1900. while ( i-- ) {
  1901. if ( ( elem = matcherOut[ i ] ) ) {
  1902. // Restore matcherIn since elem is not yet a final match
  1903. temp.push( ( matcherIn[ i ] = elem ) );
  1904. }
  1905. }
  1906. postFinder( null, ( matcherOut = [] ), temp, xml );
  1907. }
  1908. // Move matched elements from seed to results to keep them synchronized
  1909. i = matcherOut.length;
  1910. while ( i-- ) {
  1911. if ( ( elem = matcherOut[ i ] ) &&
  1912. ( temp = postFinder ? indexOf.call( seed, elem ) : preMap[ i ] ) > -1 ) {
  1913. seed[ temp ] = !( results[ temp ] = elem );
  1914. }
  1915. }
  1916. }
  1917. // Add elements to results, through postFinder if defined
  1918. } else {
  1919. matcherOut = condense(
  1920. matcherOut === results ?
  1921. matcherOut.splice( preexisting, matcherOut.length ) :
  1922. matcherOut
  1923. );
  1924. if ( postFinder ) {
  1925. postFinder( null, results, matcherOut, xml );
  1926. } else {
  1927. push.apply( results, matcherOut );
  1928. }
  1929. }
  1930. } );
  1931. }
  1932. function matcherFromTokens( tokens ) {
  1933. var checkContext, matcher, j,
  1934. len = tokens.length,
  1935. leadingRelative = Expr.relative[ tokens[ 0 ].type ],
  1936. implicitRelative = leadingRelative || Expr.relative[ " " ],
  1937. i = leadingRelative ? 1 : 0,
  1938. // The foundational matcher ensures that elements are reachable from top-level context(s)
  1939. matchContext = addCombinator( function( elem ) {
  1940. return elem === checkContext;
  1941. }, implicitRelative, true ),
  1942. matchAnyContext = addCombinator( function( elem ) {
  1943. return indexOf.call( checkContext, elem ) > -1;
  1944. }, implicitRelative, true ),
  1945. matchers = [ function( elem, context, xml ) {
  1946. // Support: IE 11+, Edge 17 - 18+
  1947. // IE/Edge sometimes throw a "Permission denied" error when strict-comparing
  1948. // two documents; shallow comparisons work.
  1949. // eslint-disable-next-line eqeqeq
  1950. var ret = ( !leadingRelative && ( xml || context != outermostContext ) ) || (
  1951. ( checkContext = context ).nodeType ?
  1952. matchContext( elem, context, xml ) :
  1953. matchAnyContext( elem, context, xml ) );
  1954. // Avoid hanging onto element
  1955. // (see https://github.com/jquery/sizzle/issues/299)
  1956. checkContext = null;
  1957. return ret;
  1958. } ];
  1959. for ( ; i < len; i++ ) {
  1960. if ( ( matcher = Expr.relative[ tokens[ i ].type ] ) ) {
  1961. matchers = [ addCombinator( elementMatcher( matchers ), matcher ) ];
  1962. } else {
  1963. matcher = Expr.filter[ tokens[ i ].type ].apply( null, tokens[ i ].matches );
  1964. // Return special upon seeing a positional matcher
  1965. if ( matcher[ expando ] ) {
  1966. // Find the next relative operator (if any) for proper handling
  1967. j = ++i;
  1968. for ( ; j < len; j++ ) {
  1969. if ( Expr.relative[ tokens[ j ].type ] ) {
  1970. break;
  1971. }
  1972. }
  1973. return setMatcher(
  1974. i > 1 && elementMatcher( matchers ),
  1975. i > 1 && toSelector(
  1976. // If the preceding token was a descendant combinator, insert an implicit any-element `*`
  1977. tokens.slice( 0, i - 1 )
  1978. .concat( { value: tokens[ i - 2 ].type === " " ? "*" : "" } )
  1979. ).replace( rtrimCSS, "$1" ),
  1980. matcher,
  1981. i < j && matcherFromTokens( tokens.slice( i, j ) ),
  1982. j < len && matcherFromTokens( ( tokens = tokens.slice( j ) ) ),
  1983. j < len && toSelector( tokens )
  1984. );
  1985. }
  1986. matchers.push( matcher );
  1987. }
  1988. }
  1989. return elementMatcher( matchers );
  1990. }
  1991. function matcherFromGroupMatchers( elementMatchers, setMatchers ) {
  1992. var bySet = setMatchers.length > 0,
  1993. byElement = elementMatchers.length > 0,
  1994. superMatcher = function( seed, context, xml, results, outermost ) {
  1995. var elem, j, matcher,
  1996. matchedCount = 0,
  1997. i = "0",
  1998. unmatched = seed && [],
  1999. setMatched = [],
  2000. contextBackup = outermostContext,
  2001. // We must always have either seed elements or outermost context
  2002. elems = seed || byElement && Expr.find.TAG( "*", outermost ),
  2003. // Use integer dirruns iff this is the outermost matcher
  2004. dirrunsUnique = ( dirruns += contextBackup == null ? 1 : Math.random() || 0.1 ),
  2005. len = elems.length;
  2006. if ( outermost ) {
  2007. // Support: IE 11+, Edge 17 - 18+
  2008. // IE/Edge sometimes throw a "Permission denied" error when strict-comparing
  2009. // two documents; shallow comparisons work.
  2010. // eslint-disable-next-line eqeqeq
  2011. outermostContext = context == document || context || outermost;
  2012. }
  2013. // Add elements passing elementMatchers directly to results
  2014. // Support: iOS <=7 - 9 only
  2015. // Tolerate NodeList properties (IE: "length"; Safari: <number>) matching
  2016. // elements by id. (see trac-14142)
  2017. for ( ; i !== len && ( elem = elems[ i ] ) != null; i++ ) {
  2018. if ( byElement && elem ) {
  2019. j = 0;
  2020. // Support: IE 11+, Edge 17 - 18+
  2021. // IE/Edge sometimes throw a "Permission denied" error when strict-comparing
  2022. // two documents; shallow comparisons work.
  2023. // eslint-disable-next-line eqeqeq
  2024. if ( !context && elem.ownerDocument != document ) {
  2025. setDocument( elem );
  2026. xml = !documentIsHTML;
  2027. }
  2028. while ( ( matcher = elementMatchers[ j++ ] ) ) {
  2029. if ( matcher( elem, context || document, xml ) ) {
  2030. push.call( results, elem );
  2031. break;
  2032. }
  2033. }
  2034. if ( outermost ) {
  2035. dirruns = dirrunsUnique;
  2036. }
  2037. }
  2038. // Track unmatched elements for set filters
  2039. if ( bySet ) {
  2040. // They will have gone through all possible matchers
  2041. if ( ( elem = !matcher && elem ) ) {
  2042. matchedCount--;
  2043. }
  2044. // Lengthen the array for every element, matched or not
  2045. if ( seed ) {
  2046. unmatched.push( elem );
  2047. }
  2048. }
  2049. }
  2050. // `i` is now the count of elements visited above, and adding it to `matchedCount`
  2051. // makes the latter nonnegative.
  2052. matchedCount += i;
  2053. // Apply set filters to unmatched elements
  2054. // NOTE: This can be skipped if there are no unmatched elements (i.e., `matchedCount`
  2055. // equals `i`), unless we didn't visit _any_ elements in the above loop because we have
  2056. // no element matchers and no seed.
  2057. // Incrementing an initially-string "0" `i` allows `i` to remain a string only in that
  2058. // case, which will result in a "00" `matchedCount` that differs from `i` but is also
  2059. // numerically zero.
  2060. if ( bySet && i !== matchedCount ) {
  2061. j = 0;
  2062. while ( ( matcher = setMatchers[ j++ ] ) ) {
  2063. matcher( unmatched, setMatched, context, xml );
  2064. }
  2065. if ( seed ) {
  2066. // Reintegrate element matches to eliminate the need for sorting
  2067. if ( matchedCount > 0 ) {
  2068. while ( i-- ) {
  2069. if ( !( unmatched[ i ] || setMatched[ i ] ) ) {
  2070. setMatched[ i ] = pop.call( results );
  2071. }
  2072. }
  2073. }
  2074. // Discard index placeholder values to get only actual matches
  2075. setMatched = condense( setMatched );
  2076. }
  2077. // Add matches to results
  2078. push.apply( results, setMatched );
  2079. // Seedless set matches succeeding multiple successful matchers stipulate sorting
  2080. if ( outermost && !seed && setMatched.length > 0 &&
  2081. ( matchedCount + setMatchers.length ) > 1 ) {
  2082. jQuery.uniqueSort( results );
  2083. }
  2084. }
  2085. // Override manipulation of globals by nested matchers
  2086. if ( outermost ) {
  2087. dirruns = dirrunsUnique;
  2088. outermostContext = contextBackup;
  2089. }
  2090. return unmatched;
  2091. };
  2092. return bySet ?
  2093. markFunction( superMatcher ) :
  2094. superMatcher;
  2095. }
  2096. function compile( selector, match /* Internal Use Only */ ) {
  2097. var i,
  2098. setMatchers = [],
  2099. elementMatchers = [],
  2100. cached = compilerCache[ selector + " " ];
  2101. if ( !cached ) {
  2102. // Generate a function of recursive functions that can be used to check each element
  2103. if ( !match ) {
  2104. match = tokenize( selector );
  2105. }
  2106. i = match.length;
  2107. while ( i-- ) {
  2108. cached = matcherFromTokens( match[ i ] );
  2109. if ( cached[ expando ] ) {
  2110. setMatchers.push( cached );
  2111. } else {
  2112. elementMatchers.push( cached );
  2113. }
  2114. }
  2115. // Cache the compiled function
  2116. cached = compilerCache( selector,
  2117. matcherFromGroupMatchers( elementMatchers, setMatchers ) );
  2118. // Save selector and tokenization
  2119. cached.selector = selector;
  2120. }
  2121. return cached;
  2122. }
  2123. /**
  2124. * A low-level selection function that works with jQuery's compiled
  2125. * selector functions
  2126. * @param {String|Function} selector A selector or a pre-compiled
  2127. * selector function built with jQuery selector compile
  2128. * @param {Element} context
  2129. * @param {Array} [results]
  2130. * @param {Array} [seed] A set of elements to match against
  2131. */
  2132. function select( selector, context, results, seed ) {
  2133. var i, tokens, token, type, find,
  2134. compiled = typeof selector === "function" && selector,
  2135. match = !seed && tokenize( ( selector = compiled.selector || selector ) );
  2136. results = results || [];
  2137. // Try to minimize operations if there is only one selector in the list and no seed
  2138. // (the latter of which guarantees us context)
  2139. if ( match.length === 1 ) {
  2140. // Reduce context if the leading compound selector is an ID
  2141. tokens = match[ 0 ] = match[ 0 ].slice( 0 );
  2142. if ( tokens.length > 2 && ( token = tokens[ 0 ] ).type === "ID" &&
  2143. context.nodeType === 9 && documentIsHTML && Expr.relative[ tokens[ 1 ].type ] ) {
  2144. context = ( Expr.find.ID(
  2145. token.matches[ 0 ].replace( runescape, funescape ),
  2146. context
  2147. ) || [] )[ 0 ];
  2148. if ( !context ) {
  2149. return results;
  2150. // Precompiled matchers will still verify ancestry, so step up a level
  2151. } else if ( compiled ) {
  2152. context = context.parentNode;
  2153. }
  2154. selector = selector.slice( tokens.shift().value.length );
  2155. }
  2156. // Fetch a seed set for right-to-left matching
  2157. i = matchExpr.needsContext.test( selector ) ? 0 : tokens.length;
  2158. while ( i-- ) {
  2159. token = tokens[ i ];
  2160. // Abort if we hit a combinator
  2161. if ( Expr.relative[ ( type = token.type ) ] ) {
  2162. break;
  2163. }
  2164. if ( ( find = Expr.find[ type ] ) ) {
  2165. // Search, expanding context for leading sibling combinators
  2166. if ( ( seed = find(
  2167. token.matches[ 0 ].replace( runescape, funescape ),
  2168. rsibling.test( tokens[ 0 ].type ) &&
  2169. testContext( context.parentNode ) || context
  2170. ) ) ) {
  2171. // If seed is empty or no tokens remain, we can return early
  2172. tokens.splice( i, 1 );
  2173. selector = seed.length && toSelector( tokens );
  2174. if ( !selector ) {
  2175. push.apply( results, seed );
  2176. return results;
  2177. }
  2178. break;
  2179. }
  2180. }
  2181. }
  2182. }
  2183. // Compile and execute a filtering function if one is not provided
  2184. // Provide `match` to avoid retokenization if we modified the selector above
  2185. ( compiled || compile( selector, match ) )(
  2186. seed,
  2187. context,
  2188. !documentIsHTML,
  2189. results,
  2190. !context || rsibling.test( selector ) && testContext( context.parentNode ) || context
  2191. );
  2192. return results;
  2193. }
  2194. // One-time assignments
  2195. // Support: Android <=4.0 - 4.1+
  2196. // Sort stability
  2197. support.sortStable = expando.split( "" ).sort( sortOrder ).join( "" ) === expando;
  2198. // Initialize against the default document
  2199. setDocument();
  2200. // Support: Android <=4.0 - 4.1+
  2201. // Detached nodes confoundingly follow *each other*
  2202. support.sortDetached = assert( function( el ) {
  2203. // Should return 1, but returns 4 (following)
  2204. return el.compareDocumentPosition( document.createElement( "fieldset" ) ) & 1;
  2205. } );
  2206. jQuery.find = find;
  2207. // Deprecated
  2208. jQuery.expr[ ":" ] = jQuery.expr.pseudos;
  2209. jQuery.unique = jQuery.uniqueSort;
  2210. // These have always been private, but they used to be documented as part of
  2211. // Sizzle so let's maintain them for now for backwards compatibility purposes.
  2212. find.compile = compile;
  2213. find.select = select;
  2214. find.setDocument = setDocument;
  2215. find.tokenize = tokenize;
  2216. find.escape = jQuery.escapeSelector;
  2217. find.getText = jQuery.text;
  2218. find.isXML = jQuery.isXMLDoc;
  2219. find.selectors = jQuery.expr;
  2220. find.support = jQuery.support;
  2221. find.uniqueSort = jQuery.uniqueSort;
  2222. /* eslint-enable */
  2223. } )();
  2224. var dir = function( elem, dir, until ) {
  2225. var matched = [],
  2226. truncate = until !== undefined;
  2227. while ( ( elem = elem[ dir ] ) && elem.nodeType !== 9 ) {
  2228. if ( elem.nodeType === 1 ) {
  2229. if ( truncate && jQuery( elem ).is( until ) ) {
  2230. break;
  2231. }
  2232. matched.push( elem );
  2233. }
  2234. }
  2235. return matched;
  2236. };
  2237. var siblings = function( n, elem ) {
  2238. var matched = [];
  2239. for ( ; n; n = n.nextSibling ) {
  2240. if ( n.nodeType === 1 && n !== elem ) {
  2241. matched.push( n );
  2242. }
  2243. }
  2244. return matched;
  2245. };
  2246. var rneedsContext = jQuery.expr.match.needsContext;
  2247. var rsingleTag = ( /^<([a-z][^\/\0>:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i );
  2248. // Implement the identical functionality for filter and not
  2249. function winnow( elements, qualifier, not ) {
  2250. if ( isFunction( qualifier ) ) {
  2251. return jQuery.grep( elements, function( elem, i ) {
  2252. return !!qualifier.call( elem, i, elem ) !== not;
  2253. } );
  2254. }
  2255. // Single element
  2256. if ( qualifier.nodeType ) {
  2257. return jQuery.grep( elements, function( elem ) {
  2258. return ( elem === qualifier ) !== not;
  2259. } );
  2260. }
  2261. // Arraylike of elements (jQuery, arguments, Array)
  2262. if ( typeof qualifier !== "string" ) {
  2263. return jQuery.grep( elements, function( elem ) {
  2264. return ( indexOf.call( qualifier, elem ) > -1 ) !== not;
  2265. } );
  2266. }
  2267. // Filtered directly for both simple and complex selectors
  2268. return jQuery.filter( qualifier, elements, not );
  2269. }
  2270. jQuery.filter = function( expr, elems, not ) {
  2271. var elem = elems[ 0 ];
  2272. if ( not ) {
  2273. expr = ":not(" + expr + ")";
  2274. }
  2275. if ( elems.length === 1 && elem.nodeType === 1 ) {
  2276. return jQuery.find.matchesSelector( elem, expr ) ? [ elem ] : [];
  2277. }
  2278. return jQuery.find.matches( expr, jQuery.grep( elems, function( elem ) {
  2279. return elem.nodeType === 1;
  2280. } ) );
  2281. };
  2282. jQuery.fn.extend( {
  2283. find: function( selector ) {
  2284. var i, ret,
  2285. len = this.length,
  2286. self = this;
  2287. if ( typeof selector !== "string" ) {
  2288. return this.pushStack( jQuery( selector ).filter( function() {
  2289. for ( i = 0; i < len; i++ ) {
  2290. if ( jQuery.contains( self[ i ], this ) ) {
  2291. return true;
  2292. }
  2293. }
  2294. } ) );
  2295. }
  2296. ret = this.pushStack( [] );
  2297. for ( i = 0; i < len; i++ ) {
  2298. jQuery.find( selector, self[ i ], ret );
  2299. }
  2300. return len > 1 ? jQuery.uniqueSort( ret ) : ret;
  2301. },
  2302. filter: function( selector ) {
  2303. return this.pushStack( winnow( this, selector || [], false ) );
  2304. },
  2305. not: function( selector ) {
  2306. return this.pushStack( winnow( this, selector || [], true ) );
  2307. },
  2308. is: function( selector ) {
  2309. return !!winnow(
  2310. this,
  2311. // If this is a positional/relative selector, check membership in the returned set
  2312. // so $("p:first").is("p:last") won't return true for a doc with two "p".
  2313. typeof selector === "string" && rneedsContext.test( selector ) ?
  2314. jQuery( selector ) :
  2315. selector || [],
  2316. false
  2317. ).length;
  2318. }
  2319. } );
  2320. // Initialize a jQuery object
  2321. // A central reference to the root jQuery(document)
  2322. var rootjQuery,
  2323. // A simple way to check for HTML strings
  2324. // Prioritize #id over <tag> to avoid XSS via location.hash (trac-9521)
  2325. // Strict HTML recognition (trac-11290: must start with <)
  2326. // Shortcut simple #id case for speed
  2327. rquickExpr = /^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]+))$/,
  2328. init = jQuery.fn.init = function( selector, context, root ) {
  2329. var match, elem;
  2330. // HANDLE: $(""), $(null), $(undefined), $(false)
  2331. if ( !selector ) {
  2332. return this;
  2333. }
  2334. // Method init() accepts an alternate rootjQuery
  2335. // so migrate can support jQuery.sub (gh-2101)
  2336. root = root || rootjQuery;
  2337. // Handle HTML strings
  2338. if ( typeof selector === "string" ) {
  2339. if ( selector[ 0 ] === "<" &&
  2340. selector[ selector.length - 1 ] === ">" &&
  2341. selector.length >= 3 ) {
  2342. // Assume that strings that start and end with <> are HTML and skip the regex check
  2343. match = [ null, selector, null ];
  2344. } else {
  2345. match = rquickExpr.exec( selector );
  2346. }
  2347. // Match html or make sure no context is specified for #id
  2348. if ( match && ( match[ 1 ] || !context ) ) {
  2349. // HANDLE: $(html) -> $(array)
  2350. if ( match[ 1 ] ) {
  2351. context = context instanceof jQuery ? context[ 0 ] : context;
  2352. // Option to run scripts is true for back-compat
  2353. // Intentionally let the error be thrown if parseHTML is not present
  2354. jQuery.merge( this, jQuery.parseHTML(
  2355. match[ 1 ],
  2356. context && context.nodeType ? context.ownerDocument || context : document,
  2357. true
  2358. ) );
  2359. // HANDLE: $(html, props)
  2360. if ( rsingleTag.test( match[ 1 ] ) && jQuery.isPlainObject( context ) ) {
  2361. for ( match in context ) {
  2362. // Properties of context are called as methods if possible
  2363. if ( isFunction( this[ match ] ) ) {
  2364. this[ match ]( context[ match ] );
  2365. // ...and otherwise set as attributes
  2366. } else {
  2367. this.attr( match, context[ match ] );
  2368. }
  2369. }
  2370. }
  2371. return this;
  2372. // HANDLE: $(#id)
  2373. } else {
  2374. elem = document.getElementById( match[ 2 ] );
  2375. if ( elem ) {
  2376. // Inject the element directly into the jQuery object
  2377. this[ 0 ] = elem;
  2378. this.length = 1;
  2379. }
  2380. return this;
  2381. }
  2382. // HANDLE: $(expr, $(...))
  2383. } else if ( !context || context.jquery ) {
  2384. return ( context || root ).find( selector );
  2385. // HANDLE: $(expr, context)
  2386. // (which is just equivalent to: $(context).find(expr)
  2387. } else {
  2388. return this.constructor( context ).find( selector );
  2389. }
  2390. // HANDLE: $(DOMElement)
  2391. } else if ( selector.nodeType ) {
  2392. this[ 0 ] = selector;
  2393. this.length = 1;
  2394. return this;
  2395. // HANDLE: $(function)
  2396. // Shortcut for document ready
  2397. } else if ( isFunction( selector ) ) {
  2398. return root.ready !== undefined ?
  2399. root.ready( selector ) :
  2400. // Execute immediately if ready is not present
  2401. selector( jQuery );
  2402. }
  2403. return jQuery.makeArray( selector, this );
  2404. };
  2405. // Give the init function the jQuery prototype for later instantiation
  2406. init.prototype = jQuery.fn;
  2407. // Initialize central reference
  2408. rootjQuery = jQuery( document );
  2409. var rparentsprev = /^(?:parents|prev(?:Until|All))/,
  2410. // Methods guaranteed to produce a unique set when starting from a unique set
  2411. guaranteedUnique = {
  2412. children: true,
  2413. contents: true,
  2414. next: true,
  2415. prev: true
  2416. };
  2417. jQuery.fn.extend( {
  2418. has: function( target ) {
  2419. var targets = jQuery( target, this ),
  2420. l = targets.length;
  2421. return this.filter( function() {
  2422. var i = 0;
  2423. for ( ; i < l; i++ ) {
  2424. if ( jQuery.contains( this, targets[ i ] ) ) {
  2425. return true;
  2426. }
  2427. }
  2428. } );
  2429. },
  2430. closest: function( selectors, context ) {
  2431. var cur,
  2432. i = 0,
  2433. l = this.length,
  2434. matched = [],
  2435. targets = typeof selectors !== "string" && jQuery( selectors );
  2436. // Positional selectors never match, since there's no _selection_ context
  2437. if ( !rneedsContext.test( selectors ) ) {
  2438. for ( ; i < l; i++ ) {
  2439. for ( cur = this[ i ]; cur && cur !== context; cur = cur.parentNode ) {
  2440. // Always skip document fragments
  2441. if ( cur.nodeType < 11 && ( targets ?
  2442. targets.index( cur ) > -1 :
  2443. // Don't pass non-elements to jQuery#find
  2444. cur.nodeType === 1 &&
  2445. jQuery.find.matchesSelector( cur, selectors ) ) ) {
  2446. matched.push( cur );
  2447. break;
  2448. }
  2449. }
  2450. }
  2451. }
  2452. return this.pushStack( matched.length > 1 ? jQuery.uniqueSort( matched ) : matched );
  2453. },
  2454. // Determine the position of an element within the set
  2455. index: function( elem ) {
  2456. // No argument, return index in parent
  2457. if ( !elem ) {
  2458. return ( this[ 0 ] && this[ 0 ].parentNode ) ? this.first().prevAll().length : -1;
  2459. }
  2460. // Index in selector
  2461. if ( typeof elem === "string" ) {
  2462. return indexOf.call( jQuery( elem ), this[ 0 ] );
  2463. }
  2464. // Locate the position of the desired element
  2465. return indexOf.call( this,
  2466. // If it receives a jQuery object, the first element is used
  2467. elem.jquery ? elem[ 0 ] : elem
  2468. );
  2469. },
  2470. add: function( selector, context ) {
  2471. return this.pushStack(
  2472. jQuery.uniqueSort(
  2473. jQuery.merge( this.get(), jQuery( selector, context ) )
  2474. )
  2475. );
  2476. },
  2477. addBack: function( selector ) {
  2478. return this.add( selector == null ?
  2479. this.prevObject : this.prevObject.filter( selector )
  2480. );
  2481. }
  2482. } );
  2483. function sibling( cur, dir ) {
  2484. while ( ( cur = cur[ dir ] ) && cur.nodeType !== 1 ) {}
  2485. return cur;
  2486. }
  2487. jQuery.each( {
  2488. parent: function( elem ) {
  2489. var parent = elem.parentNode;
  2490. return parent && parent.nodeType !== 11 ? parent : null;
  2491. },
  2492. parents: function( elem ) {
  2493. return dir( elem, "parentNode" );
  2494. },
  2495. parentsUntil: function( elem, _i, until ) {
  2496. return dir( elem, "parentNode", until );
  2497. },
  2498. next: function( elem ) {
  2499. return sibling( elem, "nextSibling" );
  2500. },
  2501. prev: function( elem ) {
  2502. return sibling( elem, "previousSibling" );
  2503. },
  2504. nextAll: function( elem ) {
  2505. return dir( elem, "nextSibling" );
  2506. },
  2507. prevAll: function( elem ) {
  2508. return dir( elem, "previousSibling" );
  2509. },
  2510. nextUntil: function( elem, _i, until ) {
  2511. return dir( elem, "nextSibling", until );
  2512. },
  2513. prevUntil: function( elem, _i, until ) {
  2514. return dir( elem, "previousSibling", until );
  2515. },
  2516. siblings: function( elem ) {
  2517. return siblings( ( elem.parentNode || {} ).firstChild, elem );
  2518. },
  2519. children: function( elem ) {
  2520. return siblings( elem.firstChild );
  2521. },
  2522. contents: function( elem ) {
  2523. if ( elem.contentDocument != null &&
  2524. // Support: IE 11+
  2525. // <object> elements with no `data` attribute has an object
  2526. // `contentDocument` with a `null` prototype.
  2527. getProto( elem.contentDocument ) ) {
  2528. return elem.contentDocument;
  2529. }
  2530. // Support: IE 9 - 11 only, iOS 7 only, Android Browser <=4.3 only
  2531. // Treat the template element as a regular one in browsers that
  2532. // don't support it.
  2533. if ( nodeName( elem, "template" ) ) {
  2534. elem = elem.content || elem;
  2535. }
  2536. return jQuery.merge( [], elem.childNodes );
  2537. }
  2538. }, function( name, fn ) {
  2539. jQuery.fn[ name ] = function( until, selector ) {
  2540. var matched = jQuery.map( this, fn, until );
  2541. if ( name.slice( -5 ) !== "Until" ) {
  2542. selector = until;
  2543. }
  2544. if ( selector && typeof selector === "string" ) {
  2545. matched = jQuery.filter( selector, matched );
  2546. }
  2547. if ( this.length > 1 ) {
  2548. // Remove duplicates
  2549. if ( !guaranteedUnique[ name ] ) {
  2550. jQuery.uniqueSort( matched );
  2551. }
  2552. // Reverse order for parents* and prev-derivatives
  2553. if ( rparentsprev.test( name ) ) {
  2554. matched.reverse();
  2555. }
  2556. }
  2557. return this.pushStack( matched );
  2558. };
  2559. } );
  2560. var rnothtmlwhite = ( /[^\x20\t\r\n\f]+/g );
  2561. // Convert String-formatted options into Object-formatted ones
  2562. function createOptions( options ) {
  2563. var object = {};
  2564. jQuery.each( options.match( rnothtmlwhite ) || [], function( _, flag ) {
  2565. object[ flag ] = true;
  2566. } );
  2567. return object;
  2568. }
  2569. /*
  2570. * Create a callback list using the following parameters:
  2571. *
  2572. * options: an optional list of space-separated options that will change how
  2573. * the callback list behaves or a more traditional option object
  2574. *
  2575. * By default a callback list will act like an event callback list and can be
  2576. * "fired" multiple times.
  2577. *
  2578. * Possible options:
  2579. *
  2580. * once: will ensure the callback list can only be fired once (like a Deferred)
  2581. *
  2582. * memory: will keep track of previous values and will call any callback added
  2583. * after the list has been fired right away with the latest "memorized"
  2584. * values (like a Deferred)
  2585. *
  2586. * unique: will ensure a callback can only be added once (no duplicate in the list)
  2587. *
  2588. * stopOnFalse: interrupt callings when a callback returns false
  2589. *
  2590. */
  2591. jQuery.Callbacks = function( options ) {
  2592. // Convert options from String-formatted to Object-formatted if needed
  2593. // (we check in cache first)
  2594. options = typeof options === "string" ?
  2595. createOptions( options ) :
  2596. jQuery.extend( {}, options );
  2597. var // Flag to know if list is currently firing
  2598. firing,
  2599. // Last fire value for non-forgettable lists
  2600. memory,
  2601. // Flag to know if list was already fired
  2602. fired,
  2603. // Flag to prevent firing
  2604. locked,
  2605. // Actual callback list
  2606. list = [],
  2607. // Queue of execution data for repeatable lists
  2608. queue = [],
  2609. // Index of currently firing callback (modified by add/remove as needed)
  2610. firingIndex = -1,
  2611. // Fire callbacks
  2612. fire = function() {
  2613. // Enforce single-firing
  2614. locked = locked || options.once;
  2615. // Execute callbacks for all pending executions,
  2616. // respecting firingIndex overrides and runtime changes
  2617. fired = firing = true;
  2618. for ( ; queue.length; firingIndex = -1 ) {
  2619. memory = queue.shift();
  2620. while ( ++firingIndex < list.length ) {
  2621. // Run callback and check for early termination
  2622. if ( list[ firingIndex ].apply( memory[ 0 ], memory[ 1 ] ) === false &&
  2623. options.stopOnFalse ) {
  2624. // Jump to end and forget the data so .add doesn't re-fire
  2625. firingIndex = list.length;
  2626. memory = false;
  2627. }
  2628. }
  2629. }
  2630. // Forget the data if we're done with it
  2631. if ( !options.memory ) {
  2632. memory = false;
  2633. }
  2634. firing = false;
  2635. // Clean up if we're done firing for good
  2636. if ( locked ) {
  2637. // Keep an empty list if we have data for future add calls
  2638. if ( memory ) {
  2639. list = [];
  2640. // Otherwise, this object is spent
  2641. } else {
  2642. list = "";
  2643. }
  2644. }
  2645. },
  2646. // Actual Callbacks object
  2647. self = {
  2648. // Add a callback or a collection of callbacks to the list
  2649. add: function() {
  2650. if ( list ) {
  2651. // If we have memory from a past run, we should fire after adding
  2652. if ( memory && !firing ) {
  2653. firingIndex = list.length - 1;
  2654. queue.push( memory );
  2655. }
  2656. ( function add( args ) {
  2657. jQuery.each( args, function( _, arg ) {
  2658. if ( isFunction( arg ) ) {
  2659. if ( !options.unique || !self.has( arg ) ) {
  2660. list.push( arg );
  2661. }
  2662. } else if ( arg && arg.length && toType( arg ) !== "string" ) {
  2663. // Inspect recursively
  2664. add( arg );
  2665. }
  2666. } );
  2667. } )( arguments );
  2668. if ( memory && !firing ) {
  2669. fire();
  2670. }
  2671. }
  2672. return this;
  2673. },
  2674. // Remove a callback from the list
  2675. remove: function() {
  2676. jQuery.each( arguments, function( _, arg ) {
  2677. var index;
  2678. while ( ( index = jQuery.inArray( arg, list, index ) ) > -1 ) {
  2679. list.splice( index, 1 );
  2680. // Handle firing indexes
  2681. if ( index <= firingIndex ) {
  2682. firingIndex--;
  2683. }
  2684. }
  2685. } );
  2686. return this;
  2687. },
  2688. // Check if a given callback is in the list.
  2689. // If no argument is given, return whether or not list has callbacks attached.
  2690. has: function( fn ) {
  2691. return fn ?
  2692. jQuery.inArray( fn, list ) > -1 :
  2693. list.length > 0;
  2694. },
  2695. // Remove all callbacks from the list
  2696. empty: function() {
  2697. if ( list ) {
  2698. list = [];
  2699. }
  2700. return this;
  2701. },
  2702. // Disable .fire and .add
  2703. // Abort any current/pending executions
  2704. // Clear all callbacks and values
  2705. disable: function() {
  2706. locked = queue = [];
  2707. list = memory = "";
  2708. return this;
  2709. },
  2710. disabled: function() {
  2711. return !list;
  2712. },
  2713. // Disable .fire
  2714. // Also disable .add unless we have memory (since it would have no effect)
  2715. // Abort any pending executions
  2716. lock: function() {
  2717. locked = queue = [];
  2718. if ( !memory && !firing ) {
  2719. list = memory = "";
  2720. }
  2721. return this;
  2722. },
  2723. locked: function() {
  2724. return !!locked;
  2725. },
  2726. // Call all callbacks with the given context and arguments
  2727. fireWith: function( context, args ) {
  2728. if ( !locked ) {
  2729. args = args || [];
  2730. args = [ context, args.slice ? args.slice() : args ];
  2731. queue.push( args );
  2732. if ( !firing ) {
  2733. fire();
  2734. }
  2735. }
  2736. return this;
  2737. },
  2738. // Call all the callbacks with the given arguments
  2739. fire: function() {
  2740. self.fireWith( this, arguments );
  2741. return this;
  2742. },
  2743. // To know if the callbacks have already been called at least once
  2744. fired: function() {
  2745. return !!fired;
  2746. }
  2747. };
  2748. return self;
  2749. };
  2750. function Identity( v ) {
  2751. return v;
  2752. }
  2753. function Thrower( ex ) {
  2754. throw ex;
  2755. }
  2756. function adoptValue( value, resolve, reject, noValue ) {
  2757. var method;
  2758. try {
  2759. // Check for promise aspect first to privilege synchronous behavior
  2760. if ( value && isFunction( ( method = value.promise ) ) ) {
  2761. method.call( value ).done( resolve ).fail( reject );
  2762. // Other thenables
  2763. } else if ( value && isFunction( ( method = value.then ) ) ) {
  2764. method.call( value, resolve, reject );
  2765. // Other non-thenables
  2766. } else {
  2767. // Control `resolve` arguments by letting Array#slice cast boolean `noValue` to integer:
  2768. // * false: [ value ].slice( 0 ) => resolve( value )
  2769. // * true: [ value ].slice( 1 ) => resolve()
  2770. resolve.apply( undefined, [ value ].slice( noValue ) );
  2771. }
  2772. // For Promises/A+, convert exceptions into rejections
  2773. // Since jQuery.when doesn't unwrap thenables, we can skip the extra checks appearing in
  2774. // Deferred#then to conditionally suppress rejection.
  2775. } catch ( value ) {
  2776. // Support: Android 4.0 only
  2777. // Strict mode functions invoked without .call/.apply get global-object context
  2778. reject.apply( undefined, [ value ] );
  2779. }
  2780. }
  2781. jQuery.extend( {
  2782. Deferred: function( func ) {
  2783. var tuples = [
  2784. // action, add listener, callbacks,
  2785. // ... .then handlers, argument index, [final state]
  2786. [ "notify", "progress", jQuery.Callbacks( "memory" ),
  2787. jQuery.Callbacks( "memory" ), 2 ],
  2788. [ "resolve", "done", jQuery.Callbacks( "once memory" ),
  2789. jQuery.Callbacks( "once memory" ), 0, "resolved" ],
  2790. [ "reject", "fail", jQuery.Callbacks( "once memory" ),
  2791. jQuery.Callbacks( "once memory" ), 1, "rejected" ]
  2792. ],
  2793. state = "pending",
  2794. promise = {
  2795. state: function() {
  2796. return state;
  2797. },
  2798. always: function() {
  2799. deferred.done( arguments ).fail( arguments );
  2800. return this;
  2801. },
  2802. "catch": function( fn ) {
  2803. return promise.then( null, fn );
  2804. },
  2805. // Keep pipe for back-compat
  2806. pipe: function( /* fnDone, fnFail, fnProgress */ ) {
  2807. var fns = arguments;
  2808. return jQuery.Deferred( function( newDefer ) {
  2809. jQuery.each( tuples, function( _i, tuple ) {
  2810. // Map tuples (progress, done, fail) to arguments (done, fail, progress)
  2811. var fn = isFunction( fns[ tuple[ 4 ] ] ) && fns[ tuple[ 4 ] ];
  2812. // deferred.progress(function() { bind to newDefer or newDefer.notify })
  2813. // deferred.done(function() { bind to newDefer or newDefer.resolve })
  2814. // deferred.fail(function() { bind to newDefer or newDefer.reject })
  2815. deferred[ tuple[ 1 ] ]( function() {
  2816. var returned = fn && fn.apply( this, arguments );
  2817. if ( returned && isFunction( returned.promise ) ) {
  2818. returned.promise()
  2819. .progress( newDefer.notify )
  2820. .done( newDefer.resolve )
  2821. .fail( newDefer.reject );
  2822. } else {
  2823. newDefer[ tuple[ 0 ] + "With" ](
  2824. this,
  2825. fn ? [ returned ] : arguments
  2826. );
  2827. }
  2828. } );
  2829. } );
  2830. fns = null;
  2831. } ).promise();
  2832. },
  2833. then: function( onFulfilled, onRejected, onProgress ) {
  2834. var maxDepth = 0;
  2835. function resolve( depth, deferred, handler, special ) {
  2836. return function() {
  2837. var that = this,
  2838. args = arguments,
  2839. mightThrow = function() {
  2840. var returned, then;
  2841. // Support: Promises/A+ section 2.3.3.3.3
  2842. // https://promisesaplus.com/#point-59
  2843. // Ignore double-resolution attempts
  2844. if ( depth < maxDepth ) {
  2845. return;
  2846. }
  2847. returned = handler.apply( that, args );
  2848. // Support: Promises/A+ section 2.3.1
  2849. // https://promisesaplus.com/#point-48
  2850. if ( returned === deferred.promise() ) {
  2851. throw new TypeError( "Thenable self-resolution" );
  2852. }
  2853. // Support: Promises/A+ sections 2.3.3.1, 3.5
  2854. // https://promisesaplus.com/#point-54
  2855. // https://promisesaplus.com/#point-75
  2856. // Retrieve `then` only once
  2857. then = returned &&
  2858. // Support: Promises/A+ section 2.3.4
  2859. // https://promisesaplus.com/#point-64
  2860. // Only check objects and functions for thenability
  2861. ( typeof returned === "object" ||
  2862. typeof returned === "function" ) &&
  2863. returned.then;
  2864. // Handle a returned thenable
  2865. if ( isFunction( then ) ) {
  2866. // Special processors (notify) just wait for resolution
  2867. if ( special ) {
  2868. then.call(
  2869. returned,
  2870. resolve( maxDepth, deferred, Identity, special ),
  2871. resolve( maxDepth, deferred, Thrower, special )
  2872. );
  2873. // Normal processors (resolve) also hook into progress
  2874. } else {
  2875. // ...and disregard older resolution values
  2876. maxDepth++;
  2877. then.call(
  2878. returned,
  2879. resolve( maxDepth, deferred, Identity, special ),
  2880. resolve( maxDepth, deferred, Thrower, special ),
  2881. resolve( maxDepth, deferred, Identity,
  2882. deferred.notifyWith )
  2883. );
  2884. }
  2885. // Handle all other returned values
  2886. } else {
  2887. // Only substitute handlers pass on context
  2888. // and multiple values (non-spec behavior)
  2889. if ( handler !== Identity ) {
  2890. that = undefined;
  2891. args = [ returned ];
  2892. }
  2893. // Process the value(s)
  2894. // Default process is resolve
  2895. ( special || deferred.resolveWith )( that, args );
  2896. }
  2897. },
  2898. // Only normal processors (resolve) catch and reject exceptions
  2899. process = special ?
  2900. mightThrow :
  2901. function() {
  2902. try {
  2903. mightThrow();
  2904. } catch ( e ) {
  2905. if ( jQuery.Deferred.exceptionHook ) {
  2906. jQuery.Deferred.exceptionHook( e,
  2907. process.error );
  2908. }
  2909. // Support: Promises/A+ section 2.3.3.3.4.1
  2910. // https://promisesaplus.com/#point-61
  2911. // Ignore post-resolution exceptions
  2912. if ( depth + 1 >= maxDepth ) {
  2913. // Only substitute handlers pass on context
  2914. // and multiple values (non-spec behavior)
  2915. if ( handler !== Thrower ) {
  2916. that = undefined;
  2917. args = [ e ];
  2918. }
  2919. deferred.rejectWith( that, args );
  2920. }
  2921. }
  2922. };
  2923. // Support: Promises/A+ section 2.3.3.3.1
  2924. // https://promisesaplus.com/#point-57
  2925. // Re-resolve promises immediately to dodge false rejection from
  2926. // subsequent errors
  2927. if ( depth ) {
  2928. process();
  2929. } else {
  2930. // Call an optional hook to record the error, in case of exception
  2931. // since it's otherwise lost when execution goes async
  2932. if ( jQuery.Deferred.getErrorHook ) {
  2933. process.error = jQuery.Deferred.getErrorHook();
  2934. // The deprecated alias of the above. While the name suggests
  2935. // returning the stack, not an error instance, jQuery just passes
  2936. // it directly to `console.warn` so both will work; an instance
  2937. // just better cooperates with source maps.
  2938. } else if ( jQuery.Deferred.getStackHook ) {
  2939. process.error = jQuery.Deferred.getStackHook();
  2940. }
  2941. window.setTimeout( process );
  2942. }
  2943. };
  2944. }
  2945. return jQuery.Deferred( function( newDefer ) {
  2946. // progress_handlers.add( ... )
  2947. tuples[ 0 ][ 3 ].add(
  2948. resolve(
  2949. 0,
  2950. newDefer,
  2951. isFunction( onProgress ) ?
  2952. onProgress :
  2953. Identity,
  2954. newDefer.notifyWith
  2955. )
  2956. );
  2957. // fulfilled_handlers.add( ... )
  2958. tuples[ 1 ][ 3 ].add(
  2959. resolve(
  2960. 0,
  2961. newDefer,
  2962. isFunction( onFulfilled ) ?
  2963. onFulfilled :
  2964. Identity
  2965. )
  2966. );
  2967. // rejected_handlers.add( ... )
  2968. tuples[ 2 ][ 3 ].add(
  2969. resolve(
  2970. 0,
  2971. newDefer,
  2972. isFunction( onRejected ) ?
  2973. onRejected :
  2974. Thrower
  2975. )
  2976. );
  2977. } ).promise();
  2978. },
  2979. // Get a promise for this deferred
  2980. // If obj is provided, the promise aspect is added to the object
  2981. promise: function( obj ) {
  2982. return obj != null ? jQuery.extend( obj, promise ) : promise;
  2983. }
  2984. },
  2985. deferred = {};
  2986. // Add list-specific methods
  2987. jQuery.each( tuples, function( i, tuple ) {
  2988. var list = tuple[ 2 ],
  2989. stateString = tuple[ 5 ];
  2990. // promise.progress = list.add
  2991. // promise.done = list.add
  2992. // promise.fail = list.add
  2993. promise[ tuple[ 1 ] ] = list.add;
  2994. // Handle state
  2995. if ( stateString ) {
  2996. list.add(
  2997. function() {
  2998. // state = "resolved" (i.e., fulfilled)
  2999. // state = "rejected"
  3000. state = stateString;
  3001. },
  3002. // rejected_callbacks.disable
  3003. // fulfilled_callbacks.disable
  3004. tuples[ 3 - i ][ 2 ].disable,
  3005. // rejected_handlers.disable
  3006. // fulfilled_handlers.disable
  3007. tuples[ 3 - i ][ 3 ].disable,
  3008. // progress_callbacks.lock
  3009. tuples[ 0 ][ 2 ].lock,
  3010. // progress_handlers.lock
  3011. tuples[ 0 ][ 3 ].lock
  3012. );
  3013. }
  3014. // progress_handlers.fire
  3015. // fulfilled_handlers.fire
  3016. // rejected_handlers.fire
  3017. list.add( tuple[ 3 ].fire );
  3018. // deferred.notify = function() { deferred.notifyWith(...) }
  3019. // deferred.resolve = function() { deferred.resolveWith(...) }
  3020. // deferred.reject = function() { deferred.rejectWith(...) }
  3021. deferred[ tuple[ 0 ] ] = function() {
  3022. deferred[ tuple[ 0 ] + "With" ]( this === deferred ? undefined : this, arguments );
  3023. return this;
  3024. };
  3025. // deferred.notifyWith = list.fireWith
  3026. // deferred.resolveWith = list.fireWith
  3027. // deferred.rejectWith = list.fireWith
  3028. deferred[ tuple[ 0 ] + "With" ] = list.fireWith;
  3029. } );
  3030. // Make the deferred a promise
  3031. promise.promise( deferred );
  3032. // Call given func if any
  3033. if ( func ) {
  3034. func.call( deferred, deferred );
  3035. }
  3036. // All done!
  3037. return deferred;
  3038. },
  3039. // Deferred helper
  3040. when: function( singleValue ) {
  3041. var
  3042. // count of uncompleted subordinates
  3043. remaining = arguments.length,
  3044. // count of unprocessed arguments
  3045. i = remaining,
  3046. // subordinate fulfillment data
  3047. resolveContexts = Array( i ),
  3048. resolveValues = slice.call( arguments ),
  3049. // the primary Deferred
  3050. primary = jQuery.Deferred(),
  3051. // subordinate callback factory
  3052. updateFunc = function( i ) {
  3053. return function( value ) {
  3054. resolveContexts[ i ] = this;
  3055. resolveValues[ i ] = arguments.length > 1 ? slice.call( arguments ) : value;
  3056. if ( !( --remaining ) ) {
  3057. primary.resolveWith( resolveContexts, resolveValues );
  3058. }
  3059. };
  3060. };
  3061. // Single- and empty arguments are adopted like Promise.resolve
  3062. if ( remaining <= 1 ) {
  3063. adoptValue( singleValue, primary.done( updateFunc( i ) ).resolve, primary.reject,
  3064. !remaining );
  3065. // Use .then() to unwrap secondary thenables (cf. gh-3000)
  3066. if ( primary.state() === "pending" ||
  3067. isFunction( resolveValues[ i ] && resolveValues[ i ].then ) ) {
  3068. return primary.then();
  3069. }
  3070. }
  3071. // Multiple arguments are aggregated like Promise.all array elements
  3072. while ( i-- ) {
  3073. adoptValue( resolveValues[ i ], updateFunc( i ), primary.reject );
  3074. }
  3075. return primary.promise();
  3076. }
  3077. } );
  3078. // These usually indicate a programmer mistake during development,
  3079. // warn about them ASAP rather than swallowing them by default.
  3080. var rerrorNames = /^(Eval|Internal|Range|Reference|Syntax|Type|URI)Error$/;
  3081. // If `jQuery.Deferred.getErrorHook` is defined, `asyncError` is an error
  3082. // captured before the async barrier to get the original error cause
  3083. // which may otherwise be hidden.
  3084. jQuery.Deferred.exceptionHook = function( error, asyncError ) {
  3085. // Support: IE 8 - 9 only
  3086. // Console exists when dev tools are open, which can happen at any time
  3087. if ( window.console && window.console.warn && error && rerrorNames.test( error.name ) ) {
  3088. window.console.warn( "jQuery.Deferred exception: " + error.message,
  3089. error.stack, asyncError );
  3090. }
  3091. };
  3092. jQuery.readyException = function( error ) {
  3093. window.setTimeout( function() {
  3094. throw error;
  3095. } );
  3096. };
  3097. // The deferred used on DOM ready
  3098. var readyList = jQuery.Deferred();
  3099. jQuery.fn.ready = function( fn ) {
  3100. readyList
  3101. .then( fn )
  3102. // Wrap jQuery.readyException in a function so that the lookup
  3103. // happens at the time of error handling instead of callback
  3104. // registration.
  3105. .catch( function( error ) {
  3106. jQuery.readyException( error );
  3107. } );
  3108. return this;
  3109. };
  3110. jQuery.extend( {
  3111. // Is the DOM ready to be used? Set to true once it occurs.
  3112. isReady: false,
  3113. // A counter to track how many items to wait for before
  3114. // the ready event fires. See trac-6781
  3115. readyWait: 1,
  3116. // Handle when the DOM is ready
  3117. ready: function( wait ) {
  3118. // Abort if there are pending holds or we're already ready
  3119. if ( wait === true ? --jQuery.readyWait : jQuery.isReady ) {
  3120. return;
  3121. }
  3122. // Remember that the DOM is ready
  3123. jQuery.isReady = true;
  3124. // If a normal DOM Ready event fired, decrement, and wait if need be
  3125. if ( wait !== true && --jQuery.readyWait > 0 ) {
  3126. return;
  3127. }
  3128. // If there are functions bound, to execute
  3129. readyList.resolveWith( document, [ jQuery ] );
  3130. }
  3131. } );
  3132. jQuery.ready.then = readyList.then;
  3133. // The ready event handler and self cleanup method
  3134. function completed() {
  3135. document.removeEventListener( "DOMContentLoaded", completed );
  3136. window.removeEventListener( "load", completed );
  3137. jQuery.ready();
  3138. }
  3139. // Catch cases where $(document).ready() is called
  3140. // after the browser event has already occurred.
  3141. // Support: IE <=9 - 10 only
  3142. // Older IE sometimes signals "interactive" too soon
  3143. if ( document.readyState === "complete" ||
  3144. ( document.readyState !== "loading" && !document.documentElement.doScroll ) ) {
  3145. // Handle it asynchronously to allow scripts the opportunity to delay ready
  3146. window.setTimeout( jQuery.ready );
  3147. } else {
  3148. // Use the handy event callback
  3149. document.addEventListener( "DOMContentLoaded", completed );
  3150. // A fallback to window.onload, that will always work
  3151. window.addEventListener( "load", completed );
  3152. }
  3153. // Multifunctional method to get and set values of a collection
  3154. // The value/s can optionally be executed if it's a function
  3155. var access = function( elems, fn, key, value, chainable, emptyGet, raw ) {
  3156. var i = 0,
  3157. len = elems.length,
  3158. bulk = key == null;
  3159. // Sets many values
  3160. if ( toType( key ) === "object" ) {
  3161. chainable = true;
  3162. for ( i in key ) {
  3163. access( elems, fn, i, key[ i ], true, emptyGet, raw );
  3164. }
  3165. // Sets one value
  3166. } else if ( value !== undefined ) {
  3167. chainable = true;
  3168. if ( !isFunction( value ) ) {
  3169. raw = true;
  3170. }
  3171. if ( bulk ) {
  3172. // Bulk operations run against the entire set
  3173. if ( raw ) {
  3174. fn.call( elems, value );
  3175. fn = null;
  3176. // ...except when executing function values
  3177. } else {
  3178. bulk = fn;
  3179. fn = function( elem, _key, value ) {
  3180. return bulk.call( jQuery( elem ), value );
  3181. };
  3182. }
  3183. }
  3184. if ( fn ) {
  3185. for ( ; i < len; i++ ) {
  3186. fn(
  3187. elems[ i ], key, raw ?
  3188. value :
  3189. value.call( elems[ i ], i, fn( elems[ i ], key ) )
  3190. );
  3191. }
  3192. }
  3193. }
  3194. if ( chainable ) {
  3195. return elems;
  3196. }
  3197. // Gets
  3198. if ( bulk ) {
  3199. return fn.call( elems );
  3200. }
  3201. return len ? fn( elems[ 0 ], key ) : emptyGet;
  3202. };
  3203. // Matches dashed string for camelizing
  3204. var rmsPrefix = /^-ms-/,
  3205. rdashAlpha = /-([a-z])/g;
  3206. // Used by camelCase as callback to replace()
  3207. function fcamelCase( _all, letter ) {
  3208. return letter.toUpperCase();
  3209. }
  3210. // Convert dashed to camelCase; used by the css and data modules
  3211. // Support: IE <=9 - 11, Edge 12 - 15
  3212. // Microsoft forgot to hump their vendor prefix (trac-9572)
  3213. function camelCase( string ) {
  3214. return string.replace( rmsPrefix, "ms-" ).replace( rdashAlpha, fcamelCase );
  3215. }
  3216. var acceptData = function( owner ) {
  3217. // Accepts only:
  3218. // - Node
  3219. // - Node.ELEMENT_NODE
  3220. // - Node.DOCUMENT_NODE
  3221. // - Object
  3222. // - Any
  3223. return owner.nodeType === 1 || owner.nodeType === 9 || !( +owner.nodeType );
  3224. };
  3225. function Data() {
  3226. this.expando = jQuery.expando + Data.uid++;
  3227. }
  3228. Data.uid = 1;
  3229. Data.prototype = {
  3230. cache: function( owner ) {
  3231. // Check if the owner object already has a cache
  3232. var value = owner[ this.expando ];
  3233. // If not, create one
  3234. if ( !value ) {
  3235. value = {};
  3236. // We can accept data for non-element nodes in modern browsers,
  3237. // but we should not, see trac-8335.
  3238. // Always return an empty object.
  3239. if ( acceptData( owner ) ) {
  3240. // If it is a node unlikely to be stringify-ed or looped over
  3241. // use plain assignment
  3242. if ( owner.nodeType ) {
  3243. owner[ this.expando ] = value;
  3244. // Otherwise secure it in a non-enumerable property
  3245. // configurable must be true to allow the property to be
  3246. // deleted when data is removed
  3247. } else {
  3248. Object.defineProperty( owner, this.expando, {
  3249. value: value,
  3250. configurable: true
  3251. } );
  3252. }
  3253. }
  3254. }
  3255. return value;
  3256. },
  3257. set: function( owner, data, value ) {
  3258. var prop,
  3259. cache = this.cache( owner );
  3260. // Handle: [ owner, key, value ] args
  3261. // Always use camelCase key (gh-2257)
  3262. if ( typeof data === "string" ) {
  3263. cache[ camelCase( data ) ] = value;
  3264. // Handle: [ owner, { properties } ] args
  3265. } else {
  3266. // Copy the properties one-by-one to the cache object
  3267. for ( prop in data ) {
  3268. cache[ camelCase( prop ) ] = data[ prop ];
  3269. }
  3270. }
  3271. return cache;
  3272. },
  3273. get: function( owner, key ) {
  3274. return key === undefined ?
  3275. this.cache( owner ) :
  3276. // Always use camelCase key (gh-2257)
  3277. owner[ this.expando ] && owner[ this.expando ][ camelCase( key ) ];
  3278. },
  3279. access: function( owner, key, value ) {
  3280. // In cases where either:
  3281. //
  3282. // 1. No key was specified
  3283. // 2. A string key was specified, but no value provided
  3284. //
  3285. // Take the "read" path and allow the get method to determine
  3286. // which value to return, respectively either:
  3287. //
  3288. // 1. The entire cache object
  3289. // 2. The data stored at the key
  3290. //
  3291. if ( key === undefined ||
  3292. ( ( key && typeof key === "string" ) && value === undefined ) ) {
  3293. return this.get( owner, key );
  3294. }
  3295. // When the key is not a string, or both a key and value
  3296. // are specified, set or extend (existing objects) with either:
  3297. //
  3298. // 1. An object of properties
  3299. // 2. A key and value
  3300. //
  3301. this.set( owner, key, value );
  3302. // Since the "set" path can have two possible entry points
  3303. // return the expected data based on which path was taken[*]
  3304. return value !== undefined ? value : key;
  3305. },
  3306. remove: function( owner, key ) {
  3307. var i,
  3308. cache = owner[ this.expando ];
  3309. if ( cache === undefined ) {
  3310. return;
  3311. }
  3312. if ( key !== undefined ) {
  3313. // Support array or space separated string of keys
  3314. if ( Array.isArray( key ) ) {
  3315. // If key is an array of keys...
  3316. // We always set camelCase keys, so remove that.
  3317. key = key.map( camelCase );
  3318. } else {
  3319. key = camelCase( key );
  3320. // If a key with the spaces exists, use it.
  3321. // Otherwise, create an array by matching non-whitespace
  3322. key = key in cache ?
  3323. [ key ] :
  3324. ( key.match( rnothtmlwhite ) || [] );
  3325. }
  3326. i = key.length;
  3327. while ( i-- ) {
  3328. delete cache[ key[ i ] ];
  3329. }
  3330. }
  3331. // Remove the expando if there's no more data
  3332. if ( key === undefined || jQuery.isEmptyObject( cache ) ) {
  3333. // Support: Chrome <=35 - 45
  3334. // Webkit & Blink performance suffers when deleting properties
  3335. // from DOM nodes, so set to undefined instead
  3336. // https://bugs.chromium.org/p/chromium/issues/detail?id=378607 (bug restricted)
  3337. if ( owner.nodeType ) {
  3338. owner[ this.expando ] = undefined;
  3339. } else {
  3340. delete owner[ this.expando ];
  3341. }
  3342. }
  3343. },
  3344. hasData: function( owner ) {
  3345. var cache = owner[ this.expando ];
  3346. return cache !== undefined && !jQuery.isEmptyObject( cache );
  3347. }
  3348. };
  3349. var dataPriv = new Data();
  3350. var dataUser = new Data();
  3351. // Implementation Summary
  3352. //
  3353. // 1. Enforce API surface and semantic compatibility with 1.9.x branch
  3354. // 2. Improve the module's maintainability by reducing the storage
  3355. // paths to a single mechanism.
  3356. // 3. Use the same single mechanism to support "private" and "user" data.
  3357. // 4. _Never_ expose "private" data to user code (TODO: Drop _data, _removeData)
  3358. // 5. Avoid exposing implementation details on user objects (eg. expando properties)
  3359. // 6. Provide a clear path for implementation upgrade to WeakMap in 2014
  3360. var rbrace = /^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,
  3361. rmultiDash = /[A-Z]/g;
  3362. function getData( data ) {
  3363. if ( data === "true" ) {
  3364. return true;
  3365. }
  3366. if ( data === "false" ) {
  3367. return false;
  3368. }
  3369. if ( data === "null" ) {
  3370. return null;
  3371. }
  3372. // Only convert to a number if it doesn't change the string
  3373. if ( data === +data + "" ) {
  3374. return +data;
  3375. }
  3376. if ( rbrace.test( data ) ) {
  3377. return JSON.parse( data );
  3378. }
  3379. return data;
  3380. }
  3381. function dataAttr( elem, key, data ) {
  3382. var name;
  3383. // If nothing was found internally, try to fetch any
  3384. // data from the HTML5 data-* attribute
  3385. if ( data === undefined && elem.nodeType === 1 ) {
  3386. name = "data-" + key.replace( rmultiDash, "-$&" ).toLowerCase();
  3387. data = elem.getAttribute( name );
  3388. if ( typeof data === "string" ) {
  3389. try {
  3390. data = getData( data );
  3391. } catch ( e ) {}
  3392. // Make sure we set the data so it isn't changed later
  3393. dataUser.set( elem, key, data );
  3394. } else {
  3395. data = undefined;
  3396. }
  3397. }
  3398. return data;
  3399. }
  3400. jQuery.extend( {
  3401. hasData: function( elem ) {
  3402. return dataUser.hasData( elem ) || dataPriv.hasData( elem );
  3403. },
  3404. data: function( elem, name, data ) {
  3405. return dataUser.access( elem, name, data );
  3406. },
  3407. removeData: function( elem, name ) {
  3408. dataUser.remove( elem, name );
  3409. },
  3410. // TODO: Now that all calls to _data and _removeData have been replaced
  3411. // with direct calls to dataPriv methods, these can be deprecated.
  3412. _data: function( elem, name, data ) {
  3413. return dataPriv.access( elem, name, data );
  3414. },
  3415. _removeData: function( elem, name ) {
  3416. dataPriv.remove( elem, name );
  3417. }
  3418. } );
  3419. jQuery.fn.extend( {
  3420. data: function( key, value ) {
  3421. var i, name, data,
  3422. elem = this[ 0 ],
  3423. attrs = elem && elem.attributes;
  3424. // Gets all values
  3425. if ( key === undefined ) {
  3426. if ( this.length ) {
  3427. data = dataUser.get( elem );
  3428. if ( elem.nodeType === 1 && !dataPriv.get( elem, "hasDataAttrs" ) ) {
  3429. i = attrs.length;
  3430. while ( i-- ) {
  3431. // Support: IE 11 only
  3432. // The attrs elements can be null (trac-14894)
  3433. if ( attrs[ i ] ) {
  3434. name = attrs[ i ].name;
  3435. if ( name.indexOf( "data-" ) === 0 ) {
  3436. name = camelCase( name.slice( 5 ) );
  3437. dataAttr( elem, name, data[ name ] );
  3438. }
  3439. }
  3440. }
  3441. dataPriv.set( elem, "hasDataAttrs", true );
  3442. }
  3443. }
  3444. return data;
  3445. }
  3446. // Sets multiple values
  3447. if ( typeof key === "object" ) {
  3448. return this.each( function() {
  3449. dataUser.set( this, key );
  3450. } );
  3451. }
  3452. return access( this, function( value ) {
  3453. var data;
  3454. // The calling jQuery object (element matches) is not empty
  3455. // (and therefore has an element appears at this[ 0 ]) and the
  3456. // `value` parameter was not undefined. An empty jQuery object
  3457. // will result in `undefined` for elem = this[ 0 ] which will
  3458. // throw an exception if an attempt to read a data cache is made.
  3459. if ( elem && value === undefined ) {
  3460. // Attempt to get data from the cache
  3461. // The key will always be camelCased in Data
  3462. data = dataUser.get( elem, key );
  3463. if ( data !== undefined ) {
  3464. return data;
  3465. }
  3466. // Attempt to "discover" the data in
  3467. // HTML5 custom data-* attrs
  3468. data = dataAttr( elem, key );
  3469. if ( data !== undefined ) {
  3470. return data;
  3471. }
  3472. // We tried really hard, but the data doesn't exist.
  3473. return;
  3474. }
  3475. // Set the data...
  3476. this.each( function() {
  3477. // We always store the camelCased key
  3478. dataUser.set( this, key, value );
  3479. } );
  3480. }, null, value, arguments.length > 1, null, true );
  3481. },
  3482. removeData: function( key ) {
  3483. return this.each( function() {
  3484. dataUser.remove( this, key );
  3485. } );
  3486. }
  3487. } );
  3488. jQuery.extend( {
  3489. queue: function( elem, type, data ) {
  3490. var queue;
  3491. if ( elem ) {
  3492. type = ( type || "fx" ) + "queue";
  3493. queue = dataPriv.get( elem, type );
  3494. // Speed up dequeue by getting out quickly if this is just a lookup
  3495. if ( data ) {
  3496. if ( !queue || Array.isArray( data ) ) {
  3497. queue = dataPriv.access( elem, type, jQuery.makeArray( data ) );
  3498. } else {
  3499. queue.push( data );
  3500. }
  3501. }
  3502. return queue || [];
  3503. }
  3504. },
  3505. dequeue: function( elem, type ) {
  3506. type = type || "fx";
  3507. var queue = jQuery.queue( elem, type ),
  3508. startLength = queue.length,
  3509. fn = queue.shift(),
  3510. hooks = jQuery._queueHooks( elem, type ),
  3511. next = function() {
  3512. jQuery.dequeue( elem, type );
  3513. };
  3514. // If the fx queue is dequeued, always remove the progress sentinel
  3515. if ( fn === "inprogress" ) {
  3516. fn = queue.shift();
  3517. startLength--;
  3518. }
  3519. if ( fn ) {
  3520. // Add a progress sentinel to prevent the fx queue from being
  3521. // automatically dequeued
  3522. if ( type === "fx" ) {
  3523. queue.unshift( "inprogress" );
  3524. }
  3525. // Clear up the last queue stop function
  3526. delete hooks.stop;
  3527. fn.call( elem, next, hooks );
  3528. }
  3529. if ( !startLength && hooks ) {
  3530. hooks.empty.fire();
  3531. }
  3532. },
  3533. // Not public - generate a queueHooks object, or return the current one
  3534. _queueHooks: function( elem, type ) {
  3535. var key = type + "queueHooks";
  3536. return dataPriv.get( elem, key ) || dataPriv.access( elem, key, {
  3537. empty: jQuery.Callbacks( "once memory" ).add( function() {
  3538. dataPriv.remove( elem, [ type + "queue", key ] );
  3539. } )
  3540. } );
  3541. }
  3542. } );
  3543. jQuery.fn.extend( {
  3544. queue: function( type, data ) {
  3545. var setter = 2;
  3546. if ( typeof type !== "string" ) {
  3547. data = type;
  3548. type = "fx";
  3549. setter--;
  3550. }
  3551. if ( arguments.length < setter ) {
  3552. return jQuery.queue( this[ 0 ], type );
  3553. }
  3554. return data === undefined ?
  3555. this :
  3556. this.each( function() {
  3557. var queue = jQuery.queue( this, type, data );
  3558. // Ensure a hooks for this queue
  3559. jQuery._queueHooks( this, type );
  3560. if ( type === "fx" && queue[ 0 ] !== "inprogress" ) {
  3561. jQuery.dequeue( this, type );
  3562. }
  3563. } );
  3564. },
  3565. dequeue: function( type ) {
  3566. return this.each( function() {
  3567. jQuery.dequeue( this, type );
  3568. } );
  3569. },
  3570. clearQueue: function( type ) {
  3571. return this.queue( type || "fx", [] );
  3572. },
  3573. // Get a promise resolved when queues of a certain type
  3574. // are emptied (fx is the type by default)
  3575. promise: function( type, obj ) {
  3576. var tmp,
  3577. count = 1,
  3578. defer = jQuery.Deferred(),
  3579. elements = this,
  3580. i = this.length,
  3581. resolve = function() {
  3582. if ( !( --count ) ) {
  3583. defer.resolveWith( elements, [ elements ] );
  3584. }
  3585. };
  3586. if ( typeof type !== "string" ) {
  3587. obj = type;
  3588. type = undefined;
  3589. }
  3590. type = type || "fx";
  3591. while ( i-- ) {
  3592. tmp = dataPriv.get( elements[ i ], type + "queueHooks" );
  3593. if ( tmp && tmp.empty ) {
  3594. count++;
  3595. tmp.empty.add( resolve );
  3596. }
  3597. }
  3598. resolve();
  3599. return defer.promise( obj );
  3600. }
  3601. } );
  3602. var pnum = ( /[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/ ).source;
  3603. var rcssNum = new RegExp( "^(?:([+-])=|)(" + pnum + ")([a-z%]*)$", "i" );
  3604. var cssExpand = [ "Top", "Right", "Bottom", "Left" ];
  3605. var documentElement = document.documentElement;
  3606. var isAttached = function( elem ) {
  3607. return jQuery.contains( elem.ownerDocument, elem );
  3608. },
  3609. composed = { composed: true };
  3610. // Support: IE 9 - 11+, Edge 12 - 18+, iOS 10.0 - 10.2 only
  3611. // Check attachment across shadow DOM boundaries when possible (gh-3504)
  3612. // Support: iOS 10.0-10.2 only
  3613. // Early iOS 10 versions support `attachShadow` but not `getRootNode`,
  3614. // leading to errors. We need to check for `getRootNode`.
  3615. if ( documentElement.getRootNode ) {
  3616. isAttached = function( elem ) {
  3617. return jQuery.contains( elem.ownerDocument, elem ) ||
  3618. elem.getRootNode( composed ) === elem.ownerDocument;
  3619. };
  3620. }
  3621. var isHiddenWithinTree = function( elem, el ) {
  3622. // isHiddenWithinTree might be called from jQuery#filter function;
  3623. // in that case, element will be second argument
  3624. elem = el || elem;
  3625. // Inline style trumps all
  3626. return elem.style.display === "none" ||
  3627. elem.style.display === "" &&
  3628. // Otherwise, check computed style
  3629. // Support: Firefox <=43 - 45
  3630. // Disconnected elements can have computed display: none, so first confirm that elem is
  3631. // in the document.
  3632. isAttached( elem ) &&
  3633. jQuery.css( elem, "display" ) === "none";
  3634. };
  3635. function adjustCSS( elem, prop, valueParts, tween ) {
  3636. var adjusted, scale,
  3637. maxIterations = 20,
  3638. currentValue = tween ?
  3639. function() {
  3640. return tween.cur();
  3641. } :
  3642. function() {
  3643. return jQuery.css( elem, prop, "" );
  3644. },
  3645. initial = currentValue(),
  3646. unit = valueParts && valueParts[ 3 ] || ( jQuery.cssNumber[ prop ] ? "" : "px" ),
  3647. // Starting value computation is required for potential unit mismatches
  3648. initialInUnit = elem.nodeType &&
  3649. ( jQuery.cssNumber[ prop ] || unit !== "px" && +initial ) &&
  3650. rcssNum.exec( jQuery.css( elem, prop ) );
  3651. if ( initialInUnit && initialInUnit[ 3 ] !== unit ) {
  3652. // Support: Firefox <=54
  3653. // Halve the iteration target value to prevent interference from CSS upper bounds (gh-2144)
  3654. initial = initial / 2;
  3655. // Trust units reported by jQuery.css
  3656. unit = unit || initialInUnit[ 3 ];
  3657. // Iteratively approximate from a nonzero starting point
  3658. initialInUnit = +initial || 1;
  3659. while ( maxIterations-- ) {
  3660. // Evaluate and update our best guess (doubling guesses that zero out).
  3661. // Finish if the scale equals or crosses 1 (making the old*new product non-positive).
  3662. jQuery.style( elem, prop, initialInUnit + unit );
  3663. if ( ( 1 - scale ) * ( 1 - ( scale = currentValue() / initial || 0.5 ) ) <= 0 ) {
  3664. maxIterations = 0;
  3665. }
  3666. initialInUnit = initialInUnit / scale;
  3667. }
  3668. initialInUnit = initialInUnit * 2;
  3669. jQuery.style( elem, prop, initialInUnit + unit );
  3670. // Make sure we update the tween properties later on
  3671. valueParts = valueParts || [];
  3672. }
  3673. if ( valueParts ) {
  3674. initialInUnit = +initialInUnit || +initial || 0;
  3675. // Apply relative offset (+=/-=) if specified
  3676. adjusted = valueParts[ 1 ] ?
  3677. initialInUnit + ( valueParts[ 1 ] + 1 ) * valueParts[ 2 ] :
  3678. +valueParts[ 2 ];
  3679. if ( tween ) {
  3680. tween.unit = unit;
  3681. tween.start = initialInUnit;
  3682. tween.end = adjusted;
  3683. }
  3684. }
  3685. return adjusted;
  3686. }
  3687. var defaultDisplayMap = {};
  3688. function getDefaultDisplay( elem ) {
  3689. var temp,
  3690. doc = elem.ownerDocument,
  3691. nodeName = elem.nodeName,
  3692. display = defaultDisplayMap[ nodeName ];
  3693. if ( display ) {
  3694. return display;
  3695. }
  3696. temp = doc.body.appendChild( doc.createElement( nodeName ) );
  3697. display = jQuery.css( temp, "display" );
  3698. temp.parentNode.removeChild( temp );
  3699. if ( display === "none" ) {
  3700. display = "block";
  3701. }
  3702. defaultDisplayMap[ nodeName ] = display;
  3703. return display;
  3704. }
  3705. function showHide( elements, show ) {
  3706. var display, elem,
  3707. values = [],
  3708. index = 0,
  3709. length = elements.length;
  3710. // Determine new display value for elements that need to change
  3711. for ( ; index < length; index++ ) {
  3712. elem = elements[ index ];
  3713. if ( !elem.style ) {
  3714. continue;
  3715. }
  3716. display = elem.style.display;
  3717. if ( show ) {
  3718. // Since we force visibility upon cascade-hidden elements, an immediate (and slow)
  3719. // check is required in this first loop unless we have a nonempty display value (either
  3720. // inline or about-to-be-restored)
  3721. if ( display === "none" ) {
  3722. values[ index ] = dataPriv.get( elem, "display" ) || null;
  3723. if ( !values[ index ] ) {
  3724. elem.style.display = "";
  3725. }
  3726. }
  3727. if ( elem.style.display === "" && isHiddenWithinTree( elem ) ) {
  3728. values[ index ] = getDefaultDisplay( elem );
  3729. }
  3730. } else {
  3731. if ( display !== "none" ) {
  3732. values[ index ] = "none";
  3733. // Remember what we're overwriting
  3734. dataPriv.set( elem, "display", display );
  3735. }
  3736. }
  3737. }
  3738. // Set the display of the elements in a second loop to avoid constant reflow
  3739. for ( index = 0; index < length; index++ ) {
  3740. if ( values[ index ] != null ) {
  3741. elements[ index ].style.display = values[ index ];
  3742. }
  3743. }
  3744. return elements;
  3745. }
  3746. jQuery.fn.extend( {
  3747. show: function() {
  3748. return showHide( this, true );
  3749. },
  3750. hide: function() {
  3751. return showHide( this );
  3752. },
  3753. toggle: function( state ) {
  3754. if ( typeof state === "boolean" ) {
  3755. return state ? this.show() : this.hide();
  3756. }
  3757. return this.each( function() {
  3758. if ( isHiddenWithinTree( this ) ) {
  3759. jQuery( this ).show();
  3760. } else {
  3761. jQuery( this ).hide();
  3762. }
  3763. } );
  3764. }
  3765. } );
  3766. var rcheckableType = ( /^(?:checkbox|radio)$/i );
  3767. var rtagName = ( /<([a-z][^\/\0>\x20\t\r\n\f]*)/i );
  3768. var rscriptType = ( /^$|^module$|\/(?:java|ecma)script/i );
  3769. ( function() {
  3770. var fragment = document.createDocumentFragment(),
  3771. div = fragment.appendChild( document.createElement( "div" ) ),
  3772. input = document.createElement( "input" );
  3773. // Support: Android 4.0 - 4.3 only
  3774. // Check state lost if the name is set (trac-11217)
  3775. // Support: Windows Web Apps (WWA)
  3776. // `name` and `type` must use .setAttribute for WWA (trac-14901)
  3777. input.setAttribute( "type", "radio" );
  3778. input.setAttribute( "checked", "checked" );
  3779. input.setAttribute( "name", "t" );
  3780. div.appendChild( input );
  3781. // Support: Android <=4.1 only
  3782. // Older WebKit doesn't clone checked state correctly in fragments
  3783. support.checkClone = div.cloneNode( true ).cloneNode( true ).lastChild.checked;
  3784. // Support: IE <=11 only
  3785. // Make sure textarea (and checkbox) defaultValue is properly cloned
  3786. div.innerHTML = "<textarea>x</textarea>";
  3787. support.noCloneChecked = !!div.cloneNode( true ).lastChild.defaultValue;
  3788. // Support: IE <=9 only
  3789. // IE <=9 replaces <option> tags with their contents when inserted outside of
  3790. // the select element.
  3791. div.innerHTML = "<option></option>";
  3792. support.option = !!div.lastChild;
  3793. } )();
  3794. // We have to close these tags to support XHTML (trac-13200)
  3795. var wrapMap = {
  3796. // XHTML parsers do not magically insert elements in the
  3797. // same way that tag soup parsers do. So we cannot shorten
  3798. // this by omitting <tbody> or other required elements.
  3799. thead: [ 1, "<table>", "</table>" ],
  3800. col: [ 2, "<table><colgroup>", "</colgroup></table>" ],
  3801. tr: [ 2, "<table><tbody>", "</tbody></table>" ],
  3802. td: [ 3, "<table><tbody><tr>", "</tr></tbody></table>" ],
  3803. _default: [ 0, "", "" ]
  3804. };
  3805. wrapMap.tbody = wrapMap.tfoot = wrapMap.colgroup = wrapMap.caption = wrapMap.thead;
  3806. wrapMap.th = wrapMap.td;
  3807. // Support: IE <=9 only
  3808. if ( !support.option ) {
  3809. wrapMap.optgroup = wrapMap.option = [ 1, "<select multiple='multiple'>", "</select>" ];
  3810. }
  3811. function getAll( context, tag ) {
  3812. // Support: IE <=9 - 11 only
  3813. // Use typeof to avoid zero-argument method invocation on host objects (trac-15151)
  3814. var ret;
  3815. if ( typeof context.getElementsByTagName !== "undefined" ) {
  3816. ret = context.getElementsByTagName( tag || "*" );
  3817. } else if ( typeof context.querySelectorAll !== "undefined" ) {
  3818. ret = context.querySelectorAll( tag || "*" );
  3819. } else {
  3820. ret = [];
  3821. }
  3822. if ( tag === undefined || tag && nodeName( context, tag ) ) {
  3823. return jQuery.merge( [ context ], ret );
  3824. }
  3825. return ret;
  3826. }
  3827. // Mark scripts as having already been evaluated
  3828. function setGlobalEval( elems, refElements ) {
  3829. var i = 0,
  3830. l = elems.length;
  3831. for ( ; i < l; i++ ) {
  3832. dataPriv.set(
  3833. elems[ i ],
  3834. "globalEval",
  3835. !refElements || dataPriv.get( refElements[ i ], "globalEval" )
  3836. );
  3837. }
  3838. }
  3839. var rhtml = /<|&#?\w+;/;
  3840. function buildFragment( elems, context, scripts, selection, ignored ) {
  3841. var elem, tmp, tag, wrap, attached, j,
  3842. fragment = context.createDocumentFragment(),
  3843. nodes = [],
  3844. i = 0,
  3845. l = elems.length;
  3846. for ( ; i < l; i++ ) {
  3847. elem = elems[ i ];
  3848. if ( elem || elem === 0 ) {
  3849. // Add nodes directly
  3850. if ( toType( elem ) === "object" ) {
  3851. // Support: Android <=4.0 only, PhantomJS 1 only
  3852. // push.apply(_, arraylike) throws on ancient WebKit
  3853. jQuery.merge( nodes, elem.nodeType ? [ elem ] : elem );
  3854. // Convert non-html into a text node
  3855. } else if ( !rhtml.test( elem ) ) {
  3856. nodes.push( context.createTextNode( elem ) );
  3857. // Convert html into DOM nodes
  3858. } else {
  3859. tmp = tmp || fragment.appendChild( context.createElement( "div" ) );
  3860. // Deserialize a standard representation
  3861. tag = ( rtagName.exec( elem ) || [ "", "" ] )[ 1 ].toLowerCase();
  3862. wrap = wrapMap[ tag ] || wrapMap._default;
  3863. tmp.innerHTML = wrap[ 1 ] + jQuery.htmlPrefilter( elem ) + wrap[ 2 ];
  3864. // Descend through wrappers to the right content
  3865. j = wrap[ 0 ];
  3866. while ( j-- ) {
  3867. tmp = tmp.lastChild;
  3868. }
  3869. // Support: Android <=4.0 only, PhantomJS 1 only
  3870. // push.apply(_, arraylike) throws on ancient WebKit
  3871. jQuery.merge( nodes, tmp.childNodes );
  3872. // Remember the top-level container
  3873. tmp = fragment.firstChild;
  3874. // Ensure the created nodes are orphaned (trac-12392)
  3875. tmp.textContent = "";
  3876. }
  3877. }
  3878. }
  3879. // Remove wrapper from fragment
  3880. fragment.textContent = "";
  3881. i = 0;
  3882. while ( ( elem = nodes[ i++ ] ) ) {
  3883. // Skip elements already in the context collection (trac-4087)
  3884. if ( selection && jQuery.inArray( elem, selection ) > -1 ) {
  3885. if ( ignored ) {
  3886. ignored.push( elem );
  3887. }
  3888. continue;
  3889. }
  3890. attached = isAttached( elem );
  3891. // Append to fragment
  3892. tmp = getAll( fragment.appendChild( elem ), "script" );
  3893. // Preserve script evaluation history
  3894. if ( attached ) {
  3895. setGlobalEval( tmp );
  3896. }
  3897. // Capture executables
  3898. if ( scripts ) {
  3899. j = 0;
  3900. while ( ( elem = tmp[ j++ ] ) ) {
  3901. if ( rscriptType.test( elem.type || "" ) ) {
  3902. scripts.push( elem );
  3903. }
  3904. }
  3905. }
  3906. }
  3907. return fragment;
  3908. }
  3909. var rtypenamespace = /^([^.]*)(?:\.(.+)|)/;
  3910. function returnTrue() {
  3911. return true;
  3912. }
  3913. function returnFalse() {
  3914. return false;
  3915. }
  3916. function on( elem, types, selector, data, fn, one ) {
  3917. var origFn, type;
  3918. // Types can be a map of types/handlers
  3919. if ( typeof types === "object" ) {
  3920. // ( types-Object, selector, data )
  3921. if ( typeof selector !== "string" ) {
  3922. // ( types-Object, data )
  3923. data = data || selector;
  3924. selector = undefined;
  3925. }
  3926. for ( type in types ) {
  3927. on( elem, type, selector, data, types[ type ], one );
  3928. }
  3929. return elem;
  3930. }
  3931. if ( data == null && fn == null ) {
  3932. // ( types, fn )
  3933. fn = selector;
  3934. data = selector = undefined;
  3935. } else if ( fn == null ) {
  3936. if ( typeof selector === "string" ) {
  3937. // ( types, selector, fn )
  3938. fn = data;
  3939. data = undefined;
  3940. } else {
  3941. // ( types, data, fn )
  3942. fn = data;
  3943. data = selector;
  3944. selector = undefined;
  3945. }
  3946. }
  3947. if ( fn === false ) {
  3948. fn = returnFalse;
  3949. } else if ( !fn ) {
  3950. return elem;
  3951. }
  3952. if ( one === 1 ) {
  3953. origFn = fn;
  3954. fn = function( event ) {
  3955. // Can use an empty set, since event contains the info
  3956. jQuery().off( event );
  3957. return origFn.apply( this, arguments );
  3958. };
  3959. // Use same guid so caller can remove using origFn
  3960. fn.guid = origFn.guid || ( origFn.guid = jQuery.guid++ );
  3961. }
  3962. return elem.each( function() {
  3963. jQuery.event.add( this, types, fn, data, selector );
  3964. } );
  3965. }
  3966. /*
  3967. * Helper functions for managing events -- not part of the public interface.
  3968. * Props to Dean Edwards' addEvent library for many of the ideas.
  3969. */
  3970. jQuery.event = {
  3971. global: {},
  3972. add: function( elem, types, handler, data, selector ) {
  3973. var handleObjIn, eventHandle, tmp,
  3974. events, t, handleObj,
  3975. special, handlers, type, namespaces, origType,
  3976. elemData = dataPriv.get( elem );
  3977. // Only attach events to objects that accept data
  3978. if ( !acceptData( elem ) ) {
  3979. return;
  3980. }
  3981. // Caller can pass in an object of custom data in lieu of the handler
  3982. if ( handler.handler ) {
  3983. handleObjIn = handler;
  3984. handler = handleObjIn.handler;
  3985. selector = handleObjIn.selector;
  3986. }
  3987. // Ensure that invalid selectors throw exceptions at attach time
  3988. // Evaluate against documentElement in case elem is a non-element node (e.g., document)
  3989. if ( selector ) {
  3990. jQuery.find.matchesSelector( documentElement, selector );
  3991. }
  3992. // Make sure that the handler has a unique ID, used to find/remove it later
  3993. if ( !handler.guid ) {
  3994. handler.guid = jQuery.guid++;
  3995. }
  3996. // Init the element's event structure and main handler, if this is the first
  3997. if ( !( events = elemData.events ) ) {
  3998. events = elemData.events = Object.create( null );
  3999. }
  4000. if ( !( eventHandle = elemData.handle ) ) {
  4001. eventHandle = elemData.handle = function( e ) {
  4002. // Discard the second event of a jQuery.event.trigger() and
  4003. // when an event is called after a page has unloaded
  4004. return typeof jQuery !== "undefined" && jQuery.event.triggered !== e.type ?
  4005. jQuery.event.dispatch.apply( elem, arguments ) : undefined;
  4006. };
  4007. }
  4008. // Handle multiple events separated by a space
  4009. types = ( types || "" ).match( rnothtmlwhite ) || [ "" ];
  4010. t = types.length;
  4011. while ( t-- ) {
  4012. tmp = rtypenamespace.exec( types[ t ] ) || [];
  4013. type = origType = tmp[ 1 ];
  4014. namespaces = ( tmp[ 2 ] || "" ).split( "." ).sort();
  4015. // There *must* be a type, no attaching namespace-only handlers
  4016. if ( !type ) {
  4017. continue;
  4018. }
  4019. // If event changes its type, use the special event handlers for the changed type
  4020. special = jQuery.event.special[ type ] || {};
  4021. // If selector defined, determine special event api type, otherwise given type
  4022. type = ( selector ? special.delegateType : special.bindType ) || type;
  4023. // Update special based on newly reset type
  4024. special = jQuery.event.special[ type ] || {};
  4025. // handleObj is passed to all event handlers
  4026. handleObj = jQuery.extend( {
  4027. type: type,
  4028. origType: origType,
  4029. data: data,
  4030. handler: handler,
  4031. guid: handler.guid,
  4032. selector: selector,
  4033. needsContext: selector && jQuery.expr.match.needsContext.test( selector ),
  4034. namespace: namespaces.join( "." )
  4035. }, handleObjIn );
  4036. // Init the event handler queue if we're the first
  4037. if ( !( handlers = events[ type ] ) ) {
  4038. handlers = events[ type ] = [];
  4039. handlers.delegateCount = 0;
  4040. // Only use addEventListener if the special events handler returns false
  4041. if ( !special.setup ||
  4042. special.setup.call( elem, data, namespaces, eventHandle ) === false ) {
  4043. if ( elem.addEventListener ) {
  4044. elem.addEventListener( type, eventHandle );
  4045. }
  4046. }
  4047. }
  4048. if ( special.add ) {
  4049. special.add.call( elem, handleObj );
  4050. if ( !handleObj.handler.guid ) {
  4051. handleObj.handler.guid = handler.guid;
  4052. }
  4053. }
  4054. // Add to the element's handler list, delegates in front
  4055. if ( selector ) {
  4056. handlers.splice( handlers.delegateCount++, 0, handleObj );
  4057. } else {
  4058. handlers.push( handleObj );
  4059. }
  4060. // Keep track of which events have ever been used, for event optimization
  4061. jQuery.event.global[ type ] = true;
  4062. }
  4063. },
  4064. // Detach an event or set of events from an element
  4065. remove: function( elem, types, handler, selector, mappedTypes ) {
  4066. var j, origCount, tmp,
  4067. events, t, handleObj,
  4068. special, handlers, type, namespaces, origType,
  4069. elemData = dataPriv.hasData( elem ) && dataPriv.get( elem );
  4070. if ( !elemData || !( events = elemData.events ) ) {
  4071. return;
  4072. }
  4073. // Once for each type.namespace in types; type may be omitted
  4074. types = ( types || "" ).match( rnothtmlwhite ) || [ "" ];
  4075. t = types.length;
  4076. while ( t-- ) {
  4077. tmp = rtypenamespace.exec( types[ t ] ) || [];
  4078. type = origType = tmp[ 1 ];
  4079. namespaces = ( tmp[ 2 ] || "" ).split( "." ).sort();
  4080. // Unbind all events (on this namespace, if provided) for the element
  4081. if ( !type ) {
  4082. for ( type in events ) {
  4083. jQuery.event.remove( elem, type + types[ t ], handler, selector, true );
  4084. }
  4085. continue;
  4086. }
  4087. special = jQuery.event.special[ type ] || {};
  4088. type = ( selector ? special.delegateType : special.bindType ) || type;
  4089. handlers = events[ type ] || [];
  4090. tmp = tmp[ 2 ] &&
  4091. new RegExp( "(^|\\.)" + namespaces.join( "\\.(?:.*\\.|)" ) + "(\\.|$)" );
  4092. // Remove matching events
  4093. origCount = j = handlers.length;
  4094. while ( j-- ) {
  4095. handleObj = handlers[ j ];
  4096. if ( ( mappedTypes || origType === handleObj.origType ) &&
  4097. ( !handler || handler.guid === handleObj.guid ) &&
  4098. ( !tmp || tmp.test( handleObj.namespace ) ) &&
  4099. ( !selector || selector === handleObj.selector ||
  4100. selector === "**" && handleObj.selector ) ) {
  4101. handlers.splice( j, 1 );
  4102. if ( handleObj.selector ) {
  4103. handlers.delegateCount--;
  4104. }
  4105. if ( special.remove ) {
  4106. special.remove.call( elem, handleObj );
  4107. }
  4108. }
  4109. }
  4110. // Remove generic event handler if we removed something and no more handlers exist
  4111. // (avoids potential for endless recursion during removal of special event handlers)
  4112. if ( origCount && !handlers.length ) {
  4113. if ( !special.teardown ||
  4114. special.teardown.call( elem, namespaces, elemData.handle ) === false ) {
  4115. jQuery.removeEvent( elem, type, elemData.handle );
  4116. }
  4117. delete events[ type ];
  4118. }
  4119. }
  4120. // Remove data and the expando if it's no longer used
  4121. if ( jQuery.isEmptyObject( events ) ) {
  4122. dataPriv.remove( elem, "handle events" );
  4123. }
  4124. },
  4125. dispatch: function( nativeEvent ) {
  4126. var i, j, ret, matched, handleObj, handlerQueue,
  4127. args = new Array( arguments.length ),
  4128. // Make a writable jQuery.Event from the native event object
  4129. event = jQuery.event.fix( nativeEvent ),
  4130. handlers = (
  4131. dataPriv.get( this, "events" ) || Object.create( null )
  4132. )[ event.type ] || [],
  4133. special = jQuery.event.special[ event.type ] || {};
  4134. // Use the fix-ed jQuery.Event rather than the (read-only) native event
  4135. args[ 0 ] = event;
  4136. for ( i = 1; i < arguments.length; i++ ) {
  4137. args[ i ] = arguments[ i ];
  4138. }
  4139. event.delegateTarget = this;
  4140. // Call the preDispatch hook for the mapped type, and let it bail if desired
  4141. if ( special.preDispatch && special.preDispatch.call( this, event ) === false ) {
  4142. return;
  4143. }
  4144. // Determine handlers
  4145. handlerQueue = jQuery.event.handlers.call( this, event, handlers );
  4146. // Run delegates first; they may want to stop propagation beneath us
  4147. i = 0;
  4148. while ( ( matched = handlerQueue[ i++ ] ) && !event.isPropagationStopped() ) {
  4149. event.currentTarget = matched.elem;
  4150. j = 0;
  4151. while ( ( handleObj = matched.handlers[ j++ ] ) &&
  4152. !event.isImmediatePropagationStopped() ) {
  4153. // If the event is namespaced, then each handler is only invoked if it is
  4154. // specially universal or its namespaces are a superset of the event's.
  4155. if ( !event.rnamespace || handleObj.namespace === false ||
  4156. event.rnamespace.test( handleObj.namespace ) ) {
  4157. event.handleObj = handleObj;
  4158. event.data = handleObj.data;
  4159. ret = ( ( jQuery.event.special[ handleObj.origType ] || {} ).handle ||
  4160. handleObj.handler ).apply( matched.elem, args );
  4161. if ( ret !== undefined ) {
  4162. if ( ( event.result = ret ) === false ) {
  4163. event.preventDefault();
  4164. event.stopPropagation();
  4165. }
  4166. }
  4167. }
  4168. }
  4169. }
  4170. // Call the postDispatch hook for the mapped type
  4171. if ( special.postDispatch ) {
  4172. special.postDispatch.call( this, event );
  4173. }
  4174. return event.result;
  4175. },
  4176. handlers: function( event, handlers ) {
  4177. var i, handleObj, sel, matchedHandlers, matchedSelectors,
  4178. handlerQueue = [],
  4179. delegateCount = handlers.delegateCount,
  4180. cur = event.target;
  4181. // Find delegate handlers
  4182. if ( delegateCount &&
  4183. // Support: IE <=9
  4184. // Black-hole SVG <use> instance trees (trac-13180)
  4185. cur.nodeType &&
  4186. // Support: Firefox <=42
  4187. // Suppress spec-violating clicks indicating a non-primary pointer button (trac-3861)
  4188. // https://www.w3.org/TR/DOM-Level-3-Events/#event-type-click
  4189. // Support: IE 11 only
  4190. // ...but not arrow key "clicks" of radio inputs, which can have `button` -1 (gh-2343)
  4191. !( event.type === "click" && event.button >= 1 ) ) {
  4192. for ( ; cur !== this; cur = cur.parentNode || this ) {
  4193. // Don't check non-elements (trac-13208)
  4194. // Don't process clicks on disabled elements (trac-6911, trac-8165, trac-11382, trac-11764)
  4195. if ( cur.nodeType === 1 && !( event.type === "click" && cur.disabled === true ) ) {
  4196. matchedHandlers = [];
  4197. matchedSelectors = {};
  4198. for ( i = 0; i < delegateCount; i++ ) {
  4199. handleObj = handlers[ i ];
  4200. // Don't conflict with Object.prototype properties (trac-13203)
  4201. sel = handleObj.selector + " ";
  4202. if ( matchedSelectors[ sel ] === undefined ) {
  4203. matchedSelectors[ sel ] = handleObj.needsContext ?
  4204. jQuery( sel, this ).index( cur ) > -1 :
  4205. jQuery.find( sel, this, null, [ cur ] ).length;
  4206. }
  4207. if ( matchedSelectors[ sel ] ) {
  4208. matchedHandlers.push( handleObj );
  4209. }
  4210. }
  4211. if ( matchedHandlers.length ) {
  4212. handlerQueue.push( { elem: cur, handlers: matchedHandlers } );
  4213. }
  4214. }
  4215. }
  4216. }
  4217. // Add the remaining (directly-bound) handlers
  4218. cur = this;
  4219. if ( delegateCount < handlers.length ) {
  4220. handlerQueue.push( { elem: cur, handlers: handlers.slice( delegateCount ) } );
  4221. }
  4222. return handlerQueue;
  4223. },
  4224. addProp: function( name, hook ) {
  4225. Object.defineProperty( jQuery.Event.prototype, name, {
  4226. enumerable: true,
  4227. configurable: true,
  4228. get: isFunction( hook ) ?
  4229. function() {
  4230. if ( this.originalEvent ) {
  4231. return hook( this.originalEvent );
  4232. }
  4233. } :
  4234. function() {
  4235. if ( this.originalEvent ) {
  4236. return this.originalEvent[ name ];
  4237. }
  4238. },
  4239. set: function( value ) {
  4240. Object.defineProperty( this, name, {
  4241. enumerable: true,
  4242. configurable: true,
  4243. writable: true,
  4244. value: value
  4245. } );
  4246. }
  4247. } );
  4248. },
  4249. fix: function( originalEvent ) {
  4250. return originalEvent[ jQuery.expando ] ?
  4251. originalEvent :
  4252. new jQuery.Event( originalEvent );
  4253. },
  4254. special: {
  4255. load: {
  4256. // Prevent triggered image.load events from bubbling to window.load
  4257. noBubble: true
  4258. },
  4259. click: {
  4260. // Utilize native event to ensure correct state for checkable inputs
  4261. setup: function( data ) {
  4262. // For mutual compressibility with _default, replace `this` access with a local var.
  4263. // `|| data` is dead code meant only to preserve the variable through minification.
  4264. var el = this || data;
  4265. // Claim the first handler
  4266. if ( rcheckableType.test( el.type ) &&
  4267. el.click && nodeName( el, "input" ) ) {
  4268. // dataPriv.set( el, "click", ... )
  4269. leverageNative( el, "click", true );
  4270. }
  4271. // Return false to allow normal processing in the caller
  4272. return false;
  4273. },
  4274. trigger: function( data ) {
  4275. // For mutual compressibility with _default, replace `this` access with a local var.
  4276. // `|| data` is dead code meant only to preserve the variable through minification.
  4277. var el = this || data;
  4278. // Force setup before triggering a click
  4279. if ( rcheckableType.test( el.type ) &&
  4280. el.click && nodeName( el, "input" ) ) {
  4281. leverageNative( el, "click" );
  4282. }
  4283. // Return non-false to allow normal event-path propagation
  4284. return true;
  4285. },
  4286. // For cross-browser consistency, suppress native .click() on links
  4287. // Also prevent it if we're currently inside a leveraged native-event stack
  4288. _default: function( event ) {
  4289. var target = event.target;
  4290. return rcheckableType.test( target.type ) &&
  4291. target.click && nodeName( target, "input" ) &&
  4292. dataPriv.get( target, "click" ) ||
  4293. nodeName( target, "a" );
  4294. }
  4295. },
  4296. beforeunload: {
  4297. postDispatch: function( event ) {
  4298. // Support: Firefox 20+
  4299. // Firefox doesn't alert if the returnValue field is not set.
  4300. if ( event.result !== undefined && event.originalEvent ) {
  4301. event.originalEvent.returnValue = event.result;
  4302. }
  4303. }
  4304. }
  4305. }
  4306. };
  4307. // Ensure the presence of an event listener that handles manually-triggered
  4308. // synthetic events by interrupting progress until reinvoked in response to
  4309. // *native* events that it fires directly, ensuring that state changes have
  4310. // already occurred before other listeners are invoked.
  4311. function leverageNative( el, type, isSetup ) {
  4312. // Missing `isSetup` indicates a trigger call, which must force setup through jQuery.event.add
  4313. if ( !isSetup ) {
  4314. if ( dataPriv.get( el, type ) === undefined ) {
  4315. jQuery.event.add( el, type, returnTrue );
  4316. }
  4317. return;
  4318. }
  4319. // Register the controller as a special universal handler for all event namespaces
  4320. dataPriv.set( el, type, false );
  4321. jQuery.event.add( el, type, {
  4322. namespace: false,
  4323. handler: function( event ) {
  4324. var result,
  4325. saved = dataPriv.get( this, type );
  4326. if ( ( event.isTrigger & 1 ) && this[ type ] ) {
  4327. // Interrupt processing of the outer synthetic .trigger()ed event
  4328. if ( !saved ) {
  4329. // Store arguments for use when handling the inner native event
  4330. // There will always be at least one argument (an event object), so this array
  4331. // will not be confused with a leftover capture object.
  4332. saved = slice.call( arguments );
  4333. dataPriv.set( this, type, saved );
  4334. // Trigger the native event and capture its result
  4335. this[ type ]();
  4336. result = dataPriv.get( this, type );
  4337. dataPriv.set( this, type, false );
  4338. if ( saved !== result ) {
  4339. // Cancel the outer synthetic event
  4340. event.stopImmediatePropagation();
  4341. event.preventDefault();
  4342. return result;
  4343. }
  4344. // If this is an inner synthetic event for an event with a bubbling surrogate
  4345. // (focus or blur), assume that the surrogate already propagated from triggering
  4346. // the native event and prevent that from happening again here.
  4347. // This technically gets the ordering wrong w.r.t. to `.trigger()` (in which the
  4348. // bubbling surrogate propagates *after* the non-bubbling base), but that seems
  4349. // less bad than duplication.
  4350. } else if ( ( jQuery.event.special[ type ] || {} ).delegateType ) {
  4351. event.stopPropagation();
  4352. }
  4353. // If this is a native event triggered above, everything is now in order
  4354. // Fire an inner synthetic event with the original arguments
  4355. } else if ( saved ) {
  4356. // ...and capture the result
  4357. dataPriv.set( this, type, jQuery.event.trigger(
  4358. saved[ 0 ],
  4359. saved.slice( 1 ),
  4360. this
  4361. ) );
  4362. // Abort handling of the native event by all jQuery handlers while allowing
  4363. // native handlers on the same element to run. On target, this is achieved
  4364. // by stopping immediate propagation just on the jQuery event. However,
  4365. // the native event is re-wrapped by a jQuery one on each level of the
  4366. // propagation so the only way to stop it for jQuery is to stop it for
  4367. // everyone via native `stopPropagation()`. This is not a problem for
  4368. // focus/blur which don't bubble, but it does also stop click on checkboxes
  4369. // and radios. We accept this limitation.
  4370. event.stopPropagation();
  4371. event.isImmediatePropagationStopped = returnTrue;
  4372. }
  4373. }
  4374. } );
  4375. }
  4376. jQuery.removeEvent = function( elem, type, handle ) {
  4377. // This "if" is needed for plain objects
  4378. if ( elem.removeEventListener ) {
  4379. elem.removeEventListener( type, handle );
  4380. }
  4381. };
  4382. jQuery.Event = function( src, props ) {
  4383. // Allow instantiation without the 'new' keyword
  4384. if ( !( this instanceof jQuery.Event ) ) {
  4385. return new jQuery.Event( src, props );
  4386. }
  4387. // Event object
  4388. if ( src && src.type ) {
  4389. this.originalEvent = src;
  4390. this.type = src.type;
  4391. // Events bubbling up the document may have been marked as prevented
  4392. // by a handler lower down the tree; reflect the correct value.
  4393. this.isDefaultPrevented = src.defaultPrevented ||
  4394. src.defaultPrevented === undefined &&
  4395. // Support: Android <=2.3 only
  4396. src.returnValue === false ?
  4397. returnTrue :
  4398. returnFalse;
  4399. // Create target properties
  4400. // Support: Safari <=6 - 7 only
  4401. // Target should not be a text node (trac-504, trac-13143)
  4402. this.target = ( src.target && src.target.nodeType === 3 ) ?
  4403. src.target.parentNode :
  4404. src.target;
  4405. this.currentTarget = src.currentTarget;
  4406. this.relatedTarget = src.relatedTarget;
  4407. // Event type
  4408. } else {
  4409. this.type = src;
  4410. }
  4411. // Put explicitly provided properties onto the event object
  4412. if ( props ) {
  4413. jQuery.extend( this, props );
  4414. }
  4415. // Create a timestamp if incoming event doesn't have one
  4416. this.timeStamp = src && src.timeStamp || Date.now();
  4417. // Mark it as fixed
  4418. this[ jQuery.expando ] = true;
  4419. };
  4420. // jQuery.Event is based on DOM3 Events as specified by the ECMAScript Language Binding
  4421. // https://www.w3.org/TR/2003/WD-DOM-Level-3-Events-20030331/ecma-script-binding.html
  4422. jQuery.Event.prototype = {
  4423. constructor: jQuery.Event,
  4424. isDefaultPrevented: returnFalse,
  4425. isPropagationStopped: returnFalse,
  4426. isImmediatePropagationStopped: returnFalse,
  4427. isSimulated: false,
  4428. preventDefault: function() {
  4429. var e = this.originalEvent;
  4430. this.isDefaultPrevented = returnTrue;
  4431. if ( e && !this.isSimulated ) {
  4432. e.preventDefault();
  4433. }
  4434. },
  4435. stopPropagation: function() {
  4436. var e = this.originalEvent;
  4437. this.isPropagationStopped = returnTrue;
  4438. if ( e && !this.isSimulated ) {
  4439. e.stopPropagation();
  4440. }
  4441. },
  4442. stopImmediatePropagation: function() {
  4443. var e = this.originalEvent;
  4444. this.isImmediatePropagationStopped = returnTrue;
  4445. if ( e && !this.isSimulated ) {
  4446. e.stopImmediatePropagation();
  4447. }
  4448. this.stopPropagation();
  4449. }
  4450. };
  4451. // Includes all common event props including KeyEvent and MouseEvent specific props
  4452. jQuery.each( {
  4453. altKey: true,
  4454. bubbles: true,
  4455. cancelable: true,
  4456. changedTouches: true,
  4457. ctrlKey: true,
  4458. detail: true,
  4459. eventPhase: true,
  4460. metaKey: true,
  4461. pageX: true,
  4462. pageY: true,
  4463. shiftKey: true,
  4464. view: true,
  4465. "char": true,
  4466. code: true,
  4467. charCode: true,
  4468. key: true,
  4469. keyCode: true,
  4470. button: true,
  4471. buttons: true,
  4472. clientX: true,
  4473. clientY: true,
  4474. offsetX: true,
  4475. offsetY: true,
  4476. pointerId: true,
  4477. pointerType: true,
  4478. screenX: true,
  4479. screenY: true,
  4480. targetTouches: true,
  4481. toElement: true,
  4482. touches: true,
  4483. which: true
  4484. }, jQuery.event.addProp );
  4485. jQuery.each( { focus: "focusin", blur: "focusout" }, function( type, delegateType ) {
  4486. function focusMappedHandler( nativeEvent ) {
  4487. if ( document.documentMode ) {
  4488. // Support: IE 11+
  4489. // Attach a single focusin/focusout handler on the document while someone wants
  4490. // focus/blur. This is because the former are synchronous in IE while the latter
  4491. // are async. In other browsers, all those handlers are invoked synchronously.
  4492. // `handle` from private data would already wrap the event, but we need
  4493. // to change the `type` here.
  4494. var handle = dataPriv.get( this, "handle" ),
  4495. event = jQuery.event.fix( nativeEvent );
  4496. event.type = nativeEvent.type === "focusin" ? "focus" : "blur";
  4497. event.isSimulated = true;
  4498. // First, handle focusin/focusout
  4499. handle( nativeEvent );
  4500. // ...then, handle focus/blur
  4501. //
  4502. // focus/blur don't bubble while focusin/focusout do; simulate the former by only
  4503. // invoking the handler at the lower level.
  4504. if ( event.target === event.currentTarget ) {
  4505. // The setup part calls `leverageNative`, which, in turn, calls
  4506. // `jQuery.event.add`, so event handle will already have been set
  4507. // by this point.
  4508. handle( event );
  4509. }
  4510. } else {
  4511. // For non-IE browsers, attach a single capturing handler on the document
  4512. // while someone wants focusin/focusout.
  4513. jQuery.event.simulate( delegateType, nativeEvent.target,
  4514. jQuery.event.fix( nativeEvent ) );
  4515. }
  4516. }
  4517. jQuery.event.special[ type ] = {
  4518. // Utilize native event if possible so blur/focus sequence is correct
  4519. setup: function() {
  4520. var attaches;
  4521. // Claim the first handler
  4522. // dataPriv.set( this, "focus", ... )
  4523. // dataPriv.set( this, "blur", ... )
  4524. leverageNative( this, type, true );
  4525. if ( document.documentMode ) {
  4526. // Support: IE 9 - 11+
  4527. // We use the same native handler for focusin & focus (and focusout & blur)
  4528. // so we need to coordinate setup & teardown parts between those events.
  4529. // Use `delegateType` as the key as `type` is already used by `leverageNative`.
  4530. attaches = dataPriv.get( this, delegateType );
  4531. if ( !attaches ) {
  4532. this.addEventListener( delegateType, focusMappedHandler );
  4533. }
  4534. dataPriv.set( this, delegateType, ( attaches || 0 ) + 1 );
  4535. } else {
  4536. // Return false to allow normal processing in the caller
  4537. return false;
  4538. }
  4539. },
  4540. trigger: function() {
  4541. // Force setup before trigger
  4542. leverageNative( this, type );
  4543. // Return non-false to allow normal event-path propagation
  4544. return true;
  4545. },
  4546. teardown: function() {
  4547. var attaches;
  4548. if ( document.documentMode ) {
  4549. attaches = dataPriv.get( this, delegateType ) - 1;
  4550. if ( !attaches ) {
  4551. this.removeEventListener( delegateType, focusMappedHandler );
  4552. dataPriv.remove( this, delegateType );
  4553. } else {
  4554. dataPriv.set( this, delegateType, attaches );
  4555. }
  4556. } else {
  4557. // Return false to indicate standard teardown should be applied
  4558. return false;
  4559. }
  4560. },
  4561. // Suppress native focus or blur if we're currently inside
  4562. // a leveraged native-event stack
  4563. _default: function( event ) {
  4564. return dataPriv.get( event.target, type );
  4565. },
  4566. delegateType: delegateType
  4567. };
  4568. // Support: Firefox <=44
  4569. // Firefox doesn't have focus(in | out) events
  4570. // Related ticket - https://bugzilla.mozilla.org/show_bug.cgi?id=687787
  4571. //
  4572. // Support: Chrome <=48 - 49, Safari <=9.0 - 9.1
  4573. // focus(in | out) events fire after focus & blur events,
  4574. // which is spec violation - http://www.w3.org/TR/DOM-Level-3-Events/#events-focusevent-event-order
  4575. // Related ticket - https://bugs.chromium.org/p/chromium/issues/detail?id=449857
  4576. //
  4577. // Support: IE 9 - 11+
  4578. // To preserve relative focusin/focus & focusout/blur event order guaranteed on the 3.x branch,
  4579. // attach a single handler for both events in IE.
  4580. jQuery.event.special[ delegateType ] = {
  4581. setup: function() {
  4582. // Handle: regular nodes (via `this.ownerDocument`), window
  4583. // (via `this.document`) & document (via `this`).
  4584. var doc = this.ownerDocument || this.document || this,
  4585. dataHolder = document.documentMode ? this : doc,
  4586. attaches = dataPriv.get( dataHolder, delegateType );
  4587. // Support: IE 9 - 11+
  4588. // We use the same native handler for focusin & focus (and focusout & blur)
  4589. // so we need to coordinate setup & teardown parts between those events.
  4590. // Use `delegateType` as the key as `type` is already used by `leverageNative`.
  4591. if ( !attaches ) {
  4592. if ( document.documentMode ) {
  4593. this.addEventListener( delegateType, focusMappedHandler );
  4594. } else {
  4595. doc.addEventListener( type, focusMappedHandler, true );
  4596. }
  4597. }
  4598. dataPriv.set( dataHolder, delegateType, ( attaches || 0 ) + 1 );
  4599. },
  4600. teardown: function() {
  4601. var doc = this.ownerDocument || this.document || this,
  4602. dataHolder = document.documentMode ? this : doc,
  4603. attaches = dataPriv.get( dataHolder, delegateType ) - 1;
  4604. if ( !attaches ) {
  4605. if ( document.documentMode ) {
  4606. this.removeEventListener( delegateType, focusMappedHandler );
  4607. } else {
  4608. doc.removeEventListener( type, focusMappedHandler, true );
  4609. }
  4610. dataPriv.remove( dataHolder, delegateType );
  4611. } else {
  4612. dataPriv.set( dataHolder, delegateType, attaches );
  4613. }
  4614. }
  4615. };
  4616. } );
  4617. // Create mouseenter/leave events using mouseover/out and event-time checks
  4618. // so that event delegation works in jQuery.
  4619. // Do the same for pointerenter/pointerleave and pointerover/pointerout
  4620. //
  4621. // Support: Safari 7 only
  4622. // Safari sends mouseenter too often; see:
  4623. // https://bugs.chromium.org/p/chromium/issues/detail?id=470258
  4624. // for the description of the bug (it existed in older Chrome versions as well).
  4625. jQuery.each( {
  4626. mouseenter: "mouseover",
  4627. mouseleave: "mouseout",
  4628. pointerenter: "pointerover",
  4629. pointerleave: "pointerout"
  4630. }, function( orig, fix ) {
  4631. jQuery.event.special[ orig ] = {
  4632. delegateType: fix,
  4633. bindType: fix,
  4634. handle: function( event ) {
  4635. var ret,
  4636. target = this,
  4637. related = event.relatedTarget,
  4638. handleObj = event.handleObj;
  4639. // For mouseenter/leave call the handler if related is outside the target.
  4640. // NB: No relatedTarget if the mouse left/entered the browser window
  4641. if ( !related || ( related !== target && !jQuery.contains( target, related ) ) ) {
  4642. event.type = handleObj.origType;
  4643. ret = handleObj.handler.apply( this, arguments );
  4644. event.type = fix;
  4645. }
  4646. return ret;
  4647. }
  4648. };
  4649. } );
  4650. jQuery.fn.extend( {
  4651. on: function( types, selector, data, fn ) {
  4652. return on( this, types, selector, data, fn );
  4653. },
  4654. one: function( types, selector, data, fn ) {
  4655. return on( this, types, selector, data, fn, 1 );
  4656. },
  4657. off: function( types, selector, fn ) {
  4658. var handleObj, type;
  4659. if ( types && types.preventDefault && types.handleObj ) {
  4660. // ( event ) dispatched jQuery.Event
  4661. handleObj = types.handleObj;
  4662. jQuery( types.delegateTarget ).off(
  4663. handleObj.namespace ?
  4664. handleObj.origType + "." + handleObj.namespace :
  4665. handleObj.origType,
  4666. handleObj.selector,
  4667. handleObj.handler
  4668. );
  4669. return this;
  4670. }
  4671. if ( typeof types === "object" ) {
  4672. // ( types-object [, selector] )
  4673. for ( type in types ) {
  4674. this.off( type, selector, types[ type ] );
  4675. }
  4676. return this;
  4677. }
  4678. if ( selector === false || typeof selector === "function" ) {
  4679. // ( types [, fn] )
  4680. fn = selector;
  4681. selector = undefined;
  4682. }
  4683. if ( fn === false ) {
  4684. fn = returnFalse;
  4685. }
  4686. return this.each( function() {
  4687. jQuery.event.remove( this, types, fn, selector );
  4688. } );
  4689. }
  4690. } );
  4691. var
  4692. // Support: IE <=10 - 11, Edge 12 - 13 only
  4693. // In IE/Edge using regex groups here causes severe slowdowns.
  4694. // See https://connect.microsoft.com/IE/feedback/details/1736512/
  4695. rnoInnerhtml = /<script|<style|<link/i,
  4696. // checked="checked" or checked
  4697. rchecked = /checked\s*(?:[^=]|=\s*.checked.)/i,
  4698. rcleanScript = /^\s*<!\[CDATA\[|\]\]>\s*$/g;
  4699. // Prefer a tbody over its parent table for containing new rows
  4700. function manipulationTarget( elem, content ) {
  4701. if ( nodeName( elem, "table" ) &&
  4702. nodeName( content.nodeType !== 11 ? content : content.firstChild, "tr" ) ) {
  4703. return jQuery( elem ).children( "tbody" )[ 0 ] || elem;
  4704. }
  4705. return elem;
  4706. }
  4707. // Replace/restore the type attribute of script elements for safe DOM manipulation
  4708. function disableScript( elem ) {
  4709. elem.type = ( elem.getAttribute( "type" ) !== null ) + "/" + elem.type;
  4710. return elem;
  4711. }
  4712. function restoreScript( elem ) {
  4713. if ( ( elem.type || "" ).slice( 0, 5 ) === "true/" ) {
  4714. elem.type = elem.type.slice( 5 );
  4715. } else {
  4716. elem.removeAttribute( "type" );
  4717. }
  4718. return elem;
  4719. }
  4720. function cloneCopyEvent( src, dest ) {
  4721. var i, l, type, pdataOld, udataOld, udataCur, events;
  4722. if ( dest.nodeType !== 1 ) {
  4723. return;
  4724. }
  4725. // 1. Copy private data: events, handlers, etc.
  4726. if ( dataPriv.hasData( src ) ) {
  4727. pdataOld = dataPriv.get( src );
  4728. events = pdataOld.events;
  4729. if ( events ) {
  4730. dataPriv.remove( dest, "handle events" );
  4731. for ( type in events ) {
  4732. for ( i = 0, l = events[ type ].length; i < l; i++ ) {
  4733. jQuery.event.add( dest, type, events[ type ][ i ] );
  4734. }
  4735. }
  4736. }
  4737. }
  4738. // 2. Copy user data
  4739. if ( dataUser.hasData( src ) ) {
  4740. udataOld = dataUser.access( src );
  4741. udataCur = jQuery.extend( {}, udataOld );
  4742. dataUser.set( dest, udataCur );
  4743. }
  4744. }
  4745. // Fix IE bugs, see support tests
  4746. function fixInput( src, dest ) {
  4747. var nodeName = dest.nodeName.toLowerCase();
  4748. // Fails to persist the checked state of a cloned checkbox or radio button.
  4749. if ( nodeName === "input" && rcheckableType.test( src.type ) ) {
  4750. dest.checked = src.checked;
  4751. // Fails to return the selected option to the default selected state when cloning options
  4752. } else if ( nodeName === "input" || nodeName === "textarea" ) {
  4753. dest.defaultValue = src.defaultValue;
  4754. }
  4755. }
  4756. function domManip( collection, args, callback, ignored ) {
  4757. // Flatten any nested arrays
  4758. args = flat( args );
  4759. var fragment, first, scripts, hasScripts, node, doc,
  4760. i = 0,
  4761. l = collection.length,
  4762. iNoClone = l - 1,
  4763. value = args[ 0 ],
  4764. valueIsFunction = isFunction( value );
  4765. // We can't cloneNode fragments that contain checked, in WebKit
  4766. if ( valueIsFunction ||
  4767. ( l > 1 && typeof value === "string" &&
  4768. !support.checkClone && rchecked.test( value ) ) ) {
  4769. return collection.each( function( index ) {
  4770. var self = collection.eq( index );
  4771. if ( valueIsFunction ) {
  4772. args[ 0 ] = value.call( this, index, self.html() );
  4773. }
  4774. domManip( self, args, callback, ignored );
  4775. } );
  4776. }
  4777. if ( l ) {
  4778. fragment = buildFragment( args, collection[ 0 ].ownerDocument, false, collection, ignored );
  4779. first = fragment.firstChild;
  4780. if ( fragment.childNodes.length === 1 ) {
  4781. fragment = first;
  4782. }
  4783. // Require either new content or an interest in ignored elements to invoke the callback
  4784. if ( first || ignored ) {
  4785. scripts = jQuery.map( getAll( fragment, "script" ), disableScript );
  4786. hasScripts = scripts.length;
  4787. // Use the original fragment for the last item
  4788. // instead of the first because it can end up
  4789. // being emptied incorrectly in certain situations (trac-8070).
  4790. for ( ; i < l; i++ ) {
  4791. node = fragment;
  4792. if ( i !== iNoClone ) {
  4793. node = jQuery.clone( node, true, true );
  4794. // Keep references to cloned scripts for later restoration
  4795. if ( hasScripts ) {
  4796. // Support: Android <=4.0 only, PhantomJS 1 only
  4797. // push.apply(_, arraylike) throws on ancient WebKit
  4798. jQuery.merge( scripts, getAll( node, "script" ) );
  4799. }
  4800. }
  4801. callback.call( collection[ i ], node, i );
  4802. }
  4803. if ( hasScripts ) {
  4804. doc = scripts[ scripts.length - 1 ].ownerDocument;
  4805. // Re-enable scripts
  4806. jQuery.map( scripts, restoreScript );
  4807. // Evaluate executable scripts on first document insertion
  4808. for ( i = 0; i < hasScripts; i++ ) {
  4809. node = scripts[ i ];
  4810. if ( rscriptType.test( node.type || "" ) &&
  4811. !dataPriv.access( node, "globalEval" ) &&
  4812. jQuery.contains( doc, node ) ) {
  4813. if ( node.src && ( node.type || "" ).toLowerCase() !== "module" ) {
  4814. // Optional AJAX dependency, but won't run scripts if not present
  4815. if ( jQuery._evalUrl && !node.noModule ) {
  4816. jQuery._evalUrl( node.src, {
  4817. nonce: node.nonce || node.getAttribute( "nonce" )
  4818. }, doc );
  4819. }
  4820. } else {
  4821. // Unwrap a CDATA section containing script contents. This shouldn't be
  4822. // needed as in XML documents they're already not visible when
  4823. // inspecting element contents and in HTML documents they have no
  4824. // meaning but we're preserving that logic for backwards compatibility.
  4825. // This will be removed completely in 4.0. See gh-4904.
  4826. DOMEval( node.textContent.replace( rcleanScript, "" ), node, doc );
  4827. }
  4828. }
  4829. }
  4830. }
  4831. }
  4832. }
  4833. return collection;
  4834. }
  4835. function remove( elem, selector, keepData ) {
  4836. var node,
  4837. nodes = selector ? jQuery.filter( selector, elem ) : elem,
  4838. i = 0;
  4839. for ( ; ( node = nodes[ i ] ) != null; i++ ) {
  4840. if ( !keepData && node.nodeType === 1 ) {
  4841. jQuery.cleanData( getAll( node ) );
  4842. }
  4843. if ( node.parentNode ) {
  4844. if ( keepData && isAttached( node ) ) {
  4845. setGlobalEval( getAll( node, "script" ) );
  4846. }
  4847. node.parentNode.removeChild( node );
  4848. }
  4849. }
  4850. return elem;
  4851. }
  4852. jQuery.extend( {
  4853. htmlPrefilter: function( html ) {
  4854. return html;
  4855. },
  4856. clone: function( elem, dataAndEvents, deepDataAndEvents ) {
  4857. var i, l, srcElements, destElements,
  4858. clone = elem.cloneNode( true ),
  4859. inPage = isAttached( elem );
  4860. // Fix IE cloning issues
  4861. if ( !support.noCloneChecked && ( elem.nodeType === 1 || elem.nodeType === 11 ) &&
  4862. !jQuery.isXMLDoc( elem ) ) {
  4863. // We eschew jQuery#find here for performance reasons:
  4864. // https://jsperf.com/getall-vs-sizzle/2
  4865. destElements = getAll( clone );
  4866. srcElements = getAll( elem );
  4867. for ( i = 0, l = srcElements.length; i < l; i++ ) {
  4868. fixInput( srcElements[ i ], destElements[ i ] );
  4869. }
  4870. }
  4871. // Copy the events from the original to the clone
  4872. if ( dataAndEvents ) {
  4873. if ( deepDataAndEvents ) {
  4874. srcElements = srcElements || getAll( elem );
  4875. destElements = destElements || getAll( clone );
  4876. for ( i = 0, l = srcElements.length; i < l; i++ ) {
  4877. cloneCopyEvent( srcElements[ i ], destElements[ i ] );
  4878. }
  4879. } else {
  4880. cloneCopyEvent( elem, clone );
  4881. }
  4882. }
  4883. // Preserve script evaluation history
  4884. destElements = getAll( clone, "script" );
  4885. if ( destElements.length > 0 ) {
  4886. setGlobalEval( destElements, !inPage && getAll( elem, "script" ) );
  4887. }
  4888. // Return the cloned set
  4889. return clone;
  4890. },
  4891. cleanData: function( elems ) {
  4892. var data, elem, type,
  4893. special = jQuery.event.special,
  4894. i = 0;
  4895. for ( ; ( elem = elems[ i ] ) !== undefined; i++ ) {
  4896. if ( acceptData( elem ) ) {
  4897. if ( ( data = elem[ dataPriv.expando ] ) ) {
  4898. if ( data.events ) {
  4899. for ( type in data.events ) {
  4900. if ( special[ type ] ) {
  4901. jQuery.event.remove( elem, type );
  4902. // This is a shortcut to avoid jQuery.event.remove's overhead
  4903. } else {
  4904. jQuery.removeEvent( elem, type, data.handle );
  4905. }
  4906. }
  4907. }
  4908. // Support: Chrome <=35 - 45+
  4909. // Assign undefined instead of using delete, see Data#remove
  4910. elem[ dataPriv.expando ] = undefined;
  4911. }
  4912. if ( elem[ dataUser.expando ] ) {
  4913. // Support: Chrome <=35 - 45+
  4914. // Assign undefined instead of using delete, see Data#remove
  4915. elem[ dataUser.expando ] = undefined;
  4916. }
  4917. }
  4918. }
  4919. }
  4920. } );
  4921. jQuery.fn.extend( {
  4922. detach: function( selector ) {
  4923. return remove( this, selector, true );
  4924. },
  4925. remove: function( selector ) {
  4926. return remove( this, selector );
  4927. },
  4928. text: function( value ) {
  4929. return access( this, function( value ) {
  4930. return value === undefined ?
  4931. jQuery.text( this ) :
  4932. this.empty().each( function() {
  4933. if ( this.nodeType === 1 || this.nodeType === 11 || this.nodeType === 9 ) {
  4934. this.textContent = value;
  4935. }
  4936. } );
  4937. }, null, value, arguments.length );
  4938. },
  4939. append: function() {
  4940. return domManip( this, arguments, function( elem ) {
  4941. if ( this.nodeType === 1 || this.nodeType === 11 || this.nodeType === 9 ) {
  4942. var target = manipulationTarget( this, elem );
  4943. target.appendChild( elem );
  4944. }
  4945. } );
  4946. },
  4947. prepend: function() {
  4948. return domManip( this, arguments, function( elem ) {
  4949. if ( this.nodeType === 1 || this.nodeType === 11 || this.nodeType === 9 ) {
  4950. var target = manipulationTarget( this, elem );
  4951. target.insertBefore( elem, target.firstChild );
  4952. }
  4953. } );
  4954. },
  4955. before: function() {
  4956. return domManip( this, arguments, function( elem ) {
  4957. if ( this.parentNode ) {
  4958. this.parentNode.insertBefore( elem, this );
  4959. }
  4960. } );
  4961. },
  4962. after: function() {
  4963. return domManip( this, arguments, function( elem ) {
  4964. if ( this.parentNode ) {
  4965. this.parentNode.insertBefore( elem, this.nextSibling );
  4966. }
  4967. } );
  4968. },
  4969. empty: function() {
  4970. var elem,
  4971. i = 0;
  4972. for ( ; ( elem = this[ i ] ) != null; i++ ) {
  4973. if ( elem.nodeType === 1 ) {
  4974. // Prevent memory leaks
  4975. jQuery.cleanData( getAll( elem, false ) );
  4976. // Remove any remaining nodes
  4977. elem.textContent = "";
  4978. }
  4979. }
  4980. return this;
  4981. },
  4982. clone: function( dataAndEvents, deepDataAndEvents ) {
  4983. dataAndEvents = dataAndEvents == null ? false : dataAndEvents;
  4984. deepDataAndEvents = deepDataAndEvents == null ? dataAndEvents : deepDataAndEvents;
  4985. return this.map( function() {
  4986. return jQuery.clone( this, dataAndEvents, deepDataAndEvents );
  4987. } );
  4988. },
  4989. html: function( value ) {
  4990. return access( this, function( value ) {
  4991. var elem = this[ 0 ] || {},
  4992. i = 0,
  4993. l = this.length;
  4994. if ( value === undefined && elem.nodeType === 1 ) {
  4995. return elem.innerHTML;
  4996. }
  4997. // See if we can take a shortcut and just use innerHTML
  4998. if ( typeof value === "string" && !rnoInnerhtml.test( value ) &&
  4999. !wrapMap[ ( rtagName.exec( value ) || [ "", "" ] )[ 1 ].toLowerCase() ] ) {
  5000. value = jQuery.htmlPrefilter( value );
  5001. try {
  5002. for ( ; i < l; i++ ) {
  5003. elem = this[ i ] || {};
  5004. // Remove element nodes and prevent memory leaks
  5005. if ( elem.nodeType === 1 ) {
  5006. jQuery.cleanData( getAll( elem, false ) );
  5007. elem.innerHTML = value;
  5008. }
  5009. }
  5010. elem = 0;
  5011. // If using innerHTML throws an exception, use the fallback method
  5012. } catch ( e ) {}
  5013. }
  5014. if ( elem ) {
  5015. this.empty().append( value );
  5016. }
  5017. }, null, value, arguments.length );
  5018. },
  5019. replaceWith: function() {
  5020. var ignored = [];
  5021. // Make the changes, replacing each non-ignored context element with the new content
  5022. return domManip( this, arguments, function( elem ) {
  5023. var parent = this.parentNode;
  5024. if ( jQuery.inArray( this, ignored ) < 0 ) {
  5025. jQuery.cleanData( getAll( this ) );
  5026. if ( parent ) {
  5027. parent.replaceChild( elem, this );
  5028. }
  5029. }
  5030. // Force callback invocation
  5031. }, ignored );
  5032. }
  5033. } );
  5034. jQuery.each( {
  5035. appendTo: "append",
  5036. prependTo: "prepend",
  5037. insertBefore: "before",
  5038. insertAfter: "after",
  5039. replaceAll: "replaceWith"
  5040. }, function( name, original ) {
  5041. jQuery.fn[ name ] = function( selector ) {
  5042. var elems,
  5043. ret = [],
  5044. insert = jQuery( selector ),
  5045. last = insert.length - 1,
  5046. i = 0;
  5047. for ( ; i <= last; i++ ) {
  5048. elems = i === last ? this : this.clone( true );
  5049. jQuery( insert[ i ] )[ original ]( elems );
  5050. // Support: Android <=4.0 only, PhantomJS 1 only
  5051. // .get() because push.apply(_, arraylike) throws on ancient WebKit
  5052. push.apply( ret, elems.get() );
  5053. }
  5054. return this.pushStack( ret );
  5055. };
  5056. } );
  5057. var rnumnonpx = new RegExp( "^(" + pnum + ")(?!px)[a-z%]+$", "i" );
  5058. var rcustomProp = /^--/;
  5059. var getStyles = function( elem ) {
  5060. // Support: IE <=11 only, Firefox <=30 (trac-15098, trac-14150)
  5061. // IE throws on elements created in popups
  5062. // FF meanwhile throws on frame elements through "defaultView.getComputedStyle"
  5063. var view = elem.ownerDocument.defaultView;
  5064. if ( !view || !view.opener ) {
  5065. view = window;
  5066. }
  5067. return view.getComputedStyle( elem );
  5068. };
  5069. var swap = function( elem, options, callback ) {
  5070. var ret, name,
  5071. old = {};
  5072. // Remember the old values, and insert the new ones
  5073. for ( name in options ) {
  5074. old[ name ] = elem.style[ name ];
  5075. elem.style[ name ] = options[ name ];
  5076. }
  5077. ret = callback.call( elem );
  5078. // Revert the old values
  5079. for ( name in options ) {
  5080. elem.style[ name ] = old[ name ];
  5081. }
  5082. return ret;
  5083. };
  5084. var rboxStyle = new RegExp( cssExpand.join( "|" ), "i" );
  5085. ( function() {
  5086. // Executing both pixelPosition & boxSizingReliable tests require only one layout
  5087. // so they're executed at the same time to save the second computation.
  5088. function computeStyleTests() {
  5089. // This is a singleton, we need to execute it only once
  5090. if ( !div ) {
  5091. return;
  5092. }
  5093. container.style.cssText = "position:absolute;left:-11111px;width:60px;" +
  5094. "margin-top:1px;padding:0;border:0";
  5095. div.style.cssText =
  5096. "position:relative;display:block;box-sizing:border-box;overflow:scroll;" +
  5097. "margin:auto;border:1px;padding:1px;" +
  5098. "width:60%;top:1%";
  5099. documentElement.appendChild( container ).appendChild( div );
  5100. var divStyle = window.getComputedStyle( div );
  5101. pixelPositionVal = divStyle.top !== "1%";
  5102. // Support: Android 4.0 - 4.3 only, Firefox <=3 - 44
  5103. reliableMarginLeftVal = roundPixelMeasures( divStyle.marginLeft ) === 12;
  5104. // Support: Android 4.0 - 4.3 only, Safari <=9.1 - 10.1, iOS <=7.0 - 9.3
  5105. // Some styles come back with percentage values, even though they shouldn't
  5106. div.style.right = "60%";
  5107. pixelBoxStylesVal = roundPixelMeasures( divStyle.right ) === 36;
  5108. // Support: IE 9 - 11 only
  5109. // Detect misreporting of content dimensions for box-sizing:border-box elements
  5110. boxSizingReliableVal = roundPixelMeasures( divStyle.width ) === 36;
  5111. // Support: IE 9 only
  5112. // Detect overflow:scroll screwiness (gh-3699)
  5113. // Support: Chrome <=64
  5114. // Don't get tricked when zoom affects offsetWidth (gh-4029)
  5115. div.style.position = "absolute";
  5116. scrollboxSizeVal = roundPixelMeasures( div.offsetWidth / 3 ) === 12;
  5117. documentElement.removeChild( container );
  5118. // Nullify the div so it wouldn't be stored in the memory and
  5119. // it will also be a sign that checks already performed
  5120. div = null;
  5121. }
  5122. function roundPixelMeasures( measure ) {
  5123. return Math.round( parseFloat( measure ) );
  5124. }
  5125. var pixelPositionVal, boxSizingReliableVal, scrollboxSizeVal, pixelBoxStylesVal,
  5126. reliableTrDimensionsVal, reliableMarginLeftVal,
  5127. container = document.createElement( "div" ),
  5128. div = document.createElement( "div" );
  5129. // Finish early in limited (non-browser) environments
  5130. if ( !div.style ) {
  5131. return;
  5132. }
  5133. // Support: IE <=9 - 11 only
  5134. // Style of cloned element affects source element cloned (trac-8908)
  5135. div.style.backgroundClip = "content-box";
  5136. div.cloneNode( true ).style.backgroundClip = "";
  5137. support.clearCloneStyle = div.style.backgroundClip === "content-box";
  5138. jQuery.extend( support, {
  5139. boxSizingReliable: function() {
  5140. computeStyleTests();
  5141. return boxSizingReliableVal;
  5142. },
  5143. pixelBoxStyles: function() {
  5144. computeStyleTests();
  5145. return pixelBoxStylesVal;
  5146. },
  5147. pixelPosition: function() {
  5148. computeStyleTests();
  5149. return pixelPositionVal;
  5150. },
  5151. reliableMarginLeft: function() {
  5152. computeStyleTests();
  5153. return reliableMarginLeftVal;
  5154. },
  5155. scrollboxSize: function() {
  5156. computeStyleTests();
  5157. return scrollboxSizeVal;
  5158. },
  5159. // Support: IE 9 - 11+, Edge 15 - 18+
  5160. // IE/Edge misreport `getComputedStyle` of table rows with width/height
  5161. // set in CSS while `offset*` properties report correct values.
  5162. // Behavior in IE 9 is more subtle than in newer versions & it passes
  5163. // some versions of this test; make sure not to make it pass there!
  5164. //
  5165. // Support: Firefox 70+
  5166. // Only Firefox includes border widths
  5167. // in computed dimensions. (gh-4529)
  5168. reliableTrDimensions: function() {
  5169. var table, tr, trChild, trStyle;
  5170. if ( reliableTrDimensionsVal == null ) {
  5171. table = document.createElement( "table" );
  5172. tr = document.createElement( "tr" );
  5173. trChild = document.createElement( "div" );
  5174. table.style.cssText = "position:absolute;left:-11111px;border-collapse:separate";
  5175. tr.style.cssText = "box-sizing:content-box;border:1px solid";
  5176. // Support: Chrome 86+
  5177. // Height set through cssText does not get applied.
  5178. // Computed height then comes back as 0.
  5179. tr.style.height = "1px";
  5180. trChild.style.height = "9px";
  5181. // Support: Android 8 Chrome 86+
  5182. // In our bodyBackground.html iframe,
  5183. // display for all div elements is set to "inline",
  5184. // which causes a problem only in Android 8 Chrome 86.
  5185. // Ensuring the div is `display: block`
  5186. // gets around this issue.
  5187. trChild.style.display = "block";
  5188. documentElement
  5189. .appendChild( table )
  5190. .appendChild( tr )
  5191. .appendChild( trChild );
  5192. trStyle = window.getComputedStyle( tr );
  5193. reliableTrDimensionsVal = ( parseInt( trStyle.height, 10 ) +
  5194. parseInt( trStyle.borderTopWidth, 10 ) +
  5195. parseInt( trStyle.borderBottomWidth, 10 ) ) === tr.offsetHeight;
  5196. documentElement.removeChild( table );
  5197. }
  5198. return reliableTrDimensionsVal;
  5199. }
  5200. } );
  5201. } )();
  5202. function curCSS( elem, name, computed ) {
  5203. var width, minWidth, maxWidth, ret,
  5204. isCustomProp = rcustomProp.test( name ),
  5205. // Support: Firefox 51+
  5206. // Retrieving style before computed somehow
  5207. // fixes an issue with getting wrong values
  5208. // on detached elements
  5209. style = elem.style;
  5210. computed = computed || getStyles( elem );
  5211. // getPropertyValue is needed for:
  5212. // .css('filter') (IE 9 only, trac-12537)
  5213. // .css('--customProperty) (gh-3144)
  5214. if ( computed ) {
  5215. // Support: IE <=9 - 11+
  5216. // IE only supports `"float"` in `getPropertyValue`; in computed styles
  5217. // it's only available as `"cssFloat"`. We no longer modify properties
  5218. // sent to `.css()` apart from camelCasing, so we need to check both.
  5219. // Normally, this would create difference in behavior: if
  5220. // `getPropertyValue` returns an empty string, the value returned
  5221. // by `.css()` would be `undefined`. This is usually the case for
  5222. // disconnected elements. However, in IE even disconnected elements
  5223. // with no styles return `"none"` for `getPropertyValue( "float" )`
  5224. ret = computed.getPropertyValue( name ) || computed[ name ];
  5225. if ( isCustomProp && ret ) {
  5226. // Support: Firefox 105+, Chrome <=105+
  5227. // Spec requires trimming whitespace for custom properties (gh-4926).
  5228. // Firefox only trims leading whitespace. Chrome just collapses
  5229. // both leading & trailing whitespace to a single space.
  5230. //
  5231. // Fall back to `undefined` if empty string returned.
  5232. // This collapses a missing definition with property defined
  5233. // and set to an empty string but there's no standard API
  5234. // allowing us to differentiate them without a performance penalty
  5235. // and returning `undefined` aligns with older jQuery.
  5236. //
  5237. // rtrimCSS treats U+000D CARRIAGE RETURN and U+000C FORM FEED
  5238. // as whitespace while CSS does not, but this is not a problem
  5239. // because CSS preprocessing replaces them with U+000A LINE FEED
  5240. // (which *is* CSS whitespace)
  5241. // https://www.w3.org/TR/css-syntax-3/#input-preprocessing
  5242. ret = ret.replace( rtrimCSS, "$1" ) || undefined;
  5243. }
  5244. if ( ret === "" && !isAttached( elem ) ) {
  5245. ret = jQuery.style( elem, name );
  5246. }
  5247. // A tribute to the "awesome hack by Dean Edwards"
  5248. // Android Browser returns percentage for some values,
  5249. // but width seems to be reliably pixels.
  5250. // This is against the CSSOM draft spec:
  5251. // https://drafts.csswg.org/cssom/#resolved-values
  5252. if ( !support.pixelBoxStyles() && rnumnonpx.test( ret ) && rboxStyle.test( name ) ) {
  5253. // Remember the original values
  5254. width = style.width;
  5255. minWidth = style.minWidth;
  5256. maxWidth = style.maxWidth;
  5257. // Put in the new values to get a computed value out
  5258. style.minWidth = style.maxWidth = style.width = ret;
  5259. ret = computed.width;
  5260. // Revert the changed values
  5261. style.width = width;
  5262. style.minWidth = minWidth;
  5263. style.maxWidth = maxWidth;
  5264. }
  5265. }
  5266. return ret !== undefined ?
  5267. // Support: IE <=9 - 11 only
  5268. // IE returns zIndex value as an integer.
  5269. ret + "" :
  5270. ret;
  5271. }
  5272. function addGetHookIf( conditionFn, hookFn ) {
  5273. // Define the hook, we'll check on the first run if it's really needed.
  5274. return {
  5275. get: function() {
  5276. if ( conditionFn() ) {
  5277. // Hook not needed (or it's not possible to use it due
  5278. // to missing dependency), remove it.
  5279. delete this.get;
  5280. return;
  5281. }
  5282. // Hook needed; redefine it so that the support test is not executed again.
  5283. return ( this.get = hookFn ).apply( this, arguments );
  5284. }
  5285. };
  5286. }
  5287. var cssPrefixes = [ "Webkit", "Moz", "ms" ],
  5288. emptyStyle = document.createElement( "div" ).style,
  5289. vendorProps = {};
  5290. // Return a vendor-prefixed property or undefined
  5291. function vendorPropName( name ) {
  5292. // Check for vendor prefixed names
  5293. var capName = name[ 0 ].toUpperCase() + name.slice( 1 ),
  5294. i = cssPrefixes.length;
  5295. while ( i-- ) {
  5296. name = cssPrefixes[ i ] + capName;
  5297. if ( name in emptyStyle ) {
  5298. return name;
  5299. }
  5300. }
  5301. }
  5302. // Return a potentially-mapped jQuery.cssProps or vendor prefixed property
  5303. function finalPropName( name ) {
  5304. var final = jQuery.cssProps[ name ] || vendorProps[ name ];
  5305. if ( final ) {
  5306. return final;
  5307. }
  5308. if ( name in emptyStyle ) {
  5309. return name;
  5310. }
  5311. return vendorProps[ name ] = vendorPropName( name ) || name;
  5312. }
  5313. var
  5314. // Swappable if display is none or starts with table
  5315. // except "table", "table-cell", or "table-caption"
  5316. // See here for display values: https://developer.mozilla.org/en-US/docs/CSS/display
  5317. rdisplayswap = /^(none|table(?!-c[ea]).+)/,
  5318. cssShow = { position: "absolute", visibility: "hidden", display: "block" },
  5319. cssNormalTransform = {
  5320. letterSpacing: "0",
  5321. fontWeight: "400"
  5322. };
  5323. function setPositiveNumber( _elem, value, subtract ) {
  5324. // Any relative (+/-) values have already been
  5325. // normalized at this point
  5326. var matches = rcssNum.exec( value );
  5327. return matches ?
  5328. // Guard against undefined "subtract", e.g., when used as in cssHooks
  5329. Math.max( 0, matches[ 2 ] - ( subtract || 0 ) ) + ( matches[ 3 ] || "px" ) :
  5330. value;
  5331. }
  5332. function boxModelAdjustment( elem, dimension, box, isBorderBox, styles, computedVal ) {
  5333. var i = dimension === "width" ? 1 : 0,
  5334. extra = 0,
  5335. delta = 0,
  5336. marginDelta = 0;
  5337. // Adjustment may not be necessary
  5338. if ( box === ( isBorderBox ? "border" : "content" ) ) {
  5339. return 0;
  5340. }
  5341. for ( ; i < 4; i += 2 ) {
  5342. // Both box models exclude margin
  5343. // Count margin delta separately to only add it after scroll gutter adjustment.
  5344. // This is needed to make negative margins work with `outerHeight( true )` (gh-3982).
  5345. if ( box === "margin" ) {
  5346. marginDelta += jQuery.css( elem, box + cssExpand[ i ], true, styles );
  5347. }
  5348. // If we get here with a content-box, we're seeking "padding" or "border" or "margin"
  5349. if ( !isBorderBox ) {
  5350. // Add padding
  5351. delta += jQuery.css( elem, "padding" + cssExpand[ i ], true, styles );
  5352. // For "border" or "margin", add border
  5353. if ( box !== "padding" ) {
  5354. delta += jQuery.css( elem, "border" + cssExpand[ i ] + "Width", true, styles );
  5355. // But still keep track of it otherwise
  5356. } else {
  5357. extra += jQuery.css( elem, "border" + cssExpand[ i ] + "Width", true, styles );
  5358. }
  5359. // If we get here with a border-box (content + padding + border), we're seeking "content" or
  5360. // "padding" or "margin"
  5361. } else {
  5362. // For "content", subtract padding
  5363. if ( box === "content" ) {
  5364. delta -= jQuery.css( elem, "padding" + cssExpand[ i ], true, styles );
  5365. }
  5366. // For "content" or "padding", subtract border
  5367. if ( box !== "margin" ) {
  5368. delta -= jQuery.css( elem, "border" + cssExpand[ i ] + "Width", true, styles );
  5369. }
  5370. }
  5371. }
  5372. // Account for positive content-box scroll gutter when requested by providing computedVal
  5373. if ( !isBorderBox && computedVal >= 0 ) {
  5374. // offsetWidth/offsetHeight is a rounded sum of content, padding, scroll gutter, and border
  5375. // Assuming integer scroll gutter, subtract the rest and round down
  5376. delta += Math.max( 0, Math.ceil(
  5377. elem[ "offset" + dimension[ 0 ].toUpperCase() + dimension.slice( 1 ) ] -
  5378. computedVal -
  5379. delta -
  5380. extra -
  5381. 0.5
  5382. // If offsetWidth/offsetHeight is unknown, then we can't determine content-box scroll gutter
  5383. // Use an explicit zero to avoid NaN (gh-3964)
  5384. ) ) || 0;
  5385. }
  5386. return delta + marginDelta;
  5387. }
  5388. function getWidthOrHeight( elem, dimension, extra ) {
  5389. // Start with computed style
  5390. var styles = getStyles( elem ),
  5391. // To avoid forcing a reflow, only fetch boxSizing if we need it (gh-4322).
  5392. // Fake content-box until we know it's needed to know the true value.
  5393. boxSizingNeeded = !support.boxSizingReliable() || extra,
  5394. isBorderBox = boxSizingNeeded &&
  5395. jQuery.css( elem, "boxSizing", false, styles ) === "border-box",
  5396. valueIsBorderBox = isBorderBox,
  5397. val = curCSS( elem, dimension, styles ),
  5398. offsetProp = "offset" + dimension[ 0 ].toUpperCase() + dimension.slice( 1 );
  5399. // Support: Firefox <=54
  5400. // Return a confounding non-pixel value or feign ignorance, as appropriate.
  5401. if ( rnumnonpx.test( val ) ) {
  5402. if ( !extra ) {
  5403. return val;
  5404. }
  5405. val = "auto";
  5406. }
  5407. // Support: IE 9 - 11 only
  5408. // Use offsetWidth/offsetHeight for when box sizing is unreliable.
  5409. // In those cases, the computed value can be trusted to be border-box.
  5410. if ( ( !support.boxSizingReliable() && isBorderBox ||
  5411. // Support: IE 10 - 11+, Edge 15 - 18+
  5412. // IE/Edge misreport `getComputedStyle` of table rows with width/height
  5413. // set in CSS while `offset*` properties report correct values.
  5414. // Interestingly, in some cases IE 9 doesn't suffer from this issue.
  5415. !support.reliableTrDimensions() && nodeName( elem, "tr" ) ||
  5416. // Fall back to offsetWidth/offsetHeight when value is "auto"
  5417. // This happens for inline elements with no explicit setting (gh-3571)
  5418. val === "auto" ||
  5419. // Support: Android <=4.1 - 4.3 only
  5420. // Also use offsetWidth/offsetHeight for misreported inline dimensions (gh-3602)
  5421. !parseFloat( val ) && jQuery.css( elem, "display", false, styles ) === "inline" ) &&
  5422. // Make sure the element is visible & connected
  5423. elem.getClientRects().length ) {
  5424. isBorderBox = jQuery.css( elem, "boxSizing", false, styles ) === "border-box";
  5425. // Where available, offsetWidth/offsetHeight approximate border box dimensions.
  5426. // Where not available (e.g., SVG), assume unreliable box-sizing and interpret the
  5427. // retrieved value as a content box dimension.
  5428. valueIsBorderBox = offsetProp in elem;
  5429. if ( valueIsBorderBox ) {
  5430. val = elem[ offsetProp ];
  5431. }
  5432. }
  5433. // Normalize "" and auto
  5434. val = parseFloat( val ) || 0;
  5435. // Adjust for the element's box model
  5436. return ( val +
  5437. boxModelAdjustment(
  5438. elem,
  5439. dimension,
  5440. extra || ( isBorderBox ? "border" : "content" ),
  5441. valueIsBorderBox,
  5442. styles,
  5443. // Provide the current computed size to request scroll gutter calculation (gh-3589)
  5444. val
  5445. )
  5446. ) + "px";
  5447. }
  5448. jQuery.extend( {
  5449. // Add in style property hooks for overriding the default
  5450. // behavior of getting and setting a style property
  5451. cssHooks: {
  5452. opacity: {
  5453. get: function( elem, computed ) {
  5454. if ( computed ) {
  5455. // We should always get a number back from opacity
  5456. var ret = curCSS( elem, "opacity" );
  5457. return ret === "" ? "1" : ret;
  5458. }
  5459. }
  5460. }
  5461. },
  5462. // Don't automatically add "px" to these possibly-unitless properties
  5463. cssNumber: {
  5464. animationIterationCount: true,
  5465. aspectRatio: true,
  5466. borderImageSlice: true,
  5467. columnCount: true,
  5468. flexGrow: true,
  5469. flexShrink: true,
  5470. fontWeight: true,
  5471. gridArea: true,
  5472. gridColumn: true,
  5473. gridColumnEnd: true,
  5474. gridColumnStart: true,
  5475. gridRow: true,
  5476. gridRowEnd: true,
  5477. gridRowStart: true,
  5478. lineHeight: true,
  5479. opacity: true,
  5480. order: true,
  5481. orphans: true,
  5482. scale: true,
  5483. widows: true,
  5484. zIndex: true,
  5485. zoom: true,
  5486. // SVG-related
  5487. fillOpacity: true,
  5488. floodOpacity: true,
  5489. stopOpacity: true,
  5490. strokeMiterlimit: true,
  5491. strokeOpacity: true
  5492. },
  5493. // Add in properties whose names you wish to fix before
  5494. // setting or getting the value
  5495. cssProps: {},
  5496. // Get and set the style property on a DOM Node
  5497. style: function( elem, name, value, extra ) {
  5498. // Don't set styles on text and comment nodes
  5499. if ( !elem || elem.nodeType === 3 || elem.nodeType === 8 || !elem.style ) {
  5500. return;
  5501. }
  5502. // Make sure that we're working with the right name
  5503. var ret, type, hooks,
  5504. origName = camelCase( name ),
  5505. isCustomProp = rcustomProp.test( name ),
  5506. style = elem.style;
  5507. // Make sure that we're working with the right name. We don't
  5508. // want to query the value if it is a CSS custom property
  5509. // since they are user-defined.
  5510. if ( !isCustomProp ) {
  5511. name = finalPropName( origName );
  5512. }
  5513. // Gets hook for the prefixed version, then unprefixed version
  5514. hooks = jQuery.cssHooks[ name ] || jQuery.cssHooks[ origName ];
  5515. // Check if we're setting a value
  5516. if ( value !== undefined ) {
  5517. type = typeof value;
  5518. // Convert "+=" or "-=" to relative numbers (trac-7345)
  5519. if ( type === "string" && ( ret = rcssNum.exec( value ) ) && ret[ 1 ] ) {
  5520. value = adjustCSS( elem, name, ret );
  5521. // Fixes bug trac-9237
  5522. type = "number";
  5523. }
  5524. // Make sure that null and NaN values aren't set (trac-7116)
  5525. if ( value == null || value !== value ) {
  5526. return;
  5527. }
  5528. // If a number was passed in, add the unit (except for certain CSS properties)
  5529. // The isCustomProp check can be removed in jQuery 4.0 when we only auto-append
  5530. // "px" to a few hardcoded values.
  5531. if ( type === "number" && !isCustomProp ) {
  5532. value += ret && ret[ 3 ] || ( jQuery.cssNumber[ origName ] ? "" : "px" );
  5533. }
  5534. // background-* props affect original clone's values
  5535. if ( !support.clearCloneStyle && value === "" && name.indexOf( "background" ) === 0 ) {
  5536. style[ name ] = "inherit";
  5537. }
  5538. // If a hook was provided, use that value, otherwise just set the specified value
  5539. if ( !hooks || !( "set" in hooks ) ||
  5540. ( value = hooks.set( elem, value, extra ) ) !== undefined ) {
  5541. if ( isCustomProp ) {
  5542. style.setProperty( name, value );
  5543. } else {
  5544. style[ name ] = value;
  5545. }
  5546. }
  5547. } else {
  5548. // If a hook was provided get the non-computed value from there
  5549. if ( hooks && "get" in hooks &&
  5550. ( ret = hooks.get( elem, false, extra ) ) !== undefined ) {
  5551. return ret;
  5552. }
  5553. // Otherwise just get the value from the style object
  5554. return style[ name ];
  5555. }
  5556. },
  5557. css: function( elem, name, extra, styles ) {
  5558. var val, num, hooks,
  5559. origName = camelCase( name ),
  5560. isCustomProp = rcustomProp.test( name );
  5561. // Make sure that we're working with the right name. We don't
  5562. // want to modify the value if it is a CSS custom property
  5563. // since they are user-defined.
  5564. if ( !isCustomProp ) {
  5565. name = finalPropName( origName );
  5566. }
  5567. // Try prefixed name followed by the unprefixed name
  5568. hooks = jQuery.cssHooks[ name ] || jQuery.cssHooks[ origName ];
  5569. // If a hook was provided get the computed value from there
  5570. if ( hooks && "get" in hooks ) {
  5571. val = hooks.get( elem, true, extra );
  5572. }
  5573. // Otherwise, if a way to get the computed value exists, use that
  5574. if ( val === undefined ) {
  5575. val = curCSS( elem, name, styles );
  5576. }
  5577. // Convert "normal" to computed value
  5578. if ( val === "normal" && name in cssNormalTransform ) {
  5579. val = cssNormalTransform[ name ];
  5580. }
  5581. // Make numeric if forced or a qualifier was provided and val looks numeric
  5582. if ( extra === "" || extra ) {
  5583. num = parseFloat( val );
  5584. return extra === true || isFinite( num ) ? num || 0 : val;
  5585. }
  5586. return val;
  5587. }
  5588. } );
  5589. jQuery.each( [ "height", "width" ], function( _i, dimension ) {
  5590. jQuery.cssHooks[ dimension ] = {
  5591. get: function( elem, computed, extra ) {
  5592. if ( computed ) {
  5593. // Certain elements can have dimension info if we invisibly show them
  5594. // but it must have a current display style that would benefit
  5595. return rdisplayswap.test( jQuery.css( elem, "display" ) ) &&
  5596. // Support: Safari 8+
  5597. // Table columns in Safari have non-zero offsetWidth & zero
  5598. // getBoundingClientRect().width unless display is changed.
  5599. // Support: IE <=11 only
  5600. // Running getBoundingClientRect on a disconnected node
  5601. // in IE throws an error.
  5602. ( !elem.getClientRects().length || !elem.getBoundingClientRect().width ) ?
  5603. swap( elem, cssShow, function() {
  5604. return getWidthOrHeight( elem, dimension, extra );
  5605. } ) :
  5606. getWidthOrHeight( elem, dimension, extra );
  5607. }
  5608. },
  5609. set: function( elem, value, extra ) {
  5610. var matches,
  5611. styles = getStyles( elem ),
  5612. // Only read styles.position if the test has a chance to fail
  5613. // to avoid forcing a reflow.
  5614. scrollboxSizeBuggy = !support.scrollboxSize() &&
  5615. styles.position === "absolute",
  5616. // To avoid forcing a reflow, only fetch boxSizing if we need it (gh-3991)
  5617. boxSizingNeeded = scrollboxSizeBuggy || extra,
  5618. isBorderBox = boxSizingNeeded &&
  5619. jQuery.css( elem, "boxSizing", false, styles ) === "border-box",
  5620. subtract = extra ?
  5621. boxModelAdjustment(
  5622. elem,
  5623. dimension,
  5624. extra,
  5625. isBorderBox,
  5626. styles
  5627. ) :
  5628. 0;
  5629. // Account for unreliable border-box dimensions by comparing offset* to computed and
  5630. // faking a content-box to get border and padding (gh-3699)
  5631. if ( isBorderBox && scrollboxSizeBuggy ) {
  5632. subtract -= Math.ceil(
  5633. elem[ "offset" + dimension[ 0 ].toUpperCase() + dimension.slice( 1 ) ] -
  5634. parseFloat( styles[ dimension ] ) -
  5635. boxModelAdjustment( elem, dimension, "border", false, styles ) -
  5636. 0.5
  5637. );
  5638. }
  5639. // Convert to pixels if value adjustment is needed
  5640. if ( subtract && ( matches = rcssNum.exec( value ) ) &&
  5641. ( matches[ 3 ] || "px" ) !== "px" ) {
  5642. elem.style[ dimension ] = value;
  5643. value = jQuery.css( elem, dimension );
  5644. }
  5645. return setPositiveNumber( elem, value, subtract );
  5646. }
  5647. };
  5648. } );
  5649. jQuery.cssHooks.marginLeft = addGetHookIf( support.reliableMarginLeft,
  5650. function( elem, computed ) {
  5651. if ( computed ) {
  5652. return ( parseFloat( curCSS( elem, "marginLeft" ) ) ||
  5653. elem.getBoundingClientRect().left -
  5654. swap( elem, { marginLeft: 0 }, function() {
  5655. return elem.getBoundingClientRect().left;
  5656. } )
  5657. ) + "px";
  5658. }
  5659. }
  5660. );
  5661. // These hooks are used by animate to expand properties
  5662. jQuery.each( {
  5663. margin: "",
  5664. padding: "",
  5665. border: "Width"
  5666. }, function( prefix, suffix ) {
  5667. jQuery.cssHooks[ prefix + suffix ] = {
  5668. expand: function( value ) {
  5669. var i = 0,
  5670. expanded = {},
  5671. // Assumes a single number if not a string
  5672. parts = typeof value === "string" ? value.split( " " ) : [ value ];
  5673. for ( ; i < 4; i++ ) {
  5674. expanded[ prefix + cssExpand[ i ] + suffix ] =
  5675. parts[ i ] || parts[ i - 2 ] || parts[ 0 ];
  5676. }
  5677. return expanded;
  5678. }
  5679. };
  5680. if ( prefix !== "margin" ) {
  5681. jQuery.cssHooks[ prefix + suffix ].set = setPositiveNumber;
  5682. }
  5683. } );
  5684. jQuery.fn.extend( {
  5685. css: function( name, value ) {
  5686. return access( this, function( elem, name, value ) {
  5687. var styles, len,
  5688. map = {},
  5689. i = 0;
  5690. if ( Array.isArray( name ) ) {
  5691. styles = getStyles( elem );
  5692. len = name.length;
  5693. for ( ; i < len; i++ ) {
  5694. map[ name[ i ] ] = jQuery.css( elem, name[ i ], false, styles );
  5695. }
  5696. return map;
  5697. }
  5698. return value !== undefined ?
  5699. jQuery.style( elem, name, value ) :
  5700. jQuery.css( elem, name );
  5701. }, name, value, arguments.length > 1 );
  5702. }
  5703. } );
  5704. function Tween( elem, options, prop, end, easing ) {
  5705. return new Tween.prototype.init( elem, options, prop, end, easing );
  5706. }
  5707. jQuery.Tween = Tween;
  5708. Tween.prototype = {
  5709. constructor: Tween,
  5710. init: function( elem, options, prop, end, easing, unit ) {
  5711. this.elem = elem;
  5712. this.prop = prop;
  5713. this.easing = easing || jQuery.easing._default;
  5714. this.options = options;
  5715. this.start = this.now = this.cur();
  5716. this.end = end;
  5717. this.unit = unit || ( jQuery.cssNumber[ prop ] ? "" : "px" );
  5718. },
  5719. cur: function() {
  5720. var hooks = Tween.propHooks[ this.prop ];
  5721. return hooks && hooks.get ?
  5722. hooks.get( this ) :
  5723. Tween.propHooks._default.get( this );
  5724. },
  5725. run: function( percent ) {
  5726. var eased,
  5727. hooks = Tween.propHooks[ this.prop ];
  5728. if ( this.options.duration ) {
  5729. this.pos = eased = jQuery.easing[ this.easing ](
  5730. percent, this.options.duration * percent, 0, 1, this.options.duration
  5731. );
  5732. } else {
  5733. this.pos = eased = percent;
  5734. }
  5735. this.now = ( this.end - this.start ) * eased + this.start;
  5736. if ( this.options.step ) {
  5737. this.options.step.call( this.elem, this.now, this );
  5738. }
  5739. if ( hooks && hooks.set ) {
  5740. hooks.set( this );
  5741. } else {
  5742. Tween.propHooks._default.set( this );
  5743. }
  5744. return this;
  5745. }
  5746. };
  5747. Tween.prototype.init.prototype = Tween.prototype;
  5748. Tween.propHooks = {
  5749. _default: {
  5750. get: function( tween ) {
  5751. var result;
  5752. // Use a property on the element directly when it is not a DOM element,
  5753. // or when there is no matching style property that exists.
  5754. if ( tween.elem.nodeType !== 1 ||
  5755. tween.elem[ tween.prop ] != null && tween.elem.style[ tween.prop ] == null ) {
  5756. return tween.elem[ tween.prop ];
  5757. }
  5758. // Passing an empty string as a 3rd parameter to .css will automatically
  5759. // attempt a parseFloat and fallback to a string if the parse fails.
  5760. // Simple values such as "10px" are parsed to Float;
  5761. // complex values such as "rotate(1rad)" are returned as-is.
  5762. result = jQuery.css( tween.elem, tween.prop, "" );
  5763. // Empty strings, null, undefined and "auto" are converted to 0.
  5764. return !result || result === "auto" ? 0 : result;
  5765. },
  5766. set: function( tween ) {
  5767. // Use step hook for back compat.
  5768. // Use cssHook if its there.
  5769. // Use .style if available and use plain properties where available.
  5770. if ( jQuery.fx.step[ tween.prop ] ) {
  5771. jQuery.fx.step[ tween.prop ]( tween );
  5772. } else if ( tween.elem.nodeType === 1 && (
  5773. jQuery.cssHooks[ tween.prop ] ||
  5774. tween.elem.style[ finalPropName( tween.prop ) ] != null ) ) {
  5775. jQuery.style( tween.elem, tween.prop, tween.now + tween.unit );
  5776. } else {
  5777. tween.elem[ tween.prop ] = tween.now;
  5778. }
  5779. }
  5780. }
  5781. };
  5782. // Support: IE <=9 only
  5783. // Panic based approach to setting things on disconnected nodes
  5784. Tween.propHooks.scrollTop = Tween.propHooks.scrollLeft = {
  5785. set: function( tween ) {
  5786. if ( tween.elem.nodeType && tween.elem.parentNode ) {
  5787. tween.elem[ tween.prop ] = tween.now;
  5788. }
  5789. }
  5790. };
  5791. jQuery.easing = {
  5792. linear: function( p ) {
  5793. return p;
  5794. },
  5795. swing: function( p ) {
  5796. return 0.5 - Math.cos( p * Math.PI ) / 2;
  5797. },
  5798. _default: "swing"
  5799. };
  5800. jQuery.fx = Tween.prototype.init;
  5801. // Back compat <1.8 extension point
  5802. jQuery.fx.step = {};
  5803. var
  5804. fxNow, inProgress,
  5805. rfxtypes = /^(?:toggle|show|hide)$/,
  5806. rrun = /queueHooks$/;
  5807. function schedule() {
  5808. if ( inProgress ) {
  5809. if ( document.hidden === false && window.requestAnimationFrame ) {
  5810. window.requestAnimationFrame( schedule );
  5811. } else {
  5812. window.setTimeout( schedule, jQuery.fx.interval );
  5813. }
  5814. jQuery.fx.tick();
  5815. }
  5816. }
  5817. // Animations created synchronously will run synchronously
  5818. function createFxNow() {
  5819. window.setTimeout( function() {
  5820. fxNow = undefined;
  5821. } );
  5822. return ( fxNow = Date.now() );
  5823. }
  5824. // Generate parameters to create a standard animation
  5825. function genFx( type, includeWidth ) {
  5826. var which,
  5827. i = 0,
  5828. attrs = { height: type };
  5829. // If we include width, step value is 1 to do all cssExpand values,
  5830. // otherwise step value is 2 to skip over Left and Right
  5831. includeWidth = includeWidth ? 1 : 0;
  5832. for ( ; i < 4; i += 2 - includeWidth ) {
  5833. which = cssExpand[ i ];
  5834. attrs[ "margin" + which ] = attrs[ "padding" + which ] = type;
  5835. }
  5836. if ( includeWidth ) {
  5837. attrs.opacity = attrs.width = type;
  5838. }
  5839. return attrs;
  5840. }
  5841. function createTween( value, prop, animation ) {
  5842. var tween,
  5843. collection = ( Animation.tweeners[ prop ] || [] ).concat( Animation.tweeners[ "*" ] ),
  5844. index = 0,
  5845. length = collection.length;
  5846. for ( ; index < length; index++ ) {
  5847. if ( ( tween = collection[ index ].call( animation, prop, value ) ) ) {
  5848. // We're done with this property
  5849. return tween;
  5850. }
  5851. }
  5852. }
  5853. function defaultPrefilter( elem, props, opts ) {
  5854. var prop, value, toggle, hooks, oldfire, propTween, restoreDisplay, display,
  5855. isBox = "width" in props || "height" in props,
  5856. anim = this,
  5857. orig = {},
  5858. style = elem.style,
  5859. hidden = elem.nodeType && isHiddenWithinTree( elem ),
  5860. dataShow = dataPriv.get( elem, "fxshow" );
  5861. // Queue-skipping animations hijack the fx hooks
  5862. if ( !opts.queue ) {
  5863. hooks = jQuery._queueHooks( elem, "fx" );
  5864. if ( hooks.unqueued == null ) {
  5865. hooks.unqueued = 0;
  5866. oldfire = hooks.empty.fire;
  5867. hooks.empty.fire = function() {
  5868. if ( !hooks.unqueued ) {
  5869. oldfire();
  5870. }
  5871. };
  5872. }
  5873. hooks.unqueued++;
  5874. anim.always( function() {
  5875. // Ensure the complete handler is called before this completes
  5876. anim.always( function() {
  5877. hooks.unqueued--;
  5878. if ( !jQuery.queue( elem, "fx" ).length ) {
  5879. hooks.empty.fire();
  5880. }
  5881. } );
  5882. } );
  5883. }
  5884. // Detect show/hide animations
  5885. for ( prop in props ) {
  5886. value = props[ prop ];
  5887. if ( rfxtypes.test( value ) ) {
  5888. delete props[ prop ];
  5889. toggle = toggle || value === "toggle";
  5890. if ( value === ( hidden ? "hide" : "show" ) ) {
  5891. // Pretend to be hidden if this is a "show" and
  5892. // there is still data from a stopped show/hide
  5893. if ( value === "show" && dataShow && dataShow[ prop ] !== undefined ) {
  5894. hidden = true;
  5895. // Ignore all other no-op show/hide data
  5896. } else {
  5897. continue;
  5898. }
  5899. }
  5900. orig[ prop ] = dataShow && dataShow[ prop ] || jQuery.style( elem, prop );
  5901. }
  5902. }
  5903. // Bail out if this is a no-op like .hide().hide()
  5904. propTween = !jQuery.isEmptyObject( props );
  5905. if ( !propTween && jQuery.isEmptyObject( orig ) ) {
  5906. return;
  5907. }
  5908. // Restrict "overflow" and "display" styles during box animations
  5909. if ( isBox && elem.nodeType === 1 ) {
  5910. // Support: IE <=9 - 11, Edge 12 - 15
  5911. // Record all 3 overflow attributes because IE does not infer the shorthand
  5912. // from identically-valued overflowX and overflowY and Edge just mirrors
  5913. // the overflowX value there.
  5914. opts.overflow = [ style.overflow, style.overflowX, style.overflowY ];
  5915. // Identify a display type, preferring old show/hide data over the CSS cascade
  5916. restoreDisplay = dataShow && dataShow.display;
  5917. if ( restoreDisplay == null ) {
  5918. restoreDisplay = dataPriv.get( elem, "display" );
  5919. }
  5920. display = jQuery.css( elem, "display" );
  5921. if ( display === "none" ) {
  5922. if ( restoreDisplay ) {
  5923. display = restoreDisplay;
  5924. } else {
  5925. // Get nonempty value(s) by temporarily forcing visibility
  5926. showHide( [ elem ], true );
  5927. restoreDisplay = elem.style.display || restoreDisplay;
  5928. display = jQuery.css( elem, "display" );
  5929. showHide( [ elem ] );
  5930. }
  5931. }
  5932. // Animate inline elements as inline-block
  5933. if ( display === "inline" || display === "inline-block" && restoreDisplay != null ) {
  5934. if ( jQuery.css( elem, "float" ) === "none" ) {
  5935. // Restore the original display value at the end of pure show/hide animations
  5936. if ( !propTween ) {
  5937. anim.done( function() {
  5938. style.display = restoreDisplay;
  5939. } );
  5940. if ( restoreDisplay == null ) {
  5941. display = style.display;
  5942. restoreDisplay = display === "none" ? "" : display;
  5943. }
  5944. }
  5945. style.display = "inline-block";
  5946. }
  5947. }
  5948. }
  5949. if ( opts.overflow ) {
  5950. style.overflow = "hidden";
  5951. anim.always( function() {
  5952. style.overflow = opts.overflow[ 0 ];
  5953. style.overflowX = opts.overflow[ 1 ];
  5954. style.overflowY = opts.overflow[ 2 ];
  5955. } );
  5956. }
  5957. // Implement show/hide animations
  5958. propTween = false;
  5959. for ( prop in orig ) {
  5960. // General show/hide setup for this element animation
  5961. if ( !propTween ) {
  5962. if ( dataShow ) {
  5963. if ( "hidden" in dataShow ) {
  5964. hidden = dataShow.hidden;
  5965. }
  5966. } else {
  5967. dataShow = dataPriv.access( elem, "fxshow", { display: restoreDisplay } );
  5968. }
  5969. // Store hidden/visible for toggle so `.stop().toggle()` "reverses"
  5970. if ( toggle ) {
  5971. dataShow.hidden = !hidden;
  5972. }
  5973. // Show elements before animating them
  5974. if ( hidden ) {
  5975. showHide( [ elem ], true );
  5976. }
  5977. /* eslint-disable no-loop-func */
  5978. anim.done( function() {
  5979. /* eslint-enable no-loop-func */
  5980. // The final step of a "hide" animation is actually hiding the element
  5981. if ( !hidden ) {
  5982. showHide( [ elem ] );
  5983. }
  5984. dataPriv.remove( elem, "fxshow" );
  5985. for ( prop in orig ) {
  5986. jQuery.style( elem, prop, orig[ prop ] );
  5987. }
  5988. } );
  5989. }
  5990. // Per-property setup
  5991. propTween = createTween( hidden ? dataShow[ prop ] : 0, prop, anim );
  5992. if ( !( prop in dataShow ) ) {
  5993. dataShow[ prop ] = propTween.start;
  5994. if ( hidden ) {
  5995. propTween.end = propTween.start;
  5996. propTween.start = 0;
  5997. }
  5998. }
  5999. }
  6000. }
  6001. function propFilter( props, specialEasing ) {
  6002. var index, name, easing, value, hooks;
  6003. // camelCase, specialEasing and expand cssHook pass
  6004. for ( index in props ) {
  6005. name = camelCase( index );
  6006. easing = specialEasing[ name ];
  6007. value = props[ index ];
  6008. if ( Array.isArray( value ) ) {
  6009. easing = value[ 1 ];
  6010. value = props[ index ] = value[ 0 ];
  6011. }
  6012. if ( index !== name ) {
  6013. props[ name ] = value;
  6014. delete props[ index ];
  6015. }
  6016. hooks = jQuery.cssHooks[ name ];
  6017. if ( hooks && "expand" in hooks ) {
  6018. value = hooks.expand( value );
  6019. delete props[ name ];
  6020. // Not quite $.extend, this won't overwrite existing keys.
  6021. // Reusing 'index' because we have the correct "name"
  6022. for ( index in value ) {
  6023. if ( !( index in props ) ) {
  6024. props[ index ] = value[ index ];
  6025. specialEasing[ index ] = easing;
  6026. }
  6027. }
  6028. } else {
  6029. specialEasing[ name ] = easing;
  6030. }
  6031. }
  6032. }
  6033. function Animation( elem, properties, options ) {
  6034. var result,
  6035. stopped,
  6036. index = 0,
  6037. length = Animation.prefilters.length,
  6038. deferred = jQuery.Deferred().always( function() {
  6039. // Don't match elem in the :animated selector
  6040. delete tick.elem;
  6041. } ),
  6042. tick = function() {
  6043. if ( stopped ) {
  6044. return false;
  6045. }
  6046. var currentTime = fxNow || createFxNow(),
  6047. remaining = Math.max( 0, animation.startTime + animation.duration - currentTime ),
  6048. // Support: Android 2.3 only
  6049. // Archaic crash bug won't allow us to use `1 - ( 0.5 || 0 )` (trac-12497)
  6050. temp = remaining / animation.duration || 0,
  6051. percent = 1 - temp,
  6052. index = 0,
  6053. length = animation.tweens.length;
  6054. for ( ; index < length; index++ ) {
  6055. animation.tweens[ index ].run( percent );
  6056. }
  6057. deferred.notifyWith( elem, [ animation, percent, remaining ] );
  6058. // If there's more to do, yield
  6059. if ( percent < 1 && length ) {
  6060. return remaining;
  6061. }
  6062. // If this was an empty animation, synthesize a final progress notification
  6063. if ( !length ) {
  6064. deferred.notifyWith( elem, [ animation, 1, 0 ] );
  6065. }
  6066. // Resolve the animation and report its conclusion
  6067. deferred.resolveWith( elem, [ animation ] );
  6068. return false;
  6069. },
  6070. animation = deferred.promise( {
  6071. elem: elem,
  6072. props: jQuery.extend( {}, properties ),
  6073. opts: jQuery.extend( true, {
  6074. specialEasing: {},
  6075. easing: jQuery.easing._default
  6076. }, options ),
  6077. originalProperties: properties,
  6078. originalOptions: options,
  6079. startTime: fxNow || createFxNow(),
  6080. duration: options.duration,
  6081. tweens: [],
  6082. createTween: function( prop, end ) {
  6083. var tween = jQuery.Tween( elem, animation.opts, prop, end,
  6084. animation.opts.specialEasing[ prop ] || animation.opts.easing );
  6085. animation.tweens.push( tween );
  6086. return tween;
  6087. },
  6088. stop: function( gotoEnd ) {
  6089. var index = 0,
  6090. // If we are going to the end, we want to run all the tweens
  6091. // otherwise we skip this part
  6092. length = gotoEnd ? animation.tweens.length : 0;
  6093. if ( stopped ) {
  6094. return this;
  6095. }
  6096. stopped = true;
  6097. for ( ; index < length; index++ ) {
  6098. animation.tweens[ index ].run( 1 );
  6099. }
  6100. // Resolve when we played the last frame; otherwise, reject
  6101. if ( gotoEnd ) {
  6102. deferred.notifyWith( elem, [ animation, 1, 0 ] );
  6103. deferred.resolveWith( elem, [ animation, gotoEnd ] );
  6104. } else {
  6105. deferred.rejectWith( elem, [ animation, gotoEnd ] );
  6106. }
  6107. return this;
  6108. }
  6109. } ),
  6110. props = animation.props;
  6111. propFilter( props, animation.opts.specialEasing );
  6112. for ( ; index < length; index++ ) {
  6113. result = Animation.prefilters[ index ].call( animation, elem, props, animation.opts );
  6114. if ( result ) {
  6115. if ( isFunction( result.stop ) ) {
  6116. jQuery._queueHooks( animation.elem, animation.opts.queue ).stop =
  6117. result.stop.bind( result );
  6118. }
  6119. return result;
  6120. }
  6121. }
  6122. jQuery.map( props, createTween, animation );
  6123. if ( isFunction( animation.opts.start ) ) {
  6124. animation.opts.start.call( elem, animation );
  6125. }
  6126. // Attach callbacks from options
  6127. animation
  6128. .progress( animation.opts.progress )
  6129. .done( animation.opts.done, animation.opts.complete )
  6130. .fail( animation.opts.fail )
  6131. .always( animation.opts.always );
  6132. jQuery.fx.timer(
  6133. jQuery.extend( tick, {
  6134. elem: elem,
  6135. anim: animation,
  6136. queue: animation.opts.queue
  6137. } )
  6138. );
  6139. return animation;
  6140. }
  6141. jQuery.Animation = jQuery.extend( Animation, {
  6142. tweeners: {
  6143. "*": [ function( prop, value ) {
  6144. var tween = this.createTween( prop, value );
  6145. adjustCSS( tween.elem, prop, rcssNum.exec( value ), tween );
  6146. return tween;
  6147. } ]
  6148. },
  6149. tweener: function( props, callback ) {
  6150. if ( isFunction( props ) ) {
  6151. callback = props;
  6152. props = [ "*" ];
  6153. } else {
  6154. props = props.match( rnothtmlwhite );
  6155. }
  6156. var prop,
  6157. index = 0,
  6158. length = props.length;
  6159. for ( ; index < length; index++ ) {
  6160. prop = props[ index ];
  6161. Animation.tweeners[ prop ] = Animation.tweeners[ prop ] || [];
  6162. Animation.tweeners[ prop ].unshift( callback );
  6163. }
  6164. },
  6165. prefilters: [ defaultPrefilter ],
  6166. prefilter: function( callback, prepend ) {
  6167. if ( prepend ) {
  6168. Animation.prefilters.unshift( callback );
  6169. } else {
  6170. Animation.prefilters.push( callback );
  6171. }
  6172. }
  6173. } );
  6174. jQuery.speed = function( speed, easing, fn ) {
  6175. var opt = speed && typeof speed === "object" ? jQuery.extend( {}, speed ) : {
  6176. complete: fn || !fn && easing ||
  6177. isFunction( speed ) && speed,
  6178. duration: speed,
  6179. easing: fn && easing || easing && !isFunction( easing ) && easing
  6180. };
  6181. // Go to the end state if fx are off
  6182. if ( jQuery.fx.off ) {
  6183. opt.duration = 0;
  6184. } else {
  6185. if ( typeof opt.duration !== "number" ) {
  6186. if ( opt.duration in jQuery.fx.speeds ) {
  6187. opt.duration = jQuery.fx.speeds[ opt.duration ];
  6188. } else {
  6189. opt.duration = jQuery.fx.speeds._default;
  6190. }
  6191. }
  6192. }
  6193. // Normalize opt.queue - true/undefined/null -> "fx"
  6194. if ( opt.queue == null || opt.queue === true ) {
  6195. opt.queue = "fx";
  6196. }
  6197. // Queueing
  6198. opt.old = opt.complete;
  6199. opt.complete = function() {
  6200. if ( isFunction( opt.old ) ) {
  6201. opt.old.call( this );
  6202. }
  6203. if ( opt.queue ) {
  6204. jQuery.dequeue( this, opt.queue );
  6205. }
  6206. };
  6207. return opt;
  6208. };
  6209. jQuery.fn.extend( {
  6210. fadeTo: function( speed, to, easing, callback ) {
  6211. // Show any hidden elements after setting opacity to 0
  6212. return this.filter( isHiddenWithinTree ).css( "opacity", 0 ).show()
  6213. // Animate to the value specified
  6214. .end().animate( { opacity: to }, speed, easing, callback );
  6215. },
  6216. animate: function( prop, speed, easing, callback ) {
  6217. var empty = jQuery.isEmptyObject( prop ),
  6218. optall = jQuery.speed( speed, easing, callback ),
  6219. doAnimation = function() {
  6220. // Operate on a copy of prop so per-property easing won't be lost
  6221. var anim = Animation( this, jQuery.extend( {}, prop ), optall );
  6222. // Empty animations, or finishing resolves immediately
  6223. if ( empty || dataPriv.get( this, "finish" ) ) {
  6224. anim.stop( true );
  6225. }
  6226. };
  6227. doAnimation.finish = doAnimation;
  6228. return empty || optall.queue === false ?
  6229. this.each( doAnimation ) :
  6230. this.queue( optall.queue, doAnimation );
  6231. },
  6232. stop: function( type, clearQueue, gotoEnd ) {
  6233. var stopQueue = function( hooks ) {
  6234. var stop = hooks.stop;
  6235. delete hooks.stop;
  6236. stop( gotoEnd );
  6237. };
  6238. if ( typeof type !== "string" ) {
  6239. gotoEnd = clearQueue;
  6240. clearQueue = type;
  6241. type = undefined;
  6242. }
  6243. if ( clearQueue ) {
  6244. this.queue( type || "fx", [] );
  6245. }
  6246. return this.each( function() {
  6247. var dequeue = true,
  6248. index = type != null && type + "queueHooks",
  6249. timers = jQuery.timers,
  6250. data = dataPriv.get( this );
  6251. if ( index ) {
  6252. if ( data[ index ] && data[ index ].stop ) {
  6253. stopQueue( data[ index ] );
  6254. }
  6255. } else {
  6256. for ( index in data ) {
  6257. if ( data[ index ] && data[ index ].stop && rrun.test( index ) ) {
  6258. stopQueue( data[ index ] );
  6259. }
  6260. }
  6261. }
  6262. for ( index = timers.length; index--; ) {
  6263. if ( timers[ index ].elem === this &&
  6264. ( type == null || timers[ index ].queue === type ) ) {
  6265. timers[ index ].anim.stop( gotoEnd );
  6266. dequeue = false;
  6267. timers.splice( index, 1 );
  6268. }
  6269. }
  6270. // Start the next in the queue if the last step wasn't forced.
  6271. // Timers currently will call their complete callbacks, which
  6272. // will dequeue but only if they were gotoEnd.
  6273. if ( dequeue || !gotoEnd ) {
  6274. jQuery.dequeue( this, type );
  6275. }
  6276. } );
  6277. },
  6278. finish: function( type ) {
  6279. if ( type !== false ) {
  6280. type = type || "fx";
  6281. }
  6282. return this.each( function() {
  6283. var index,
  6284. data = dataPriv.get( this ),
  6285. queue = data[ type + "queue" ],
  6286. hooks = data[ type + "queueHooks" ],
  6287. timers = jQuery.timers,
  6288. length = queue ? queue.length : 0;
  6289. // Enable finishing flag on private data
  6290. data.finish = true;
  6291. // Empty the queue first
  6292. jQuery.queue( this, type, [] );
  6293. if ( hooks && hooks.stop ) {
  6294. hooks.stop.call( this, true );
  6295. }
  6296. // Look for any active animations, and finish them
  6297. for ( index = timers.length; index--; ) {
  6298. if ( timers[ index ].elem === this && timers[ index ].queue === type ) {
  6299. timers[ index ].anim.stop( true );
  6300. timers.splice( index, 1 );
  6301. }
  6302. }
  6303. // Look for any animations in the old queue and finish them
  6304. for ( index = 0; index < length; index++ ) {
  6305. if ( queue[ index ] && queue[ index ].finish ) {
  6306. queue[ index ].finish.call( this );
  6307. }
  6308. }
  6309. // Turn off finishing flag
  6310. delete data.finish;
  6311. } );
  6312. }
  6313. } );
  6314. jQuery.each( [ "toggle", "show", "hide" ], function( _i, name ) {
  6315. var cssFn = jQuery.fn[ name ];
  6316. jQuery.fn[ name ] = function( speed, easing, callback ) {
  6317. return speed == null || typeof speed === "boolean" ?
  6318. cssFn.apply( this, arguments ) :
  6319. this.animate( genFx( name, true ), speed, easing, callback );
  6320. };
  6321. } );
  6322. // Generate shortcuts for custom animations
  6323. jQuery.each( {
  6324. slideDown: genFx( "show" ),
  6325. slideUp: genFx( "hide" ),
  6326. slideToggle: genFx( "toggle" ),
  6327. fadeIn: { opacity: "show" },
  6328. fadeOut: { opacity: "hide" },
  6329. fadeToggle: { opacity: "toggle" }
  6330. }, function( name, props ) {
  6331. jQuery.fn[ name ] = function( speed, easing, callback ) {
  6332. return this.animate( props, speed, easing, callback );
  6333. };
  6334. } );
  6335. jQuery.timers = [];
  6336. jQuery.fx.tick = function() {
  6337. var timer,
  6338. i = 0,
  6339. timers = jQuery.timers;
  6340. fxNow = Date.now();
  6341. for ( ; i < timers.length; i++ ) {
  6342. timer = timers[ i ];
  6343. // Run the timer and safely remove it when done (allowing for external removal)
  6344. if ( !timer() && timers[ i ] === timer ) {
  6345. timers.splice( i--, 1 );
  6346. }
  6347. }
  6348. if ( !timers.length ) {
  6349. jQuery.fx.stop();
  6350. }
  6351. fxNow = undefined;
  6352. };
  6353. jQuery.fx.timer = function( timer ) {
  6354. jQuery.timers.push( timer );
  6355. jQuery.fx.start();
  6356. };
  6357. jQuery.fx.interval = 13;
  6358. jQuery.fx.start = function() {
  6359. if ( inProgress ) {
  6360. return;
  6361. }
  6362. inProgress = true;
  6363. schedule();
  6364. };
  6365. jQuery.fx.stop = function() {
  6366. inProgress = null;
  6367. };
  6368. jQuery.fx.speeds = {
  6369. slow: 600,
  6370. fast: 200,
  6371. // Default speed
  6372. _default: 400
  6373. };
  6374. // Based off of the plugin by Clint Helfers, with permission.
  6375. jQuery.fn.delay = function( time, type ) {
  6376. time = jQuery.fx ? jQuery.fx.speeds[ time ] || time : time;
  6377. type = type || "fx";
  6378. return this.queue( type, function( next, hooks ) {
  6379. var timeout = window.setTimeout( next, time );
  6380. hooks.stop = function() {
  6381. window.clearTimeout( timeout );
  6382. };
  6383. } );
  6384. };
  6385. ( function() {
  6386. var input = document.createElement( "input" ),
  6387. select = document.createElement( "select" ),
  6388. opt = select.appendChild( document.createElement( "option" ) );
  6389. input.type = "checkbox";
  6390. // Support: Android <=4.3 only
  6391. // Default value for a checkbox should be "on"
  6392. support.checkOn = input.value !== "";
  6393. // Support: IE <=11 only
  6394. // Must access selectedIndex to make default options select
  6395. support.optSelected = opt.selected;
  6396. // Support: IE <=11 only
  6397. // An input loses its value after becoming a radio
  6398. input = document.createElement( "input" );
  6399. input.value = "t";
  6400. input.type = "radio";
  6401. support.radioValue = input.value === "t";
  6402. } )();
  6403. var boolHook,
  6404. attrHandle = jQuery.expr.attrHandle;
  6405. jQuery.fn.extend( {
  6406. attr: function( name, value ) {
  6407. return access( this, jQuery.attr, name, value, arguments.length > 1 );
  6408. },
  6409. removeAttr: function( name ) {
  6410. return this.each( function() {
  6411. jQuery.removeAttr( this, name );
  6412. } );
  6413. }
  6414. } );
  6415. jQuery.extend( {
  6416. attr: function( elem, name, value ) {
  6417. var ret, hooks,
  6418. nType = elem.nodeType;
  6419. // Don't get/set attributes on text, comment and attribute nodes
  6420. if ( nType === 3 || nType === 8 || nType === 2 ) {
  6421. return;
  6422. }
  6423. // Fallback to prop when attributes are not supported
  6424. if ( typeof elem.getAttribute === "undefined" ) {
  6425. return jQuery.prop( elem, name, value );
  6426. }
  6427. // Attribute hooks are determined by the lowercase version
  6428. // Grab necessary hook if one is defined
  6429. if ( nType !== 1 || !jQuery.isXMLDoc( elem ) ) {
  6430. hooks = jQuery.attrHooks[ name.toLowerCase() ] ||
  6431. ( jQuery.expr.match.bool.test( name ) ? boolHook : undefined );
  6432. }
  6433. if ( value !== undefined ) {
  6434. if ( value === null ) {
  6435. jQuery.removeAttr( elem, name );
  6436. return;
  6437. }
  6438. if ( hooks && "set" in hooks &&
  6439. ( ret = hooks.set( elem, value, name ) ) !== undefined ) {
  6440. return ret;
  6441. }
  6442. elem.setAttribute( name, value + "" );
  6443. return value;
  6444. }
  6445. if ( hooks && "get" in hooks && ( ret = hooks.get( elem, name ) ) !== null ) {
  6446. return ret;
  6447. }
  6448. ret = jQuery.find.attr( elem, name );
  6449. // Non-existent attributes return null, we normalize to undefined
  6450. return ret == null ? undefined : ret;
  6451. },
  6452. attrHooks: {
  6453. type: {
  6454. set: function( elem, value ) {
  6455. if ( !support.radioValue && value === "radio" &&
  6456. nodeName( elem, "input" ) ) {
  6457. var val = elem.value;
  6458. elem.setAttribute( "type", value );
  6459. if ( val ) {
  6460. elem.value = val;
  6461. }
  6462. return value;
  6463. }
  6464. }
  6465. }
  6466. },
  6467. removeAttr: function( elem, value ) {
  6468. var name,
  6469. i = 0,
  6470. // Attribute names can contain non-HTML whitespace characters
  6471. // https://html.spec.whatwg.org/multipage/syntax.html#attributes-2
  6472. attrNames = value && value.match( rnothtmlwhite );
  6473. if ( attrNames && elem.nodeType === 1 ) {
  6474. while ( ( name = attrNames[ i++ ] ) ) {
  6475. elem.removeAttribute( name );
  6476. }
  6477. }
  6478. }
  6479. } );
  6480. // Hooks for boolean attributes
  6481. boolHook = {
  6482. set: function( elem, value, name ) {
  6483. if ( value === false ) {
  6484. // Remove boolean attributes when set to false
  6485. jQuery.removeAttr( elem, name );
  6486. } else {
  6487. elem.setAttribute( name, name );
  6488. }
  6489. return name;
  6490. }
  6491. };
  6492. jQuery.each( jQuery.expr.match.bool.source.match( /\w+/g ), function( _i, name ) {
  6493. var getter = attrHandle[ name ] || jQuery.find.attr;
  6494. attrHandle[ name ] = function( elem, name, isXML ) {
  6495. var ret, handle,
  6496. lowercaseName = name.toLowerCase();
  6497. if ( !isXML ) {
  6498. // Avoid an infinite loop by temporarily removing this function from the getter
  6499. handle = attrHandle[ lowercaseName ];
  6500. attrHandle[ lowercaseName ] = ret;
  6501. ret = getter( elem, name, isXML ) != null ?
  6502. lowercaseName :
  6503. null;
  6504. attrHandle[ lowercaseName ] = handle;
  6505. }
  6506. return ret;
  6507. };
  6508. } );
  6509. var rfocusable = /^(?:input|select|textarea|button)$/i,
  6510. rclickable = /^(?:a|area)$/i;
  6511. jQuery.fn.extend( {
  6512. prop: function( name, value ) {
  6513. return access( this, jQuery.prop, name, value, arguments.length > 1 );
  6514. },
  6515. removeProp: function( name ) {
  6516. return this.each( function() {
  6517. delete this[ jQuery.propFix[ name ] || name ];
  6518. } );
  6519. }
  6520. } );
  6521. jQuery.extend( {
  6522. prop: function( elem, name, value ) {
  6523. var ret, hooks,
  6524. nType = elem.nodeType;
  6525. // Don't get/set properties on text, comment and attribute nodes
  6526. if ( nType === 3 || nType === 8 || nType === 2 ) {
  6527. return;
  6528. }
  6529. if ( nType !== 1 || !jQuery.isXMLDoc( elem ) ) {
  6530. // Fix name and attach hooks
  6531. name = jQuery.propFix[ name ] || name;
  6532. hooks = jQuery.propHooks[ name ];
  6533. }
  6534. if ( value !== undefined ) {
  6535. if ( hooks && "set" in hooks &&
  6536. ( ret = hooks.set( elem, value, name ) ) !== undefined ) {
  6537. return ret;
  6538. }
  6539. return ( elem[ name ] = value );
  6540. }
  6541. if ( hooks && "get" in hooks && ( ret = hooks.get( elem, name ) ) !== null ) {
  6542. return ret;
  6543. }
  6544. return elem[ name ];
  6545. },
  6546. propHooks: {
  6547. tabIndex: {
  6548. get: function( elem ) {
  6549. // Support: IE <=9 - 11 only
  6550. // elem.tabIndex doesn't always return the
  6551. // correct value when it hasn't been explicitly set
  6552. // Use proper attribute retrieval (trac-12072)
  6553. var tabindex = jQuery.find.attr( elem, "tabindex" );
  6554. if ( tabindex ) {
  6555. return parseInt( tabindex, 10 );
  6556. }
  6557. if (
  6558. rfocusable.test( elem.nodeName ) ||
  6559. rclickable.test( elem.nodeName ) &&
  6560. elem.href
  6561. ) {
  6562. return 0;
  6563. }
  6564. return -1;
  6565. }
  6566. }
  6567. },
  6568. propFix: {
  6569. "for": "htmlFor",
  6570. "class": "className"
  6571. }
  6572. } );
  6573. // Support: IE <=11 only
  6574. // Accessing the selectedIndex property
  6575. // forces the browser to respect setting selected
  6576. // on the option
  6577. // The getter ensures a default option is selected
  6578. // when in an optgroup
  6579. // eslint rule "no-unused-expressions" is disabled for this code
  6580. // since it considers such accessions noop
  6581. if ( !support.optSelected ) {
  6582. jQuery.propHooks.selected = {
  6583. get: function( elem ) {
  6584. /* eslint no-unused-expressions: "off" */
  6585. var parent = elem.parentNode;
  6586. if ( parent && parent.parentNode ) {
  6587. parent.parentNode.selectedIndex;
  6588. }
  6589. return null;
  6590. },
  6591. set: function( elem ) {
  6592. /* eslint no-unused-expressions: "off" */
  6593. var parent = elem.parentNode;
  6594. if ( parent ) {
  6595. parent.selectedIndex;
  6596. if ( parent.parentNode ) {
  6597. parent.parentNode.selectedIndex;
  6598. }
  6599. }
  6600. }
  6601. };
  6602. }
  6603. jQuery.each( [
  6604. "tabIndex",
  6605. "readOnly",
  6606. "maxLength",
  6607. "cellSpacing",
  6608. "cellPadding",
  6609. "rowSpan",
  6610. "colSpan",
  6611. "useMap",
  6612. "frameBorder",
  6613. "contentEditable"
  6614. ], function() {
  6615. jQuery.propFix[ this.toLowerCase() ] = this;
  6616. } );
  6617. // Strip and collapse whitespace according to HTML spec
  6618. // https://infra.spec.whatwg.org/#strip-and-collapse-ascii-whitespace
  6619. function stripAndCollapse( value ) {
  6620. var tokens = value.match( rnothtmlwhite ) || [];
  6621. return tokens.join( " " );
  6622. }
  6623. function getClass( elem ) {
  6624. return elem.getAttribute && elem.getAttribute( "class" ) || "";
  6625. }
  6626. function classesToArray( value ) {
  6627. if ( Array.isArray( value ) ) {
  6628. return value;
  6629. }
  6630. if ( typeof value === "string" ) {
  6631. return value.match( rnothtmlwhite ) || [];
  6632. }
  6633. return [];
  6634. }
  6635. jQuery.fn.extend( {
  6636. addClass: function( value ) {
  6637. var classNames, cur, curValue, className, i, finalValue;
  6638. if ( isFunction( value ) ) {
  6639. return this.each( function( j ) {
  6640. jQuery( this ).addClass( value.call( this, j, getClass( this ) ) );
  6641. } );
  6642. }
  6643. classNames = classesToArray( value );
  6644. if ( classNames.length ) {
  6645. return this.each( function() {
  6646. curValue = getClass( this );
  6647. cur = this.nodeType === 1 && ( " " + stripAndCollapse( curValue ) + " " );
  6648. if ( cur ) {
  6649. for ( i = 0; i < classNames.length; i++ ) {
  6650. className = classNames[ i ];
  6651. if ( cur.indexOf( " " + className + " " ) < 0 ) {
  6652. cur += className + " ";
  6653. }
  6654. }
  6655. // Only assign if different to avoid unneeded rendering.
  6656. finalValue = stripAndCollapse( cur );
  6657. if ( curValue !== finalValue ) {
  6658. this.setAttribute( "class", finalValue );
  6659. }
  6660. }
  6661. } );
  6662. }
  6663. return this;
  6664. },
  6665. removeClass: function( value ) {
  6666. var classNames, cur, curValue, className, i, finalValue;
  6667. if ( isFunction( value ) ) {
  6668. return this.each( function( j ) {
  6669. jQuery( this ).removeClass( value.call( this, j, getClass( this ) ) );
  6670. } );
  6671. }
  6672. if ( !arguments.length ) {
  6673. return this.attr( "class", "" );
  6674. }
  6675. classNames = classesToArray( value );
  6676. if ( classNames.length ) {
  6677. return this.each( function() {
  6678. curValue = getClass( this );
  6679. // This expression is here for better compressibility (see addClass)
  6680. cur = this.nodeType === 1 && ( " " + stripAndCollapse( curValue ) + " " );
  6681. if ( cur ) {
  6682. for ( i = 0; i < classNames.length; i++ ) {
  6683. className = classNames[ i ];
  6684. // Remove *all* instances
  6685. while ( cur.indexOf( " " + className + " " ) > -1 ) {
  6686. cur = cur.replace( " " + className + " ", " " );
  6687. }
  6688. }
  6689. // Only assign if different to avoid unneeded rendering.
  6690. finalValue = stripAndCollapse( cur );
  6691. if ( curValue !== finalValue ) {
  6692. this.setAttribute( "class", finalValue );
  6693. }
  6694. }
  6695. } );
  6696. }
  6697. return this;
  6698. },
  6699. toggleClass: function( value, stateVal ) {
  6700. var classNames, className, i, self,
  6701. type = typeof value,
  6702. isValidValue = type === "string" || Array.isArray( value );
  6703. if ( isFunction( value ) ) {
  6704. return this.each( function( i ) {
  6705. jQuery( this ).toggleClass(
  6706. value.call( this, i, getClass( this ), stateVal ),
  6707. stateVal
  6708. );
  6709. } );
  6710. }
  6711. if ( typeof stateVal === "boolean" && isValidValue ) {
  6712. return stateVal ? this.addClass( value ) : this.removeClass( value );
  6713. }
  6714. classNames = classesToArray( value );
  6715. return this.each( function() {
  6716. if ( isValidValue ) {
  6717. // Toggle individual class names
  6718. self = jQuery( this );
  6719. for ( i = 0; i < classNames.length; i++ ) {
  6720. className = classNames[ i ];
  6721. // Check each className given, space separated list
  6722. if ( self.hasClass( className ) ) {
  6723. self.removeClass( className );
  6724. } else {
  6725. self.addClass( className );
  6726. }
  6727. }
  6728. // Toggle whole class name
  6729. } else if ( value === undefined || type === "boolean" ) {
  6730. className = getClass( this );
  6731. if ( className ) {
  6732. // Store className if set
  6733. dataPriv.set( this, "__className__", className );
  6734. }
  6735. // If the element has a class name or if we're passed `false`,
  6736. // then remove the whole classname (if there was one, the above saved it).
  6737. // Otherwise bring back whatever was previously saved (if anything),
  6738. // falling back to the empty string if nothing was stored.
  6739. if ( this.setAttribute ) {
  6740. this.setAttribute( "class",
  6741. className || value === false ?
  6742. "" :
  6743. dataPriv.get( this, "__className__" ) || ""
  6744. );
  6745. }
  6746. }
  6747. } );
  6748. },
  6749. hasClass: function( selector ) {
  6750. var className, elem,
  6751. i = 0;
  6752. className = " " + selector + " ";
  6753. while ( ( elem = this[ i++ ] ) ) {
  6754. if ( elem.nodeType === 1 &&
  6755. ( " " + stripAndCollapse( getClass( elem ) ) + " " ).indexOf( className ) > -1 ) {
  6756. return true;
  6757. }
  6758. }
  6759. return false;
  6760. }
  6761. } );
  6762. var rreturn = /\r/g;
  6763. jQuery.fn.extend( {
  6764. val: function( value ) {
  6765. var hooks, ret, valueIsFunction,
  6766. elem = this[ 0 ];
  6767. if ( !arguments.length ) {
  6768. if ( elem ) {
  6769. hooks = jQuery.valHooks[ elem.type ] ||
  6770. jQuery.valHooks[ elem.nodeName.toLowerCase() ];
  6771. if ( hooks &&
  6772. "get" in hooks &&
  6773. ( ret = hooks.get( elem, "value" ) ) !== undefined
  6774. ) {
  6775. return ret;
  6776. }
  6777. ret = elem.value;
  6778. // Handle most common string cases
  6779. if ( typeof ret === "string" ) {
  6780. return ret.replace( rreturn, "" );
  6781. }
  6782. // Handle cases where value is null/undef or number
  6783. return ret == null ? "" : ret;
  6784. }
  6785. return;
  6786. }
  6787. valueIsFunction = isFunction( value );
  6788. return this.each( function( i ) {
  6789. var val;
  6790. if ( this.nodeType !== 1 ) {
  6791. return;
  6792. }
  6793. if ( valueIsFunction ) {
  6794. val = value.call( this, i, jQuery( this ).val() );
  6795. } else {
  6796. val = value;
  6797. }
  6798. // Treat null/undefined as ""; convert numbers to string
  6799. if ( val == null ) {
  6800. val = "";
  6801. } else if ( typeof val === "number" ) {
  6802. val += "";
  6803. } else if ( Array.isArray( val ) ) {
  6804. val = jQuery.map( val, function( value ) {
  6805. return value == null ? "" : value + "";
  6806. } );
  6807. }
  6808. hooks = jQuery.valHooks[ this.type ] || jQuery.valHooks[ this.nodeName.toLowerCase() ];
  6809. // If set returns undefined, fall back to normal setting
  6810. if ( !hooks || !( "set" in hooks ) || hooks.set( this, val, "value" ) === undefined ) {
  6811. this.value = val;
  6812. }
  6813. } );
  6814. }
  6815. } );
  6816. jQuery.extend( {
  6817. valHooks: {
  6818. option: {
  6819. get: function( elem ) {
  6820. var val = jQuery.find.attr( elem, "value" );
  6821. return val != null ?
  6822. val :
  6823. // Support: IE <=10 - 11 only
  6824. // option.text throws exceptions (trac-14686, trac-14858)
  6825. // Strip and collapse whitespace
  6826. // https://html.spec.whatwg.org/#strip-and-collapse-whitespace
  6827. stripAndCollapse( jQuery.text( elem ) );
  6828. }
  6829. },
  6830. select: {
  6831. get: function( elem ) {
  6832. var value, option, i,
  6833. options = elem.options,
  6834. index = elem.selectedIndex,
  6835. one = elem.type === "select-one",
  6836. values = one ? null : [],
  6837. max = one ? index + 1 : options.length;
  6838. if ( index < 0 ) {
  6839. i = max;
  6840. } else {
  6841. i = one ? index : 0;
  6842. }
  6843. // Loop through all the selected options
  6844. for ( ; i < max; i++ ) {
  6845. option = options[ i ];
  6846. // Support: IE <=9 only
  6847. // IE8-9 doesn't update selected after form reset (trac-2551)
  6848. if ( ( option.selected || i === index ) &&
  6849. // Don't return options that are disabled or in a disabled optgroup
  6850. !option.disabled &&
  6851. ( !option.parentNode.disabled ||
  6852. !nodeName( option.parentNode, "optgroup" ) ) ) {
  6853. // Get the specific value for the option
  6854. value = jQuery( option ).val();
  6855. // We don't need an array for one selects
  6856. if ( one ) {
  6857. return value;
  6858. }
  6859. // Multi-Selects return an array
  6860. values.push( value );
  6861. }
  6862. }
  6863. return values;
  6864. },
  6865. set: function( elem, value ) {
  6866. var optionSet, option,
  6867. options = elem.options,
  6868. values = jQuery.makeArray( value ),
  6869. i = options.length;
  6870. while ( i-- ) {
  6871. option = options[ i ];
  6872. /* eslint-disable no-cond-assign */
  6873. if ( option.selected =
  6874. jQuery.inArray( jQuery.valHooks.option.get( option ), values ) > -1
  6875. ) {
  6876. optionSet = true;
  6877. }
  6878. /* eslint-enable no-cond-assign */
  6879. }
  6880. // Force browsers to behave consistently when non-matching value is set
  6881. if ( !optionSet ) {
  6882. elem.selectedIndex = -1;
  6883. }
  6884. return values;
  6885. }
  6886. }
  6887. }
  6888. } );
  6889. // Radios and checkboxes getter/setter
  6890. jQuery.each( [ "radio", "checkbox" ], function() {
  6891. jQuery.valHooks[ this ] = {
  6892. set: function( elem, value ) {
  6893. if ( Array.isArray( value ) ) {
  6894. return ( elem.checked = jQuery.inArray( jQuery( elem ).val(), value ) > -1 );
  6895. }
  6896. }
  6897. };
  6898. if ( !support.checkOn ) {
  6899. jQuery.valHooks[ this ].get = function( elem ) {
  6900. return elem.getAttribute( "value" ) === null ? "on" : elem.value;
  6901. };
  6902. }
  6903. } );
  6904. // Return jQuery for attributes-only inclusion
  6905. var location = window.location;
  6906. var nonce = { guid: Date.now() };
  6907. var rquery = ( /\?/ );
  6908. // Cross-browser xml parsing
  6909. jQuery.parseXML = function( data ) {
  6910. var xml, parserErrorElem;
  6911. if ( !data || typeof data !== "string" ) {
  6912. return null;
  6913. }
  6914. // Support: IE 9 - 11 only
  6915. // IE throws on parseFromString with invalid input.
  6916. try {
  6917. xml = ( new window.DOMParser() ).parseFromString( data, "text/xml" );
  6918. } catch ( e ) {}
  6919. parserErrorElem = xml && xml.getElementsByTagName( "parsererror" )[ 0 ];
  6920. if ( !xml || parserErrorElem ) {
  6921. jQuery.error( "Invalid XML: " + (
  6922. parserErrorElem ?
  6923. jQuery.map( parserErrorElem.childNodes, function( el ) {
  6924. return el.textContent;
  6925. } ).join( "\n" ) :
  6926. data
  6927. ) );
  6928. }
  6929. return xml;
  6930. };
  6931. var rfocusMorph = /^(?:focusinfocus|focusoutblur)$/,
  6932. stopPropagationCallback = function( e ) {
  6933. e.stopPropagation();
  6934. };
  6935. jQuery.extend( jQuery.event, {
  6936. trigger: function( event, data, elem, onlyHandlers ) {
  6937. var i, cur, tmp, bubbleType, ontype, handle, special, lastElement,
  6938. eventPath = [ elem || document ],
  6939. type = hasOwn.call( event, "type" ) ? event.type : event,
  6940. namespaces = hasOwn.call( event, "namespace" ) ? event.namespace.split( "." ) : [];
  6941. cur = lastElement = tmp = elem = elem || document;
  6942. // Don't do events on text and comment nodes
  6943. if ( elem.nodeType === 3 || elem.nodeType === 8 ) {
  6944. return;
  6945. }
  6946. // focus/blur morphs to focusin/out; ensure we're not firing them right now
  6947. if ( rfocusMorph.test( type + jQuery.event.triggered ) ) {
  6948. return;
  6949. }
  6950. if ( type.indexOf( "." ) > -1 ) {
  6951. // Namespaced trigger; create a regexp to match event type in handle()
  6952. namespaces = type.split( "." );
  6953. type = namespaces.shift();
  6954. namespaces.sort();
  6955. }
  6956. ontype = type.indexOf( ":" ) < 0 && "on" + type;
  6957. // Caller can pass in a jQuery.Event object, Object, or just an event type string
  6958. event = event[ jQuery.expando ] ?
  6959. event :
  6960. new jQuery.Event( type, typeof event === "object" && event );
  6961. // Trigger bitmask: & 1 for native handlers; & 2 for jQuery (always true)
  6962. event.isTrigger = onlyHandlers ? 2 : 3;
  6963. event.namespace = namespaces.join( "." );
  6964. event.rnamespace = event.namespace ?
  6965. new RegExp( "(^|\\.)" + namespaces.join( "\\.(?:.*\\.|)" ) + "(\\.|$)" ) :
  6966. null;
  6967. // Clean up the event in case it is being reused
  6968. event.result = undefined;
  6969. if ( !event.target ) {
  6970. event.target = elem;
  6971. }
  6972. // Clone any incoming data and prepend the event, creating the handler arg list
  6973. data = data == null ?
  6974. [ event ] :
  6975. jQuery.makeArray( data, [ event ] );
  6976. // Allow special events to draw outside the lines
  6977. special = jQuery.event.special[ type ] || {};
  6978. if ( !onlyHandlers && special.trigger && special.trigger.apply( elem, data ) === false ) {
  6979. return;
  6980. }
  6981. // Determine event propagation path in advance, per W3C events spec (trac-9951)
  6982. // Bubble up to document, then to window; watch for a global ownerDocument var (trac-9724)
  6983. if ( !onlyHandlers && !special.noBubble && !isWindow( elem ) ) {
  6984. bubbleType = special.delegateType || type;
  6985. if ( !rfocusMorph.test( bubbleType + type ) ) {
  6986. cur = cur.parentNode;
  6987. }
  6988. for ( ; cur; cur = cur.parentNode ) {
  6989. eventPath.push( cur );
  6990. tmp = cur;
  6991. }
  6992. // Only add window if we got to document (e.g., not plain obj or detached DOM)
  6993. if ( tmp === ( elem.ownerDocument || document ) ) {
  6994. eventPath.push( tmp.defaultView || tmp.parentWindow || window );
  6995. }
  6996. }
  6997. // Fire handlers on the event path
  6998. i = 0;
  6999. while ( ( cur = eventPath[ i++ ] ) && !event.isPropagationStopped() ) {
  7000. lastElement = cur;
  7001. event.type = i > 1 ?
  7002. bubbleType :
  7003. special.bindType || type;
  7004. // jQuery handler
  7005. handle = ( dataPriv.get( cur, "events" ) || Object.create( null ) )[ event.type ] &&
  7006. dataPriv.get( cur, "handle" );
  7007. if ( handle ) {
  7008. handle.apply( cur, data );
  7009. }
  7010. // Native handler
  7011. handle = ontype && cur[ ontype ];
  7012. if ( handle && handle.apply && acceptData( cur ) ) {
  7013. event.result = handle.apply( cur, data );
  7014. if ( event.result === false ) {
  7015. event.preventDefault();
  7016. }
  7017. }
  7018. }
  7019. event.type = type;
  7020. // If nobody prevented the default action, do it now
  7021. if ( !onlyHandlers && !event.isDefaultPrevented() ) {
  7022. if ( ( !special._default ||
  7023. special._default.apply( eventPath.pop(), data ) === false ) &&
  7024. acceptData( elem ) ) {
  7025. // Call a native DOM method on the target with the same name as the event.
  7026. // Don't do default actions on window, that's where global variables be (trac-6170)
  7027. if ( ontype && isFunction( elem[ type ] ) && !isWindow( elem ) ) {
  7028. // Don't re-trigger an onFOO event when we call its FOO() method
  7029. tmp = elem[ ontype ];
  7030. if ( tmp ) {
  7031. elem[ ontype ] = null;
  7032. }
  7033. // Prevent re-triggering of the same event, since we already bubbled it above
  7034. jQuery.event.triggered = type;
  7035. if ( event.isPropagationStopped() ) {
  7036. lastElement.addEventListener( type, stopPropagationCallback );
  7037. }
  7038. elem[ type ]();
  7039. if ( event.isPropagationStopped() ) {
  7040. lastElement.removeEventListener( type, stopPropagationCallback );
  7041. }
  7042. jQuery.event.triggered = undefined;
  7043. if ( tmp ) {
  7044. elem[ ontype ] = tmp;
  7045. }
  7046. }
  7047. }
  7048. }
  7049. return event.result;
  7050. },
  7051. // Piggyback on a donor event to simulate a different one
  7052. // Used only for `focus(in | out)` events
  7053. simulate: function( type, elem, event ) {
  7054. var e = jQuery.extend(
  7055. new jQuery.Event(),
  7056. event,
  7057. {
  7058. type: type,
  7059. isSimulated: true
  7060. }
  7061. );
  7062. jQuery.event.trigger( e, null, elem );
  7063. }
  7064. } );
  7065. jQuery.fn.extend( {
  7066. trigger: function( type, data ) {
  7067. return this.each( function() {
  7068. jQuery.event.trigger( type, data, this );
  7069. } );
  7070. },
  7071. triggerHandler: function( type, data ) {
  7072. var elem = this[ 0 ];
  7073. if ( elem ) {
  7074. return jQuery.event.trigger( type, data, elem, true );
  7075. }
  7076. }
  7077. } );
  7078. var
  7079. rbracket = /\[\]$/,
  7080. rCRLF = /\r?\n/g,
  7081. rsubmitterTypes = /^(?:submit|button|image|reset|file)$/i,
  7082. rsubmittable = /^(?:input|select|textarea|keygen)/i;
  7083. function buildParams( prefix, obj, traditional, add ) {
  7084. var name;
  7085. if ( Array.isArray( obj ) ) {
  7086. // Serialize array item.
  7087. jQuery.each( obj, function( i, v ) {
  7088. if ( traditional || rbracket.test( prefix ) ) {
  7089. // Treat each array item as a scalar.
  7090. add( prefix, v );
  7091. } else {
  7092. // Item is non-scalar (array or object), encode its numeric index.
  7093. buildParams(
  7094. prefix + "[" + ( typeof v === "object" && v != null ? i : "" ) + "]",
  7095. v,
  7096. traditional,
  7097. add
  7098. );
  7099. }
  7100. } );
  7101. } else if ( !traditional && toType( obj ) === "object" ) {
  7102. // Serialize object item.
  7103. for ( name in obj ) {
  7104. buildParams( prefix + "[" + name + "]", obj[ name ], traditional, add );
  7105. }
  7106. } else {
  7107. // Serialize scalar item.
  7108. add( prefix, obj );
  7109. }
  7110. }
  7111. // Serialize an array of form elements or a set of
  7112. // key/values into a query string
  7113. jQuery.param = function( a, traditional ) {
  7114. var prefix,
  7115. s = [],
  7116. add = function( key, valueOrFunction ) {
  7117. // If value is a function, invoke it and use its return value
  7118. var value = isFunction( valueOrFunction ) ?
  7119. valueOrFunction() :
  7120. valueOrFunction;
  7121. s[ s.length ] = encodeURIComponent( key ) + "=" +
  7122. encodeURIComponent( value == null ? "" : value );
  7123. };
  7124. if ( a == null ) {
  7125. return "";
  7126. }
  7127. // If an array was passed in, assume that it is an array of form elements.
  7128. if ( Array.isArray( a ) || ( a.jquery && !jQuery.isPlainObject( a ) ) ) {
  7129. // Serialize the form elements
  7130. jQuery.each( a, function() {
  7131. add( this.name, this.value );
  7132. } );
  7133. } else {
  7134. // If traditional, encode the "old" way (the way 1.3.2 or older
  7135. // did it), otherwise encode params recursively.
  7136. for ( prefix in a ) {
  7137. buildParams( prefix, a[ prefix ], traditional, add );
  7138. }
  7139. }
  7140. // Return the resulting serialization
  7141. return s.join( "&" );
  7142. };
  7143. jQuery.fn.extend( {
  7144. serialize: function() {
  7145. return jQuery.param( this.serializeArray() );
  7146. },
  7147. serializeArray: function() {
  7148. return this.map( function() {
  7149. // Can add propHook for "elements" to filter or add form elements
  7150. var elements = jQuery.prop( this, "elements" );
  7151. return elements ? jQuery.makeArray( elements ) : this;
  7152. } ).filter( function() {
  7153. var type = this.type;
  7154. // Use .is( ":disabled" ) so that fieldset[disabled] works
  7155. return this.name && !jQuery( this ).is( ":disabled" ) &&
  7156. rsubmittable.test( this.nodeName ) && !rsubmitterTypes.test( type ) &&
  7157. ( this.checked || !rcheckableType.test( type ) );
  7158. } ).map( function( _i, elem ) {
  7159. var val = jQuery( this ).val();
  7160. if ( val == null ) {
  7161. return null;
  7162. }
  7163. if ( Array.isArray( val ) ) {
  7164. return jQuery.map( val, function( val ) {
  7165. return { name: elem.name, value: val.replace( rCRLF, "\r\n" ) };
  7166. } );
  7167. }
  7168. return { name: elem.name, value: val.replace( rCRLF, "\r\n" ) };
  7169. } ).get();
  7170. }
  7171. } );
  7172. var
  7173. r20 = /%20/g,
  7174. rhash = /#.*$/,
  7175. rantiCache = /([?&])_=[^&]*/,
  7176. rheaders = /^(.*?):[ \t]*([^\r\n]*)$/mg,
  7177. // trac-7653, trac-8125, trac-8152: local protocol detection
  7178. rlocalProtocol = /^(?:about|app|app-storage|.+-extension|file|res|widget):$/,
  7179. rnoContent = /^(?:GET|HEAD)$/,
  7180. rprotocol = /^\/\//,
  7181. /* Prefilters
  7182. * 1) They are useful to introduce custom dataTypes (see ajax/jsonp.js for an example)
  7183. * 2) These are called:
  7184. * - BEFORE asking for a transport
  7185. * - AFTER param serialization (s.data is a string if s.processData is true)
  7186. * 3) key is the dataType
  7187. * 4) the catchall symbol "*" can be used
  7188. * 5) execution will start with transport dataType and THEN continue down to "*" if needed
  7189. */
  7190. prefilters = {},
  7191. /* Transports bindings
  7192. * 1) key is the dataType
  7193. * 2) the catchall symbol "*" can be used
  7194. * 3) selection will start with transport dataType and THEN go to "*" if needed
  7195. */
  7196. transports = {},
  7197. // Avoid comment-prolog char sequence (trac-10098); must appease lint and evade compression
  7198. allTypes = "*/".concat( "*" ),
  7199. // Anchor tag for parsing the document origin
  7200. originAnchor = document.createElement( "a" );
  7201. originAnchor.href = location.href;
  7202. // Base "constructor" for jQuery.ajaxPrefilter and jQuery.ajaxTransport
  7203. function addToPrefiltersOrTransports( structure ) {
  7204. // dataTypeExpression is optional and defaults to "*"
  7205. return function( dataTypeExpression, func ) {
  7206. if ( typeof dataTypeExpression !== "string" ) {
  7207. func = dataTypeExpression;
  7208. dataTypeExpression = "*";
  7209. }
  7210. var dataType,
  7211. i = 0,
  7212. dataTypes = dataTypeExpression.toLowerCase().match( rnothtmlwhite ) || [];
  7213. if ( isFunction( func ) ) {
  7214. // For each dataType in the dataTypeExpression
  7215. while ( ( dataType = dataTypes[ i++ ] ) ) {
  7216. // Prepend if requested
  7217. if ( dataType[ 0 ] === "+" ) {
  7218. dataType = dataType.slice( 1 ) || "*";
  7219. ( structure[ dataType ] = structure[ dataType ] || [] ).unshift( func );
  7220. // Otherwise append
  7221. } else {
  7222. ( structure[ dataType ] = structure[ dataType ] || [] ).push( func );
  7223. }
  7224. }
  7225. }
  7226. };
  7227. }
  7228. // Base inspection function for prefilters and transports
  7229. function inspectPrefiltersOrTransports( structure, options, originalOptions, jqXHR ) {
  7230. var inspected = {},
  7231. seekingTransport = ( structure === transports );
  7232. function inspect( dataType ) {
  7233. var selected;
  7234. inspected[ dataType ] = true;
  7235. jQuery.each( structure[ dataType ] || [], function( _, prefilterOrFactory ) {
  7236. var dataTypeOrTransport = prefilterOrFactory( options, originalOptions, jqXHR );
  7237. if ( typeof dataTypeOrTransport === "string" &&
  7238. !seekingTransport && !inspected[ dataTypeOrTransport ] ) {
  7239. options.dataTypes.unshift( dataTypeOrTransport );
  7240. inspect( dataTypeOrTransport );
  7241. return false;
  7242. } else if ( seekingTransport ) {
  7243. return !( selected = dataTypeOrTransport );
  7244. }
  7245. } );
  7246. return selected;
  7247. }
  7248. return inspect( options.dataTypes[ 0 ] ) || !inspected[ "*" ] && inspect( "*" );
  7249. }
  7250. // A special extend for ajax options
  7251. // that takes "flat" options (not to be deep extended)
  7252. // Fixes trac-9887
  7253. function ajaxExtend( target, src ) {
  7254. var key, deep,
  7255. flatOptions = jQuery.ajaxSettings.flatOptions || {};
  7256. for ( key in src ) {
  7257. if ( src[ key ] !== undefined ) {
  7258. ( flatOptions[ key ] ? target : ( deep || ( deep = {} ) ) )[ key ] = src[ key ];
  7259. }
  7260. }
  7261. if ( deep ) {
  7262. jQuery.extend( true, target, deep );
  7263. }
  7264. return target;
  7265. }
  7266. /* Handles responses to an ajax request:
  7267. * - finds the right dataType (mediates between content-type and expected dataType)
  7268. * - returns the corresponding response
  7269. */
  7270. function ajaxHandleResponses( s, jqXHR, responses ) {
  7271. var ct, type, finalDataType, firstDataType,
  7272. contents = s.contents,
  7273. dataTypes = s.dataTypes;
  7274. // Remove auto dataType and get content-type in the process
  7275. while ( dataTypes[ 0 ] === "*" ) {
  7276. dataTypes.shift();
  7277. if ( ct === undefined ) {
  7278. ct = s.mimeType || jqXHR.getResponseHeader( "Content-Type" );
  7279. }
  7280. }
  7281. // Check if we're dealing with a known content-type
  7282. if ( ct ) {
  7283. for ( type in contents ) {
  7284. if ( contents[ type ] && contents[ type ].test( ct ) ) {
  7285. dataTypes.unshift( type );
  7286. break;
  7287. }
  7288. }
  7289. }
  7290. // Check to see if we have a response for the expected dataType
  7291. if ( dataTypes[ 0 ] in responses ) {
  7292. finalDataType = dataTypes[ 0 ];
  7293. } else {
  7294. // Try convertible dataTypes
  7295. for ( type in responses ) {
  7296. if ( !dataTypes[ 0 ] || s.converters[ type + " " + dataTypes[ 0 ] ] ) {
  7297. finalDataType = type;
  7298. break;
  7299. }
  7300. if ( !firstDataType ) {
  7301. firstDataType = type;
  7302. }
  7303. }
  7304. // Or just use first one
  7305. finalDataType = finalDataType || firstDataType;
  7306. }
  7307. // If we found a dataType
  7308. // We add the dataType to the list if needed
  7309. // and return the corresponding response
  7310. if ( finalDataType ) {
  7311. if ( finalDataType !== dataTypes[ 0 ] ) {
  7312. dataTypes.unshift( finalDataType );
  7313. }
  7314. return responses[ finalDataType ];
  7315. }
  7316. }
  7317. /* Chain conversions given the request and the original response
  7318. * Also sets the responseXXX fields on the jqXHR instance
  7319. */
  7320. function ajaxConvert( s, response, jqXHR, isSuccess ) {
  7321. var conv2, current, conv, tmp, prev,
  7322. converters = {},
  7323. // Work with a copy of dataTypes in case we need to modify it for conversion
  7324. dataTypes = s.dataTypes.slice();
  7325. // Create converters map with lowercased keys
  7326. if ( dataTypes[ 1 ] ) {
  7327. for ( conv in s.converters ) {
  7328. converters[ conv.toLowerCase() ] = s.converters[ conv ];
  7329. }
  7330. }
  7331. current = dataTypes.shift();
  7332. // Convert to each sequential dataType
  7333. while ( current ) {
  7334. if ( s.responseFields[ current ] ) {
  7335. jqXHR[ s.responseFields[ current ] ] = response;
  7336. }
  7337. // Apply the dataFilter if provided
  7338. if ( !prev && isSuccess && s.dataFilter ) {
  7339. response = s.dataFilter( response, s.dataType );
  7340. }
  7341. prev = current;
  7342. current = dataTypes.shift();
  7343. if ( current ) {
  7344. // There's only work to do if current dataType is non-auto
  7345. if ( current === "*" ) {
  7346. current = prev;
  7347. // Convert response if prev dataType is non-auto and differs from current
  7348. } else if ( prev !== "*" && prev !== current ) {
  7349. // Seek a direct converter
  7350. conv = converters[ prev + " " + current ] || converters[ "* " + current ];
  7351. // If none found, seek a pair
  7352. if ( !conv ) {
  7353. for ( conv2 in converters ) {
  7354. // If conv2 outputs current
  7355. tmp = conv2.split( " " );
  7356. if ( tmp[ 1 ] === current ) {
  7357. // If prev can be converted to accepted input
  7358. conv = converters[ prev + " " + tmp[ 0 ] ] ||
  7359. converters[ "* " + tmp[ 0 ] ];
  7360. if ( conv ) {
  7361. // Condense equivalence converters
  7362. if ( conv === true ) {
  7363. conv = converters[ conv2 ];
  7364. // Otherwise, insert the intermediate dataType
  7365. } else if ( converters[ conv2 ] !== true ) {
  7366. current = tmp[ 0 ];
  7367. dataTypes.unshift( tmp[ 1 ] );
  7368. }
  7369. break;
  7370. }
  7371. }
  7372. }
  7373. }
  7374. // Apply converter (if not an equivalence)
  7375. if ( conv !== true ) {
  7376. // Unless errors are allowed to bubble, catch and return them
  7377. if ( conv && s.throws ) {
  7378. response = conv( response );
  7379. } else {
  7380. try {
  7381. response = conv( response );
  7382. } catch ( e ) {
  7383. return {
  7384. state: "parsererror",
  7385. error: conv ? e : "No conversion from " + prev + " to " + current
  7386. };
  7387. }
  7388. }
  7389. }
  7390. }
  7391. }
  7392. }
  7393. return { state: "success", data: response };
  7394. }
  7395. jQuery.extend( {
  7396. // Counter for holding the number of active queries
  7397. active: 0,
  7398. // Last-Modified header cache for next request
  7399. lastModified: {},
  7400. etag: {},
  7401. ajaxSettings: {
  7402. url: location.href,
  7403. type: "GET",
  7404. isLocal: rlocalProtocol.test( location.protocol ),
  7405. global: true,
  7406. processData: true,
  7407. async: true,
  7408. contentType: "application/x-www-form-urlencoded; charset=UTF-8",
  7409. /*
  7410. timeout: 0,
  7411. data: null,
  7412. dataType: null,
  7413. username: null,
  7414. password: null,
  7415. cache: null,
  7416. throws: false,
  7417. traditional: false,
  7418. headers: {},
  7419. */
  7420. accepts: {
  7421. "*": allTypes,
  7422. text: "text/plain",
  7423. html: "text/html",
  7424. xml: "application/xml, text/xml",
  7425. json: "application/json, text/javascript"
  7426. },
  7427. contents: {
  7428. xml: /\bxml\b/,
  7429. html: /\bhtml/,
  7430. json: /\bjson\b/
  7431. },
  7432. responseFields: {
  7433. xml: "responseXML",
  7434. text: "responseText",
  7435. json: "responseJSON"
  7436. },
  7437. // Data converters
  7438. // Keys separate source (or catchall "*") and destination types with a single space
  7439. converters: {
  7440. // Convert anything to text
  7441. "* text": String,
  7442. // Text to html (true = no transformation)
  7443. "text html": true,
  7444. // Evaluate text as a json expression
  7445. "text json": JSON.parse,
  7446. // Parse text as xml
  7447. "text xml": jQuery.parseXML
  7448. },
  7449. // For options that shouldn't be deep extended:
  7450. // you can add your own custom options here if
  7451. // and when you create one that shouldn't be
  7452. // deep extended (see ajaxExtend)
  7453. flatOptions: {
  7454. url: true,
  7455. context: true
  7456. }
  7457. },
  7458. // Creates a full fledged settings object into target
  7459. // with both ajaxSettings and settings fields.
  7460. // If target is omitted, writes into ajaxSettings.
  7461. ajaxSetup: function( target, settings ) {
  7462. return settings ?
  7463. // Building a settings object
  7464. ajaxExtend( ajaxExtend( target, jQuery.ajaxSettings ), settings ) :
  7465. // Extending ajaxSettings
  7466. ajaxExtend( jQuery.ajaxSettings, target );
  7467. },
  7468. ajaxPrefilter: addToPrefiltersOrTransports( prefilters ),
  7469. ajaxTransport: addToPrefiltersOrTransports( transports ),
  7470. // Main method
  7471. ajax: function( url, options ) {
  7472. // If url is an object, simulate pre-1.5 signature
  7473. if ( typeof url === "object" ) {
  7474. options = url;
  7475. url = undefined;
  7476. }
  7477. // Force options to be an object
  7478. options = options || {};
  7479. var transport,
  7480. // URL without anti-cache param
  7481. cacheURL,
  7482. // Response headers
  7483. responseHeadersString,
  7484. responseHeaders,
  7485. // timeout handle
  7486. timeoutTimer,
  7487. // Url cleanup var
  7488. urlAnchor,
  7489. // Request state (becomes false upon send and true upon completion)
  7490. completed,
  7491. // To know if global events are to be dispatched
  7492. fireGlobals,
  7493. // Loop variable
  7494. i,
  7495. // uncached part of the url
  7496. uncached,
  7497. // Create the final options object
  7498. s = jQuery.ajaxSetup( {}, options ),
  7499. // Callbacks context
  7500. callbackContext = s.context || s,
  7501. // Context for global events is callbackContext if it is a DOM node or jQuery collection
  7502. globalEventContext = s.context &&
  7503. ( callbackContext.nodeType || callbackContext.jquery ) ?
  7504. jQuery( callbackContext ) :
  7505. jQuery.event,
  7506. // Deferreds
  7507. deferred = jQuery.Deferred(),
  7508. completeDeferred = jQuery.Callbacks( "once memory" ),
  7509. // Status-dependent callbacks
  7510. statusCode = s.statusCode || {},
  7511. // Headers (they are sent all at once)
  7512. requestHeaders = {},
  7513. requestHeadersNames = {},
  7514. // Default abort message
  7515. strAbort = "canceled",
  7516. // Fake xhr
  7517. jqXHR = {
  7518. readyState: 0,
  7519. // Builds headers hashtable if needed
  7520. getResponseHeader: function( key ) {
  7521. var match;
  7522. if ( completed ) {
  7523. if ( !responseHeaders ) {
  7524. responseHeaders = {};
  7525. while ( ( match = rheaders.exec( responseHeadersString ) ) ) {
  7526. responseHeaders[ match[ 1 ].toLowerCase() + " " ] =
  7527. ( responseHeaders[ match[ 1 ].toLowerCase() + " " ] || [] )
  7528. .concat( match[ 2 ] );
  7529. }
  7530. }
  7531. match = responseHeaders[ key.toLowerCase() + " " ];
  7532. }
  7533. return match == null ? null : match.join( ", " );
  7534. },
  7535. // Raw string
  7536. getAllResponseHeaders: function() {
  7537. return completed ? responseHeadersString : null;
  7538. },
  7539. // Caches the header
  7540. setRequestHeader: function( name, value ) {
  7541. if ( completed == null ) {
  7542. name = requestHeadersNames[ name.toLowerCase() ] =
  7543. requestHeadersNames[ name.toLowerCase() ] || name;
  7544. requestHeaders[ name ] = value;
  7545. }
  7546. return this;
  7547. },
  7548. // Overrides response content-type header
  7549. overrideMimeType: function( type ) {
  7550. if ( completed == null ) {
  7551. s.mimeType = type;
  7552. }
  7553. return this;
  7554. },
  7555. // Status-dependent callbacks
  7556. statusCode: function( map ) {
  7557. var code;
  7558. if ( map ) {
  7559. if ( completed ) {
  7560. // Execute the appropriate callbacks
  7561. jqXHR.always( map[ jqXHR.status ] );
  7562. } else {
  7563. // Lazy-add the new callbacks in a way that preserves old ones
  7564. for ( code in map ) {
  7565. statusCode[ code ] = [ statusCode[ code ], map[ code ] ];
  7566. }
  7567. }
  7568. }
  7569. return this;
  7570. },
  7571. // Cancel the request
  7572. abort: function( statusText ) {
  7573. var finalText = statusText || strAbort;
  7574. if ( transport ) {
  7575. transport.abort( finalText );
  7576. }
  7577. done( 0, finalText );
  7578. return this;
  7579. }
  7580. };
  7581. // Attach deferreds
  7582. deferred.promise( jqXHR );
  7583. // Add protocol if not provided (prefilters might expect it)
  7584. // Handle falsy url in the settings object (trac-10093: consistency with old signature)
  7585. // We also use the url parameter if available
  7586. s.url = ( ( url || s.url || location.href ) + "" )
  7587. .replace( rprotocol, location.protocol + "//" );
  7588. // Alias method option to type as per ticket trac-12004
  7589. s.type = options.method || options.type || s.method || s.type;
  7590. // Extract dataTypes list
  7591. s.dataTypes = ( s.dataType || "*" ).toLowerCase().match( rnothtmlwhite ) || [ "" ];
  7592. // A cross-domain request is in order when the origin doesn't match the current origin.
  7593. if ( s.crossDomain == null ) {
  7594. urlAnchor = document.createElement( "a" );
  7595. // Support: IE <=8 - 11, Edge 12 - 15
  7596. // IE throws exception on accessing the href property if url is malformed,
  7597. // e.g. http://example.com:80x/
  7598. try {
  7599. urlAnchor.href = s.url;
  7600. // Support: IE <=8 - 11 only
  7601. // Anchor's host property isn't correctly set when s.url is relative
  7602. urlAnchor.href = urlAnchor.href;
  7603. s.crossDomain = originAnchor.protocol + "//" + originAnchor.host !==
  7604. urlAnchor.protocol + "//" + urlAnchor.host;
  7605. } catch ( e ) {
  7606. // If there is an error parsing the URL, assume it is crossDomain,
  7607. // it can be rejected by the transport if it is invalid
  7608. s.crossDomain = true;
  7609. }
  7610. }
  7611. // Convert data if not already a string
  7612. if ( s.data && s.processData && typeof s.data !== "string" ) {
  7613. s.data = jQuery.param( s.data, s.traditional );
  7614. }
  7615. // Apply prefilters
  7616. inspectPrefiltersOrTransports( prefilters, s, options, jqXHR );
  7617. // If request was aborted inside a prefilter, stop there
  7618. if ( completed ) {
  7619. return jqXHR;
  7620. }
  7621. // We can fire global events as of now if asked to
  7622. // Don't fire events if jQuery.event is undefined in an AMD-usage scenario (trac-15118)
  7623. fireGlobals = jQuery.event && s.global;
  7624. // Watch for a new set of requests
  7625. if ( fireGlobals && jQuery.active++ === 0 ) {
  7626. jQuery.event.trigger( "ajaxStart" );
  7627. }
  7628. // Uppercase the type
  7629. s.type = s.type.toUpperCase();
  7630. // Determine if request has content
  7631. s.hasContent = !rnoContent.test( s.type );
  7632. // Save the URL in case we're toying with the If-Modified-Since
  7633. // and/or If-None-Match header later on
  7634. // Remove hash to simplify url manipulation
  7635. cacheURL = s.url.replace( rhash, "" );
  7636. // More options handling for requests with no content
  7637. if ( !s.hasContent ) {
  7638. // Remember the hash so we can put it back
  7639. uncached = s.url.slice( cacheURL.length );
  7640. // If data is available and should be processed, append data to url
  7641. if ( s.data && ( s.processData || typeof s.data === "string" ) ) {
  7642. cacheURL += ( rquery.test( cacheURL ) ? "&" : "?" ) + s.data;
  7643. // trac-9682: remove data so that it's not used in an eventual retry
  7644. delete s.data;
  7645. }
  7646. // Add or update anti-cache param if needed
  7647. if ( s.cache === false ) {
  7648. cacheURL = cacheURL.replace( rantiCache, "$1" );
  7649. uncached = ( rquery.test( cacheURL ) ? "&" : "?" ) + "_=" + ( nonce.guid++ ) +
  7650. uncached;
  7651. }
  7652. // Put hash and anti-cache on the URL that will be requested (gh-1732)
  7653. s.url = cacheURL + uncached;
  7654. // Change '%20' to '+' if this is encoded form body content (gh-2658)
  7655. } else if ( s.data && s.processData &&
  7656. ( s.contentType || "" ).indexOf( "application/x-www-form-urlencoded" ) === 0 ) {
  7657. s.data = s.data.replace( r20, "+" );
  7658. }
  7659. // Set the If-Modified-Since and/or If-None-Match header, if in ifModified mode.
  7660. if ( s.ifModified ) {
  7661. if ( jQuery.lastModified[ cacheURL ] ) {
  7662. jqXHR.setRequestHeader( "If-Modified-Since", jQuery.lastModified[ cacheURL ] );
  7663. }
  7664. if ( jQuery.etag[ cacheURL ] ) {
  7665. jqXHR.setRequestHeader( "If-None-Match", jQuery.etag[ cacheURL ] );
  7666. }
  7667. }
  7668. // Set the correct header, if data is being sent
  7669. if ( s.data && s.hasContent && s.contentType !== false || options.contentType ) {
  7670. jqXHR.setRequestHeader( "Content-Type", s.contentType );
  7671. }
  7672. // Set the Accepts header for the server, depending on the dataType
  7673. jqXHR.setRequestHeader(
  7674. "Accept",
  7675. s.dataTypes[ 0 ] && s.accepts[ s.dataTypes[ 0 ] ] ?
  7676. s.accepts[ s.dataTypes[ 0 ] ] +
  7677. ( s.dataTypes[ 0 ] !== "*" ? ", " + allTypes + "; q=0.01" : "" ) :
  7678. s.accepts[ "*" ]
  7679. );
  7680. // Check for headers option
  7681. for ( i in s.headers ) {
  7682. jqXHR.setRequestHeader( i, s.headers[ i ] );
  7683. }
  7684. // Allow custom headers/mimetypes and early abort
  7685. if ( s.beforeSend &&
  7686. ( s.beforeSend.call( callbackContext, jqXHR, s ) === false || completed ) ) {
  7687. // Abort if not done already and return
  7688. return jqXHR.abort();
  7689. }
  7690. // Aborting is no longer a cancellation
  7691. strAbort = "abort";
  7692. // Install callbacks on deferreds
  7693. completeDeferred.add( s.complete );
  7694. jqXHR.done( s.success );
  7695. jqXHR.fail( s.error );
  7696. // Get transport
  7697. transport = inspectPrefiltersOrTransports( transports, s, options, jqXHR );
  7698. // If no transport, we auto-abort
  7699. if ( !transport ) {
  7700. done( -1, "No Transport" );
  7701. } else {
  7702. jqXHR.readyState = 1;
  7703. // Send global event
  7704. if ( fireGlobals ) {
  7705. globalEventContext.trigger( "ajaxSend", [ jqXHR, s ] );
  7706. }
  7707. // If request was aborted inside ajaxSend, stop there
  7708. if ( completed ) {
  7709. return jqXHR;
  7710. }
  7711. // Timeout
  7712. if ( s.async && s.timeout > 0 ) {
  7713. timeoutTimer = window.setTimeout( function() {
  7714. jqXHR.abort( "timeout" );
  7715. }, s.timeout );
  7716. }
  7717. try {
  7718. completed = false;
  7719. transport.send( requestHeaders, done );
  7720. } catch ( e ) {
  7721. // Rethrow post-completion exceptions
  7722. if ( completed ) {
  7723. throw e;
  7724. }
  7725. // Propagate others as results
  7726. done( -1, e );
  7727. }
  7728. }
  7729. // Callback for when everything is done
  7730. function done( status, nativeStatusText, responses, headers ) {
  7731. var isSuccess, success, error, response, modified,
  7732. statusText = nativeStatusText;
  7733. // Ignore repeat invocations
  7734. if ( completed ) {
  7735. return;
  7736. }
  7737. completed = true;
  7738. // Clear timeout if it exists
  7739. if ( timeoutTimer ) {
  7740. window.clearTimeout( timeoutTimer );
  7741. }
  7742. // Dereference transport for early garbage collection
  7743. // (no matter how long the jqXHR object will be used)
  7744. transport = undefined;
  7745. // Cache response headers
  7746. responseHeadersString = headers || "";
  7747. // Set readyState
  7748. jqXHR.readyState = status > 0 ? 4 : 0;
  7749. // Determine if successful
  7750. isSuccess = status >= 200 && status < 300 || status === 304;
  7751. // Get response data
  7752. if ( responses ) {
  7753. response = ajaxHandleResponses( s, jqXHR, responses );
  7754. }
  7755. // Use a noop converter for missing script but not if jsonp
  7756. if ( !isSuccess &&
  7757. jQuery.inArray( "script", s.dataTypes ) > -1 &&
  7758. jQuery.inArray( "json", s.dataTypes ) < 0 ) {
  7759. s.converters[ "text script" ] = function() {};
  7760. }
  7761. // Convert no matter what (that way responseXXX fields are always set)
  7762. response = ajaxConvert( s, response, jqXHR, isSuccess );
  7763. // If successful, handle type chaining
  7764. if ( isSuccess ) {
  7765. // Set the If-Modified-Since and/or If-None-Match header, if in ifModified mode.
  7766. if ( s.ifModified ) {
  7767. modified = jqXHR.getResponseHeader( "Last-Modified" );
  7768. if ( modified ) {
  7769. jQuery.lastModified[ cacheURL ] = modified;
  7770. }
  7771. modified = jqXHR.getResponseHeader( "etag" );
  7772. if ( modified ) {
  7773. jQuery.etag[ cacheURL ] = modified;
  7774. }
  7775. }
  7776. // if no content
  7777. if ( status === 204 || s.type === "HEAD" ) {
  7778. statusText = "nocontent";
  7779. // if not modified
  7780. } else if ( status === 304 ) {
  7781. statusText = "notmodified";
  7782. // If we have data, let's convert it
  7783. } else {
  7784. statusText = response.state;
  7785. success = response.data;
  7786. error = response.error;
  7787. isSuccess = !error;
  7788. }
  7789. } else {
  7790. // Extract error from statusText and normalize for non-aborts
  7791. error = statusText;
  7792. if ( status || !statusText ) {
  7793. statusText = "error";
  7794. if ( status < 0 ) {
  7795. status = 0;
  7796. }
  7797. }
  7798. }
  7799. // Set data for the fake xhr object
  7800. jqXHR.status = status;
  7801. jqXHR.statusText = ( nativeStatusText || statusText ) + "";
  7802. // Success/Error
  7803. if ( isSuccess ) {
  7804. deferred.resolveWith( callbackContext, [ success, statusText, jqXHR ] );
  7805. } else {
  7806. deferred.rejectWith( callbackContext, [ jqXHR, statusText, error ] );
  7807. }
  7808. // Status-dependent callbacks
  7809. jqXHR.statusCode( statusCode );
  7810. statusCode = undefined;
  7811. if ( fireGlobals ) {
  7812. globalEventContext.trigger( isSuccess ? "ajaxSuccess" : "ajaxError",
  7813. [ jqXHR, s, isSuccess ? success : error ] );
  7814. }
  7815. // Complete
  7816. completeDeferred.fireWith( callbackContext, [ jqXHR, statusText ] );
  7817. if ( fireGlobals ) {
  7818. globalEventContext.trigger( "ajaxComplete", [ jqXHR, s ] );
  7819. // Handle the global AJAX counter
  7820. if ( !( --jQuery.active ) ) {
  7821. jQuery.event.trigger( "ajaxStop" );
  7822. }
  7823. }
  7824. }
  7825. return jqXHR;
  7826. },
  7827. getJSON: function( url, data, callback ) {
  7828. return jQuery.get( url, data, callback, "json" );
  7829. },
  7830. getScript: function( url, callback ) {
  7831. return jQuery.get( url, undefined, callback, "script" );
  7832. }
  7833. } );
  7834. jQuery.each( [ "get", "post" ], function( _i, method ) {
  7835. jQuery[ method ] = function( url, data, callback, type ) {
  7836. // Shift arguments if data argument was omitted
  7837. if ( isFunction( data ) ) {
  7838. type = type || callback;
  7839. callback = data;
  7840. data = undefined;
  7841. }
  7842. // The url can be an options object (which then must have .url)
  7843. return jQuery.ajax( jQuery.extend( {
  7844. url: url,
  7845. type: method,
  7846. dataType: type,
  7847. data: data,
  7848. success: callback
  7849. }, jQuery.isPlainObject( url ) && url ) );
  7850. };
  7851. } );
  7852. jQuery.ajaxPrefilter( function( s ) {
  7853. var i;
  7854. for ( i in s.headers ) {
  7855. if ( i.toLowerCase() === "content-type" ) {
  7856. s.contentType = s.headers[ i ] || "";
  7857. }
  7858. }
  7859. } );
  7860. jQuery._evalUrl = function( url, options, doc ) {
  7861. return jQuery.ajax( {
  7862. url: url,
  7863. // Make this explicit, since user can override this through ajaxSetup (trac-11264)
  7864. type: "GET",
  7865. dataType: "script",
  7866. cache: true,
  7867. async: false,
  7868. global: false,
  7869. // Only evaluate the response if it is successful (gh-4126)
  7870. // dataFilter is not invoked for failure responses, so using it instead
  7871. // of the default converter is kludgy but it works.
  7872. converters: {
  7873. "text script": function() {}
  7874. },
  7875. dataFilter: function( response ) {
  7876. jQuery.globalEval( response, options, doc );
  7877. }
  7878. } );
  7879. };
  7880. jQuery.fn.extend( {
  7881. wrapAll: function( html ) {
  7882. var wrap;
  7883. if ( this[ 0 ] ) {
  7884. if ( isFunction( html ) ) {
  7885. html = html.call( this[ 0 ] );
  7886. }
  7887. // The elements to wrap the target around
  7888. wrap = jQuery( html, this[ 0 ].ownerDocument ).eq( 0 ).clone( true );
  7889. if ( this[ 0 ].parentNode ) {
  7890. wrap.insertBefore( this[ 0 ] );
  7891. }
  7892. wrap.map( function() {
  7893. var elem = this;
  7894. while ( elem.firstElementChild ) {
  7895. elem = elem.firstElementChild;
  7896. }
  7897. return elem;
  7898. } ).append( this );
  7899. }
  7900. return this;
  7901. },
  7902. wrapInner: function( html ) {
  7903. if ( isFunction( html ) ) {
  7904. return this.each( function( i ) {
  7905. jQuery( this ).wrapInner( html.call( this, i ) );
  7906. } );
  7907. }
  7908. return this.each( function() {
  7909. var self = jQuery( this ),
  7910. contents = self.contents();
  7911. if ( contents.length ) {
  7912. contents.wrapAll( html );
  7913. } else {
  7914. self.append( html );
  7915. }
  7916. } );
  7917. },
  7918. wrap: function( html ) {
  7919. var htmlIsFunction = isFunction( html );
  7920. return this.each( function( i ) {
  7921. jQuery( this ).wrapAll( htmlIsFunction ? html.call( this, i ) : html );
  7922. } );
  7923. },
  7924. unwrap: function( selector ) {
  7925. this.parent( selector ).not( "body" ).each( function() {
  7926. jQuery( this ).replaceWith( this.childNodes );
  7927. } );
  7928. return this;
  7929. }
  7930. } );
  7931. jQuery.expr.pseudos.hidden = function( elem ) {
  7932. return !jQuery.expr.pseudos.visible( elem );
  7933. };
  7934. jQuery.expr.pseudos.visible = function( elem ) {
  7935. return !!( elem.offsetWidth || elem.offsetHeight || elem.getClientRects().length );
  7936. };
  7937. jQuery.ajaxSettings.xhr = function() {
  7938. try {
  7939. return new window.XMLHttpRequest();
  7940. } catch ( e ) {}
  7941. };
  7942. var xhrSuccessStatus = {
  7943. // File protocol always yields status code 0, assume 200
  7944. 0: 200,
  7945. // Support: IE <=9 only
  7946. // trac-1450: sometimes IE returns 1223 when it should be 204
  7947. 1223: 204
  7948. },
  7949. xhrSupported = jQuery.ajaxSettings.xhr();
  7950. support.cors = !!xhrSupported && ( "withCredentials" in xhrSupported );
  7951. support.ajax = xhrSupported = !!xhrSupported;
  7952. jQuery.ajaxTransport( function( options ) {
  7953. var callback, errorCallback;
  7954. // Cross domain only allowed if supported through XMLHttpRequest
  7955. if ( support.cors || xhrSupported && !options.crossDomain ) {
  7956. return {
  7957. send: function( headers, complete ) {
  7958. var i,
  7959. xhr = options.xhr();
  7960. xhr.open(
  7961. options.type,
  7962. options.url,
  7963. options.async,
  7964. options.username,
  7965. options.password
  7966. );
  7967. // Apply custom fields if provided
  7968. if ( options.xhrFields ) {
  7969. for ( i in options.xhrFields ) {
  7970. xhr[ i ] = options.xhrFields[ i ];
  7971. }
  7972. }
  7973. // Override mime type if needed
  7974. if ( options.mimeType && xhr.overrideMimeType ) {
  7975. xhr.overrideMimeType( options.mimeType );
  7976. }
  7977. // X-Requested-With header
  7978. // For cross-domain requests, seeing as conditions for a preflight are
  7979. // akin to a jigsaw puzzle, we simply never set it to be sure.
  7980. // (it can always be set on a per-request basis or even using ajaxSetup)
  7981. // For same-domain requests, won't change header if already provided.
  7982. if ( !options.crossDomain && !headers[ "X-Requested-With" ] ) {
  7983. headers[ "X-Requested-With" ] = "XMLHttpRequest";
  7984. }
  7985. // Set headers
  7986. for ( i in headers ) {
  7987. xhr.setRequestHeader( i, headers[ i ] );
  7988. }
  7989. // Callback
  7990. callback = function( type ) {
  7991. return function() {
  7992. if ( callback ) {
  7993. callback = errorCallback = xhr.onload =
  7994. xhr.onerror = xhr.onabort = xhr.ontimeout =
  7995. xhr.onreadystatechange = null;
  7996. if ( type === "abort" ) {
  7997. xhr.abort();
  7998. } else if ( type === "error" ) {
  7999. // Support: IE <=9 only
  8000. // On a manual native abort, IE9 throws
  8001. // errors on any property access that is not readyState
  8002. if ( typeof xhr.status !== "number" ) {
  8003. complete( 0, "error" );
  8004. } else {
  8005. complete(
  8006. // File: protocol always yields status 0; see trac-8605, trac-14207
  8007. xhr.status,
  8008. xhr.statusText
  8009. );
  8010. }
  8011. } else {
  8012. complete(
  8013. xhrSuccessStatus[ xhr.status ] || xhr.status,
  8014. xhr.statusText,
  8015. // Support: IE <=9 only
  8016. // IE9 has no XHR2 but throws on binary (trac-11426)
  8017. // For XHR2 non-text, let the caller handle it (gh-2498)
  8018. ( xhr.responseType || "text" ) !== "text" ||
  8019. typeof xhr.responseText !== "string" ?
  8020. { binary: xhr.response } :
  8021. { text: xhr.responseText },
  8022. xhr.getAllResponseHeaders()
  8023. );
  8024. }
  8025. }
  8026. };
  8027. };
  8028. // Listen to events
  8029. xhr.onload = callback();
  8030. errorCallback = xhr.onerror = xhr.ontimeout = callback( "error" );
  8031. // Support: IE 9 only
  8032. // Use onreadystatechange to replace onabort
  8033. // to handle uncaught aborts
  8034. if ( xhr.onabort !== undefined ) {
  8035. xhr.onabort = errorCallback;
  8036. } else {
  8037. xhr.onreadystatechange = function() {
  8038. // Check readyState before timeout as it changes
  8039. if ( xhr.readyState === 4 ) {
  8040. // Allow onerror to be called first,
  8041. // but that will not handle a native abort
  8042. // Also, save errorCallback to a variable
  8043. // as xhr.onerror cannot be accessed
  8044. window.setTimeout( function() {
  8045. if ( callback ) {
  8046. errorCallback();
  8047. }
  8048. } );
  8049. }
  8050. };
  8051. }
  8052. // Create the abort callback
  8053. callback = callback( "abort" );
  8054. try {
  8055. // Do send the request (this may raise an exception)
  8056. xhr.send( options.hasContent && options.data || null );
  8057. } catch ( e ) {
  8058. // trac-14683: Only rethrow if this hasn't been notified as an error yet
  8059. if ( callback ) {
  8060. throw e;
  8061. }
  8062. }
  8063. },
  8064. abort: function() {
  8065. if ( callback ) {
  8066. callback();
  8067. }
  8068. }
  8069. };
  8070. }
  8071. } );
  8072. // Prevent auto-execution of scripts when no explicit dataType was provided (See gh-2432)
  8073. jQuery.ajaxPrefilter( function( s ) {
  8074. if ( s.crossDomain ) {
  8075. s.contents.script = false;
  8076. }
  8077. } );
  8078. // Install script dataType
  8079. jQuery.ajaxSetup( {
  8080. accepts: {
  8081. script: "text/javascript, application/javascript, " +
  8082. "application/ecmascript, application/x-ecmascript"
  8083. },
  8084. contents: {
  8085. script: /\b(?:java|ecma)script\b/
  8086. },
  8087. converters: {
  8088. "text script": function( text ) {
  8089. jQuery.globalEval( text );
  8090. return text;
  8091. }
  8092. }
  8093. } );
  8094. // Handle cache's special case and crossDomain
  8095. jQuery.ajaxPrefilter( "script", function( s ) {
  8096. if ( s.cache === undefined ) {
  8097. s.cache = false;
  8098. }
  8099. if ( s.crossDomain ) {
  8100. s.type = "GET";
  8101. }
  8102. } );
  8103. // Bind script tag hack transport
  8104. jQuery.ajaxTransport( "script", function( s ) {
  8105. // This transport only deals with cross domain or forced-by-attrs requests
  8106. if ( s.crossDomain || s.scriptAttrs ) {
  8107. var script, callback;
  8108. return {
  8109. send: function( _, complete ) {
  8110. script = jQuery( "<script>" )
  8111. .attr( s.scriptAttrs || {} )
  8112. .prop( { charset: s.scriptCharset, src: s.url } )
  8113. .on( "load error", callback = function( evt ) {
  8114. script.remove();
  8115. callback = null;
  8116. if ( evt ) {
  8117. complete( evt.type === "error" ? 404 : 200, evt.type );
  8118. }
  8119. } );
  8120. // Use native DOM manipulation to avoid our domManip AJAX trickery
  8121. document.head.appendChild( script[ 0 ] );
  8122. },
  8123. abort: function() {
  8124. if ( callback ) {
  8125. callback();
  8126. }
  8127. }
  8128. };
  8129. }
  8130. } );
  8131. var oldCallbacks = [],
  8132. rjsonp = /(=)\?(?=&|$)|\?\?/;
  8133. // Default jsonp settings
  8134. jQuery.ajaxSetup( {
  8135. jsonp: "callback",
  8136. jsonpCallback: function() {
  8137. var callback = oldCallbacks.pop() || ( jQuery.expando + "_" + ( nonce.guid++ ) );
  8138. this[ callback ] = true;
  8139. return callback;
  8140. }
  8141. } );
  8142. // Detect, normalize options and install callbacks for jsonp requests
  8143. jQuery.ajaxPrefilter( "json jsonp", function( s, originalSettings, jqXHR ) {
  8144. var callbackName, overwritten, responseContainer,
  8145. jsonProp = s.jsonp !== false && ( rjsonp.test( s.url ) ?
  8146. "url" :
  8147. typeof s.data === "string" &&
  8148. ( s.contentType || "" )
  8149. .indexOf( "application/x-www-form-urlencoded" ) === 0 &&
  8150. rjsonp.test( s.data ) && "data"
  8151. );
  8152. // Handle iff the expected data type is "jsonp" or we have a parameter to set
  8153. if ( jsonProp || s.dataTypes[ 0 ] === "jsonp" ) {
  8154. // Get callback name, remembering preexisting value associated with it
  8155. callbackName = s.jsonpCallback = isFunction( s.jsonpCallback ) ?
  8156. s.jsonpCallback() :
  8157. s.jsonpCallback;
  8158. // Insert callback into url or form data
  8159. if ( jsonProp ) {
  8160. s[ jsonProp ] = s[ jsonProp ].replace( rjsonp, "$1" + callbackName );
  8161. } else if ( s.jsonp !== false ) {
  8162. s.url += ( rquery.test( s.url ) ? "&" : "?" ) + s.jsonp + "=" + callbackName;
  8163. }
  8164. // Use data converter to retrieve json after script execution
  8165. s.converters[ "script json" ] = function() {
  8166. if ( !responseContainer ) {
  8167. jQuery.error( callbackName + " was not called" );
  8168. }
  8169. return responseContainer[ 0 ];
  8170. };
  8171. // Force json dataType
  8172. s.dataTypes[ 0 ] = "json";
  8173. // Install callback
  8174. overwritten = window[ callbackName ];
  8175. window[ callbackName ] = function() {
  8176. responseContainer = arguments;
  8177. };
  8178. // Clean-up function (fires after converters)
  8179. jqXHR.always( function() {
  8180. // If previous value didn't exist - remove it
  8181. if ( overwritten === undefined ) {
  8182. jQuery( window ).removeProp( callbackName );
  8183. // Otherwise restore preexisting value
  8184. } else {
  8185. window[ callbackName ] = overwritten;
  8186. }
  8187. // Save back as free
  8188. if ( s[ callbackName ] ) {
  8189. // Make sure that re-using the options doesn't screw things around
  8190. s.jsonpCallback = originalSettings.jsonpCallback;
  8191. // Save the callback name for future use
  8192. oldCallbacks.push( callbackName );
  8193. }
  8194. // Call if it was a function and we have a response
  8195. if ( responseContainer && isFunction( overwritten ) ) {
  8196. overwritten( responseContainer[ 0 ] );
  8197. }
  8198. responseContainer = overwritten = undefined;
  8199. } );
  8200. // Delegate to script
  8201. return "script";
  8202. }
  8203. } );
  8204. // Support: Safari 8 only
  8205. // In Safari 8 documents created via document.implementation.createHTMLDocument
  8206. // collapse sibling forms: the second one becomes a child of the first one.
  8207. // Because of that, this security measure has to be disabled in Safari 8.
  8208. // https://bugs.webkit.org/show_bug.cgi?id=137337
  8209. support.createHTMLDocument = ( function() {
  8210. var body = document.implementation.createHTMLDocument( "" ).body;
  8211. body.innerHTML = "<form></form><form></form>";
  8212. return body.childNodes.length === 2;
  8213. } )();
  8214. // Argument "data" should be string of html
  8215. // context (optional): If specified, the fragment will be created in this context,
  8216. // defaults to document
  8217. // keepScripts (optional): If true, will include scripts passed in the html string
  8218. jQuery.parseHTML = function( data, context, keepScripts ) {
  8219. if ( typeof data !== "string" ) {
  8220. return [];
  8221. }
  8222. if ( typeof context === "boolean" ) {
  8223. keepScripts = context;
  8224. context = false;
  8225. }
  8226. var base, parsed, scripts;
  8227. if ( !context ) {
  8228. // Stop scripts or inline event handlers from being executed immediately
  8229. // by using document.implementation
  8230. if ( support.createHTMLDocument ) {
  8231. context = document.implementation.createHTMLDocument( "" );
  8232. // Set the base href for the created document
  8233. // so any parsed elements with URLs
  8234. // are based on the document's URL (gh-2965)
  8235. base = context.createElement( "base" );
  8236. base.href = document.location.href;
  8237. context.head.appendChild( base );
  8238. } else {
  8239. context = document;
  8240. }
  8241. }
  8242. parsed = rsingleTag.exec( data );
  8243. scripts = !keepScripts && [];
  8244. // Single tag
  8245. if ( parsed ) {
  8246. return [ context.createElement( parsed[ 1 ] ) ];
  8247. }
  8248. parsed = buildFragment( [ data ], context, scripts );
  8249. if ( scripts && scripts.length ) {
  8250. jQuery( scripts ).remove();
  8251. }
  8252. return jQuery.merge( [], parsed.childNodes );
  8253. };
  8254. /**
  8255. * Load a url into a page
  8256. */
  8257. jQuery.fn.load = function( url, params, callback ) {
  8258. var selector, type, response,
  8259. self = this,
  8260. off = url.indexOf( " " );
  8261. if ( off > -1 ) {
  8262. selector = stripAndCollapse( url.slice( off ) );
  8263. url = url.slice( 0, off );
  8264. }
  8265. // If it's a function
  8266. if ( isFunction( params ) ) {
  8267. // We assume that it's the callback
  8268. callback = params;
  8269. params = undefined;
  8270. // Otherwise, build a param string
  8271. } else if ( params && typeof params === "object" ) {
  8272. type = "POST";
  8273. }
  8274. // If we have elements to modify, make the request
  8275. if ( self.length > 0 ) {
  8276. jQuery.ajax( {
  8277. url: url,
  8278. // If "type" variable is undefined, then "GET" method will be used.
  8279. // Make value of this field explicit since
  8280. // user can override it through ajaxSetup method
  8281. type: type || "GET",
  8282. dataType: "html",
  8283. data: params
  8284. } ).done( function( responseText ) {
  8285. // Save response for use in complete callback
  8286. response = arguments;
  8287. self.html( selector ?
  8288. // If a selector was specified, locate the right elements in a dummy div
  8289. // Exclude scripts to avoid IE 'Permission Denied' errors
  8290. jQuery( "<div>" ).append( jQuery.parseHTML( responseText ) ).find( selector ) :
  8291. // Otherwise use the full result
  8292. responseText );
  8293. // If the request succeeds, this function gets "data", "status", "jqXHR"
  8294. // but they are ignored because response was set above.
  8295. // If it fails, this function gets "jqXHR", "status", "error"
  8296. } ).always( callback && function( jqXHR, status ) {
  8297. self.each( function() {
  8298. callback.apply( this, response || [ jqXHR.responseText, status, jqXHR ] );
  8299. } );
  8300. } );
  8301. }
  8302. return this;
  8303. };
  8304. jQuery.expr.pseudos.animated = function( elem ) {
  8305. return jQuery.grep( jQuery.timers, function( fn ) {
  8306. return elem === fn.elem;
  8307. } ).length;
  8308. };
  8309. jQuery.offset = {
  8310. setOffset: function( elem, options, i ) {
  8311. var curPosition, curLeft, curCSSTop, curTop, curOffset, curCSSLeft, calculatePosition,
  8312. position = jQuery.css( elem, "position" ),
  8313. curElem = jQuery( elem ),
  8314. props = {};
  8315. // Set position first, in-case top/left are set even on static elem
  8316. if ( position === "static" ) {
  8317. elem.style.position = "relative";
  8318. }
  8319. curOffset = curElem.offset();
  8320. curCSSTop = jQuery.css( elem, "top" );
  8321. curCSSLeft = jQuery.css( elem, "left" );
  8322. calculatePosition = ( position === "absolute" || position === "fixed" ) &&
  8323. ( curCSSTop + curCSSLeft ).indexOf( "auto" ) > -1;
  8324. // Need to be able to calculate position if either
  8325. // top or left is auto and position is either absolute or fixed
  8326. if ( calculatePosition ) {
  8327. curPosition = curElem.position();
  8328. curTop = curPosition.top;
  8329. curLeft = curPosition.left;
  8330. } else {
  8331. curTop = parseFloat( curCSSTop ) || 0;
  8332. curLeft = parseFloat( curCSSLeft ) || 0;
  8333. }
  8334. if ( isFunction( options ) ) {
  8335. // Use jQuery.extend here to allow modification of coordinates argument (gh-1848)
  8336. options = options.call( elem, i, jQuery.extend( {}, curOffset ) );
  8337. }
  8338. if ( options.top != null ) {
  8339. props.top = ( options.top - curOffset.top ) + curTop;
  8340. }
  8341. if ( options.left != null ) {
  8342. props.left = ( options.left - curOffset.left ) + curLeft;
  8343. }
  8344. if ( "using" in options ) {
  8345. options.using.call( elem, props );
  8346. } else {
  8347. curElem.css( props );
  8348. }
  8349. }
  8350. };
  8351. jQuery.fn.extend( {
  8352. // offset() relates an element's border box to the document origin
  8353. offset: function( options ) {
  8354. // Preserve chaining for setter
  8355. if ( arguments.length ) {
  8356. return options === undefined ?
  8357. this :
  8358. this.each( function( i ) {
  8359. jQuery.offset.setOffset( this, options, i );
  8360. } );
  8361. }
  8362. var rect, win,
  8363. elem = this[ 0 ];
  8364. if ( !elem ) {
  8365. return;
  8366. }
  8367. // Return zeros for disconnected and hidden (display: none) elements (gh-2310)
  8368. // Support: IE <=11 only
  8369. // Running getBoundingClientRect on a
  8370. // disconnected node in IE throws an error
  8371. if ( !elem.getClientRects().length ) {
  8372. return { top: 0, left: 0 };
  8373. }
  8374. // Get document-relative position by adding viewport scroll to viewport-relative gBCR
  8375. rect = elem.getBoundingClientRect();
  8376. win = elem.ownerDocument.defaultView;
  8377. return {
  8378. top: rect.top + win.pageYOffset,
  8379. left: rect.left + win.pageXOffset
  8380. };
  8381. },
  8382. // position() relates an element's margin box to its offset parent's padding box
  8383. // This corresponds to the behavior of CSS absolute positioning
  8384. position: function() {
  8385. if ( !this[ 0 ] ) {
  8386. return;
  8387. }
  8388. var offsetParent, offset, doc,
  8389. elem = this[ 0 ],
  8390. parentOffset = { top: 0, left: 0 };
  8391. // position:fixed elements are offset from the viewport, which itself always has zero offset
  8392. if ( jQuery.css( elem, "position" ) === "fixed" ) {
  8393. // Assume position:fixed implies availability of getBoundingClientRect
  8394. offset = elem.getBoundingClientRect();
  8395. } else {
  8396. offset = this.offset();
  8397. // Account for the *real* offset parent, which can be the document or its root element
  8398. // when a statically positioned element is identified
  8399. doc = elem.ownerDocument;
  8400. offsetParent = elem.offsetParent || doc.documentElement;
  8401. while ( offsetParent &&
  8402. ( offsetParent === doc.body || offsetParent === doc.documentElement ) &&
  8403. jQuery.css( offsetParent, "position" ) === "static" ) {
  8404. offsetParent = offsetParent.parentNode;
  8405. }
  8406. if ( offsetParent && offsetParent !== elem && offsetParent.nodeType === 1 ) {
  8407. // Incorporate borders into its offset, since they are outside its content origin
  8408. parentOffset = jQuery( offsetParent ).offset();
  8409. parentOffset.top += jQuery.css( offsetParent, "borderTopWidth", true );
  8410. parentOffset.left += jQuery.css( offsetParent, "borderLeftWidth", true );
  8411. }
  8412. }
  8413. // Subtract parent offsets and element margins
  8414. return {
  8415. top: offset.top - parentOffset.top - jQuery.css( elem, "marginTop", true ),
  8416. left: offset.left - parentOffset.left - jQuery.css( elem, "marginLeft", true )
  8417. };
  8418. },
  8419. // This method will return documentElement in the following cases:
  8420. // 1) For the element inside the iframe without offsetParent, this method will return
  8421. // documentElement of the parent window
  8422. // 2) For the hidden or detached element
  8423. // 3) For body or html element, i.e. in case of the html node - it will return itself
  8424. //
  8425. // but those exceptions were never presented as a real life use-cases
  8426. // and might be considered as more preferable results.
  8427. //
  8428. // This logic, however, is not guaranteed and can change at any point in the future
  8429. offsetParent: function() {
  8430. return this.map( function() {
  8431. var offsetParent = this.offsetParent;
  8432. while ( offsetParent && jQuery.css( offsetParent, "position" ) === "static" ) {
  8433. offsetParent = offsetParent.offsetParent;
  8434. }
  8435. return offsetParent || documentElement;
  8436. } );
  8437. }
  8438. } );
  8439. // Create scrollLeft and scrollTop methods
  8440. jQuery.each( { scrollLeft: "pageXOffset", scrollTop: "pageYOffset" }, function( method, prop ) {
  8441. var top = "pageYOffset" === prop;
  8442. jQuery.fn[ method ] = function( val ) {
  8443. return access( this, function( elem, method, val ) {
  8444. // Coalesce documents and windows
  8445. var win;
  8446. if ( isWindow( elem ) ) {
  8447. win = elem;
  8448. } else if ( elem.nodeType === 9 ) {
  8449. win = elem.defaultView;
  8450. }
  8451. if ( val === undefined ) {
  8452. return win ? win[ prop ] : elem[ method ];
  8453. }
  8454. if ( win ) {
  8455. win.scrollTo(
  8456. !top ? val : win.pageXOffset,
  8457. top ? val : win.pageYOffset
  8458. );
  8459. } else {
  8460. elem[ method ] = val;
  8461. }
  8462. }, method, val, arguments.length );
  8463. };
  8464. } );
  8465. // Support: Safari <=7 - 9.1, Chrome <=37 - 49
  8466. // Add the top/left cssHooks using jQuery.fn.position
  8467. // Webkit bug: https://bugs.webkit.org/show_bug.cgi?id=29084
  8468. // Blink bug: https://bugs.chromium.org/p/chromium/issues/detail?id=589347
  8469. // getComputedStyle returns percent when specified for top/left/bottom/right;
  8470. // rather than make the css module depend on the offset module, just check for it here
  8471. jQuery.each( [ "top", "left" ], function( _i, prop ) {
  8472. jQuery.cssHooks[ prop ] = addGetHookIf( support.pixelPosition,
  8473. function( elem, computed ) {
  8474. if ( computed ) {
  8475. computed = curCSS( elem, prop );
  8476. // If curCSS returns percentage, fallback to offset
  8477. return rnumnonpx.test( computed ) ?
  8478. jQuery( elem ).position()[ prop ] + "px" :
  8479. computed;
  8480. }
  8481. }
  8482. );
  8483. } );
  8484. // Create innerHeight, innerWidth, height, width, outerHeight and outerWidth methods
  8485. jQuery.each( { Height: "height", Width: "width" }, function( name, type ) {
  8486. jQuery.each( {
  8487. padding: "inner" + name,
  8488. content: type,
  8489. "": "outer" + name
  8490. }, function( defaultExtra, funcName ) {
  8491. // Margin is only for outerHeight, outerWidth
  8492. jQuery.fn[ funcName ] = function( margin, value ) {
  8493. var chainable = arguments.length && ( defaultExtra || typeof margin !== "boolean" ),
  8494. extra = defaultExtra || ( margin === true || value === true ? "margin" : "border" );
  8495. return access( this, function( elem, type, value ) {
  8496. var doc;
  8497. if ( isWindow( elem ) ) {
  8498. // $( window ).outerWidth/Height return w/h including scrollbars (gh-1729)
  8499. return funcName.indexOf( "outer" ) === 0 ?
  8500. elem[ "inner" + name ] :
  8501. elem.document.documentElement[ "client" + name ];
  8502. }
  8503. // Get document width or height
  8504. if ( elem.nodeType === 9 ) {
  8505. doc = elem.documentElement;
  8506. // Either scroll[Width/Height] or offset[Width/Height] or client[Width/Height],
  8507. // whichever is greatest
  8508. return Math.max(
  8509. elem.body[ "scroll" + name ], doc[ "scroll" + name ],
  8510. elem.body[ "offset" + name ], doc[ "offset" + name ],
  8511. doc[ "client" + name ]
  8512. );
  8513. }
  8514. return value === undefined ?
  8515. // Get width or height on the element, requesting but not forcing parseFloat
  8516. jQuery.css( elem, type, extra ) :
  8517. // Set width or height on the element
  8518. jQuery.style( elem, type, value, extra );
  8519. }, type, chainable ? margin : undefined, chainable );
  8520. };
  8521. } );
  8522. } );
  8523. jQuery.each( [
  8524. "ajaxStart",
  8525. "ajaxStop",
  8526. "ajaxComplete",
  8527. "ajaxError",
  8528. "ajaxSuccess",
  8529. "ajaxSend"
  8530. ], function( _i, type ) {
  8531. jQuery.fn[ type ] = function( fn ) {
  8532. return this.on( type, fn );
  8533. };
  8534. } );
  8535. jQuery.fn.extend( {
  8536. bind: function( types, data, fn ) {
  8537. return this.on( types, null, data, fn );
  8538. },
  8539. unbind: function( types, fn ) {
  8540. return this.off( types, null, fn );
  8541. },
  8542. delegate: function( selector, types, data, fn ) {
  8543. return this.on( types, selector, data, fn );
  8544. },
  8545. undelegate: function( selector, types, fn ) {
  8546. // ( namespace ) or ( selector, types [, fn] )
  8547. return arguments.length === 1 ?
  8548. this.off( selector, "**" ) :
  8549. this.off( types, selector || "**", fn );
  8550. },
  8551. hover: function( fnOver, fnOut ) {
  8552. return this
  8553. .on( "mouseenter", fnOver )
  8554. .on( "mouseleave", fnOut || fnOver );
  8555. }
  8556. } );
  8557. jQuery.each(
  8558. ( "blur focus focusin focusout resize scroll click dblclick " +
  8559. "mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave " +
  8560. "change select submit keydown keypress keyup contextmenu" ).split( " " ),
  8561. function( _i, name ) {
  8562. // Handle event binding
  8563. jQuery.fn[ name ] = function( data, fn ) {
  8564. return arguments.length > 0 ?
  8565. this.on( name, null, data, fn ) :
  8566. this.trigger( name );
  8567. };
  8568. }
  8569. );
  8570. // Support: Android <=4.0 only
  8571. // Make sure we trim BOM and NBSP
  8572. // Require that the "whitespace run" starts from a non-whitespace
  8573. // to avoid O(N^2) behavior when the engine would try matching "\s+$" at each space position.
  8574. var rtrim = /^[\s\uFEFF\xA0]+|([^\s\uFEFF\xA0])[\s\uFEFF\xA0]+$/g;
  8575. // Bind a function to a context, optionally partially applying any
  8576. // arguments.
  8577. // jQuery.proxy is deprecated to promote standards (specifically Function#bind)
  8578. // However, it is not slated for removal any time soon
  8579. jQuery.proxy = function( fn, context ) {
  8580. var tmp, args, proxy;
  8581. if ( typeof context === "string" ) {
  8582. tmp = fn[ context ];
  8583. context = fn;
  8584. fn = tmp;
  8585. }
  8586. // Quick check to determine if target is callable, in the spec
  8587. // this throws a TypeError, but we will just return undefined.
  8588. if ( !isFunction( fn ) ) {
  8589. return undefined;
  8590. }
  8591. // Simulated bind
  8592. args = slice.call( arguments, 2 );
  8593. proxy = function() {
  8594. return fn.apply( context || this, args.concat( slice.call( arguments ) ) );
  8595. };
  8596. // Set the guid of unique handler to the same of original handler, so it can be removed
  8597. proxy.guid = fn.guid = fn.guid || jQuery.guid++;
  8598. return proxy;
  8599. };
  8600. jQuery.holdReady = function( hold ) {
  8601. if ( hold ) {
  8602. jQuery.readyWait++;
  8603. } else {
  8604. jQuery.ready( true );
  8605. }
  8606. };
  8607. jQuery.isArray = Array.isArray;
  8608. jQuery.parseJSON = JSON.parse;
  8609. jQuery.nodeName = nodeName;
  8610. jQuery.isFunction = isFunction;
  8611. jQuery.isWindow = isWindow;
  8612. jQuery.camelCase = camelCase;
  8613. jQuery.type = toType;
  8614. jQuery.now = Date.now;
  8615. jQuery.isNumeric = function( obj ) {
  8616. // As of jQuery 3.0, isNumeric is limited to
  8617. // strings and numbers (primitives or objects)
  8618. // that can be coerced to finite numbers (gh-2662)
  8619. var type = jQuery.type( obj );
  8620. return ( type === "number" || type === "string" ) &&
  8621. // parseFloat NaNs numeric-cast false positives ("")
  8622. // ...but misinterprets leading-number strings, particularly hex literals ("0x...")
  8623. // subtraction forces infinities to NaN
  8624. !isNaN( obj - parseFloat( obj ) );
  8625. };
  8626. jQuery.trim = function( text ) {
  8627. return text == null ?
  8628. "" :
  8629. ( text + "" ).replace( rtrim, "$1" );
  8630. };
  8631. // Register as a named AMD module, since jQuery can be concatenated with other
  8632. // files that may use define, but not via a proper concatenation script that
  8633. // understands anonymous AMD modules. A named AMD is safest and most robust
  8634. // way to register. Lowercase jquery is used because AMD module names are
  8635. // derived from file names, and jQuery is normally delivered in a lowercase
  8636. // file name. Do this after creating the global so that if an AMD module wants
  8637. // to call noConflict to hide this version of jQuery, it will work.
  8638. // Note that for maximum portability, libraries that are not jQuery should
  8639. // declare themselves as anonymous modules, and avoid setting a global if an
  8640. // AMD loader is present. jQuery is a special case. For more information, see
  8641. // https://github.com/jrburke/requirejs/wiki/Updating-existing-libraries#wiki-anon
  8642. if ( true ) {
  8643. !(__WEBPACK_AMD_DEFINE_ARRAY__ = [], __WEBPACK_AMD_DEFINE_RESULT__ = (function() {
  8644. return jQuery;
  8645. }).apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__),
  8646. __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));
  8647. }
  8648. var
  8649. // Map over jQuery in case of overwrite
  8650. _jQuery = window.jQuery,
  8651. // Map over the $ in case of overwrite
  8652. _$ = window.$;
  8653. jQuery.noConflict = function( deep ) {
  8654. if ( window.$ === jQuery ) {
  8655. window.$ = _$;
  8656. }
  8657. if ( deep && window.jQuery === jQuery ) {
  8658. window.jQuery = _jQuery;
  8659. }
  8660. return jQuery;
  8661. };
  8662. // Expose jQuery and $ identifiers, even in AMD
  8663. // (trac-7102#comment:10, https://github.com/jquery/jquery/pull/557)
  8664. // and CommonJS for browser emulators (trac-13566)
  8665. if ( typeof noGlobal === "undefined" ) {
  8666. window.jQuery = window.$ = jQuery;
  8667. }
  8668. return jQuery;
  8669. } );
  8670. /***/ }),
  8671. /***/ "./node_modules/decode-uri-component/index.js":
  8672. /*!****************************************************!*\
  8673. !*** ./node_modules/decode-uri-component/index.js ***!
  8674. \****************************************************/
  8675. /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
  8676. "use strict";
  8677. __webpack_require__.r(__webpack_exports__);
  8678. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  8679. /* harmony export */ "default": () => (/* binding */ decodeUriComponent)
  8680. /* harmony export */ });
  8681. const token = '%[a-f0-9]{2}';
  8682. const singleMatcher = new RegExp('(' + token + ')|([^%]+?)', 'gi');
  8683. const multiMatcher = new RegExp('(' + token + ')+', 'gi');
  8684. function decodeComponents(components, split) {
  8685. try {
  8686. // Try to decode the entire string first
  8687. return [decodeURIComponent(components.join(''))];
  8688. } catch {
  8689. // Do nothing
  8690. }
  8691. if (components.length === 1) {
  8692. return components;
  8693. }
  8694. split = split || 1;
  8695. // Split the array in 2 parts
  8696. const left = components.slice(0, split);
  8697. const right = components.slice(split);
  8698. return Array.prototype.concat.call([], decodeComponents(left), decodeComponents(right));
  8699. }
  8700. function decode(input) {
  8701. try {
  8702. return decodeURIComponent(input);
  8703. } catch {
  8704. let tokens = input.match(singleMatcher) || [];
  8705. for (let i = 1; i < tokens.length; i++) {
  8706. input = decodeComponents(tokens, i).join('');
  8707. tokens = input.match(singleMatcher) || [];
  8708. }
  8709. return input;
  8710. }
  8711. }
  8712. function customDecodeURIComponent(input) {
  8713. // Keep track of all the replacements and prefill the map with the `BOM`
  8714. const replaceMap = {
  8715. '%FE%FF': '\uFFFD\uFFFD',
  8716. '%FF%FE': '\uFFFD\uFFFD',
  8717. };
  8718. let match = multiMatcher.exec(input);
  8719. while (match) {
  8720. try {
  8721. // Decode as big chunks as possible
  8722. replaceMap[match[0]] = decodeURIComponent(match[0]);
  8723. } catch {
  8724. const result = decode(match[0]);
  8725. if (result !== match[0]) {
  8726. replaceMap[match[0]] = result;
  8727. }
  8728. }
  8729. match = multiMatcher.exec(input);
  8730. }
  8731. // Add `%C2` at the end of the map to make sure it does not replace the combinator before everything else
  8732. replaceMap['%C2'] = '\uFFFD';
  8733. const entries = Object.keys(replaceMap);
  8734. for (const key of entries) {
  8735. // Replace all decoded components
  8736. input = input.replace(new RegExp(key, 'g'), replaceMap[key]);
  8737. }
  8738. return input;
  8739. }
  8740. function decodeUriComponent(encodedURI) {
  8741. if (typeof encodedURI !== 'string') {
  8742. throw new TypeError('Expected `encodedURI` to be of type `string`, got `' + typeof encodedURI + '`');
  8743. }
  8744. try {
  8745. // Try the built in decoder first
  8746. return decodeURIComponent(encodedURI);
  8747. } catch {
  8748. // Fallback to a more advanced decoder
  8749. return customDecodeURIComponent(encodedURI);
  8750. }
  8751. }
  8752. /***/ }),
  8753. /***/ "./node_modules/filter-obj/index.js":
  8754. /*!******************************************!*\
  8755. !*** ./node_modules/filter-obj/index.js ***!
  8756. \******************************************/
  8757. /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
  8758. "use strict";
  8759. __webpack_require__.r(__webpack_exports__);
  8760. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  8761. /* harmony export */ excludeKeys: () => (/* binding */ excludeKeys),
  8762. /* harmony export */ includeKeys: () => (/* binding */ includeKeys)
  8763. /* harmony export */ });
  8764. function includeKeys(object, predicate) {
  8765. const result = {};
  8766. if (Array.isArray(predicate)) {
  8767. for (const key of predicate) {
  8768. const descriptor = Object.getOwnPropertyDescriptor(object, key);
  8769. if (descriptor?.enumerable) {
  8770. Object.defineProperty(result, key, descriptor);
  8771. }
  8772. }
  8773. } else {
  8774. // `Reflect.ownKeys()` is required to retrieve symbol properties
  8775. for (const key of Reflect.ownKeys(object)) {
  8776. const descriptor = Object.getOwnPropertyDescriptor(object, key);
  8777. if (descriptor.enumerable) {
  8778. const value = object[key];
  8779. if (predicate(key, value, object)) {
  8780. Object.defineProperty(result, key, descriptor);
  8781. }
  8782. }
  8783. }
  8784. }
  8785. return result;
  8786. }
  8787. function excludeKeys(object, predicate) {
  8788. if (Array.isArray(predicate)) {
  8789. const set = new Set(predicate);
  8790. return includeKeys(object, key => !set.has(key));
  8791. }
  8792. return includeKeys(object, (key, value, object) => !predicate(key, value, object));
  8793. }
  8794. /***/ }),
  8795. /***/ "./node_modules/query-string/base.js":
  8796. /*!*******************************************!*\
  8797. !*** ./node_modules/query-string/base.js ***!
  8798. \*******************************************/
  8799. /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
  8800. "use strict";
  8801. __webpack_require__.r(__webpack_exports__);
  8802. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  8803. /* harmony export */ exclude: () => (/* binding */ exclude),
  8804. /* harmony export */ extract: () => (/* binding */ extract),
  8805. /* harmony export */ parse: () => (/* binding */ parse),
  8806. /* harmony export */ parseUrl: () => (/* binding */ parseUrl),
  8807. /* harmony export */ pick: () => (/* binding */ pick),
  8808. /* harmony export */ stringify: () => (/* binding */ stringify),
  8809. /* harmony export */ stringifyUrl: () => (/* binding */ stringifyUrl)
  8810. /* harmony export */ });
  8811. /* harmony import */ var decode_uri_component__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! decode-uri-component */ "./node_modules/decode-uri-component/index.js");
  8812. /* harmony import */ var split_on_first__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! split-on-first */ "./node_modules/split-on-first/index.js");
  8813. /* harmony import */ var filter_obj__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! filter-obj */ "./node_modules/filter-obj/index.js");
  8814. const isNullOrUndefined = value => value === null || value === undefined;
  8815. // eslint-disable-next-line unicorn/prefer-code-point
  8816. const strictUriEncode = string => encodeURIComponent(string).replaceAll(/[!'()*]/g, x => `%${x.charCodeAt(0).toString(16).toUpperCase()}`);
  8817. const encodeFragmentIdentifier = Symbol('encodeFragmentIdentifier');
  8818. function encoderForArrayFormat(options) {
  8819. switch (options.arrayFormat) {
  8820. case 'index': {
  8821. return key => (result, value) => {
  8822. const index = result.length;
  8823. if (
  8824. value === undefined
  8825. || (options.skipNull && value === null)
  8826. || (options.skipEmptyString && value === '')
  8827. ) {
  8828. return result;
  8829. }
  8830. if (value === null) {
  8831. return [
  8832. ...result, [encode(key, options), '[', index, ']'].join(''),
  8833. ];
  8834. }
  8835. return [
  8836. ...result,
  8837. [encode(key, options), '[', encode(index, options), ']=', encode(value, options)].join(''),
  8838. ];
  8839. };
  8840. }
  8841. case 'bracket': {
  8842. return key => (result, value) => {
  8843. if (
  8844. value === undefined
  8845. || (options.skipNull && value === null)
  8846. || (options.skipEmptyString && value === '')
  8847. ) {
  8848. return result;
  8849. }
  8850. if (value === null) {
  8851. return [
  8852. ...result,
  8853. [encode(key, options), '[]'].join(''),
  8854. ];
  8855. }
  8856. return [
  8857. ...result,
  8858. [encode(key, options), '[]=', encode(value, options)].join(''),
  8859. ];
  8860. };
  8861. }
  8862. case 'colon-list-separator': {
  8863. return key => (result, value) => {
  8864. if (
  8865. value === undefined
  8866. || (options.skipNull && value === null)
  8867. || (options.skipEmptyString && value === '')
  8868. ) {
  8869. return result;
  8870. }
  8871. if (value === null) {
  8872. return [
  8873. ...result,
  8874. [encode(key, options), ':list='].join(''),
  8875. ];
  8876. }
  8877. return [
  8878. ...result,
  8879. [encode(key, options), ':list=', encode(value, options)].join(''),
  8880. ];
  8881. };
  8882. }
  8883. case 'comma':
  8884. case 'separator':
  8885. case 'bracket-separator': {
  8886. const keyValueSeparator = options.arrayFormat === 'bracket-separator'
  8887. ? '[]='
  8888. : '=';
  8889. return key => (result, value) => {
  8890. if (
  8891. value === undefined
  8892. || (options.skipNull && value === null)
  8893. || (options.skipEmptyString && value === '')
  8894. ) {
  8895. return result;
  8896. }
  8897. // Translate null to an empty string so that it doesn't serialize as 'null'
  8898. value = value === null ? '' : value;
  8899. if (result.length === 0) {
  8900. return [[encode(key, options), keyValueSeparator, encode(value, options)].join('')];
  8901. }
  8902. return [[result, encode(value, options)].join(options.arrayFormatSeparator)];
  8903. };
  8904. }
  8905. default: {
  8906. return key => (result, value) => {
  8907. if (
  8908. value === undefined
  8909. || (options.skipNull && value === null)
  8910. || (options.skipEmptyString && value === '')
  8911. ) {
  8912. return result;
  8913. }
  8914. if (value === null) {
  8915. return [
  8916. ...result,
  8917. encode(key, options),
  8918. ];
  8919. }
  8920. return [
  8921. ...result,
  8922. [encode(key, options), '=', encode(value, options)].join(''),
  8923. ];
  8924. };
  8925. }
  8926. }
  8927. }
  8928. function parserForArrayFormat(options) {
  8929. let result;
  8930. switch (options.arrayFormat) {
  8931. case 'index': {
  8932. return (key, value, accumulator) => {
  8933. result = /\[(\d*)]$/.exec(key);
  8934. key = key.replace(/\[\d*]$/, '');
  8935. if (!result) {
  8936. accumulator[key] = value;
  8937. return;
  8938. }
  8939. if (accumulator[key] === undefined) {
  8940. accumulator[key] = {};
  8941. }
  8942. accumulator[key][result[1]] = value;
  8943. };
  8944. }
  8945. case 'bracket': {
  8946. return (key, value, accumulator) => {
  8947. result = /(\[])$/.exec(key);
  8948. key = key.replace(/\[]$/, '');
  8949. if (!result) {
  8950. accumulator[key] = value;
  8951. return;
  8952. }
  8953. if (accumulator[key] === undefined) {
  8954. accumulator[key] = [value];
  8955. return;
  8956. }
  8957. accumulator[key] = [...accumulator[key], value];
  8958. };
  8959. }
  8960. case 'colon-list-separator': {
  8961. return (key, value, accumulator) => {
  8962. result = /(:list)$/.exec(key);
  8963. key = key.replace(/:list$/, '');
  8964. if (!result) {
  8965. accumulator[key] = value;
  8966. return;
  8967. }
  8968. if (accumulator[key] === undefined) {
  8969. accumulator[key] = [value];
  8970. return;
  8971. }
  8972. accumulator[key] = [...accumulator[key], value];
  8973. };
  8974. }
  8975. case 'comma':
  8976. case 'separator': {
  8977. return (key, value, accumulator) => {
  8978. const isArray = typeof value === 'string' && value.includes(options.arrayFormatSeparator);
  8979. const isEncodedArray = (typeof value === 'string' && !isArray && decode(value, options).includes(options.arrayFormatSeparator));
  8980. value = isEncodedArray ? decode(value, options) : value;
  8981. const newValue = isArray || isEncodedArray ? value.split(options.arrayFormatSeparator).map(item => decode(item, options)) : (value === null ? value : decode(value, options));
  8982. accumulator[key] = newValue;
  8983. };
  8984. }
  8985. case 'bracket-separator': {
  8986. return (key, value, accumulator) => {
  8987. const isArray = /(\[])$/.test(key);
  8988. key = key.replace(/\[]$/, '');
  8989. if (!isArray) {
  8990. accumulator[key] = value ? decode(value, options) : value;
  8991. return;
  8992. }
  8993. const arrayValue = value === null
  8994. ? []
  8995. : value.split(options.arrayFormatSeparator).map(item => decode(item, options));
  8996. if (accumulator[key] === undefined) {
  8997. accumulator[key] = arrayValue;
  8998. return;
  8999. }
  9000. accumulator[key] = [...accumulator[key], ...arrayValue];
  9001. };
  9002. }
  9003. default: {
  9004. return (key, value, accumulator) => {
  9005. if (accumulator[key] === undefined) {
  9006. accumulator[key] = value;
  9007. return;
  9008. }
  9009. accumulator[key] = [...[accumulator[key]].flat(), value];
  9010. };
  9011. }
  9012. }
  9013. }
  9014. function validateArrayFormatSeparator(value) {
  9015. if (typeof value !== 'string' || value.length !== 1) {
  9016. throw new TypeError('arrayFormatSeparator must be single character string');
  9017. }
  9018. }
  9019. function encode(value, options) {
  9020. if (options.encode) {
  9021. return options.strict ? strictUriEncode(value) : encodeURIComponent(value);
  9022. }
  9023. return value;
  9024. }
  9025. function decode(value, options) {
  9026. if (options.decode) {
  9027. return (0,decode_uri_component__WEBPACK_IMPORTED_MODULE_0__["default"])(value);
  9028. }
  9029. return value;
  9030. }
  9031. function keysSorter(input) {
  9032. if (Array.isArray(input)) {
  9033. return input.sort();
  9034. }
  9035. if (typeof input === 'object') {
  9036. return keysSorter(Object.keys(input))
  9037. .sort((a, b) => Number(a) - Number(b))
  9038. .map(key => input[key]);
  9039. }
  9040. return input;
  9041. }
  9042. function removeHash(input) {
  9043. const hashStart = input.indexOf('#');
  9044. if (hashStart !== -1) {
  9045. input = input.slice(0, hashStart);
  9046. }
  9047. return input;
  9048. }
  9049. function getHash(url) {
  9050. let hash = '';
  9051. const hashStart = url.indexOf('#');
  9052. if (hashStart !== -1) {
  9053. hash = url.slice(hashStart);
  9054. }
  9055. return hash;
  9056. }
  9057. function parseValue(value, options) {
  9058. if (options.parseNumbers && !Number.isNaN(Number(value)) && (typeof value === 'string' && value.trim() !== '')) {
  9059. value = Number(value);
  9060. } else if (options.parseBooleans && value !== null && (value.toLowerCase() === 'true' || value.toLowerCase() === 'false')) {
  9061. value = value.toLowerCase() === 'true';
  9062. }
  9063. return value;
  9064. }
  9065. function extract(input) {
  9066. input = removeHash(input);
  9067. const queryStart = input.indexOf('?');
  9068. if (queryStart === -1) {
  9069. return '';
  9070. }
  9071. return input.slice(queryStart + 1);
  9072. }
  9073. function parse(query, options) {
  9074. options = {
  9075. decode: true,
  9076. sort: true,
  9077. arrayFormat: 'none',
  9078. arrayFormatSeparator: ',',
  9079. parseNumbers: false,
  9080. parseBooleans: false,
  9081. ...options,
  9082. };
  9083. validateArrayFormatSeparator(options.arrayFormatSeparator);
  9084. const formatter = parserForArrayFormat(options);
  9085. // Create an object with no prototype
  9086. const returnValue = Object.create(null);
  9087. if (typeof query !== 'string') {
  9088. return returnValue;
  9089. }
  9090. query = query.trim().replace(/^[?#&]/, '');
  9091. if (!query) {
  9092. return returnValue;
  9093. }
  9094. for (const parameter of query.split('&')) {
  9095. if (parameter === '') {
  9096. continue;
  9097. }
  9098. const parameter_ = options.decode ? parameter.replaceAll('+', ' ') : parameter;
  9099. let [key, value] = (0,split_on_first__WEBPACK_IMPORTED_MODULE_1__["default"])(parameter_, '=');
  9100. if (key === undefined) {
  9101. key = parameter_;
  9102. }
  9103. // Missing `=` should be `null`:
  9104. // http://w3.org/TR/2012/WD-url-20120524/#collect-url-parameters
  9105. value = value === undefined ? null : (['comma', 'separator', 'bracket-separator'].includes(options.arrayFormat) ? value : decode(value, options));
  9106. formatter(decode(key, options), value, returnValue);
  9107. }
  9108. for (const [key, value] of Object.entries(returnValue)) {
  9109. if (typeof value === 'object' && value !== null) {
  9110. for (const [key2, value2] of Object.entries(value)) {
  9111. value[key2] = parseValue(value2, options);
  9112. }
  9113. } else {
  9114. returnValue[key] = parseValue(value, options);
  9115. }
  9116. }
  9117. if (options.sort === false) {
  9118. return returnValue;
  9119. }
  9120. // TODO: Remove the use of `reduce`.
  9121. // eslint-disable-next-line unicorn/no-array-reduce
  9122. return (options.sort === true ? Object.keys(returnValue).sort() : Object.keys(returnValue).sort(options.sort)).reduce((result, key) => {
  9123. const value = returnValue[key];
  9124. result[key] = Boolean(value) && typeof value === 'object' && !Array.isArray(value) ? keysSorter(value) : value;
  9125. return result;
  9126. }, Object.create(null));
  9127. }
  9128. function stringify(object, options) {
  9129. if (!object) {
  9130. return '';
  9131. }
  9132. options = {
  9133. encode: true,
  9134. strict: true,
  9135. arrayFormat: 'none',
  9136. arrayFormatSeparator: ',',
  9137. ...options,
  9138. };
  9139. validateArrayFormatSeparator(options.arrayFormatSeparator);
  9140. const shouldFilter = key => (
  9141. (options.skipNull && isNullOrUndefined(object[key]))
  9142. || (options.skipEmptyString && object[key] === '')
  9143. );
  9144. const formatter = encoderForArrayFormat(options);
  9145. const objectCopy = {};
  9146. for (const [key, value] of Object.entries(object)) {
  9147. if (!shouldFilter(key)) {
  9148. objectCopy[key] = value;
  9149. }
  9150. }
  9151. const keys = Object.keys(objectCopy);
  9152. if (options.sort !== false) {
  9153. keys.sort(options.sort);
  9154. }
  9155. return keys.map(key => {
  9156. const value = object[key];
  9157. if (value === undefined) {
  9158. return '';
  9159. }
  9160. if (value === null) {
  9161. return encode(key, options);
  9162. }
  9163. if (Array.isArray(value)) {
  9164. if (value.length === 0 && options.arrayFormat === 'bracket-separator') {
  9165. return encode(key, options) + '[]';
  9166. }
  9167. return value
  9168. .reduce(formatter(key), [])
  9169. .join('&');
  9170. }
  9171. return encode(key, options) + '=' + encode(value, options);
  9172. }).filter(x => x.length > 0).join('&');
  9173. }
  9174. function parseUrl(url, options) {
  9175. options = {
  9176. decode: true,
  9177. ...options,
  9178. };
  9179. let [url_, hash] = (0,split_on_first__WEBPACK_IMPORTED_MODULE_1__["default"])(url, '#');
  9180. if (url_ === undefined) {
  9181. url_ = url;
  9182. }
  9183. return {
  9184. url: url_?.split('?')?.[0] ?? '',
  9185. query: parse(extract(url), options),
  9186. ...(options && options.parseFragmentIdentifier && hash ? {fragmentIdentifier: decode(hash, options)} : {}),
  9187. };
  9188. }
  9189. function stringifyUrl(object, options) {
  9190. options = {
  9191. encode: true,
  9192. strict: true,
  9193. [encodeFragmentIdentifier]: true,
  9194. ...options,
  9195. };
  9196. const url = removeHash(object.url).split('?')[0] || '';
  9197. const queryFromUrl = extract(object.url);
  9198. const query = {
  9199. ...parse(queryFromUrl, {sort: false}),
  9200. ...object.query,
  9201. };
  9202. let queryString = stringify(query, options);
  9203. queryString &&= `?${queryString}`;
  9204. let hash = getHash(object.url);
  9205. if (typeof object.fragmentIdentifier === 'string') {
  9206. const urlObjectForFragmentEncode = new URL(url);
  9207. urlObjectForFragmentEncode.hash = object.fragmentIdentifier;
  9208. hash = options[encodeFragmentIdentifier] ? urlObjectForFragmentEncode.hash : `#${object.fragmentIdentifier}`;
  9209. }
  9210. return `${url}${queryString}${hash}`;
  9211. }
  9212. function pick(input, filter, options) {
  9213. options = {
  9214. parseFragmentIdentifier: true,
  9215. [encodeFragmentIdentifier]: false,
  9216. ...options,
  9217. };
  9218. const {url, query, fragmentIdentifier} = parseUrl(input, options);
  9219. return stringifyUrl({
  9220. url,
  9221. query: (0,filter_obj__WEBPACK_IMPORTED_MODULE_2__.includeKeys)(query, filter),
  9222. fragmentIdentifier,
  9223. }, options);
  9224. }
  9225. function exclude(input, filter, options) {
  9226. const exclusionFilter = Array.isArray(filter) ? key => !filter.includes(key) : (key, value) => !filter(key, value);
  9227. return pick(input, exclusionFilter, options);
  9228. }
  9229. /***/ }),
  9230. /***/ "./node_modules/query-string/index.js":
  9231. /*!********************************************!*\
  9232. !*** ./node_modules/query-string/index.js ***!
  9233. \********************************************/
  9234. /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
  9235. "use strict";
  9236. __webpack_require__.r(__webpack_exports__);
  9237. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  9238. /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
  9239. /* harmony export */ });
  9240. /* harmony import */ var _base_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./base.js */ "./node_modules/query-string/base.js");
  9241. /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (_base_js__WEBPACK_IMPORTED_MODULE_0__);
  9242. /***/ }),
  9243. /***/ "./node_modules/split-on-first/index.js":
  9244. /*!**********************************************!*\
  9245. !*** ./node_modules/split-on-first/index.js ***!
  9246. \**********************************************/
  9247. /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
  9248. "use strict";
  9249. __webpack_require__.r(__webpack_exports__);
  9250. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  9251. /* harmony export */ "default": () => (/* binding */ splitOnFirst)
  9252. /* harmony export */ });
  9253. function splitOnFirst(string, separator) {
  9254. if (!(typeof string === 'string' && typeof separator === 'string')) {
  9255. throw new TypeError('Expected the arguments to be of type `string`');
  9256. }
  9257. if (string === '' || separator === '') {
  9258. return [];
  9259. }
  9260. const separatorIndex = string.indexOf(separator);
  9261. if (separatorIndex === -1) {
  9262. return [];
  9263. }
  9264. return [
  9265. string.slice(0, separatorIndex),
  9266. string.slice(separatorIndex + separator.length)
  9267. ];
  9268. }
  9269. /***/ })
  9270. /******/ });
  9271. /************************************************************************/
  9272. /******/ // The module cache
  9273. /******/ var __webpack_module_cache__ = {};
  9274. /******/
  9275. /******/ // The require function
  9276. /******/ function __webpack_require__(moduleId) {
  9277. /******/ // Check if module is in cache
  9278. /******/ var cachedModule = __webpack_module_cache__[moduleId];
  9279. /******/ if (cachedModule !== undefined) {
  9280. /******/ return cachedModule.exports;
  9281. /******/ }
  9282. /******/ // Create a new module (and put it into the cache)
  9283. /******/ var module = __webpack_module_cache__[moduleId] = {
  9284. /******/ // no module.id needed
  9285. /******/ // no module.loaded needed
  9286. /******/ exports: {}
  9287. /******/ };
  9288. /******/
  9289. /******/ // Execute the module function
  9290. /******/ __webpack_modules__[moduleId].call(module.exports, module, module.exports, __webpack_require__);
  9291. /******/
  9292. /******/ // Return the exports of the module
  9293. /******/ return module.exports;
  9294. /******/ }
  9295. /******/
  9296. /************************************************************************/
  9297. /******/ /* webpack/runtime/compat get default export */
  9298. /******/ (() => {
  9299. /******/ // getDefaultExport function for compatibility with non-harmony modules
  9300. /******/ __webpack_require__.n = (module) => {
  9301. /******/ var getter = module && module.__esModule ?
  9302. /******/ () => (module['default']) :
  9303. /******/ () => (module);
  9304. /******/ __webpack_require__.d(getter, { a: getter });
  9305. /******/ return getter;
  9306. /******/ };
  9307. /******/ })();
  9308. /******/
  9309. /******/ /* webpack/runtime/define property getters */
  9310. /******/ (() => {
  9311. /******/ // define getter functions for harmony exports
  9312. /******/ __webpack_require__.d = (exports, definition) => {
  9313. /******/ for(var key in definition) {
  9314. /******/ if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {
  9315. /******/ Object.defineProperty(exports, key, { enumerable: true, get: definition[key] });
  9316. /******/ }
  9317. /******/ }
  9318. /******/ };
  9319. /******/ })();
  9320. /******/
  9321. /******/ /* webpack/runtime/global */
  9322. /******/ (() => {
  9323. /******/ __webpack_require__.g = (function() {
  9324. /******/ if (typeof globalThis === 'object') return globalThis;
  9325. /******/ try {
  9326. /******/ return this || new Function('return this')();
  9327. /******/ } catch (e) {
  9328. /******/ if (typeof window === 'object') return window;
  9329. /******/ }
  9330. /******/ })();
  9331. /******/ })();
  9332. /******/
  9333. /******/ /* webpack/runtime/hasOwnProperty shorthand */
  9334. /******/ (() => {
  9335. /******/ __webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))
  9336. /******/ })();
  9337. /******/
  9338. /******/ /* webpack/runtime/make namespace object */
  9339. /******/ (() => {
  9340. /******/ // define __esModule on exports
  9341. /******/ __webpack_require__.r = (exports) => {
  9342. /******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
  9343. /******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
  9344. /******/ }
  9345. /******/ Object.defineProperty(exports, '__esModule', { value: true });
  9346. /******/ };
  9347. /******/ })();
  9348. /******/
  9349. /************************************************************************/
  9350. var __webpack_exports__ = {};
  9351. // This entry need to be wrapped in an IIFE because it need to be in strict mode.
  9352. (() => {
  9353. "use strict";
  9354. /*!******************************!*\
  9355. !*** ./resources/js/main.js ***!
  9356. \******************************/
  9357. __webpack_require__.r(__webpack_exports__);
  9358. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  9359. /* harmony export */ "default": () => (/* binding */ API)
  9360. /* harmony export */ });
  9361. /* harmony import */ var aos__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! aos */ "./node_modules/aos/dist/aos.js");
  9362. /* harmony import */ var aos__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(aos__WEBPACK_IMPORTED_MODULE_0__);
  9363. /* harmony import */ var jquery__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! jquery */ "./node_modules/jquery/dist/jquery.js");
  9364. /* harmony import */ var jquery__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(jquery__WEBPACK_IMPORTED_MODULE_1__);
  9365. /* harmony import */ var query_string__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! query-string */ "./node_modules/query-string/index.js");
  9366. function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
  9367. function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
  9368. function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }
  9369. function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
  9370. function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
  9371. function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
  9372. //import API from './api/api';
  9373. var server_url = "https://thebola.club";
  9374. var API = /*#__PURE__*/function () {
  9375. function API() {
  9376. _classCallCheck(this, API);
  9377. this.prefix = server_url;
  9378. this.url = "/api";
  9379. this.test = 200;
  9380. }
  9381. _createClass(API, [{
  9382. key: "listLocation",
  9383. value: function listLocation(_ref) {
  9384. var _search = _ref._search,
  9385. _ref$_page = _ref._page,
  9386. _page = _ref$_page === void 0 ? 1 : _ref$_page,
  9387. _ref$_pagesize = _ref._pagesize,
  9388. _pagesize = _ref$_pagesize === void 0 ? 20 : _ref$_pagesize,
  9389. _ref$_callback = _ref._callback,
  9390. _callback = _ref$_callback === void 0 ? function () {} : _ref$_callback;
  9391. var url = "".concat(this.prefix).concat(this.url, "/public/event/location?").concat(query_string__WEBPACK_IMPORTED_MODULE_2__["default"].stringify({
  9392. _search: _search,
  9393. _page: _page,
  9394. _pagesize: _pagesize
  9395. }));
  9396. fetch(url).then(function (response) {
  9397. return response.json();
  9398. }).then(function (data) {
  9399. return _callback(data);
  9400. })["catch"](function (err) {
  9401. return console.log(err);
  9402. });
  9403. }
  9404. }]);
  9405. return API;
  9406. }();
  9407. var $ = (jquery__WEBPACK_IMPORTED_MODULE_1___default());
  9408. var api = new API();
  9409. var bookingList = [];
  9410. var bookingRules = [];
  9411. setTimeout(function () {
  9412. console.log("AOS init");
  9413. aos__WEBPACK_IMPORTED_MODULE_0___default().init();
  9414. }, 500);
  9415. $(document).ready(function () {
  9416. // this section is for booking page
  9417. //check if booking section exist in any page
  9418. var bookingContainer = $('#booking-section');
  9419. if (bookingContainer.length > 0) {
  9420. api.listLocation({
  9421. _search: "",
  9422. _page: 1,
  9423. _pagesize: 20,
  9424. _callback: function _callback(data) {
  9425. console.log("fetch");
  9426. localStorage.setItem('thebola-booking', JSON.stringify(data));
  9427. bookingList = data;
  9428. // set date max and min
  9429. var _createDateInputWithR = createDateInputWithRange(14),
  9430. maxDate = _createDateInputWithR.maxDate,
  9431. minDate = _createDateInputWithR.minDate;
  9432. $('#input-booking-date').attr("min", minDate);
  9433. $('#input-booking-date').attr("max", maxDate);
  9434. }
  9435. });
  9436. }
  9437. $(".booking-item").on("click", function () {
  9438. // remove all child active class, then add active on clicked
  9439. var bookingContainer = $('.booking-container');
  9440. $(bookingContainer).find(".booking-item").removeClass("active");
  9441. $(this).addClass("active");
  9442. var fieldID = $(this).data('fieldid');
  9443. //ensure everything exist
  9444. if (bookingList === undefined || bookingList.length == 0) {
  9445. bookingList = localStorage.getItem('thebola-booking');
  9446. }
  9447. if (fieldID && bookingList) {
  9448. var _bookingList = bookingList,
  9449. results = _bookingList.results;
  9450. var slots = results.filter(function (data) {
  9451. return data.id == fieldID;
  9452. });
  9453. var rules = slots[0].slot_rules.rules;
  9454. bookingRules = rules;
  9455. } else {
  9456. console.log("no booking data");
  9457. }
  9458. });
  9459. $('#input-booking-date').change(function () {
  9460. if (bookingRules) {
  9461. // render rule of slot base on current input value date
  9462. var dayName = getDayNameFromInput(document.getElementById("input-booking-date"));
  9463. $("#input-booking-slot").children(".select-value").remove();
  9464. setTimeout(function () {
  9465. // append slot list
  9466. bookingRules[dayName].forEach(function (_ref2) {
  9467. var end_time = _ref2.end_time,
  9468. start_time = _ref2.start_time,
  9469. price = _ref2.price,
  9470. id = _ref2.id;
  9471. var newOption = document.createElement('option');
  9472. $(newOption).attr("id", id);
  9473. $(newOption).addClass("select-value");
  9474. newOption.text = "".concat(start_time, " - ").concat(end_time, " (RM ").concat(price, ")");
  9475. $("#input-booking-slot").append(newOption);
  9476. });
  9477. }, 1000);
  9478. }
  9479. });
  9480. function createDateInputWithRange(days) {
  9481. var today = new Date();
  9482. var futureDate = new Date(today.getTime() + days * 24 * 60 * 60 * 1000);
  9483. var maxDate = futureDate.toISOString().split('T')[0];
  9484. var minDate = today.toISOString().split('T')[0];
  9485. return {
  9486. maxDate: maxDate,
  9487. minDate: minDate
  9488. };
  9489. }
  9490. function getDayNameFromInput(inputElement) {
  9491. // Get the value of the input element
  9492. var selectedDate = inputElement.value;
  9493. // Create a new Date object from the input date string
  9494. var date = new Date(selectedDate);
  9495. // Array of day names
  9496. var dayNames = ["Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"];
  9497. // Get the day of the week (0 for Sunday, 1 for Monday, ..., 6 for Saturday)
  9498. var dayIndex = date.getDay();
  9499. // Return the name of the day corresponding to the day index
  9500. return dayNames[dayIndex];
  9501. }
  9502. });
  9503. })();
  9504. /******/ })()
  9505. ;