12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648264926502651265226532654265526562657265826592660266126622663266426652666266726682669267026712672267326742675267626772678267926802681268226832684268526862687268826892690269126922693269426952696269726982699270027012702270327042705270627072708270927102711271227132714271527162717271827192720272127222723272427252726272727282729273027312732273327342735273627372738273927402741274227432744274527462747274827492750275127522753275427552756275727582759276027612762276327642765276627672768276927702771277227732774277527762777277827792780278127822783278427852786278727882789279027912792279327942795279627972798279928002801280228032804280528062807280828092810281128122813281428152816281728182819282028212822282328242825282628272828282928302831283228332834283528362837283828392840284128422843284428452846284728482849285028512852285328542855285628572858285928602861286228632864286528662867286828692870287128722873287428752876287728782879288028812882288328842885288628872888288928902891289228932894289528962897289828992900290129022903290429052906290729082909291029112912291329142915291629172918291929202921292229232924292529262927292829292930293129322933293429352936293729382939294029412942294329442945294629472948294929502951295229532954295529562957295829592960296129622963296429652966296729682969297029712972297329742975297629772978297929802981298229832984298529862987298829892990299129922993299429952996299729982999300030013002300330043005300630073008300930103011301230133014301530163017301830193020302130223023302430253026302730283029303030313032303330343035303630373038303930403041304230433044304530463047304830493050305130523053305430553056305730583059306030613062306330643065306630673068306930703071307230733074307530763077307830793080308130823083308430853086308730883089309030913092309330943095309630973098309931003101310231033104310531063107310831093110311131123113311431153116311731183119312031213122312331243125312631273128312931303131313231333134313531363137313831393140314131423143314431453146314731483149315031513152315331543155315631573158315931603161316231633164316531663167316831693170317131723173317431753176317731783179318031813182318331843185318631873188318931903191319231933194319531963197319831993200320132023203320432053206320732083209321032113212321332143215321632173218321932203221322232233224322532263227322832293230323132323233323432353236323732383239324032413242324332443245324632473248324932503251325232533254325532563257325832593260326132623263326432653266326732683269327032713272327332743275327632773278327932803281328232833284328532863287328832893290329132923293329432953296329732983299330033013302330333043305330633073308330933103311331233133314331533163317331833193320332133223323332433253326332733283329333033313332333333343335333633373338333933403341334233433344334533463347334833493350335133523353335433553356335733583359336033613362336333643365336633673368336933703371337233733374337533763377337833793380338133823383338433853386338733883389339033913392339333943395339633973398339934003401340234033404340534063407340834093410341134123413341434153416341734183419342034213422342334243425342634273428342934303431343234333434343534363437343834393440344134423443344434453446344734483449345034513452345334543455345634573458345934603461346234633464346534663467346834693470347134723473347434753476347734783479348034813482348334843485348634873488348934903491349234933494349534963497349834993500350135023503350435053506350735083509351035113512351335143515351635173518351935203521352235233524352535263527352835293530353135323533353435353536353735383539354035413542354335443545354635473548354935503551355235533554355535563557355835593560356135623563356435653566356735683569357035713572357335743575357635773578357935803581358235833584358535863587358835893590359135923593359435953596359735983599360036013602360336043605360636073608360936103611361236133614361536163617361836193620362136223623362436253626362736283629363036313632363336343635363636373638363936403641364236433644364536463647364836493650365136523653365436553656365736583659366036613662366336643665366636673668366936703671367236733674367536763677367836793680368136823683368436853686368736883689369036913692369336943695369636973698369937003701370237033704370537063707370837093710371137123713371437153716371737183719372037213722372337243725372637273728372937303731373237333734373537363737373837393740374137423743374437453746374737483749375037513752375337543755375637573758375937603761376237633764376537663767376837693770377137723773377437753776377737783779378037813782378337843785378637873788378937903791379237933794379537963797379837993800380138023803380438053806380738083809381038113812381338143815381638173818381938203821382238233824382538263827382838293830383138323833383438353836383738383839384038413842384338443845384638473848384938503851385238533854385538563857385838593860386138623863386438653866386738683869387038713872387338743875387638773878387938803881388238833884388538863887388838893890389138923893389438953896389738983899390039013902390339043905390639073908390939103911391239133914391539163917391839193920392139223923392439253926392739283929393039313932393339343935393639373938393939403941394239433944394539463947394839493950395139523953395439553956395739583959396039613962396339643965396639673968396939703971397239733974397539763977397839793980398139823983398439853986398739883989399039913992399339943995399639973998399940004001400240034004400540064007400840094010401140124013401440154016401740184019402040214022402340244025402640274028402940304031403240334034403540364037403840394040404140424043404440454046404740484049405040514052405340544055405640574058405940604061406240634064406540664067406840694070407140724073407440754076407740784079408040814082408340844085408640874088408940904091409240934094409540964097409840994100410141024103410441054106410741084109411041114112411341144115411641174118411941204121412241234124412541264127412841294130413141324133413441354136413741384139414041414142414341444145414641474148414941504151415241534154415541564157415841594160416141624163416441654166416741684169417041714172417341744175417641774178417941804181418241834184418541864187418841894190419141924193419441954196419741984199420042014202420342044205420642074208420942104211421242134214421542164217421842194220422142224223422442254226422742284229423042314232423342344235423642374238423942404241424242434244424542464247424842494250425142524253425442554256425742584259426042614262426342644265426642674268426942704271427242734274427542764277427842794280428142824283428442854286428742884289429042914292429342944295429642974298429943004301430243034304430543064307430843094310431143124313431443154316431743184319432043214322432343244325432643274328432943304331433243334334433543364337433843394340434143424343434443454346434743484349435043514352435343544355435643574358435943604361436243634364436543664367436843694370437143724373437443754376437743784379438043814382438343844385438643874388438943904391439243934394439543964397439843994400440144024403440444054406440744084409441044114412441344144415441644174418441944204421442244234424442544264427442844294430443144324433443444354436443744384439444044414442444344444445444644474448444944504451445244534454445544564457445844594460446144624463446444654466446744684469447044714472447344744475447644774478447944804481448244834484448544864487448844894490449144924493449444954496449744984499450045014502450345044505450645074508450945104511451245134514451545164517451845194520452145224523452445254526452745284529453045314532453345344535453645374538453945404541454245434544454545464547454845494550455145524553455445554556455745584559456045614562456345644565456645674568456945704571457245734574457545764577457845794580458145824583458445854586458745884589459045914592459345944595459645974598459946004601460246034604460546064607460846094610461146124613461446154616461746184619462046214622462346244625462646274628462946304631463246334634463546364637463846394640464146424643464446454646464746484649465046514652465346544655465646574658465946604661466246634664466546664667466846694670467146724673467446754676467746784679468046814682468346844685468646874688468946904691469246934694469546964697469846994700470147024703470447054706470747084709471047114712471347144715471647174718471947204721472247234724472547264727472847294730473147324733473447354736473747384739474047414742474347444745474647474748474947504751475247534754475547564757475847594760476147624763476447654766476747684769477047714772477347744775477647774778477947804781478247834784478547864787478847894790479147924793479447954796479747984799480048014802480348044805480648074808480948104811481248134814481548164817481848194820482148224823482448254826482748284829483048314832483348344835483648374838483948404841484248434844484548464847484848494850485148524853485448554856485748584859486048614862486348644865486648674868486948704871487248734874487548764877487848794880488148824883488448854886488748884889489048914892489348944895489648974898489949004901490249034904490549064907490849094910491149124913491449154916491749184919492049214922492349244925492649274928492949304931493249334934493549364937493849394940494149424943494449454946494749484949495049514952495349544955495649574958495949604961496249634964496549664967496849694970497149724973497449754976497749784979498049814982498349844985498649874988498949904991499249934994499549964997499849995000500150025003500450055006500750085009501050115012501350145015501650175018501950205021502250235024502550265027502850295030503150325033503450355036503750385039504050415042504350445045504650475048504950505051505250535054505550565057505850595060506150625063506450655066506750685069507050715072507350745075507650775078507950805081508250835084508550865087508850895090509150925093509450955096509750985099510051015102510351045105510651075108510951105111511251135114511551165117511851195120512151225123512451255126512751285129513051315132513351345135513651375138513951405141514251435144514551465147514851495150515151525153515451555156515751585159516051615162516351645165516651675168516951705171517251735174517551765177517851795180518151825183518451855186518751885189519051915192519351945195519651975198519952005201520252035204520552065207520852095210521152125213521452155216521752185219522052215222522352245225522652275228522952305231523252335234523552365237523852395240524152425243524452455246524752485249525052515252525352545255525652575258525952605261526252635264526552665267526852695270527152725273527452755276527752785279528052815282528352845285528652875288528952905291529252935294529552965297529852995300530153025303530453055306530753085309531053115312531353145315531653175318531953205321532253235324532553265327532853295330533153325333533453355336533753385339534053415342534353445345534653475348534953505351535253535354535553565357535853595360536153625363536453655366536753685369537053715372537353745375537653775378537953805381538253835384538553865387538853895390539153925393539453955396539753985399540054015402540354045405540654075408540954105411541254135414541554165417541854195420542154225423542454255426542754285429543054315432543354345435543654375438543954405441544254435444544554465447544854495450545154525453545454555456545754585459546054615462546354645465546654675468546954705471547254735474547554765477547854795480548154825483548454855486548754885489549054915492549354945495549654975498549955005501550255035504550555065507550855095510551155125513551455155516551755185519552055215522552355245525552655275528552955305531553255335534553555365537553855395540554155425543554455455546554755485549555055515552555355545555555655575558555955605561556255635564556555665567556855695570557155725573557455755576557755785579558055815582558355845585558655875588558955905591559255935594559555965597559855995600560156025603560456055606560756085609561056115612561356145615561656175618561956205621562256235624562556265627562856295630563156325633563456355636563756385639564056415642564356445645564656475648564956505651565256535654565556565657565856595660566156625663566456655666566756685669567056715672567356745675567656775678567956805681568256835684568556865687568856895690569156925693569456955696569756985699570057015702570357045705570657075708570957105711571257135714571557165717571857195720572157225723572457255726572757285729573057315732573357345735573657375738573957405741574257435744574557465747574857495750575157525753575457555756575757585759576057615762576357645765576657675768576957705771577257735774577557765777577857795780578157825783578457855786578757885789579057915792579357945795579657975798579958005801580258035804580558065807580858095810581158125813581458155816581758185819582058215822582358245825582658275828582958305831583258335834583558365837583858395840584158425843584458455846584758485849585058515852585358545855585658575858585958605861586258635864586558665867586858695870587158725873587458755876587758785879588058815882588358845885588658875888588958905891589258935894589558965897589858995900590159025903590459055906590759085909591059115912591359145915591659175918591959205921592259235924592559265927592859295930593159325933593459355936593759385939594059415942594359445945594659475948594959505951595259535954595559565957595859595960596159625963596459655966596759685969597059715972597359745975597659775978597959805981598259835984598559865987598859895990599159925993599459955996599759985999600060016002600360046005600660076008600960106011601260136014601560166017601860196020602160226023602460256026602760286029603060316032603360346035603660376038603960406041604260436044604560466047604860496050605160526053605460556056605760586059606060616062606360646065606660676068606960706071607260736074607560766077607860796080608160826083608460856086608760886089609060916092609360946095609660976098609961006101610261036104610561066107610861096110611161126113611461156116611761186119612061216122612361246125612661276128612961306131613261336134613561366137613861396140614161426143614461456146614761486149615061516152615361546155615661576158615961606161616261636164616561666167616861696170617161726173617461756176617761786179618061816182618361846185618661876188618961906191619261936194619561966197619861996200620162026203620462056206620762086209621062116212621362146215621662176218621962206221622262236224622562266227622862296230623162326233623462356236623762386239624062416242624362446245624662476248624962506251625262536254625562566257625862596260626162626263626462656266626762686269627062716272627362746275627662776278627962806281628262836284628562866287628862896290629162926293629462956296629762986299630063016302630363046305630663076308630963106311631263136314631563166317631863196320632163226323632463256326632763286329633063316332633363346335633663376338633963406341634263436344634563466347634863496350635163526353635463556356635763586359636063616362636363646365636663676368636963706371637263736374637563766377637863796380638163826383638463856386638763886389639063916392639363946395639663976398639964006401640264036404640564066407640864096410641164126413641464156416641764186419642064216422642364246425642664276428642964306431643264336434643564366437643864396440644164426443644464456446644764486449645064516452645364546455645664576458645964606461646264636464646564666467646864696470647164726473647464756476647764786479648064816482648364846485648664876488648964906491649264936494649564966497649864996500650165026503650465056506650765086509651065116512651365146515651665176518651965206521652265236524652565266527652865296530653165326533653465356536653765386539654065416542654365446545654665476548654965506551655265536554655565566557655865596560656165626563656465656566656765686569657065716572657365746575657665776578657965806581658265836584658565866587658865896590659165926593659465956596659765986599660066016602660366046605660666076608660966106611661266136614661566166617661866196620662166226623662466256626662766286629663066316632663366346635663666376638663966406641664266436644664566466647664866496650665166526653665466556656665766586659666066616662666366646665666666676668666966706671667266736674667566766677667866796680668166826683668466856686668766886689669066916692669366946695669666976698669967006701670267036704670567066707670867096710671167126713671467156716671767186719672067216722672367246725672667276728672967306731673267336734673567366737673867396740674167426743674467456746674767486749675067516752675367546755675667576758675967606761676267636764676567666767676867696770677167726773677467756776677767786779678067816782678367846785678667876788678967906791679267936794679567966797679867996800680168026803680468056806680768086809681068116812681368146815681668176818681968206821682268236824682568266827682868296830683168326833683468356836683768386839684068416842684368446845684668476848684968506851685268536854685568566857685868596860686168626863686468656866686768686869687068716872687368746875687668776878687968806881688268836884688568866887688868896890689168926893689468956896689768986899690069016902690369046905690669076908690969106911691269136914691569166917691869196920692169226923692469256926692769286929693069316932693369346935693669376938693969406941694269436944694569466947694869496950695169526953695469556956695769586959696069616962696369646965696669676968696969706971697269736974697569766977697869796980698169826983698469856986698769886989699069916992699369946995699669976998699970007001700270037004700570067007700870097010701170127013701470157016701770187019702070217022702370247025702670277028702970307031703270337034703570367037703870397040704170427043704470457046704770487049705070517052705370547055705670577058705970607061706270637064706570667067706870697070707170727073707470757076707770787079708070817082708370847085708670877088708970907091709270937094709570967097709870997100710171027103710471057106710771087109711071117112711371147115711671177118711971207121712271237124712571267127712871297130713171327133713471357136713771387139714071417142714371447145714671477148714971507151715271537154715571567157715871597160716171627163716471657166716771687169717071717172717371747175717671777178717971807181718271837184718571867187718871897190719171927193719471957196719771987199720072017202720372047205720672077208720972107211721272137214721572167217721872197220722172227223722472257226722772287229723072317232723372347235723672377238723972407241724272437244724572467247724872497250725172527253725472557256725772587259726072617262726372647265726672677268726972707271727272737274727572767277727872797280728172827283728472857286728772887289729072917292729372947295729672977298729973007301730273037304730573067307730873097310731173127313731473157316731773187319732073217322732373247325732673277328732973307331733273337334733573367337733873397340734173427343734473457346734773487349735073517352735373547355735673577358735973607361736273637364736573667367736873697370737173727373737473757376737773787379738073817382738373847385738673877388738973907391739273937394739573967397739873997400740174027403740474057406740774087409741074117412741374147415741674177418741974207421742274237424742574267427742874297430743174327433743474357436743774387439744074417442744374447445744674477448744974507451745274537454745574567457745874597460746174627463746474657466746774687469747074717472747374747475747674777478747974807481748274837484748574867487748874897490749174927493749474957496749774987499750075017502750375047505750675077508750975107511751275137514751575167517751875197520752175227523752475257526752775287529753075317532753375347535753675377538753975407541754275437544754575467547754875497550755175527553755475557556755775587559756075617562756375647565756675677568756975707571757275737574757575767577757875797580758175827583758475857586758775887589759075917592759375947595759675977598759976007601760276037604760576067607760876097610761176127613761476157616761776187619762076217622762376247625762676277628762976307631763276337634763576367637763876397640764176427643764476457646764776487649765076517652765376547655765676577658765976607661766276637664766576667667766876697670767176727673767476757676767776787679768076817682768376847685768676877688768976907691769276937694769576967697769876997700770177027703770477057706770777087709771077117712771377147715771677177718771977207721772277237724772577267727772877297730773177327733773477357736773777387739774077417742774377447745774677477748774977507751775277537754775577567757775877597760776177627763776477657766776777687769777077717772777377747775777677777778777977807781778277837784778577867787778877897790779177927793779477957796779777987799780078017802780378047805780678077808780978107811781278137814781578167817781878197820782178227823782478257826782778287829783078317832783378347835783678377838783978407841784278437844784578467847784878497850785178527853785478557856785778587859786078617862786378647865786678677868786978707871787278737874787578767877787878797880788178827883788478857886788778887889789078917892789378947895789678977898789979007901790279037904790579067907790879097910791179127913791479157916791779187919792079217922792379247925792679277928792979307931793279337934793579367937793879397940794179427943794479457946794779487949795079517952795379547955795679577958795979607961796279637964796579667967796879697970797179727973797479757976797779787979798079817982798379847985798679877988798979907991799279937994799579967997799879998000800180028003800480058006800780088009801080118012801380148015801680178018801980208021802280238024802580268027802880298030803180328033803480358036803780388039804080418042804380448045804680478048804980508051805280538054805580568057805880598060806180628063806480658066806780688069807080718072807380748075807680778078807980808081808280838084808580868087808880898090809180928093809480958096809780988099810081018102810381048105810681078108810981108111811281138114811581168117811881198120812181228123812481258126812781288129813081318132813381348135813681378138813981408141814281438144814581468147814881498150815181528153815481558156815781588159816081618162816381648165816681678168816981708171817281738174817581768177817881798180818181828183818481858186818781888189819081918192819381948195819681978198819982008201820282038204820582068207820882098210821182128213821482158216821782188219822082218222822382248225822682278228822982308231823282338234823582368237823882398240824182428243824482458246824782488249825082518252825382548255825682578258825982608261826282638264826582668267826882698270827182728273827482758276827782788279828082818282828382848285828682878288828982908291829282938294829582968297829882998300830183028303830483058306830783088309831083118312831383148315831683178318831983208321832283238324832583268327832883298330833183328333833483358336833783388339834083418342834383448345834683478348834983508351835283538354835583568357835883598360836183628363836483658366836783688369837083718372837383748375837683778378837983808381838283838384838583868387838883898390839183928393839483958396839783988399840084018402840384048405840684078408840984108411841284138414841584168417841884198420842184228423842484258426842784288429843084318432843384348435843684378438843984408441844284438444844584468447844884498450845184528453845484558456845784588459846084618462846384648465846684678468846984708471847284738474847584768477847884798480848184828483848484858486848784888489849084918492849384948495849684978498849985008501850285038504850585068507850885098510851185128513851485158516851785188519852085218522852385248525852685278528852985308531853285338534853585368537853885398540854185428543854485458546854785488549855085518552855385548555855685578558855985608561856285638564856585668567856885698570857185728573857485758576857785788579858085818582858385848585858685878588858985908591859285938594859585968597859885998600860186028603860486058606860786088609861086118612861386148615861686178618861986208621862286238624862586268627862886298630863186328633863486358636863786388639864086418642864386448645864686478648864986508651865286538654865586568657865886598660866186628663866486658666866786688669867086718672867386748675867686778678867986808681868286838684868586868687868886898690869186928693869486958696869786988699870087018702870387048705870687078708870987108711871287138714871587168717871887198720872187228723872487258726872787288729873087318732873387348735873687378738873987408741874287438744874587468747874887498750875187528753875487558756875787588759876087618762876387648765876687678768876987708771877287738774877587768777877887798780878187828783878487858786878787888789879087918792879387948795879687978798879988008801880288038804880588068807880888098810881188128813881488158816881788188819882088218822882388248825882688278828882988308831883288338834883588368837883888398840884188428843884488458846884788488849885088518852885388548855885688578858885988608861886288638864886588668867886888698870887188728873887488758876887788788879888088818882888388848885888688878888888988908891889288938894889588968897889888998900890189028903890489058906890789088909891089118912891389148915891689178918891989208921892289238924892589268927892889298930893189328933893489358936893789388939894089418942894389448945894689478948894989508951895289538954895589568957895889598960896189628963896489658966896789688969897089718972897389748975897689778978897989808981898289838984898589868987898889898990899189928993899489958996899789988999900090019002900390049005900690079008900990109011901290139014901590169017901890199020902190229023902490259026902790289029903090319032903390349035903690379038903990409041904290439044904590469047904890499050905190529053905490559056905790589059906090619062906390649065906690679068906990709071907290739074907590769077907890799080908190829083908490859086908790889089909090919092909390949095909690979098909991009101910291039104910591069107910891099110911191129113911491159116911791189119912091219122912391249125912691279128912991309131913291339134913591369137913891399140914191429143914491459146914791489149915091519152915391549155915691579158915991609161916291639164916591669167916891699170917191729173917491759176917791789179918091819182918391849185918691879188918991909191919291939194919591969197919891999200920192029203920492059206920792089209921092119212921392149215921692179218921992209221922292239224922592269227922892299230923192329233923492359236923792389239924092419242924392449245924692479248924992509251925292539254925592569257925892599260926192629263926492659266926792689269927092719272927392749275927692779278927992809281928292839284928592869287928892899290929192929293929492959296929792989299930093019302930393049305930693079308930993109311931293139314931593169317931893199320932193229323932493259326932793289329933093319332933393349335933693379338933993409341934293439344934593469347934893499350935193529353935493559356935793589359936093619362936393649365936693679368936993709371937293739374937593769377937893799380938193829383938493859386938793889389939093919392939393949395939693979398939994009401940294039404940594069407940894099410941194129413941494159416941794189419942094219422942394249425942694279428942994309431943294339434943594369437943894399440944194429443944494459446944794489449945094519452945394549455945694579458945994609461946294639464946594669467946894699470947194729473947494759476947794789479948094819482948394849485948694879488948994909491949294939494949594969497949894999500950195029503950495059506950795089509951095119512951395149515951695179518951995209521952295239524952595269527952895299530953195329533953495359536953795389539954095419542954395449545954695479548954995509551955295539554955595569557955895599560956195629563956495659566956795689569957095719572957395749575957695779578957995809581958295839584958595869587958895899590959195929593959495959596959795989599960096019602960396049605960696079608960996109611961296139614961596169617961896199620962196229623962496259626962796289629963096319632963396349635963696379638963996409641964296439644964596469647964896499650965196529653965496559656965796589659966096619662966396649665966696679668966996709671967296739674967596769677967896799680968196829683968496859686968796889689969096919692969396949695969696979698969997009701970297039704970597069707970897099710971197129713971497159716971797189719972097219722972397249725972697279728972997309731973297339734973597369737973897399740974197429743974497459746974797489749975097519752975397549755975697579758975997609761976297639764976597669767976897699770977197729773977497759776977797789779978097819782978397849785978697879788978997909791979297939794979597969797979897999800980198029803980498059806980798089809981098119812981398149815981698179818981998209821982298239824982598269827982898299830983198329833983498359836983798389839984098419842984398449845984698479848984998509851985298539854985598569857985898599860986198629863986498659866986798689869987098719872987398749875987698779878987998809881988298839884988598869887988898899890989198929893989498959896989798989899990099019902990399049905990699079908990999109911991299139914991599169917991899199920992199229923992499259926992799289929993099319932993399349935993699379938993999409941994299439944994599469947994899499950995199529953995499559956995799589959996099619962996399649965996699679968996999709971997299739974997599769977997899799980998199829983998499859986998799889989999099919992999399949995999699979998999910000100011000210003100041000510006100071000810009100101001110012100131001410015100161001710018100191002010021100221002310024100251002610027100281002910030100311003210033100341003510036100371003810039100401004110042100431004410045100461004710048100491005010051100521005310054100551005610057100581005910060100611006210063100641006510066100671006810069100701007110072100731007410075100761007710078100791008010081100821008310084100851008610087100881008910090100911009210093100941009510096100971009810099101001010110102101031010410105101061010710108101091011010111101121011310114101151011610117101181011910120101211012210123101241012510126101271012810129101301013110132101331013410135101361013710138101391014010141101421014310144101451014610147101481014910150101511015210153101541015510156101571015810159101601016110162101631016410165101661016710168101691017010171101721017310174101751017610177101781017910180101811018210183101841018510186101871018810189101901019110192101931019410195101961019710198101991020010201102021020310204102051020610207102081020910210102111021210213102141021510216102171021810219102201022110222102231022410225102261022710228102291023010231102321023310234102351023610237102381023910240102411024210243102441024510246102471024810249102501025110252102531025410255102561025710258102591026010261102621026310264102651026610267102681026910270102711027210273102741027510276102771027810279102801028110282102831028410285102861028710288102891029010291102921029310294102951029610297102981029910300103011030210303103041030510306103071030810309103101031110312103131031410315103161031710318103191032010321103221032310324103251032610327103281032910330103311033210333103341033510336103371033810339103401034110342103431034410345103461034710348103491035010351103521035310354103551035610357103581035910360103611036210363103641036510366103671036810369103701037110372103731037410375103761037710378103791038010381103821038310384103851038610387103881038910390103911039210393103941039510396103971039810399104001040110402104031040410405104061040710408104091041010411104121041310414104151041610417104181041910420104211042210423104241042510426104271042810429104301043110432104331043410435104361043710438104391044010441104421044310444104451044610447104481044910450104511045210453104541045510456104571045810459104601046110462104631046410465104661046710468104691047010471104721047310474104751047610477104781047910480104811048210483104841048510486104871048810489104901049110492104931049410495104961049710498104991050010501105021050310504105051050610507105081050910510105111051210513105141051510516105171051810519105201052110522105231052410525105261052710528105291053010531105321053310534105351053610537105381053910540105411054210543105441054510546105471054810549105501055110552105531055410555105561055710558105591056010561105621056310564105651056610567105681056910570105711057210573105741057510576105771057810579105801058110582105831058410585105861058710588105891059010591105921059310594105951059610597105981059910600106011060210603106041060510606106071060810609106101061110612106131061410615106161061710618106191062010621106221062310624106251062610627106281062910630106311063210633106341063510636106371063810639106401064110642106431064410645106461064710648106491065010651106521065310654106551065610657106581065910660106611066210663106641066510666106671066810669106701067110672106731067410675106761067710678106791068010681106821068310684106851068610687106881068910690106911069210693106941069510696106971069810699107001070110702107031070410705107061070710708107091071010711107121071310714107151071610717107181071910720107211072210723107241072510726107271072810729107301073110732107331073410735107361073710738107391074010741107421074310744107451074610747107481074910750107511075210753107541075510756107571075810759107601076110762107631076410765107661076710768107691077010771107721077310774107751077610777107781077910780107811078210783107841078510786107871078810789107901079110792107931079410795107961079710798107991080010801108021080310804108051080610807108081080910810108111081210813108141081510816108171081810819108201082110822108231082410825108261082710828108291083010831108321083310834108351083610837108381083910840108411084210843108441084510846108471084810849108501085110852108531085410855108561085710858108591086010861108621086310864108651086610867108681086910870108711087210873108741087510876108771087810879108801088110882108831088410885108861088710888108891089010891108921089310894108951089610897108981089910900109011090210903109041090510906109071090810909109101091110912109131091410915109161091710918109191092010921109221092310924109251092610927109281092910930109311093210933109341093510936109371093810939109401094110942109431094410945109461094710948109491095010951109521095310954109551095610957109581095910960109611096210963109641096510966109671096810969109701097110972109731097410975109761097710978109791098010981109821098310984109851098610987109881098910990109911099210993109941099510996109971099810999110001100111002110031100411005110061100711008110091101011011110121101311014110151101611017110181101911020110211102211023110241102511026110271102811029110301103111032110331103411035110361103711038110391104011041110421104311044110451104611047110481104911050110511105211053110541105511056110571105811059110601106111062110631106411065110661106711068110691107011071110721107311074110751107611077110781107911080110811108211083110841108511086110871108811089110901109111092110931109411095110961109711098110991110011101111021110311104111051110611107111081110911110111111111211113111141111511116111171111811119111201112111122111231112411125111261112711128111291113011131111321113311134111351113611137111381113911140111411114211143111441114511146111471114811149111501115111152111531115411155111561115711158111591116011161111621116311164111651116611167111681116911170111711117211173111741117511176111771117811179111801118111182111831118411185111861118711188111891119011191111921119311194111951119611197111981119911200112011120211203112041120511206112071120811209112101121111212112131121411215112161121711218112191122011221112221122311224112251122611227112281122911230112311123211233112341123511236112371123811239112401124111242112431124411245112461124711248112491125011251112521125311254112551125611257112581125911260112611126211263112641126511266112671126811269112701127111272112731127411275112761127711278112791128011281112821128311284112851128611287112881128911290112911129211293112941129511296112971129811299113001130111302113031130411305113061130711308113091131011311113121131311314113151131611317113181131911320113211132211323113241132511326113271132811329113301133111332113331133411335113361133711338113391134011341113421134311344113451134611347113481134911350113511135211353113541135511356113571135811359113601136111362113631136411365113661136711368113691137011371113721137311374113751137611377113781137911380113811138211383113841138511386113871138811389113901139111392113931139411395113961139711398113991140011401114021140311404114051140611407114081140911410114111141211413114141141511416114171141811419114201142111422114231142411425114261142711428114291143011431114321143311434114351143611437114381143911440114411144211443114441144511446114471144811449114501145111452114531145411455114561145711458114591146011461114621146311464114651146611467114681146911470114711147211473114741147511476114771147811479114801148111482114831148411485114861148711488114891149011491114921149311494114951149611497114981149911500115011150211503115041150511506115071150811509115101151111512115131151411515115161151711518115191152011521115221152311524115251152611527115281152911530115311153211533115341153511536115371153811539115401154111542115431154411545115461154711548115491155011551115521155311554115551155611557115581155911560115611156211563115641156511566115671156811569115701157111572115731157411575115761157711578115791158011581115821158311584115851158611587115881158911590115911159211593115941159511596115971159811599116001160111602116031160411605116061160711608116091161011611116121161311614116151161611617116181161911620116211162211623116241162511626116271162811629116301163111632116331163411635116361163711638116391164011641116421164311644116451164611647116481164911650116511165211653116541165511656116571165811659116601166111662116631166411665116661166711668116691167011671116721167311674116751167611677116781167911680116811168211683116841168511686116871168811689116901169111692116931169411695116961169711698116991170011701117021170311704117051170611707117081170911710117111171211713117141171511716117171171811719117201172111722117231172411725117261172711728117291173011731117321173311734117351173611737117381173911740117411174211743117441174511746117471174811749117501175111752117531175411755117561175711758117591176011761117621176311764117651176611767117681176911770117711177211773117741177511776117771177811779117801178111782117831178411785117861178711788117891179011791117921179311794117951179611797117981179911800118011180211803118041180511806118071180811809118101181111812118131181411815118161181711818118191182011821118221182311824118251182611827118281182911830118311183211833118341183511836118371183811839118401184111842118431184411845118461184711848118491185011851118521185311854118551185611857118581185911860118611186211863118641186511866118671186811869118701187111872118731187411875118761187711878118791188011881118821188311884118851188611887118881188911890118911189211893118941189511896118971189811899119001190111902119031190411905119061190711908119091191011911119121191311914119151191611917119181191911920119211192211923119241192511926119271192811929119301193111932119331193411935119361193711938119391194011941119421194311944119451194611947119481194911950119511195211953119541195511956119571195811959119601196111962119631196411965119661196711968119691197011971119721197311974119751197611977119781197911980119811198211983119841198511986119871198811989119901199111992119931199411995119961199711998119991200012001120021200312004120051200612007120081200912010120111201212013120141201512016120171201812019120201202112022120231202412025120261202712028120291203012031120321203312034120351203612037120381203912040120411204212043120441204512046120471204812049120501205112052120531205412055120561205712058120591206012061120621206312064120651206612067120681206912070120711207212073120741207512076120771207812079120801208112082120831208412085120861208712088120891209012091120921209312094120951209612097120981209912100121011210212103121041210512106121071210812109121101211112112121131211412115121161211712118121191212012121121221212312124121251212612127121281212912130121311213212133121341213512136121371213812139121401214112142121431214412145121461214712148121491215012151121521215312154121551215612157121581215912160121611216212163121641216512166121671216812169121701217112172121731217412175121761217712178121791218012181121821218312184121851218612187121881218912190121911219212193121941219512196121971219812199122001220112202122031220412205122061220712208122091221012211122121221312214122151221612217122181221912220122211222212223122241222512226122271222812229122301223112232122331223412235122361223712238122391224012241122421224312244122451224612247122481224912250122511225212253122541225512256122571225812259122601226112262122631226412265122661226712268122691227012271122721227312274122751227612277122781227912280122811228212283122841228512286122871228812289122901229112292122931229412295122961229712298122991230012301123021230312304123051230612307123081230912310123111231212313123141231512316123171231812319123201232112322123231232412325123261232712328123291233012331123321233312334123351233612337123381233912340123411234212343123441234512346123471234812349123501235112352123531235412355123561235712358123591236012361123621236312364123651236612367123681236912370123711237212373123741237512376123771237812379123801238112382123831238412385123861238712388123891239012391123921239312394123951239612397123981239912400124011240212403124041240512406124071240812409124101241112412124131241412415124161241712418124191242012421124221242312424124251242612427124281242912430124311243212433124341243512436124371243812439124401244112442124431244412445124461244712448124491245012451124521245312454124551245612457124581245912460124611246212463124641246512466124671246812469124701247112472124731247412475124761247712478124791248012481124821248312484124851248612487124881248912490124911249212493124941249512496124971249812499125001250112502125031250412505125061250712508125091251012511125121251312514125151251612517125181251912520125211252212523125241252512526125271252812529125301253112532125331253412535125361253712538125391254012541125421254312544125451254612547125481254912550125511255212553125541255512556125571255812559125601256112562125631256412565125661256712568125691257012571125721257312574125751257612577125781257912580125811258212583125841258512586125871258812589125901259112592125931259412595125961259712598125991260012601126021260312604126051260612607126081260912610126111261212613126141261512616126171261812619126201262112622126231262412625126261262712628126291263012631126321263312634126351263612637126381263912640126411264212643126441264512646126471264812649126501265112652126531265412655126561265712658126591266012661126621266312664126651266612667126681266912670126711267212673126741267512676126771267812679126801268112682126831268412685126861268712688126891269012691126921269312694126951269612697126981269912700127011270212703127041270512706127071270812709127101271112712127131271412715127161271712718127191272012721127221272312724127251272612727127281272912730127311273212733127341273512736127371273812739127401274112742127431274412745127461274712748127491275012751127521275312754127551275612757127581275912760127611276212763127641276512766127671276812769127701277112772127731277412775127761277712778127791278012781127821278312784127851278612787127881278912790127911279212793127941279512796127971279812799128001280112802128031280412805128061280712808128091281012811128121281312814128151281612817128181281912820128211282212823128241282512826128271282812829128301283112832128331283412835128361283712838128391284012841128421284312844128451284612847128481284912850128511285212853128541285512856128571285812859128601286112862128631286412865128661286712868128691287012871128721287312874128751287612877128781287912880128811288212883128841288512886128871288812889128901289112892128931289412895128961289712898128991290012901129021290312904129051290612907129081290912910129111291212913129141291512916129171291812919129201292112922129231292412925129261292712928129291293012931129321293312934129351293612937129381293912940129411294212943129441294512946129471294812949129501295112952129531295412955129561295712958129591296012961129621296312964129651296612967129681296912970129711297212973129741297512976129771297812979129801298112982129831298412985129861298712988129891299012991129921299312994129951299612997129981299913000130011300213003130041300513006130071300813009130101301113012130131301413015130161301713018130191302013021130221302313024130251302613027130281302913030130311303213033130341303513036130371303813039130401304113042130431304413045130461304713048130491305013051130521305313054130551305613057130581305913060130611306213063130641306513066130671306813069130701307113072130731307413075130761307713078130791308013081130821308313084130851308613087130881308913090130911309213093130941309513096130971309813099131001310113102131031310413105131061310713108131091311013111131121311313114131151311613117131181311913120131211312213123131241312513126131271312813129131301313113132131331313413135131361313713138131391314013141131421314313144131451314613147131481314913150131511315213153131541315513156131571315813159131601316113162131631316413165131661316713168131691317013171131721317313174131751317613177131781317913180131811318213183131841318513186131871318813189131901319113192131931319413195131961319713198131991320013201132021320313204132051320613207132081320913210132111321213213132141321513216132171321813219132201322113222132231322413225132261322713228132291323013231132321323313234132351323613237132381323913240132411324213243132441324513246132471324813249132501325113252132531325413255132561325713258132591326013261132621326313264132651326613267132681326913270132711327213273132741327513276132771327813279132801328113282132831328413285132861328713288132891329013291132921329313294132951329613297132981329913300133011330213303133041330513306133071330813309133101331113312133131331413315133161331713318133191332013321133221332313324133251332613327133281332913330133311333213333133341333513336133371333813339133401334113342133431334413345133461334713348133491335013351133521335313354133551335613357133581335913360133611336213363133641336513366133671336813369133701337113372133731337413375133761337713378133791338013381133821338313384133851338613387133881338913390133911339213393133941339513396133971339813399134001340113402134031340413405134061340713408134091341013411134121341313414134151341613417134181341913420134211342213423134241342513426134271342813429134301343113432134331343413435134361343713438134391344013441134421344313444134451344613447134481344913450134511345213453134541345513456134571345813459134601346113462134631346413465134661346713468134691347013471134721347313474134751347613477134781347913480134811348213483134841348513486134871348813489134901349113492134931349413495134961349713498134991350013501135021350313504135051350613507135081350913510135111351213513135141351513516135171351813519135201352113522135231352413525135261352713528135291353013531135321353313534135351353613537135381353913540135411354213543135441354513546135471354813549135501355113552135531355413555135561355713558135591356013561135621356313564135651356613567135681356913570135711357213573135741357513576135771357813579135801358113582135831358413585135861358713588135891359013591135921359313594135951359613597135981359913600136011360213603136041360513606136071360813609136101361113612136131361413615136161361713618136191362013621136221362313624136251362613627136281362913630136311363213633136341363513636136371363813639136401364113642136431364413645136461364713648136491365013651136521365313654136551365613657136581365913660136611366213663136641366513666136671366813669136701367113672136731367413675136761367713678136791368013681136821368313684136851368613687136881368913690136911369213693136941369513696136971369813699137001370113702137031370413705137061370713708137091371013711137121371313714137151371613717137181371913720137211372213723137241372513726137271372813729137301373113732137331373413735137361373713738137391374013741137421374313744137451374613747137481374913750137511375213753137541375513756137571375813759137601376113762137631376413765137661376713768137691377013771137721377313774137751377613777137781377913780137811378213783137841378513786137871378813789137901379113792137931379413795137961379713798137991380013801138021380313804138051380613807138081380913810138111381213813138141381513816138171381813819138201382113822138231382413825138261382713828138291383013831138321383313834138351383613837138381383913840138411384213843138441384513846138471384813849138501385113852138531385413855138561385713858138591386013861138621386313864138651386613867138681386913870138711387213873138741387513876138771387813879138801388113882138831388413885138861388713888138891389013891138921389313894138951389613897138981389913900139011390213903139041390513906139071390813909139101391113912139131391413915139161391713918139191392013921139221392313924139251392613927139281392913930139311393213933139341393513936139371393813939139401394113942139431394413945139461394713948139491395013951139521395313954139551395613957139581395913960139611396213963139641396513966139671396813969139701397113972139731397413975139761397713978139791398013981139821398313984139851398613987139881398913990139911399213993139941399513996139971399813999140001400114002140031400414005140061400714008140091401014011140121401314014140151401614017140181401914020140211402214023140241402514026140271402814029140301403114032140331403414035140361403714038140391404014041140421404314044140451404614047140481404914050140511405214053140541405514056140571405814059140601406114062140631406414065140661406714068140691407014071140721407314074140751407614077140781407914080140811408214083140841408514086140871408814089140901409114092140931409414095140961409714098140991410014101141021410314104141051410614107141081410914110141111411214113141141411514116141171411814119141201412114122141231412414125141261412714128141291413014131141321413314134141351413614137141381413914140141411414214143141441414514146141471414814149141501415114152141531415414155141561415714158141591416014161141621416314164141651416614167141681416914170141711417214173141741417514176141771417814179141801418114182141831418414185141861418714188141891419014191141921419314194141951419614197141981419914200142011420214203142041420514206142071420814209142101421114212142131421414215142161421714218142191422014221142221422314224142251422614227142281422914230142311423214233142341423514236142371423814239142401424114242142431424414245142461424714248142491425014251142521425314254142551425614257142581425914260142611426214263142641426514266142671426814269142701427114272142731427414275142761427714278142791428014281142821428314284142851428614287142881428914290142911429214293142941429514296142971429814299143001430114302143031430414305143061430714308143091431014311143121431314314143151431614317143181431914320143211432214323143241432514326143271432814329143301433114332143331433414335143361433714338143391434014341143421434314344143451434614347143481434914350143511435214353143541435514356143571435814359143601436114362143631436414365143661436714368143691437014371143721437314374143751437614377143781437914380143811438214383143841438514386143871438814389143901439114392143931439414395143961439714398143991440014401144021440314404144051440614407144081440914410144111441214413144141441514416144171441814419144201442114422144231442414425144261442714428144291443014431144321443314434144351443614437144381443914440144411444214443144441444514446144471444814449144501445114452144531445414455144561445714458144591446014461144621446314464144651446614467144681446914470144711447214473144741447514476144771447814479144801448114482144831448414485144861448714488144891449014491144921449314494144951449614497144981449914500145011450214503145041450514506145071450814509145101451114512145131451414515145161451714518145191452014521145221452314524145251452614527145281452914530145311453214533145341453514536145371453814539145401454114542145431454414545145461454714548145491455014551145521455314554145551455614557145581455914560145611456214563145641456514566145671456814569145701457114572145731457414575145761457714578145791458014581145821458314584145851458614587145881458914590145911459214593145941459514596145971459814599146001460114602146031460414605146061460714608146091461014611146121461314614146151461614617146181461914620146211462214623146241462514626146271462814629146301463114632146331463414635146361463714638146391464014641146421464314644146451464614647146481464914650146511465214653146541465514656146571465814659146601466114662146631466414665146661466714668146691467014671146721467314674146751467614677146781467914680146811468214683146841468514686146871468814689146901469114692146931469414695146961469714698146991470014701147021470314704147051470614707147081470914710147111471214713147141471514716147171471814719147201472114722147231472414725147261472714728147291473014731147321473314734147351473614737147381473914740147411474214743147441474514746147471474814749147501475114752147531475414755147561475714758147591476014761147621476314764147651476614767147681476914770147711477214773147741477514776147771477814779147801478114782147831478414785147861478714788147891479014791147921479314794147951479614797147981479914800148011480214803148041480514806148071480814809148101481114812148131481414815148161481714818148191482014821148221482314824148251482614827148281482914830148311483214833148341483514836148371483814839148401484114842148431484414845148461484714848148491485014851148521485314854148551485614857148581485914860148611486214863148641486514866148671486814869148701487114872148731487414875148761487714878148791488014881148821488314884148851488614887148881488914890148911489214893148941489514896148971489814899149001490114902149031490414905149061490714908149091491014911149121491314914149151491614917149181491914920149211492214923149241492514926149271492814929149301493114932149331493414935149361493714938149391494014941149421494314944149451494614947149481494914950149511495214953149541495514956149571495814959149601496114962149631496414965149661496714968149691497014971149721497314974149751497614977149781497914980149811498214983149841498514986149871498814989149901499114992149931499414995149961499714998149991500015001150021500315004150051500615007150081500915010150111501215013150141501515016150171501815019150201502115022150231502415025150261502715028150291503015031150321503315034150351503615037150381503915040150411504215043150441504515046150471504815049150501505115052150531505415055150561505715058150591506015061150621506315064150651506615067150681506915070150711507215073150741507515076150771507815079150801508115082150831508415085150861508715088150891509015091150921509315094150951509615097150981509915100151011510215103151041510515106151071510815109151101511115112151131511415115151161511715118151191512015121151221512315124151251512615127151281512915130151311513215133151341513515136151371513815139151401514115142151431514415145151461514715148151491515015151151521515315154151551515615157151581515915160151611516215163151641516515166151671516815169151701517115172151731517415175151761517715178151791518015181151821518315184151851518615187151881518915190151911519215193151941519515196151971519815199152001520115202152031520415205152061520715208152091521015211152121521315214152151521615217152181521915220152211522215223152241522515226152271522815229152301523115232152331523415235152361523715238152391524015241152421524315244152451524615247152481524915250152511525215253152541525515256152571525815259152601526115262152631526415265152661526715268152691527015271152721527315274152751527615277152781527915280152811528215283152841528515286152871528815289152901529115292152931529415295152961529715298152991530015301153021530315304153051530615307153081530915310153111531215313153141531515316153171531815319153201532115322153231532415325153261532715328153291533015331153321533315334153351533615337153381533915340153411534215343153441534515346153471534815349153501535115352153531535415355153561535715358153591536015361153621536315364153651536615367153681536915370153711537215373153741537515376153771537815379153801538115382153831538415385153861538715388153891539015391153921539315394153951539615397153981539915400154011540215403154041540515406154071540815409154101541115412154131541415415154161541715418154191542015421154221542315424154251542615427154281542915430154311543215433154341543515436154371543815439154401544115442154431544415445154461544715448154491545015451154521545315454154551545615457154581545915460154611546215463154641546515466154671546815469154701547115472154731547415475154761547715478154791548015481154821548315484154851548615487154881548915490154911549215493154941549515496154971549815499155001550115502155031550415505155061550715508155091551015511155121551315514155151551615517155181551915520155211552215523155241552515526155271552815529155301553115532155331553415535155361553715538155391554015541155421554315544155451554615547155481554915550155511555215553155541555515556155571555815559155601556115562155631556415565155661556715568155691557015571155721557315574155751557615577155781557915580155811558215583155841558515586155871558815589155901559115592155931559415595155961559715598155991560015601156021560315604156051560615607156081560915610156111561215613156141561515616156171561815619156201562115622156231562415625156261562715628156291563015631156321563315634156351563615637156381563915640156411564215643156441564515646156471564815649156501565115652156531565415655156561565715658156591566015661156621566315664156651566615667156681566915670156711567215673156741567515676156771567815679156801568115682156831568415685156861568715688156891569015691156921569315694156951569615697156981569915700157011570215703157041570515706157071570815709157101571115712157131571415715157161571715718157191572015721157221572315724157251572615727157281572915730157311573215733157341573515736157371573815739157401574115742157431574415745157461574715748157491575015751157521575315754157551575615757157581575915760157611576215763157641576515766157671576815769157701577115772157731577415775157761577715778157791578015781157821578315784157851578615787157881578915790157911579215793157941579515796157971579815799158001580115802158031580415805158061580715808158091581015811158121581315814158151581615817158181581915820158211582215823158241582515826158271582815829158301583115832158331583415835158361583715838158391584015841158421584315844158451584615847158481584915850158511585215853158541585515856158571585815859158601586115862158631586415865158661586715868158691587015871158721587315874158751587615877158781587915880158811588215883158841588515886158871588815889158901589115892158931589415895158961589715898158991590015901159021590315904159051590615907159081590915910159111591215913159141591515916159171591815919159201592115922159231592415925159261592715928159291593015931159321593315934159351593615937159381593915940159411594215943159441594515946159471594815949159501595115952159531595415955159561595715958159591596015961159621596315964159651596615967159681596915970159711597215973159741597515976159771597815979159801598115982159831598415985159861598715988159891599015991159921599315994159951599615997159981599916000160011600216003160041600516006160071600816009160101601116012160131601416015160161601716018160191602016021160221602316024160251602616027160281602916030160311603216033160341603516036160371603816039160401604116042160431604416045160461604716048160491605016051160521605316054160551605616057160581605916060160611606216063160641606516066160671606816069160701607116072160731607416075160761607716078160791608016081160821608316084160851608616087160881608916090160911609216093160941609516096160971609816099161001610116102161031610416105161061610716108161091611016111161121611316114161151611616117161181611916120161211612216123161241612516126161271612816129161301613116132161331613416135161361613716138161391614016141161421614316144161451614616147161481614916150161511615216153161541615516156161571615816159161601616116162161631616416165161661616716168161691617016171161721617316174161751617616177161781617916180161811618216183161841618516186161871618816189161901619116192161931619416195161961619716198161991620016201162021620316204162051620616207162081620916210162111621216213162141621516216162171621816219162201622116222162231622416225162261622716228162291623016231162321623316234162351623616237162381623916240162411624216243162441624516246162471624816249162501625116252162531625416255162561625716258162591626016261162621626316264162651626616267162681626916270162711627216273162741627516276162771627816279162801628116282162831628416285162861628716288162891629016291162921629316294162951629616297162981629916300163011630216303163041630516306163071630816309163101631116312163131631416315163161631716318163191632016321163221632316324163251632616327163281632916330163311633216333163341633516336163371633816339163401634116342163431634416345163461634716348163491635016351163521635316354163551635616357163581635916360163611636216363163641636516366163671636816369163701637116372163731637416375163761637716378163791638016381163821638316384163851638616387163881638916390163911639216393163941639516396163971639816399164001640116402164031640416405164061640716408164091641016411164121641316414164151641616417164181641916420164211642216423164241642516426164271642816429164301643116432164331643416435164361643716438164391644016441164421644316444164451644616447164481644916450164511645216453164541645516456164571645816459164601646116462164631646416465164661646716468164691647016471164721647316474164751647616477164781647916480164811648216483164841648516486164871648816489164901649116492164931649416495164961649716498164991650016501165021650316504165051650616507165081650916510165111651216513165141651516516165171651816519165201652116522165231652416525165261652716528165291653016531165321653316534165351653616537165381653916540165411654216543165441654516546165471654816549165501655116552165531655416555165561655716558165591656016561165621656316564165651656616567165681656916570165711657216573165741657516576165771657816579165801658116582165831658416585165861658716588165891659016591165921659316594165951659616597165981659916600166011660216603166041660516606166071660816609166101661116612166131661416615166161661716618166191662016621166221662316624166251662616627166281662916630166311663216633166341663516636166371663816639166401664116642166431664416645166461664716648166491665016651166521665316654166551665616657166581665916660166611666216663166641666516666166671666816669166701667116672166731667416675166761667716678166791668016681166821668316684166851668616687166881668916690166911669216693166941669516696166971669816699167001670116702167031670416705167061670716708167091671016711167121671316714167151671616717167181671916720167211672216723167241672516726167271672816729167301673116732167331673416735167361673716738167391674016741167421674316744167451674616747167481674916750167511675216753167541675516756167571675816759167601676116762167631676416765167661676716768167691677016771167721677316774167751677616777167781677916780167811678216783167841678516786167871678816789167901679116792167931679416795167961679716798167991680016801168021680316804168051680616807168081680916810168111681216813168141681516816168171681816819168201682116822168231682416825168261682716828168291683016831168321683316834168351683616837168381683916840168411684216843168441684516846168471684816849168501685116852168531685416855168561685716858168591686016861168621686316864168651686616867168681686916870168711687216873168741687516876168771687816879168801688116882168831688416885168861688716888168891689016891168921689316894168951689616897168981689916900169011690216903169041690516906169071690816909169101691116912169131691416915169161691716918169191692016921169221692316924169251692616927169281692916930169311693216933169341693516936169371693816939169401694116942169431694416945169461694716948169491695016951169521695316954169551695616957169581695916960169611696216963169641696516966169671696816969169701697116972169731697416975169761697716978169791698016981169821698316984169851698616987169881698916990169911699216993169941699516996169971699816999170001700117002170031700417005170061700717008170091701017011170121701317014170151701617017170181701917020170211702217023170241702517026170271702817029170301703117032170331703417035170361703717038170391704017041170421704317044170451704617047170481704917050170511705217053170541705517056170571705817059170601706117062170631706417065170661706717068170691707017071170721707317074170751707617077170781707917080170811708217083170841708517086170871708817089170901709117092170931709417095170961709717098170991710017101171021710317104171051710617107171081710917110171111711217113171141711517116171171711817119171201712117122171231712417125171261712717128171291713017131171321713317134171351713617137171381713917140171411714217143171441714517146171471714817149171501715117152171531715417155171561715717158171591716017161171621716317164171651716617167171681716917170171711717217173171741717517176171771717817179171801718117182171831718417185171861718717188171891719017191171921719317194171951719617197171981719917200172011720217203172041720517206172071720817209172101721117212172131721417215172161721717218172191722017221172221722317224172251722617227172281722917230172311723217233172341723517236172371723817239172401724117242172431724417245172461724717248172491725017251172521725317254172551725617257172581725917260172611726217263172641726517266172671726817269172701727117272172731727417275172761727717278172791728017281172821728317284172851728617287172881728917290172911729217293172941729517296172971729817299173001730117302173031730417305173061730717308173091731017311173121731317314173151731617317173181731917320173211732217323173241732517326173271732817329173301733117332173331733417335173361733717338173391734017341173421734317344173451734617347173481734917350173511735217353173541735517356173571735817359173601736117362173631736417365173661736717368173691737017371173721737317374173751737617377173781737917380173811738217383173841738517386173871738817389173901739117392173931739417395173961739717398173991740017401174021740317404174051740617407174081740917410174111741217413174141741517416174171741817419174201742117422174231742417425174261742717428174291743017431174321743317434174351743617437174381743917440174411744217443174441744517446174471744817449174501745117452174531745417455174561745717458174591746017461174621746317464174651746617467174681746917470174711747217473174741747517476174771747817479174801748117482174831748417485174861748717488174891749017491174921749317494174951749617497174981749917500175011750217503175041750517506175071750817509175101751117512175131751417515175161751717518175191752017521175221752317524175251752617527175281752917530175311753217533175341753517536175371753817539175401754117542175431754417545175461754717548175491755017551175521755317554175551755617557175581755917560175611756217563175641756517566175671756817569175701757117572175731757417575175761757717578175791758017581175821758317584175851758617587175881758917590175911759217593175941759517596175971759817599176001760117602176031760417605176061760717608176091761017611176121761317614176151761617617176181761917620176211762217623176241762517626176271762817629176301763117632176331763417635176361763717638176391764017641176421764317644176451764617647176481764917650176511765217653176541765517656176571765817659176601766117662176631766417665176661766717668176691767017671176721767317674176751767617677176781767917680176811768217683176841768517686176871768817689176901769117692176931769417695176961769717698176991770017701177021770317704177051770617707177081770917710177111771217713177141771517716177171771817719177201772117722177231772417725177261772717728177291773017731177321773317734177351773617737177381773917740177411774217743177441774517746177471774817749177501775117752177531775417755177561775717758177591776017761177621776317764177651776617767177681776917770177711777217773177741777517776177771777817779177801778117782177831778417785177861778717788177891779017791177921779317794177951779617797177981779917800178011780217803178041780517806178071780817809178101781117812178131781417815178161781717818178191782017821178221782317824178251782617827178281782917830178311783217833178341783517836178371783817839178401784117842178431784417845178461784717848178491785017851178521785317854178551785617857178581785917860178611786217863178641786517866178671786817869178701787117872178731787417875178761787717878178791788017881178821788317884178851788617887178881788917890178911789217893178941789517896178971789817899179001790117902179031790417905179061790717908179091791017911179121791317914179151791617917179181791917920179211792217923179241792517926179271792817929179301793117932179331793417935179361793717938179391794017941179421794317944179451794617947179481794917950179511795217953179541795517956179571795817959179601796117962179631796417965179661796717968179691797017971179721797317974179751797617977179781797917980179811798217983179841798517986179871798817989179901799117992179931799417995179961799717998179991800018001180021800318004180051800618007180081800918010180111801218013180141801518016180171801818019180201802118022180231802418025180261802718028180291803018031180321803318034180351803618037180381803918040180411804218043180441804518046180471804818049180501805118052180531805418055180561805718058180591806018061180621806318064180651806618067180681806918070180711807218073180741807518076180771807818079180801808118082180831808418085180861808718088180891809018091180921809318094180951809618097180981809918100181011810218103181041810518106181071810818109181101811118112181131811418115181161811718118181191812018121181221812318124181251812618127181281812918130181311813218133181341813518136181371813818139181401814118142181431814418145181461814718148181491815018151181521815318154181551815618157181581815918160181611816218163181641816518166181671816818169181701817118172181731817418175181761817718178181791818018181181821818318184181851818618187181881818918190181911819218193181941819518196181971819818199182001820118202182031820418205182061820718208182091821018211182121821318214182151821618217182181821918220182211822218223182241822518226182271822818229182301823118232182331823418235182361823718238182391824018241182421824318244182451824618247182481824918250182511825218253182541825518256182571825818259182601826118262182631826418265182661826718268182691827018271182721827318274182751827618277182781827918280182811828218283182841828518286182871828818289182901829118292182931829418295182961829718298182991830018301183021830318304183051830618307183081830918310183111831218313183141831518316183171831818319183201832118322183231832418325183261832718328183291833018331183321833318334183351833618337183381833918340183411834218343183441834518346183471834818349183501835118352183531835418355183561835718358183591836018361183621836318364183651836618367183681836918370183711837218373183741837518376183771837818379183801838118382183831838418385183861838718388183891839018391183921839318394183951839618397183981839918400184011840218403184041840518406184071840818409184101841118412184131841418415184161841718418184191842018421184221842318424184251842618427184281842918430184311843218433184341843518436184371843818439184401844118442184431844418445184461844718448184491845018451184521845318454184551845618457184581845918460184611846218463184641846518466184671846818469184701847118472184731847418475184761847718478184791848018481184821848318484184851848618487184881848918490184911849218493184941849518496184971849818499185001850118502185031850418505185061850718508185091851018511185121851318514185151851618517185181851918520185211852218523185241852518526185271852818529185301853118532185331853418535185361853718538185391854018541185421854318544185451854618547185481854918550185511855218553185541855518556185571855818559185601856118562185631856418565185661856718568185691857018571185721857318574185751857618577185781857918580185811858218583185841858518586185871858818589185901859118592185931859418595185961859718598185991860018601186021860318604186051860618607186081860918610186111861218613186141861518616186171861818619186201862118622186231862418625186261862718628186291863018631186321863318634186351863618637186381863918640186411864218643186441864518646186471864818649186501865118652186531865418655186561865718658186591866018661186621866318664186651866618667186681866918670186711867218673186741867518676186771867818679186801868118682186831868418685186861868718688186891869018691186921869318694186951869618697186981869918700187011870218703187041870518706187071870818709187101871118712187131871418715187161871718718187191872018721187221872318724187251872618727187281872918730187311873218733187341873518736187371873818739187401874118742187431874418745187461874718748187491875018751187521875318754187551875618757187581875918760187611876218763187641876518766187671876818769187701877118772187731877418775187761877718778187791878018781187821878318784187851878618787187881878918790187911879218793187941879518796187971879818799188001880118802188031880418805188061880718808188091881018811188121881318814188151881618817188181881918820188211882218823188241882518826188271882818829188301883118832188331883418835188361883718838188391884018841188421884318844188451884618847188481884918850188511885218853188541885518856188571885818859188601886118862188631886418865188661886718868188691887018871188721887318874188751887618877188781887918880188811888218883188841888518886188871888818889188901889118892188931889418895188961889718898188991890018901189021890318904189051890618907189081890918910189111891218913189141891518916189171891818919189201892118922189231892418925189261892718928189291893018931189321893318934189351893618937189381893918940189411894218943189441894518946189471894818949189501895118952189531895418955189561895718958189591896018961189621896318964189651896618967189681896918970189711897218973189741897518976189771897818979189801898118982189831898418985189861898718988189891899018991189921899318994189951899618997189981899919000190011900219003190041900519006190071900819009190101901119012190131901419015190161901719018190191902019021190221902319024190251902619027190281902919030190311903219033190341903519036190371903819039190401904119042190431904419045190461904719048190491905019051190521905319054190551905619057190581905919060190611906219063190641906519066190671906819069190701907119072190731907419075190761907719078190791908019081190821908319084190851908619087190881908919090190911909219093190941909519096190971909819099191001910119102191031910419105191061910719108191091911019111191121911319114191151911619117191181911919120191211912219123191241912519126191271912819129191301913119132191331913419135191361913719138191391914019141191421914319144191451914619147191481914919150191511915219153191541915519156191571915819159191601916119162191631916419165191661916719168191691917019171191721917319174191751917619177191781917919180191811918219183191841918519186191871918819189191901919119192191931919419195191961919719198191991920019201192021920319204192051920619207192081920919210192111921219213192141921519216192171921819219192201922119222192231922419225192261922719228192291923019231192321923319234192351923619237192381923919240192411924219243192441924519246192471924819249192501925119252192531925419255192561925719258192591926019261192621926319264192651926619267192681926919270192711927219273192741927519276192771927819279192801928119282192831928419285192861928719288192891929019291192921929319294192951929619297192981929919300193011930219303193041930519306193071930819309193101931119312193131931419315193161931719318193191932019321193221932319324193251932619327193281932919330193311933219333193341933519336193371933819339193401934119342193431934419345193461934719348193491935019351193521935319354193551935619357193581935919360193611936219363193641936519366193671936819369193701937119372193731937419375193761937719378193791938019381193821938319384193851938619387193881938919390193911939219393193941939519396193971939819399194001940119402194031940419405194061940719408194091941019411194121941319414194151941619417194181941919420194211942219423194241942519426194271942819429194301943119432194331943419435194361943719438194391944019441194421944319444194451944619447194481944919450194511945219453194541945519456194571945819459194601946119462194631946419465194661946719468194691947019471194721947319474194751947619477194781947919480194811948219483194841948519486194871948819489194901949119492194931949419495194961949719498194991950019501195021950319504195051950619507195081950919510195111951219513195141951519516195171951819519195201952119522195231952419525195261952719528195291953019531195321953319534195351953619537195381953919540195411954219543195441954519546195471954819549195501955119552195531955419555195561955719558195591956019561195621956319564195651956619567195681956919570195711957219573195741957519576195771957819579195801958119582195831958419585195861958719588195891959019591195921959319594195951959619597195981959919600196011960219603196041960519606196071960819609196101961119612196131961419615196161961719618196191962019621196221962319624196251962619627196281962919630196311963219633196341963519636196371963819639196401964119642196431964419645196461964719648196491965019651196521965319654196551965619657196581965919660196611966219663196641966519666196671966819669196701967119672196731967419675196761967719678196791968019681196821968319684196851968619687196881968919690196911969219693196941969519696196971969819699197001970119702197031970419705197061970719708197091971019711197121971319714197151971619717197181971919720197211972219723197241972519726197271972819729197301973119732197331973419735197361973719738197391974019741197421974319744197451974619747197481974919750197511975219753197541975519756197571975819759197601976119762197631976419765197661976719768197691977019771197721977319774197751977619777197781977919780197811978219783197841978519786197871978819789197901979119792197931979419795197961979719798197991980019801198021980319804198051980619807198081980919810198111981219813198141981519816198171981819819198201982119822198231982419825198261982719828198291983019831198321983319834198351983619837198381983919840198411984219843198441984519846198471984819849198501985119852198531985419855198561985719858198591986019861198621986319864198651986619867198681986919870198711987219873198741987519876198771987819879198801988119882198831988419885198861988719888198891989019891198921989319894198951989619897198981989919900199011990219903199041990519906199071990819909199101991119912199131991419915199161991719918199191992019921199221992319924199251992619927199281992919930199311993219933199341993519936199371993819939199401994119942199431994419945199461994719948199491995019951199521995319954199551995619957199581995919960199611996219963199641996519966199671996819969199701997119972199731997419975199761997719978199791998019981199821998319984199851998619987199881998919990199911999219993199941999519996199971999819999200002000120002200032000420005200062000720008200092001020011200122001320014200152001620017200182001920020200212002220023200242002520026200272002820029200302003120032200332003420035200362003720038200392004020041200422004320044200452004620047200482004920050200512005220053200542005520056200572005820059200602006120062200632006420065200662006720068200692007020071200722007320074200752007620077200782007920080200812008220083200842008520086200872008820089200902009120092200932009420095200962009720098200992010020101201022010320104201052010620107201082010920110201112011220113201142011520116201172011820119201202012120122201232012420125201262012720128201292013020131201322013320134201352013620137201382013920140201412014220143201442014520146201472014820149201502015120152201532015420155201562015720158201592016020161201622016320164201652016620167201682016920170201712017220173201742017520176201772017820179201802018120182201832018420185201862018720188201892019020191201922019320194201952019620197201982019920200202012020220203202042020520206202072020820209202102021120212202132021420215202162021720218202192022020221202222022320224202252022620227202282022920230202312023220233202342023520236202372023820239202402024120242202432024420245202462024720248202492025020251202522025320254202552025620257202582025920260202612026220263202642026520266202672026820269202702027120272202732027420275202762027720278202792028020281202822028320284202852028620287202882028920290202912029220293202942029520296202972029820299203002030120302203032030420305203062030720308203092031020311203122031320314203152031620317203182031920320203212032220323203242032520326203272032820329203302033120332203332033420335203362033720338203392034020341203422034320344203452034620347203482034920350203512035220353203542035520356203572035820359203602036120362203632036420365203662036720368203692037020371203722037320374203752037620377203782037920380203812038220383203842038520386203872038820389203902039120392203932039420395203962039720398203992040020401204022040320404204052040620407204082040920410204112041220413204142041520416204172041820419204202042120422204232042420425204262042720428204292043020431204322043320434204352043620437204382043920440204412044220443204442044520446204472044820449204502045120452204532045420455204562045720458204592046020461204622046320464204652046620467204682046920470204712047220473204742047520476204772047820479204802048120482204832048420485204862048720488204892049020491204922049320494204952049620497204982049920500205012050220503205042050520506205072050820509205102051120512205132051420515205162051720518205192052020521205222052320524205252052620527205282052920530205312053220533205342053520536205372053820539205402054120542205432054420545205462054720548205492055020551205522055320554205552055620557205582055920560205612056220563205642056520566205672056820569205702057120572205732057420575205762057720578205792058020581205822058320584205852058620587205882058920590205912059220593205942059520596205972059820599206002060120602206032060420605206062060720608206092061020611206122061320614206152061620617206182061920620206212062220623206242062520626206272062820629206302063120632206332063420635206362063720638206392064020641206422064320644206452064620647206482064920650206512065220653206542065520656206572065820659206602066120662206632066420665206662066720668206692067020671206722067320674206752067620677206782067920680206812068220683206842068520686206872068820689206902069120692206932069420695206962069720698206992070020701207022070320704207052070620707207082070920710207112071220713207142071520716207172071820719207202072120722207232072420725207262072720728207292073020731207322073320734207352073620737207382073920740207412074220743207442074520746207472074820749207502075120752207532075420755207562075720758207592076020761207622076320764207652076620767207682076920770207712077220773207742077520776207772077820779207802078120782207832078420785207862078720788207892079020791207922079320794207952079620797207982079920800208012080220803208042080520806208072080820809208102081120812208132081420815208162081720818208192082020821208222082320824208252082620827208282082920830208312083220833208342083520836208372083820839208402084120842208432084420845208462084720848208492085020851208522085320854208552085620857208582085920860208612086220863208642086520866208672086820869208702087120872208732087420875208762087720878208792088020881208822088320884208852088620887208882088920890208912089220893208942089520896208972089820899209002090120902209032090420905209062090720908209092091020911209122091320914209152091620917209182091920920209212092220923209242092520926209272092820929209302093120932209332093420935209362093720938209392094020941209422094320944209452094620947209482094920950209512095220953209542095520956209572095820959209602096120962209632096420965209662096720968209692097020971209722097320974209752097620977209782097920980209812098220983209842098520986209872098820989209902099120992209932099420995209962099720998209992100021001210022100321004210052100621007210082100921010210112101221013210142101521016210172101821019210202102121022210232102421025210262102721028210292103021031210322103321034210352103621037210382103921040210412104221043210442104521046210472104821049210502105121052210532105421055210562105721058210592106021061210622106321064210652106621067210682106921070210712107221073210742107521076210772107821079210802108121082210832108421085210862108721088210892109021091210922109321094210952109621097210982109921100211012110221103211042110521106211072110821109211102111121112211132111421115211162111721118211192112021121211222112321124211252112621127211282112921130211312113221133211342113521136211372113821139211402114121142211432114421145211462114721148211492115021151211522115321154211552115621157211582115921160211612116221163211642116521166211672116821169211702117121172211732117421175211762117721178211792118021181211822118321184211852118621187211882118921190211912119221193211942119521196211972119821199212002120121202212032120421205212062120721208212092121021211212122121321214212152121621217212182121921220212212122221223212242122521226212272122821229212302123121232212332123421235212362123721238212392124021241212422124321244212452124621247212482124921250212512125221253212542125521256212572125821259212602126121262212632126421265212662126721268212692127021271212722127321274212752127621277212782127921280212812128221283212842128521286212872128821289212902129121292212932129421295212962129721298212992130021301213022130321304213052130621307213082130921310213112131221313213142131521316213172131821319213202132121322213232132421325213262132721328213292133021331213322133321334213352133621337213382133921340213412134221343213442134521346213472134821349213502135121352213532135421355213562135721358213592136021361213622136321364213652136621367213682136921370213712137221373213742137521376213772137821379213802138121382213832138421385213862138721388213892139021391213922139321394213952139621397213982139921400214012140221403214042140521406214072140821409214102141121412214132141421415214162141721418214192142021421214222142321424214252142621427214282142921430214312143221433214342143521436214372143821439214402144121442214432144421445214462144721448214492145021451214522145321454214552145621457214582145921460214612146221463214642146521466214672146821469214702147121472214732147421475214762147721478214792148021481214822148321484214852148621487214882148921490214912149221493214942149521496214972149821499215002150121502215032150421505215062150721508215092151021511215122151321514215152151621517215182151921520215212152221523215242152521526215272152821529215302153121532215332153421535215362153721538215392154021541215422154321544215452154621547215482154921550215512155221553215542155521556215572155821559215602156121562215632156421565215662156721568215692157021571215722157321574215752157621577215782157921580215812158221583215842158521586215872158821589215902159121592215932159421595215962159721598215992160021601216022160321604216052160621607216082160921610216112161221613216142161521616216172161821619216202162121622216232162421625216262162721628216292163021631216322163321634216352163621637216382163921640216412164221643216442164521646216472164821649216502165121652216532165421655216562165721658216592166021661216622166321664216652166621667216682166921670216712167221673216742167521676216772167821679216802168121682216832168421685216862168721688216892169021691216922169321694216952169621697216982169921700217012170221703217042170521706217072170821709217102171121712217132171421715217162171721718217192172021721217222172321724217252172621727217282172921730217312173221733217342173521736217372173821739217402174121742217432174421745217462174721748217492175021751217522175321754217552175621757217582175921760217612176221763217642176521766217672176821769217702177121772217732177421775217762177721778217792178021781217822178321784217852178621787217882178921790217912179221793217942179521796217972179821799218002180121802218032180421805218062180721808218092181021811218122181321814218152181621817218182181921820218212182221823218242182521826218272182821829218302183121832218332183421835218362183721838218392184021841218422184321844218452184621847218482184921850218512185221853218542185521856218572185821859218602186121862218632186421865218662186721868218692187021871218722187321874218752187621877218782187921880218812188221883218842188521886218872188821889218902189121892218932189421895218962189721898218992190021901219022190321904219052190621907219082190921910219112191221913219142191521916219172191821919219202192121922219232192421925219262192721928219292193021931219322193321934219352193621937219382193921940219412194221943219442194521946219472194821949219502195121952219532195421955219562195721958219592196021961219622196321964219652196621967219682196921970219712197221973219742197521976219772197821979219802198121982219832198421985219862198721988219892199021991219922199321994219952199621997219982199922000220012200222003220042200522006220072200822009220102201122012220132201422015220162201722018220192202022021220222202322024220252202622027220282202922030220312203222033220342203522036220372203822039220402204122042220432204422045220462204722048220492205022051220522205322054220552205622057220582205922060220612206222063220642206522066220672206822069220702207122072220732207422075220762207722078220792208022081220822208322084220852208622087220882208922090220912209222093220942209522096220972209822099221002210122102221032210422105221062210722108221092211022111221122211322114221152211622117221182211922120221212212222123221242212522126221272212822129221302213122132221332213422135221362213722138221392214022141221422214322144221452214622147221482214922150221512215222153221542215522156221572215822159221602216122162221632216422165221662216722168221692217022171221722217322174221752217622177221782217922180221812218222183221842218522186221872218822189221902219122192221932219422195221962219722198221992220022201222022220322204222052220622207222082220922210222112221222213222142221522216222172221822219222202222122222222232222422225222262222722228222292223022231222322223322234222352223622237222382223922240222412224222243222442224522246222472224822249222502225122252222532225422255222562225722258222592226022261222622226322264222652226622267222682226922270222712227222273222742227522276222772227822279222802228122282222832228422285222862228722288222892229022291222922229322294222952229622297222982229922300223012230222303223042230522306223072230822309223102231122312223132231422315223162231722318223192232022321223222232322324223252232622327223282232922330223312233222333223342233522336223372233822339223402234122342223432234422345223462234722348223492235022351223522235322354223552235622357223582235922360223612236222363223642236522366223672236822369223702237122372223732237422375223762237722378223792238022381223822238322384223852238622387223882238922390223912239222393223942239522396223972239822399224002240122402224032240422405224062240722408224092241022411224122241322414224152241622417224182241922420224212242222423224242242522426224272242822429224302243122432224332243422435224362243722438224392244022441224422244322444224452244622447224482244922450224512245222453224542245522456224572245822459224602246122462224632246422465224662246722468224692247022471224722247322474224752247622477224782247922480224812248222483224842248522486224872248822489224902249122492224932249422495224962249722498224992250022501225022250322504225052250622507225082250922510225112251222513225142251522516225172251822519225202252122522225232252422525225262252722528225292253022531225322253322534225352253622537225382253922540225412254222543225442254522546225472254822549225502255122552225532255422555225562255722558225592256022561225622256322564225652256622567225682256922570225712257222573225742257522576225772257822579225802258122582225832258422585225862258722588225892259022591225922259322594225952259622597225982259922600226012260222603226042260522606226072260822609226102261122612226132261422615226162261722618226192262022621226222262322624226252262622627226282262922630226312263222633226342263522636226372263822639226402264122642226432264422645226462264722648226492265022651226522265322654226552265622657226582265922660226612266222663226642266522666226672266822669226702267122672226732267422675226762267722678226792268022681226822268322684226852268622687226882268922690226912269222693226942269522696226972269822699227002270122702227032270422705227062270722708227092271022711227122271322714227152271622717227182271922720227212272222723227242272522726227272272822729227302273122732227332273422735227362273722738227392274022741227422274322744227452274622747227482274922750227512275222753227542275522756227572275822759227602276122762227632276422765227662276722768227692277022771227722277322774227752277622777227782277922780227812278222783227842278522786227872278822789227902279122792227932279422795227962279722798227992280022801228022280322804228052280622807228082280922810228112281222813228142281522816228172281822819228202282122822228232282422825228262282722828228292283022831228322283322834228352283622837228382283922840228412284222843228442284522846228472284822849228502285122852228532285422855228562285722858228592286022861228622286322864228652286622867228682286922870228712287222873228742287522876228772287822879228802288122882228832288422885228862288722888228892289022891228922289322894228952289622897228982289922900229012290222903229042290522906229072290822909229102291122912229132291422915229162291722918229192292022921229222292322924229252292622927229282292922930229312293222933229342293522936229372293822939229402294122942229432294422945229462294722948229492295022951229522295322954229552295622957229582295922960229612296222963229642296522966229672296822969229702297122972229732297422975229762297722978229792298022981229822298322984229852298622987229882298922990229912299222993229942299522996229972299822999230002300123002230032300423005230062300723008230092301023011230122301323014230152301623017230182301923020230212302223023230242302523026230272302823029230302303123032230332303423035230362303723038230392304023041230422304323044230452304623047230482304923050230512305223053230542305523056230572305823059230602306123062230632306423065230662306723068230692307023071230722307323074230752307623077230782307923080230812308223083230842308523086230872308823089230902309123092230932309423095230962309723098230992310023101231022310323104231052310623107231082310923110231112311223113231142311523116231172311823119231202312123122231232312423125231262312723128231292313023131231322313323134231352313623137231382313923140231412314223143231442314523146231472314823149231502315123152231532315423155231562315723158231592316023161231622316323164231652316623167231682316923170231712317223173231742317523176231772317823179231802318123182231832318423185231862318723188231892319023191231922319323194231952319623197231982319923200232012320223203232042320523206232072320823209232102321123212232132321423215232162321723218232192322023221232222322323224232252322623227232282322923230232312323223233232342323523236232372323823239232402324123242232432324423245232462324723248232492325023251232522325323254232552325623257232582325923260232612326223263232642326523266232672326823269232702327123272232732327423275232762327723278232792328023281232822328323284232852328623287232882328923290232912329223293232942329523296232972329823299233002330123302233032330423305233062330723308233092331023311233122331323314233152331623317233182331923320233212332223323233242332523326233272332823329233302333123332233332333423335233362333723338233392334023341233422334323344233452334623347233482334923350233512335223353233542335523356233572335823359233602336123362233632336423365233662336723368233692337023371233722337323374233752337623377233782337923380233812338223383233842338523386233872338823389233902339123392233932339423395233962339723398233992340023401234022340323404234052340623407234082340923410234112341223413234142341523416234172341823419234202342123422234232342423425234262342723428234292343023431234322343323434234352343623437234382343923440234412344223443234442344523446234472344823449234502345123452234532345423455234562345723458234592346023461234622346323464234652346623467234682346923470234712347223473234742347523476234772347823479234802348123482234832348423485234862348723488234892349023491234922349323494234952349623497234982349923500235012350223503235042350523506235072350823509235102351123512235132351423515235162351723518235192352023521235222352323524235252352623527235282352923530235312353223533235342353523536235372353823539235402354123542235432354423545235462354723548235492355023551235522355323554235552355623557235582355923560235612356223563235642356523566235672356823569235702357123572235732357423575235762357723578235792358023581235822358323584235852358623587235882358923590235912359223593235942359523596235972359823599236002360123602236032360423605236062360723608236092361023611236122361323614236152361623617236182361923620236212362223623236242362523626236272362823629236302363123632236332363423635236362363723638236392364023641236422364323644236452364623647236482364923650236512365223653236542365523656236572365823659236602366123662236632366423665236662366723668236692367023671236722367323674236752367623677236782367923680236812368223683236842368523686236872368823689236902369123692236932369423695236962369723698236992370023701237022370323704237052370623707237082370923710237112371223713237142371523716237172371823719237202372123722237232372423725237262372723728237292373023731237322373323734237352373623737237382373923740237412374223743237442374523746237472374823749237502375123752237532375423755237562375723758237592376023761237622376323764237652376623767237682376923770237712377223773237742377523776237772377823779237802378123782237832378423785237862378723788237892379023791237922379323794237952379623797237982379923800238012380223803238042380523806238072380823809238102381123812238132381423815238162381723818238192382023821238222382323824238252382623827238282382923830238312383223833238342383523836238372383823839238402384123842238432384423845238462384723848238492385023851238522385323854238552385623857238582385923860238612386223863238642386523866238672386823869238702387123872238732387423875238762387723878238792388023881238822388323884238852388623887238882388923890238912389223893238942389523896238972389823899239002390123902239032390423905239062390723908239092391023911239122391323914239152391623917239182391923920239212392223923239242392523926239272392823929239302393123932239332393423935239362393723938239392394023941239422394323944239452394623947239482394923950239512395223953239542395523956239572395823959239602396123962239632396423965239662396723968239692397023971239722397323974239752397623977239782397923980239812398223983239842398523986239872398823989239902399123992239932399423995239962399723998239992400024001240022400324004240052400624007240082400924010240112401224013240142401524016240172401824019240202402124022240232402424025240262402724028240292403024031240322403324034240352403624037240382403924040240412404224043240442404524046240472404824049240502405124052240532405424055240562405724058240592406024061240622406324064240652406624067240682406924070240712407224073240742407524076240772407824079240802408124082240832408424085240862408724088240892409024091240922409324094240952409624097240982409924100241012410224103241042410524106241072410824109241102411124112241132411424115241162411724118241192412024121241222412324124241252412624127241282412924130241312413224133241342413524136241372413824139241402414124142241432414424145241462414724148241492415024151241522415324154241552415624157241582415924160241612416224163241642416524166241672416824169241702417124172241732417424175241762417724178241792418024181241822418324184241852418624187241882418924190241912419224193241942419524196241972419824199242002420124202242032420424205242062420724208242092421024211242122421324214242152421624217242182421924220242212422224223242242422524226242272422824229242302423124232242332423424235242362423724238242392424024241242422424324244242452424624247242482424924250242512425224253242542425524256242572425824259242602426124262242632426424265242662426724268242692427024271242722427324274242752427624277242782427924280242812428224283242842428524286242872428824289242902429124292242932429424295242962429724298242992430024301243022430324304243052430624307243082430924310243112431224313243142431524316243172431824319243202432124322243232432424325243262432724328243292433024331243322433324334243352433624337243382433924340243412434224343243442434524346243472434824349243502435124352243532435424355243562435724358243592436024361243622436324364243652436624367243682436924370243712437224373243742437524376243772437824379243802438124382243832438424385243862438724388243892439024391243922439324394243952439624397243982439924400244012440224403244042440524406244072440824409244102441124412244132441424415244162441724418244192442024421244222442324424244252442624427244282442924430244312443224433244342443524436244372443824439244402444124442244432444424445244462444724448244492445024451244522445324454244552445624457244582445924460244612446224463244642446524466244672446824469244702447124472244732447424475244762447724478244792448024481244822448324484244852448624487244882448924490244912449224493244942449524496244972449824499245002450124502245032450424505245062450724508245092451024511245122451324514245152451624517245182451924520245212452224523245242452524526245272452824529245302453124532245332453424535245362453724538245392454024541245422454324544245452454624547245482454924550245512455224553245542455524556245572455824559245602456124562245632456424565245662456724568245692457024571245722457324574245752457624577245782457924580245812458224583245842458524586245872458824589245902459124592245932459424595245962459724598245992460024601246022460324604246052460624607246082460924610246112461224613246142461524616246172461824619246202462124622246232462424625246262462724628246292463024631246322463324634246352463624637246382463924640246412464224643246442464524646246472464824649246502465124652246532465424655246562465724658246592466024661246622466324664246652466624667246682466924670246712467224673246742467524676246772467824679246802468124682246832468424685246862468724688246892469024691246922469324694246952469624697246982469924700247012470224703247042470524706247072470824709247102471124712247132471424715247162471724718247192472024721247222472324724247252472624727247282472924730247312473224733247342473524736247372473824739247402474124742247432474424745247462474724748247492475024751247522475324754247552475624757247582475924760247612476224763247642476524766247672476824769247702477124772247732477424775247762477724778247792478024781247822478324784247852478624787247882478924790247912479224793247942479524796247972479824799248002480124802248032480424805248062480724808248092481024811248122481324814248152481624817248182481924820248212482224823248242482524826248272482824829248302483124832248332483424835248362483724838248392484024841248422484324844248452484624847248482484924850248512485224853248542485524856248572485824859248602486124862248632486424865248662486724868248692487024871248722487324874248752487624877248782487924880248812488224883248842488524886248872488824889248902489124892248932489424895248962489724898248992490024901249022490324904249052490624907249082490924910249112491224913249142491524916249172491824919249202492124922249232492424925249262492724928249292493024931249322493324934249352493624937249382493924940249412494224943249442494524946249472494824949249502495124952249532495424955249562495724958249592496024961249622496324964249652496624967249682496924970249712497224973249742497524976249772497824979249802498124982249832498424985249862498724988249892499024991249922499324994249952499624997249982499925000250012500225003250042500525006250072500825009250102501125012250132501425015250162501725018250192502025021250222502325024250252502625027250282502925030250312503225033250342503525036250372503825039250402504125042250432504425045250462504725048250492505025051250522505325054250552505625057250582505925060250612506225063250642506525066250672506825069250702507125072250732507425075250762507725078250792508025081250822508325084250852508625087250882508925090250912509225093250942509525096250972509825099251002510125102251032510425105251062510725108251092511025111251122511325114251152511625117251182511925120251212512225123251242512525126251272512825129251302513125132251332513425135251362513725138251392514025141251422514325144251452514625147251482514925150251512515225153251542515525156251572515825159251602516125162251632516425165251662516725168251692517025171251722517325174251752517625177251782517925180251812518225183251842518525186251872518825189251902519125192251932519425195251962519725198251992520025201252022520325204252052520625207252082520925210252112521225213252142521525216252172521825219252202522125222252232522425225252262522725228252292523025231252322523325234252352523625237252382523925240252412524225243252442524525246252472524825249252502525125252252532525425255252562525725258252592526025261252622526325264252652526625267252682526925270252712527225273252742527525276252772527825279252802528125282252832528425285252862528725288252892529025291252922529325294252952529625297252982529925300253012530225303253042530525306253072530825309253102531125312253132531425315253162531725318253192532025321253222532325324253252532625327253282532925330253312533225333253342533525336253372533825339253402534125342253432534425345253462534725348253492535025351253522535325354253552535625357253582535925360253612536225363253642536525366253672536825369253702537125372253732537425375253762537725378253792538025381253822538325384253852538625387253882538925390253912539225393253942539525396253972539825399254002540125402254032540425405254062540725408254092541025411254122541325414254152541625417254182541925420254212542225423254242542525426254272542825429254302543125432254332543425435254362543725438254392544025441254422544325444254452544625447254482544925450254512545225453254542545525456254572545825459254602546125462254632546425465254662546725468254692547025471254722547325474254752547625477254782547925480254812548225483254842548525486254872548825489254902549125492254932549425495254962549725498254992550025501255022550325504255052550625507255082550925510255112551225513255142551525516255172551825519255202552125522255232552425525255262552725528255292553025531255322553325534255352553625537255382553925540255412554225543255442554525546255472554825549255502555125552255532555425555255562555725558255592556025561255622556325564255652556625567255682556925570255712557225573255742557525576255772557825579255802558125582255832558425585255862558725588255892559025591255922559325594255952559625597255982559925600256012560225603256042560525606256072560825609256102561125612256132561425615256162561725618256192562025621256222562325624256252562625627256282562925630256312563225633256342563525636256372563825639256402564125642256432564425645256462564725648256492565025651256522565325654256552565625657256582565925660256612566225663256642566525666256672566825669256702567125672256732567425675256762567725678256792568025681256822568325684256852568625687256882568925690256912569225693256942569525696256972569825699257002570125702257032570425705257062570725708257092571025711257122571325714257152571625717257182571925720257212572225723257242572525726257272572825729257302573125732257332573425735257362573725738257392574025741257422574325744257452574625747257482574925750257512575225753257542575525756257572575825759257602576125762257632576425765257662576725768257692577025771257722577325774257752577625777257782577925780257812578225783257842578525786257872578825789257902579125792257932579425795257962579725798257992580025801258022580325804258052580625807258082580925810258112581225813258142581525816258172581825819258202582125822258232582425825258262582725828258292583025831258322583325834258352583625837258382583925840258412584225843258442584525846258472584825849258502585125852258532585425855258562585725858258592586025861258622586325864258652586625867258682586925870258712587225873258742587525876258772587825879258802588125882258832588425885258862588725888258892589025891258922589325894258952589625897258982589925900259012590225903259042590525906259072590825909259102591125912259132591425915259162591725918259192592025921259222592325924259252592625927259282592925930259312593225933259342593525936259372593825939259402594125942259432594425945259462594725948259492595025951259522595325954259552595625957259582595925960259612596225963259642596525966259672596825969259702597125972259732597425975259762597725978259792598025981259822598325984259852598625987259882598925990259912599225993259942599525996259972599825999260002600126002260032600426005260062600726008260092601026011260122601326014260152601626017260182601926020260212602226023260242602526026260272602826029260302603126032260332603426035260362603726038260392604026041260422604326044260452604626047260482604926050260512605226053260542605526056260572605826059260602606126062260632606426065260662606726068260692607026071260722607326074260752607626077260782607926080260812608226083260842608526086260872608826089260902609126092260932609426095260962609726098260992610026101261022610326104261052610626107261082610926110261112611226113261142611526116261172611826119261202612126122261232612426125261262612726128261292613026131261322613326134261352613626137261382613926140261412614226143261442614526146261472614826149261502615126152261532615426155261562615726158261592616026161261622616326164261652616626167261682616926170261712617226173261742617526176261772617826179261802618126182261832618426185261862618726188261892619026191261922619326194261952619626197261982619926200262012620226203262042620526206262072620826209262102621126212262132621426215262162621726218262192622026221262222622326224262252622626227262282622926230262312623226233262342623526236262372623826239262402624126242262432624426245262462624726248262492625026251262522625326254262552625626257262582625926260262612626226263262642626526266262672626826269262702627126272262732627426275262762627726278262792628026281262822628326284262852628626287262882628926290262912629226293262942629526296262972629826299263002630126302263032630426305263062630726308263092631026311263122631326314263152631626317263182631926320263212632226323263242632526326263272632826329263302633126332263332633426335263362633726338263392634026341263422634326344263452634626347263482634926350263512635226353263542635526356263572635826359263602636126362263632636426365263662636726368263692637026371263722637326374263752637626377263782637926380263812638226383263842638526386263872638826389263902639126392263932639426395263962639726398263992640026401264022640326404264052640626407264082640926410264112641226413264142641526416264172641826419264202642126422264232642426425264262642726428264292643026431264322643326434264352643626437264382643926440264412644226443264442644526446264472644826449264502645126452264532645426455264562645726458264592646026461264622646326464264652646626467264682646926470264712647226473264742647526476264772647826479264802648126482264832648426485264862648726488264892649026491264922649326494264952649626497264982649926500265012650226503265042650526506265072650826509265102651126512265132651426515265162651726518265192652026521265222652326524265252652626527265282652926530265312653226533265342653526536265372653826539265402654126542265432654426545265462654726548265492655026551265522655326554265552655626557265582655926560265612656226563265642656526566265672656826569265702657126572265732657426575265762657726578265792658026581265822658326584265852658626587265882658926590265912659226593265942659526596265972659826599266002660126602266032660426605266062660726608266092661026611266122661326614266152661626617266182661926620266212662226623266242662526626266272662826629266302663126632266332663426635266362663726638266392664026641266422664326644266452664626647266482664926650266512665226653266542665526656266572665826659266602666126662266632666426665266662666726668266692667026671266722667326674266752667626677266782667926680266812668226683266842668526686266872668826689266902669126692266932669426695266962669726698266992670026701267022670326704267052670626707267082670926710267112671226713267142671526716267172671826719267202672126722267232672426725267262672726728267292673026731267322673326734267352673626737267382673926740267412674226743267442674526746267472674826749267502675126752267532675426755267562675726758267592676026761267622676326764267652676626767267682676926770267712677226773267742677526776267772677826779267802678126782267832678426785267862678726788267892679026791267922679326794267952679626797267982679926800268012680226803268042680526806268072680826809268102681126812268132681426815268162681726818268192682026821268222682326824268252682626827268282682926830268312683226833268342683526836268372683826839268402684126842268432684426845268462684726848268492685026851268522685326854268552685626857268582685926860268612686226863268642686526866268672686826869268702687126872268732687426875268762687726878268792688026881268822688326884268852688626887268882688926890268912689226893268942689526896268972689826899269002690126902269032690426905269062690726908269092691026911269122691326914269152691626917269182691926920269212692226923269242692526926269272692826929269302693126932269332693426935269362693726938269392694026941269422694326944269452694626947269482694926950269512695226953269542695526956269572695826959269602696126962269632696426965269662696726968269692697026971269722697326974269752697626977269782697926980269812698226983269842698526986269872698826989269902699126992269932699426995269962699726998269992700027001270022700327004270052700627007270082700927010270112701227013270142701527016270172701827019270202702127022270232702427025270262702727028270292703027031270322703327034270352703627037270382703927040270412704227043270442704527046270472704827049270502705127052270532705427055270562705727058270592706027061270622706327064270652706627067270682706927070270712707227073270742707527076270772707827079270802708127082270832708427085270862708727088270892709027091270922709327094270952709627097270982709927100271012710227103271042710527106271072710827109271102711127112271132711427115271162711727118271192712027121271222712327124271252712627127271282712927130271312713227133271342713527136271372713827139271402714127142271432714427145271462714727148271492715027151271522715327154271552715627157271582715927160271612716227163271642716527166271672716827169271702717127172271732717427175271762717727178271792718027181271822718327184271852718627187271882718927190271912719227193271942719527196271972719827199272002720127202272032720427205272062720727208272092721027211272122721327214272152721627217272182721927220272212722227223272242722527226272272722827229272302723127232272332723427235272362723727238272392724027241272422724327244272452724627247272482724927250272512725227253272542725527256272572725827259272602726127262272632726427265272662726727268272692727027271272722727327274272752727627277272782727927280272812728227283272842728527286272872728827289272902729127292272932729427295272962729727298272992730027301273022730327304273052730627307273082730927310273112731227313273142731527316273172731827319273202732127322273232732427325273262732727328273292733027331273322733327334273352733627337273382733927340273412734227343273442734527346273472734827349273502735127352273532735427355273562735727358273592736027361273622736327364273652736627367273682736927370273712737227373273742737527376273772737827379273802738127382273832738427385273862738727388273892739027391273922739327394273952739627397273982739927400274012740227403274042740527406274072740827409274102741127412274132741427415274162741727418274192742027421274222742327424274252742627427274282742927430274312743227433274342743527436274372743827439274402744127442274432744427445274462744727448274492745027451274522745327454274552745627457274582745927460274612746227463274642746527466274672746827469274702747127472274732747427475274762747727478274792748027481274822748327484274852748627487274882748927490274912749227493274942749527496274972749827499275002750127502275032750427505275062750727508275092751027511275122751327514275152751627517275182751927520275212752227523275242752527526275272752827529275302753127532275332753427535275362753727538275392754027541275422754327544275452754627547275482754927550275512755227553275542755527556275572755827559275602756127562275632756427565275662756727568275692757027571275722757327574275752757627577275782757927580275812758227583275842758527586275872758827589275902759127592275932759427595275962759727598275992760027601276022760327604276052760627607276082760927610276112761227613276142761527616276172761827619276202762127622276232762427625276262762727628276292763027631276322763327634276352763627637276382763927640276412764227643276442764527646276472764827649276502765127652276532765427655276562765727658276592766027661276622766327664276652766627667276682766927670276712767227673276742767527676276772767827679276802768127682276832768427685276862768727688276892769027691276922769327694276952769627697276982769927700277012770227703277042770527706277072770827709277102771127712277132771427715277162771727718277192772027721277222772327724277252772627727277282772927730277312773227733277342773527736277372773827739277402774127742277432774427745277462774727748277492775027751277522775327754277552775627757277582775927760277612776227763277642776527766277672776827769277702777127772277732777427775277762777727778277792778027781277822778327784277852778627787277882778927790277912779227793277942779527796277972779827799278002780127802278032780427805278062780727808278092781027811278122781327814278152781627817278182781927820278212782227823278242782527826278272782827829278302783127832278332783427835278362783727838278392784027841278422784327844278452784627847278482784927850278512785227853278542785527856278572785827859278602786127862278632786427865278662786727868278692787027871278722787327874278752787627877278782787927880278812788227883278842788527886278872788827889278902789127892278932789427895278962789727898278992790027901279022790327904279052790627907279082790927910279112791227913279142791527916279172791827919279202792127922279232792427925279262792727928279292793027931279322793327934279352793627937279382793927940279412794227943279442794527946279472794827949279502795127952279532795427955279562795727958279592796027961279622796327964279652796627967279682796927970279712797227973279742797527976279772797827979279802798127982279832798427985279862798727988279892799027991279922799327994279952799627997279982799928000280012800228003280042800528006280072800828009280102801128012280132801428015280162801728018280192802028021280222802328024280252802628027280282802928030280312803228033280342803528036280372803828039280402804128042280432804428045280462804728048280492805028051280522805328054280552805628057280582805928060280612806228063280642806528066280672806828069280702807128072280732807428075280762807728078280792808028081280822808328084280852808628087280882808928090280912809228093280942809528096280972809828099281002810128102281032810428105281062810728108281092811028111281122811328114281152811628117281182811928120281212812228123281242812528126281272812828129281302813128132281332813428135281362813728138281392814028141281422814328144281452814628147281482814928150281512815228153281542815528156281572815828159281602816128162281632816428165281662816728168281692817028171281722817328174281752817628177281782817928180281812818228183281842818528186281872818828189281902819128192281932819428195281962819728198281992820028201282022820328204282052820628207282082820928210282112821228213282142821528216282172821828219282202822128222282232822428225282262822728228282292823028231282322823328234282352823628237282382823928240282412824228243282442824528246282472824828249282502825128252282532825428255282562825728258282592826028261282622826328264282652826628267282682826928270282712827228273282742827528276282772827828279282802828128282282832828428285282862828728288282892829028291282922829328294282952829628297282982829928300283012830228303283042830528306283072830828309283102831128312283132831428315283162831728318283192832028321283222832328324283252832628327283282832928330283312833228333283342833528336283372833828339283402834128342283432834428345283462834728348283492835028351283522835328354283552835628357283582835928360283612836228363283642836528366283672836828369283702837128372283732837428375283762837728378283792838028381283822838328384283852838628387283882838928390283912839228393283942839528396283972839828399284002840128402284032840428405284062840728408284092841028411284122841328414284152841628417284182841928420284212842228423284242842528426284272842828429284302843128432284332843428435284362843728438284392844028441284422844328444284452844628447284482844928450284512845228453284542845528456284572845828459284602846128462284632846428465284662846728468284692847028471284722847328474284752847628477284782847928480284812848228483284842848528486284872848828489284902849128492284932849428495284962849728498284992850028501285022850328504285052850628507285082850928510285112851228513285142851528516285172851828519285202852128522285232852428525285262852728528285292853028531285322853328534285352853628537285382853928540285412854228543285442854528546285472854828549285502855128552285532855428555285562855728558285592856028561285622856328564285652856628567285682856928570285712857228573285742857528576285772857828579285802858128582285832858428585285862858728588285892859028591285922859328594285952859628597285982859928600286012860228603286042860528606286072860828609286102861128612286132861428615286162861728618286192862028621286222862328624286252862628627286282862928630286312863228633286342863528636286372863828639286402864128642286432864428645286462864728648286492865028651286522865328654286552865628657286582865928660286612866228663286642866528666286672866828669286702867128672286732867428675286762867728678286792868028681286822868328684286852868628687286882868928690286912869228693286942869528696286972869828699287002870128702287032870428705287062870728708287092871028711287122871328714287152871628717287182871928720287212872228723287242872528726287272872828729287302873128732287332873428735287362873728738287392874028741287422874328744287452874628747287482874928750287512875228753287542875528756287572875828759287602876128762287632876428765287662876728768287692877028771287722877328774287752877628777287782877928780287812878228783287842878528786287872878828789287902879128792287932879428795287962879728798287992880028801288022880328804288052880628807288082880928810288112881228813288142881528816288172881828819288202882128822288232882428825288262882728828288292883028831288322883328834288352883628837288382883928840288412884228843288442884528846288472884828849288502885128852288532885428855288562885728858288592886028861288622886328864288652886628867288682886928870288712887228873288742887528876288772887828879288802888128882288832888428885288862888728888288892889028891288922889328894288952889628897288982889928900289012890228903289042890528906289072890828909289102891128912289132891428915289162891728918289192892028921289222892328924289252892628927289282892928930289312893228933289342893528936289372893828939289402894128942289432894428945289462894728948289492895028951289522895328954289552895628957289582895928960289612896228963289642896528966289672896828969289702897128972289732897428975289762897728978289792898028981289822898328984289852898628987289882898928990289912899228993289942899528996289972899828999290002900129002290032900429005290062900729008290092901029011290122901329014290152901629017290182901929020290212902229023290242902529026290272902829029290302903129032290332903429035290362903729038290392904029041290422904329044290452904629047290482904929050290512905229053290542905529056290572905829059290602906129062290632906429065290662906729068290692907029071290722907329074290752907629077290782907929080290812908229083290842908529086290872908829089290902909129092290932909429095290962909729098290992910029101291022910329104291052910629107291082910929110291112911229113291142911529116291172911829119291202912129122291232912429125291262912729128291292913029131291322913329134291352913629137291382913929140291412914229143291442914529146291472914829149291502915129152291532915429155291562915729158291592916029161291622916329164291652916629167291682916929170291712917229173291742917529176291772917829179291802918129182291832918429185291862918729188291892919029191291922919329194291952919629197291982919929200292012920229203292042920529206292072920829209292102921129212292132921429215292162921729218292192922029221292222922329224292252922629227292282922929230292312923229233292342923529236292372923829239292402924129242292432924429245292462924729248292492925029251292522925329254292552925629257292582925929260292612926229263292642926529266292672926829269292702927129272292732927429275292762927729278292792928029281292822928329284292852928629287292882928929290292912929229293292942929529296292972929829299293002930129302293032930429305293062930729308293092931029311293122931329314293152931629317293182931929320293212932229323293242932529326293272932829329293302933129332293332933429335293362933729338293392934029341293422934329344293452934629347293482934929350293512935229353293542935529356293572935829359293602936129362293632936429365293662936729368293692937029371293722937329374293752937629377293782937929380293812938229383293842938529386293872938829389293902939129392293932939429395293962939729398293992940029401294022940329404294052940629407294082940929410294112941229413294142941529416294172941829419294202942129422294232942429425294262942729428294292943029431294322943329434294352943629437294382943929440294412944229443294442944529446294472944829449294502945129452294532945429455294562945729458294592946029461294622946329464294652946629467294682946929470294712947229473294742947529476294772947829479294802948129482294832948429485294862948729488294892949029491294922949329494294952949629497294982949929500295012950229503295042950529506295072950829509295102951129512295132951429515295162951729518295192952029521295222952329524295252952629527295282952929530295312953229533295342953529536295372953829539295402954129542295432954429545295462954729548295492955029551295522955329554295552955629557295582955929560295612956229563295642956529566295672956829569295702957129572295732957429575295762957729578295792958029581295822958329584295852958629587295882958929590295912959229593295942959529596295972959829599296002960129602296032960429605296062960729608296092961029611296122961329614296152961629617296182961929620296212962229623296242962529626296272962829629296302963129632296332963429635296362963729638296392964029641296422964329644296452964629647296482964929650296512965229653296542965529656296572965829659296602966129662296632966429665296662966729668296692967029671296722967329674296752967629677296782967929680296812968229683296842968529686296872968829689296902969129692296932969429695296962969729698296992970029701297022970329704297052970629707297082970929710297112971229713297142971529716297172971829719297202972129722297232972429725297262972729728297292973029731297322973329734297352973629737297382973929740297412974229743297442974529746297472974829749297502975129752297532975429755297562975729758297592976029761297622976329764297652976629767297682976929770297712977229773297742977529776297772977829779297802978129782297832978429785297862978729788297892979029791297922979329794297952979629797297982979929800298012980229803298042980529806298072980829809298102981129812298132981429815298162981729818298192982029821298222982329824298252982629827298282982929830298312983229833298342983529836298372983829839298402984129842298432984429845298462984729848298492985029851298522985329854298552985629857298582985929860298612986229863298642986529866298672986829869298702987129872298732987429875298762987729878298792988029881298822988329884298852988629887298882988929890298912989229893298942989529896298972989829899299002990129902299032990429905299062990729908299092991029911299122991329914299152991629917299182991929920299212992229923299242992529926299272992829929299302993129932299332993429935299362993729938299392994029941299422994329944299452994629947299482994929950299512995229953299542995529956299572995829959299602996129962299632996429965299662996729968299692997029971299722997329974299752997629977299782997929980299812998229983299842998529986299872998829989299902999129992299932999429995299962999729998299993000030001300023000330004300053000630007300083000930010300113001230013300143001530016300173001830019300203002130022300233002430025300263002730028300293003030031300323003330034300353003630037300383003930040300413004230043300443004530046300473004830049300503005130052300533005430055300563005730058300593006030061300623006330064300653006630067300683006930070300713007230073300743007530076300773007830079300803008130082300833008430085300863008730088300893009030091300923009330094300953009630097300983009930100301013010230103301043010530106301073010830109301103011130112301133011430115301163011730118301193012030121301223012330124301253012630127301283012930130301313013230133301343013530136301373013830139301403014130142301433014430145301463014730148301493015030151301523015330154301553015630157301583015930160301613016230163301643016530166301673016830169301703017130172301733017430175301763017730178301793018030181301823018330184301853018630187301883018930190301913019230193301943019530196301973019830199302003020130202302033020430205302063020730208302093021030211302123021330214302153021630217302183021930220302213022230223302243022530226302273022830229302303023130232302333023430235302363023730238302393024030241302423024330244302453024630247302483024930250302513025230253302543025530256302573025830259302603026130262302633026430265302663026730268302693027030271302723027330274302753027630277302783027930280302813028230283302843028530286302873028830289302903029130292302933029430295302963029730298302993030030301303023030330304303053030630307303083030930310303113031230313303143031530316303173031830319303203032130322303233032430325303263032730328303293033030331303323033330334303353033630337303383033930340303413034230343303443034530346303473034830349303503035130352303533035430355303563035730358303593036030361303623036330364303653036630367303683036930370303713037230373303743037530376303773037830379303803038130382303833038430385303863038730388303893039030391303923039330394303953039630397303983039930400304013040230403304043040530406304073040830409304103041130412304133041430415304163041730418304193042030421304223042330424304253042630427304283042930430304313043230433304343043530436304373043830439304403044130442304433044430445304463044730448304493045030451304523045330454304553045630457304583045930460304613046230463304643046530466304673046830469304703047130472304733047430475304763047730478304793048030481304823048330484304853048630487304883048930490304913049230493304943049530496304973049830499305003050130502305033050430505305063050730508305093051030511305123051330514305153051630517305183051930520305213052230523305243052530526305273052830529305303053130532305333053430535305363053730538305393054030541305423054330544305453054630547305483054930550305513055230553305543055530556305573055830559305603056130562305633056430565305663056730568305693057030571305723057330574305753057630577305783057930580305813058230583305843058530586305873058830589305903059130592305933059430595305963059730598305993060030601306023060330604306053060630607306083060930610306113061230613306143061530616306173061830619306203062130622306233062430625306263062730628306293063030631306323063330634306353063630637306383063930640306413064230643306443064530646306473064830649306503065130652306533065430655306563065730658306593066030661306623066330664306653066630667306683066930670306713067230673306743067530676306773067830679306803068130682306833068430685306863068730688306893069030691306923069330694306953069630697306983069930700307013070230703307043070530706307073070830709307103071130712307133071430715307163071730718307193072030721307223072330724307253072630727307283072930730307313073230733307343073530736307373073830739307403074130742307433074430745307463074730748307493075030751307523075330754307553075630757307583075930760307613076230763307643076530766307673076830769307703077130772307733077430775307763077730778307793078030781307823078330784307853078630787307883078930790307913079230793307943079530796307973079830799308003080130802308033080430805308063080730808308093081030811308123081330814308153081630817308183081930820308213082230823308243082530826308273082830829308303083130832308333083430835308363083730838308393084030841308423084330844308453084630847308483084930850308513085230853308543085530856308573085830859308603086130862308633086430865308663086730868308693087030871308723087330874308753087630877308783087930880308813088230883308843088530886308873088830889308903089130892308933089430895308963089730898308993090030901309023090330904309053090630907309083090930910309113091230913309143091530916309173091830919309203092130922309233092430925309263092730928309293093030931309323093330934309353093630937309383093930940309413094230943309443094530946309473094830949309503095130952309533095430955309563095730958309593096030961309623096330964309653096630967309683096930970309713097230973309743097530976309773097830979309803098130982309833098430985309863098730988309893099030991309923099330994309953099630997309983099931000310013100231003310043100531006310073100831009310103101131012310133101431015310163101731018310193102031021310223102331024310253102631027310283102931030310313103231033310343103531036310373103831039310403104131042310433104431045310463104731048310493105031051310523105331054310553105631057310583105931060310613106231063310643106531066310673106831069310703107131072310733107431075310763107731078310793108031081310823108331084310853108631087310883108931090310913109231093310943109531096310973109831099311003110131102311033110431105311063110731108311093111031111311123111331114311153111631117311183111931120311213112231123311243112531126311273112831129311303113131132311333113431135311363113731138311393114031141311423114331144311453114631147311483114931150311513115231153311543115531156311573115831159311603116131162311633116431165311663116731168311693117031171311723117331174311753117631177311783117931180311813118231183311843118531186311873118831189311903119131192311933119431195311963119731198311993120031201312023120331204312053120631207312083120931210312113121231213312143121531216312173121831219312203122131222312233122431225312263122731228312293123031231312323123331234312353123631237312383123931240312413124231243312443124531246312473124831249312503125131252312533125431255312563125731258312593126031261312623126331264312653126631267312683126931270312713127231273312743127531276312773127831279312803128131282312833128431285312863128731288312893129031291312923129331294312953129631297312983129931300313013130231303313043130531306313073130831309313103131131312313133131431315313163131731318313193132031321313223132331324313253132631327313283132931330313313133231333313343133531336313373133831339313403134131342313433134431345313463134731348313493135031351313523135331354313553135631357313583135931360313613136231363313643136531366313673136831369313703137131372313733137431375313763137731378313793138031381313823138331384313853138631387313883138931390313913139231393313943139531396313973139831399314003140131402314033140431405314063140731408314093141031411314123141331414314153141631417314183141931420314213142231423314243142531426314273142831429314303143131432314333143431435314363143731438314393144031441314423144331444314453144631447314483144931450314513145231453314543145531456314573145831459314603146131462314633146431465314663146731468314693147031471314723147331474314753147631477314783147931480314813148231483314843148531486314873148831489314903149131492314933149431495314963149731498314993150031501315023150331504315053150631507315083150931510315113151231513315143151531516315173151831519315203152131522315233152431525315263152731528315293153031531315323153331534315353153631537315383153931540315413154231543315443154531546315473154831549315503155131552315533155431555315563155731558315593156031561315623156331564315653156631567315683156931570315713157231573315743157531576315773157831579315803158131582315833158431585315863158731588315893159031591315923159331594315953159631597315983159931600316013160231603316043160531606316073160831609316103161131612316133161431615316163161731618316193162031621316223162331624316253162631627316283162931630316313163231633316343163531636316373163831639316403164131642316433164431645316463164731648316493165031651316523165331654316553165631657316583165931660316613166231663316643166531666316673166831669316703167131672316733167431675316763167731678316793168031681316823168331684316853168631687316883168931690316913169231693316943169531696316973169831699317003170131702317033170431705317063170731708317093171031711317123171331714317153171631717317183171931720317213172231723317243172531726317273172831729317303173131732317333173431735317363173731738317393174031741317423174331744317453174631747317483174931750317513175231753317543175531756317573175831759317603176131762317633176431765317663176731768317693177031771317723177331774317753177631777317783177931780317813178231783317843178531786317873178831789317903179131792317933179431795317963179731798317993180031801318023180331804318053180631807318083180931810318113181231813318143181531816318173181831819318203182131822318233182431825318263182731828318293183031831318323183331834318353183631837318383183931840318413184231843318443184531846318473184831849318503185131852318533185431855318563185731858318593186031861318623186331864318653186631867318683186931870318713187231873318743187531876318773187831879318803188131882318833188431885318863188731888318893189031891318923189331894318953189631897318983189931900319013190231903319043190531906319073190831909319103191131912319133191431915319163191731918319193192031921319223192331924319253192631927319283192931930319313193231933319343193531936319373193831939319403194131942319433194431945319463194731948319493195031951319523195331954319553195631957319583195931960319613196231963319643196531966319673196831969319703197131972319733197431975319763197731978319793198031981319823198331984319853198631987319883198931990319913199231993319943199531996319973199831999320003200132002320033200432005320063200732008320093201032011320123201332014320153201632017320183201932020320213202232023320243202532026320273202832029320303203132032320333203432035320363203732038320393204032041320423204332044320453204632047320483204932050320513205232053320543205532056320573205832059320603206132062320633206432065320663206732068320693207032071320723207332074320753207632077320783207932080320813208232083320843208532086320873208832089320903209132092320933209432095320963209732098320993210032101321023210332104321053210632107321083210932110321113211232113321143211532116321173211832119321203212132122321233212432125321263212732128321293213032131321323213332134321353213632137321383213932140321413214232143321443214532146321473214832149321503215132152321533215432155321563215732158321593216032161321623216332164321653216632167321683216932170321713217232173321743217532176321773217832179321803218132182321833218432185321863218732188321893219032191321923219332194321953219632197321983219932200322013220232203322043220532206322073220832209322103221132212322133221432215322163221732218322193222032221322223222332224322253222632227322283222932230322313223232233322343223532236322373223832239322403224132242322433224432245322463224732248322493225032251322523225332254322553225632257322583225932260322613226232263322643226532266322673226832269322703227132272322733227432275322763227732278322793228032281322823228332284322853228632287322883228932290322913229232293322943229532296322973229832299323003230132302323033230432305323063230732308323093231032311323123231332314323153231632317323183231932320323213232232323323243232532326323273232832329323303233132332323333233432335323363233732338323393234032341323423234332344323453234632347323483234932350323513235232353323543235532356323573235832359323603236132362323633236432365323663236732368323693237032371323723237332374323753237632377323783237932380323813238232383323843238532386323873238832389323903239132392323933239432395323963239732398323993240032401324023240332404324053240632407324083240932410324113241232413324143241532416324173241832419324203242132422324233242432425324263242732428324293243032431324323243332434324353243632437324383243932440324413244232443324443244532446324473244832449324503245132452324533245432455324563245732458324593246032461324623246332464324653246632467324683246932470324713247232473324743247532476324773247832479324803248132482324833248432485324863248732488324893249032491324923249332494324953249632497324983249932500325013250232503325043250532506325073250832509325103251132512325133251432515325163251732518325193252032521325223252332524325253252632527325283252932530325313253232533325343253532536325373253832539325403254132542325433254432545325463254732548325493255032551325523255332554325553255632557325583255932560325613256232563325643256532566325673256832569325703257132572325733257432575325763257732578325793258032581325823258332584325853258632587325883258932590325913259232593325943259532596325973259832599326003260132602326033260432605326063260732608326093261032611326123261332614326153261632617326183261932620326213262232623326243262532626326273262832629326303263132632326333263432635326363263732638326393264032641326423264332644326453264632647326483264932650326513265232653326543265532656326573265832659326603266132662326633266432665326663266732668326693267032671326723267332674326753267632677326783267932680326813268232683326843268532686326873268832689326903269132692326933269432695326963269732698326993270032701327023270332704327053270632707327083270932710327113271232713327143271532716327173271832719327203272132722327233272432725327263272732728327293273032731327323273332734327353273632737327383273932740327413274232743327443274532746327473274832749327503275132752327533275432755327563275732758327593276032761327623276332764327653276632767327683276932770327713277232773327743277532776327773277832779327803278132782327833278432785327863278732788327893279032791327923279332794327953279632797327983279932800328013280232803328043280532806328073280832809328103281132812328133281432815328163281732818328193282032821328223282332824328253282632827328283282932830328313283232833328343283532836328373283832839328403284132842328433284432845328463284732848328493285032851328523285332854328553285632857328583285932860328613286232863328643286532866328673286832869328703287132872328733287432875328763287732878328793288032881328823288332884328853288632887328883288932890328913289232893328943289532896328973289832899329003290132902329033290432905329063290732908329093291032911329123291332914329153291632917329183291932920329213292232923329243292532926329273292832929329303293132932329333293432935329363293732938329393294032941329423294332944329453294632947329483294932950329513295232953329543295532956329573295832959329603296132962329633296432965329663296732968329693297032971329723297332974329753297632977329783297932980329813298232983329843298532986329873298832989329903299132992329933299432995329963299732998329993300033001330023300333004330053300633007330083300933010330113301233013330143301533016330173301833019330203302133022330233302433025330263302733028330293303033031330323303333034330353303633037330383303933040330413304233043330443304533046330473304833049330503305133052330533305433055330563305733058330593306033061330623306333064330653306633067330683306933070330713307233073330743307533076330773307833079330803308133082330833308433085330863308733088330893309033091330923309333094330953309633097330983309933100331013310233103331043310533106331073310833109331103311133112331133311433115331163311733118331193312033121331223312333124331253312633127331283312933130331313313233133331343313533136331373313833139331403314133142331433314433145331463314733148331493315033151331523315333154331553315633157331583315933160331613316233163331643316533166331673316833169331703317133172331733317433175331763317733178331793318033181331823318333184331853318633187331883318933190331913319233193331943319533196331973319833199332003320133202332033320433205332063320733208332093321033211332123321333214332153321633217332183321933220332213322233223332243322533226332273322833229332303323133232332333323433235332363323733238332393324033241332423324333244332453324633247332483324933250332513325233253332543325533256332573325833259332603326133262332633326433265332663326733268332693327033271332723327333274332753327633277332783327933280332813328233283332843328533286332873328833289332903329133292332933329433295332963329733298332993330033301333023330333304333053330633307333083330933310333113331233313333143331533316333173331833319333203332133322333233332433325333263332733328333293333033331333323333333334333353333633337333383333933340333413334233343333443334533346333473334833349333503335133352333533335433355333563335733358333593336033361333623336333364333653336633367333683336933370333713337233373333743337533376333773337833379333803338133382333833338433385333863338733388333893339033391333923339333394333953339633397333983339933400334013340233403334043340533406334073340833409334103341133412334133341433415334163341733418334193342033421334223342333424334253342633427334283342933430334313343233433334343343533436334373343833439334403344133442334433344433445334463344733448334493345033451334523345333454334553345633457334583345933460334613346233463334643346533466334673346833469334703347133472334733347433475334763347733478334793348033481334823348333484334853348633487334883348933490334913349233493334943349533496334973349833499335003350133502335033350433505335063350733508335093351033511335123351333514335153351633517335183351933520335213352233523335243352533526335273352833529335303353133532335333353433535335363353733538335393354033541335423354333544335453354633547335483354933550335513355233553335543355533556335573355833559335603356133562335633356433565335663356733568335693357033571335723357333574335753357633577335783357933580335813358233583335843358533586335873358833589335903359133592335933359433595335963359733598335993360033601336023360333604336053360633607336083360933610336113361233613336143361533616336173361833619336203362133622336233362433625336263362733628336293363033631336323363333634336353363633637336383363933640336413364233643336443364533646336473364833649336503365133652336533365433655336563365733658336593366033661336623366333664336653366633667336683366933670336713367233673336743367533676336773367833679336803368133682336833368433685336863368733688336893369033691336923369333694336953369633697336983369933700337013370233703337043370533706337073370833709337103371133712337133371433715337163371733718337193372033721337223372333724337253372633727337283372933730337313373233733337343373533736337373373833739337403374133742337433374433745337463374733748337493375033751337523375333754337553375633757337583375933760337613376233763337643376533766337673376833769337703377133772337733377433775337763377733778337793378033781337823378333784337853378633787337883378933790337913379233793337943379533796337973379833799338003380133802338033380433805338063380733808338093381033811338123381333814338153381633817338183381933820338213382233823338243382533826338273382833829338303383133832338333383433835338363383733838338393384033841338423384333844338453384633847338483384933850338513385233853338543385533856338573385833859338603386133862338633386433865338663386733868338693387033871338723387333874338753387633877338783387933880338813388233883338843388533886338873388833889338903389133892338933389433895338963389733898338993390033901339023390333904339053390633907339083390933910339113391233913339143391533916339173391833919339203392133922339233392433925339263392733928339293393033931339323393333934339353393633937339383393933940339413394233943339443394533946339473394833949339503395133952339533395433955339563395733958339593396033961339623396333964339653396633967339683396933970339713397233973339743397533976339773397833979339803398133982339833398433985339863398733988339893399033991339923399333994339953399633997339983399934000340013400234003340043400534006340073400834009340103401134012340133401434015340163401734018340193402034021340223402334024340253402634027340283402934030340313403234033340343403534036340373403834039340403404134042340433404434045340463404734048340493405034051340523405334054340553405634057340583405934060340613406234063340643406534066340673406834069340703407134072340733407434075340763407734078340793408034081340823408334084340853408634087340883408934090340913409234093340943409534096340973409834099341003410134102341033410434105341063410734108341093411034111341123411334114341153411634117341183411934120341213412234123341243412534126341273412834129341303413134132341333413434135341363413734138341393414034141341423414334144341453414634147341483414934150341513415234153341543415534156341573415834159341603416134162341633416434165341663416734168341693417034171341723417334174341753417634177341783417934180341813418234183341843418534186341873418834189341903419134192341933419434195341963419734198341993420034201342023420334204342053420634207342083420934210342113421234213342143421534216342173421834219342203422134222342233422434225342263422734228342293423034231342323423334234342353423634237342383423934240342413424234243342443424534246342473424834249342503425134252342533425434255342563425734258342593426034261342623426334264342653426634267342683426934270342713427234273342743427534276342773427834279342803428134282342833428434285342863428734288342893429034291342923429334294342953429634297342983429934300343013430234303343043430534306343073430834309343103431134312343133431434315343163431734318343193432034321343223432334324343253432634327343283432934330343313433234333343343433534336343373433834339343403434134342343433434434345343463434734348343493435034351343523435334354343553435634357343583435934360343613436234363343643436534366343673436834369343703437134372343733437434375343763437734378343793438034381343823438334384343853438634387343883438934390343913439234393343943439534396343973439834399344003440134402344033440434405344063440734408344093441034411344123441334414344153441634417344183441934420344213442234423344243442534426344273442834429344303443134432344333443434435344363443734438344393444034441344423444334444344453444634447344483444934450344513445234453344543445534456344573445834459344603446134462344633446434465344663446734468344693447034471344723447334474344753447634477344783447934480344813448234483344843448534486344873448834489344903449134492344933449434495344963449734498344993450034501345023450334504345053450634507345083450934510345113451234513345143451534516345173451834519345203452134522345233452434525345263452734528345293453034531345323453334534345353453634537345383453934540345413454234543345443454534546345473454834549345503455134552345533455434555345563455734558345593456034561345623456334564345653456634567345683456934570345713457234573345743457534576345773457834579345803458134582345833458434585345863458734588345893459034591345923459334594345953459634597345983459934600346013460234603346043460534606346073460834609346103461134612346133461434615346163461734618346193462034621346223462334624346253462634627346283462934630346313463234633346343463534636346373463834639346403464134642346433464434645346463464734648346493465034651346523465334654346553465634657346583465934660346613466234663346643466534666346673466834669346703467134672346733467434675346763467734678346793468034681346823468334684346853468634687346883468934690346913469234693346943469534696346973469834699347003470134702347033470434705347063470734708347093471034711347123471334714347153471634717347183471934720347213472234723347243472534726347273472834729347303473134732347333473434735347363473734738347393474034741347423474334744347453474634747347483474934750347513475234753347543475534756347573475834759347603476134762347633476434765347663476734768347693477034771347723477334774347753477634777347783477934780347813478234783347843478534786347873478834789347903479134792347933479434795347963479734798347993480034801348023480334804348053480634807348083480934810348113481234813348143481534816348173481834819348203482134822348233482434825348263482734828348293483034831348323483334834348353483634837348383483934840348413484234843348443484534846348473484834849348503485134852348533485434855348563485734858348593486034861348623486334864348653486634867348683486934870348713487234873348743487534876348773487834879348803488134882348833488434885348863488734888348893489034891348923489334894348953489634897348983489934900349013490234903349043490534906349073490834909349103491134912349133491434915349163491734918349193492034921349223492334924349253492634927349283492934930349313493234933349343493534936349373493834939349403494134942349433494434945349463494734948349493495034951349523495334954349553495634957349583495934960349613496234963349643496534966349673496834969349703497134972349733497434975349763497734978349793498034981349823498334984349853498634987349883498934990349913499234993349943499534996349973499834999350003500135002350033500435005350063500735008350093501035011350123501335014350153501635017350183501935020350213502235023350243502535026350273502835029350303503135032350333503435035350363503735038350393504035041350423504335044350453504635047350483504935050350513505235053350543505535056350573505835059350603506135062350633506435065350663506735068350693507035071350723507335074350753507635077350783507935080350813508235083350843508535086350873508835089350903509135092350933509435095350963509735098350993510035101351023510335104351053510635107351083510935110351113511235113351143511535116351173511835119351203512135122351233512435125351263512735128351293513035131351323513335134351353513635137351383513935140351413514235143351443514535146351473514835149351503515135152351533515435155351563515735158351593516035161351623516335164351653516635167351683516935170351713517235173351743517535176351773517835179351803518135182351833518435185351863518735188351893519035191351923519335194351953519635197351983519935200352013520235203352043520535206352073520835209352103521135212352133521435215352163521735218352193522035221352223522335224352253522635227352283522935230352313523235233352343523535236352373523835239352403524135242352433524435245352463524735248352493525035251352523525335254352553525635257352583525935260352613526235263352643526535266352673526835269352703527135272352733527435275352763527735278352793528035281352823528335284352853528635287352883528935290352913529235293352943529535296352973529835299353003530135302353033530435305353063530735308353093531035311353123531335314353153531635317353183531935320353213532235323353243532535326353273532835329353303533135332353333533435335353363533735338353393534035341353423534335344353453534635347353483534935350353513535235353353543535535356353573535835359353603536135362353633536435365353663536735368353693537035371353723537335374353753537635377353783537935380353813538235383353843538535386353873538835389353903539135392353933539435395353963539735398353993540035401354023540335404354053540635407354083540935410354113541235413354143541535416354173541835419354203542135422354233542435425354263542735428354293543035431354323543335434354353543635437354383543935440354413544235443354443544535446354473544835449354503545135452354533545435455354563545735458354593546035461354623546335464354653546635467354683546935470354713547235473354743547535476354773547835479354803548135482354833548435485354863548735488354893549035491354923549335494354953549635497354983549935500355013550235503355043550535506355073550835509355103551135512355133551435515355163551735518355193552035521355223552335524355253552635527355283552935530355313553235533355343553535536355373553835539355403554135542355433554435545355463554735548355493555035551355523555335554355553555635557355583555935560355613556235563355643556535566355673556835569355703557135572355733557435575355763557735578355793558035581355823558335584355853558635587355883558935590355913559235593355943559535596355973559835599356003560135602356033560435605356063560735608356093561035611356123561335614356153561635617356183561935620356213562235623356243562535626356273562835629356303563135632356333563435635356363563735638356393564035641356423564335644356453564635647356483564935650356513565235653356543565535656356573565835659356603566135662356633566435665356663566735668356693567035671356723567335674356753567635677356783567935680356813568235683356843568535686356873568835689356903569135692356933569435695356963569735698356993570035701357023570335704357053570635707357083570935710357113571235713357143571535716357173571835719357203572135722357233572435725357263572735728357293573035731357323573335734357353573635737357383573935740357413574235743357443574535746357473574835749357503575135752357533575435755357563575735758357593576035761357623576335764357653576635767357683576935770357713577235773357743577535776357773577835779357803578135782357833578435785357863578735788357893579035791357923579335794357953579635797357983579935800358013580235803358043580535806358073580835809358103581135812358133581435815358163581735818358193582035821358223582335824358253582635827358283582935830358313583235833358343583535836358373583835839358403584135842358433584435845358463584735848358493585035851358523585335854358553585635857358583585935860358613586235863358643586535866358673586835869358703587135872358733587435875358763587735878358793588035881358823588335884358853588635887358883588935890358913589235893358943589535896358973589835899359003590135902359033590435905359063590735908359093591035911359123591335914359153591635917359183591935920359213592235923359243592535926359273592835929359303593135932359333593435935359363593735938359393594035941359423594335944359453594635947359483594935950359513595235953359543595535956359573595835959359603596135962359633596435965359663596735968359693597035971359723597335974359753597635977359783597935980359813598235983359843598535986359873598835989359903599135992359933599435995359963599735998359993600036001360023600336004360053600636007360083600936010360113601236013360143601536016360173601836019360203602136022360233602436025360263602736028360293603036031360323603336034360353603636037360383603936040360413604236043360443604536046360473604836049360503605136052360533605436055360563605736058360593606036061360623606336064360653606636067360683606936070360713607236073360743607536076360773607836079360803608136082360833608436085360863608736088360893609036091360923609336094360953609636097360983609936100361013610236103361043610536106361073610836109361103611136112361133611436115361163611736118361193612036121361223612336124361253612636127361283612936130361313613236133361343613536136361373613836139361403614136142361433614436145361463614736148361493615036151361523615336154361553615636157361583615936160361613616236163361643616536166361673616836169361703617136172361733617436175361763617736178361793618036181361823618336184361853618636187361883618936190361913619236193361943619536196361973619836199362003620136202362033620436205362063620736208362093621036211362123621336214362153621636217362183621936220362213622236223362243622536226362273622836229362303623136232362333623436235362363623736238362393624036241362423624336244362453624636247362483624936250362513625236253362543625536256362573625836259362603626136262362633626436265362663626736268362693627036271362723627336274362753627636277362783627936280362813628236283362843628536286362873628836289362903629136292362933629436295362963629736298362993630036301363023630336304363053630636307363083630936310363113631236313363143631536316363173631836319363203632136322363233632436325363263632736328363293633036331363323633336334363353633636337363383633936340363413634236343363443634536346363473634836349363503635136352363533635436355363563635736358363593636036361363623636336364363653636636367363683636936370363713637236373363743637536376363773637836379363803638136382363833638436385363863638736388363893639036391363923639336394363953639636397363983639936400364013640236403364043640536406364073640836409364103641136412364133641436415364163641736418364193642036421364223642336424364253642636427364283642936430364313643236433364343643536436364373643836439364403644136442364433644436445364463644736448364493645036451364523645336454364553645636457364583645936460364613646236463364643646536466364673646836469364703647136472364733647436475364763647736478364793648036481364823648336484364853648636487364883648936490364913649236493364943649536496364973649836499365003650136502365033650436505365063650736508365093651036511365123651336514365153651636517365183651936520365213652236523365243652536526365273652836529365303653136532365333653436535365363653736538365393654036541365423654336544365453654636547365483654936550365513655236553365543655536556365573655836559365603656136562365633656436565365663656736568365693657036571365723657336574365753657636577365783657936580365813658236583365843658536586365873658836589365903659136592365933659436595365963659736598365993660036601366023660336604366053660636607366083660936610366113661236613366143661536616366173661836619366203662136622366233662436625366263662736628366293663036631366323663336634366353663636637366383663936640366413664236643366443664536646366473664836649366503665136652366533665436655366563665736658366593666036661366623666336664366653666636667366683666936670366713667236673366743667536676366773667836679366803668136682366833668436685366863668736688366893669036691366923669336694366953669636697366983669936700367013670236703367043670536706367073670836709367103671136712367133671436715367163671736718367193672036721367223672336724367253672636727367283672936730367313673236733367343673536736367373673836739367403674136742367433674436745367463674736748367493675036751367523675336754367553675636757367583675936760367613676236763367643676536766367673676836769367703677136772367733677436775367763677736778367793678036781367823678336784367853678636787367883678936790367913679236793367943679536796367973679836799368003680136802368033680436805368063680736808368093681036811368123681336814368153681636817368183681936820368213682236823368243682536826368273682836829368303683136832368333683436835368363683736838368393684036841368423684336844368453684636847368483684936850368513685236853368543685536856368573685836859368603686136862368633686436865368663686736868368693687036871368723687336874368753687636877368783687936880368813688236883368843688536886368873688836889368903689136892368933689436895368963689736898368993690036901369023690336904369053690636907369083690936910369113691236913369143691536916369173691836919369203692136922369233692436925369263692736928369293693036931369323693336934369353693636937369383693936940369413694236943369443694536946369473694836949369503695136952369533695436955369563695736958369593696036961369623696336964369653696636967369683696936970369713697236973369743697536976369773697836979369803698136982369833698436985369863698736988369893699036991369923699336994369953699636997369983699937000370013700237003370043700537006370073700837009370103701137012370133701437015370163701737018370193702037021370223702337024370253702637027370283702937030370313703237033370343703537036370373703837039370403704137042370433704437045370463704737048370493705037051370523705337054370553705637057370583705937060370613706237063370643706537066370673706837069370703707137072370733707437075370763707737078370793708037081370823708337084370853708637087370883708937090370913709237093370943709537096370973709837099371003710137102371033710437105371063710737108371093711037111371123711337114371153711637117371183711937120371213712237123371243712537126371273712837129371303713137132371333713437135371363713737138371393714037141371423714337144371453714637147371483714937150371513715237153371543715537156371573715837159371603716137162371633716437165371663716737168371693717037171371723717337174371753717637177371783717937180371813718237183371843718537186371873718837189371903719137192371933719437195371963719737198371993720037201372023720337204372053720637207372083720937210372113721237213372143721537216372173721837219372203722137222372233722437225372263722737228372293723037231372323723337234372353723637237372383723937240372413724237243372443724537246372473724837249372503725137252372533725437255372563725737258372593726037261372623726337264372653726637267372683726937270372713727237273372743727537276372773727837279372803728137282372833728437285372863728737288372893729037291372923729337294372953729637297372983729937300373013730237303373043730537306373073730837309373103731137312373133731437315373163731737318373193732037321373223732337324373253732637327373283732937330373313733237333373343733537336373373733837339373403734137342373433734437345373463734737348373493735037351373523735337354373553735637357373583735937360373613736237363373643736537366373673736837369373703737137372373733737437375373763737737378373793738037381373823738337384373853738637387373883738937390373913739237393373943739537396373973739837399374003740137402374033740437405374063740737408374093741037411374123741337414374153741637417374183741937420374213742237423374243742537426374273742837429374303743137432374333743437435374363743737438374393744037441374423744337444374453744637447374483744937450374513745237453374543745537456374573745837459374603746137462374633746437465374663746737468374693747037471374723747337474374753747637477374783747937480374813748237483374843748537486374873748837489374903749137492374933749437495374963749737498374993750037501375023750337504375053750637507375083750937510375113751237513375143751537516375173751837519375203752137522375233752437525375263752737528375293753037531375323753337534375353753637537375383753937540375413754237543375443754537546375473754837549375503755137552375533755437555375563755737558375593756037561375623756337564375653756637567375683756937570375713757237573375743757537576375773757837579375803758137582375833758437585375863758737588375893759037591375923759337594375953759637597375983759937600376013760237603376043760537606376073760837609376103761137612376133761437615376163761737618376193762037621376223762337624376253762637627376283762937630376313763237633376343763537636376373763837639376403764137642376433764437645376463764737648376493765037651376523765337654376553765637657376583765937660376613766237663376643766537666376673766837669376703767137672376733767437675376763767737678376793768037681376823768337684376853768637687376883768937690376913769237693376943769537696376973769837699377003770137702377033770437705377063770737708377093771037711377123771337714377153771637717377183771937720377213772237723377243772537726377273772837729377303773137732377333773437735377363773737738377393774037741377423774337744377453774637747377483774937750377513775237753377543775537756377573775837759377603776137762377633776437765377663776737768377693777037771377723777337774377753777637777377783777937780377813778237783377843778537786377873778837789377903779137792377933779437795377963779737798377993780037801378023780337804378053780637807378083780937810378113781237813378143781537816378173781837819378203782137822378233782437825378263782737828378293783037831378323783337834378353783637837378383783937840378413784237843378443784537846378473784837849378503785137852378533785437855378563785737858378593786037861378623786337864378653786637867378683786937870378713787237873378743787537876378773787837879378803788137882378833788437885378863788737888378893789037891378923789337894378953789637897378983789937900379013790237903379043790537906379073790837909379103791137912379133791437915379163791737918379193792037921379223792337924379253792637927379283792937930379313793237933379343793537936379373793837939379403794137942379433794437945379463794737948379493795037951379523795337954379553795637957379583795937960379613796237963379643796537966379673796837969379703797137972379733797437975379763797737978379793798037981379823798337984379853798637987379883798937990379913799237993379943799537996379973799837999380003800138002380033800438005380063800738008380093801038011380123801338014380153801638017380183801938020380213802238023380243802538026380273802838029380303803138032380333803438035380363803738038380393804038041380423804338044380453804638047380483804938050380513805238053380543805538056380573805838059380603806138062380633806438065380663806738068380693807038071380723807338074380753807638077380783807938080380813808238083380843808538086380873808838089380903809138092380933809438095380963809738098380993810038101381023810338104381053810638107381083810938110381113811238113381143811538116381173811838119381203812138122381233812438125381263812738128381293813038131381323813338134381353813638137381383813938140381413814238143381443814538146381473814838149381503815138152381533815438155381563815738158381593816038161381623816338164381653816638167381683816938170381713817238173381743817538176381773817838179381803818138182381833818438185381863818738188381893819038191381923819338194381953819638197381983819938200382013820238203382043820538206382073820838209382103821138212382133821438215382163821738218382193822038221382223822338224382253822638227382283822938230382313823238233382343823538236382373823838239382403824138242382433824438245382463824738248382493825038251382523825338254382553825638257382583825938260382613826238263382643826538266382673826838269382703827138272382733827438275382763827738278382793828038281382823828338284382853828638287382883828938290382913829238293382943829538296382973829838299383003830138302383033830438305383063830738308383093831038311383123831338314383153831638317383183831938320383213832238323383243832538326383273832838329383303833138332383333833438335383363833738338383393834038341383423834338344383453834638347383483834938350383513835238353383543835538356383573835838359383603836138362383633836438365383663836738368383693837038371383723837338374383753837638377383783837938380383813838238383383843838538386383873838838389383903839138392383933839438395383963839738398383993840038401384023840338404384053840638407384083840938410384113841238413384143841538416384173841838419384203842138422384233842438425384263842738428384293843038431384323843338434384353843638437384383843938440384413844238443384443844538446384473844838449384503845138452384533845438455384563845738458384593846038461384623846338464384653846638467384683846938470384713847238473384743847538476384773847838479384803848138482384833848438485384863848738488384893849038491384923849338494384953849638497384983849938500385013850238503385043850538506385073850838509385103851138512385133851438515385163851738518385193852038521385223852338524385253852638527385283852938530385313853238533385343853538536385373853838539385403854138542385433854438545385463854738548385493855038551385523855338554385553855638557385583855938560385613856238563385643856538566385673856838569385703857138572385733857438575385763857738578385793858038581385823858338584385853858638587385883858938590385913859238593385943859538596385973859838599386003860138602386033860438605386063860738608386093861038611386123861338614386153861638617386183861938620386213862238623386243862538626386273862838629386303863138632386333863438635386363863738638386393864038641386423864338644386453864638647386483864938650386513865238653386543865538656386573865838659386603866138662386633866438665386663866738668386693867038671386723867338674386753867638677386783867938680386813868238683386843868538686386873868838689386903869138692386933869438695386963869738698386993870038701387023870338704387053870638707387083870938710387113871238713387143871538716387173871838719387203872138722387233872438725387263872738728387293873038731387323873338734387353873638737387383873938740387413874238743387443874538746387473874838749387503875138752387533875438755387563875738758387593876038761387623876338764387653876638767387683876938770387713877238773387743877538776387773877838779387803878138782387833878438785387863878738788387893879038791387923879338794387953879638797387983879938800388013880238803388043880538806388073880838809388103881138812388133881438815388163881738818388193882038821388223882338824388253882638827388283882938830388313883238833388343883538836388373883838839388403884138842388433884438845388463884738848388493885038851388523885338854388553885638857388583885938860388613886238863388643886538866388673886838869388703887138872388733887438875388763887738878388793888038881388823888338884388853888638887388883888938890388913889238893388943889538896388973889838899389003890138902389033890438905389063890738908389093891038911389123891338914389153891638917389183891938920389213892238923389243892538926389273892838929389303893138932389333893438935389363893738938389393894038941389423894338944389453894638947389483894938950389513895238953389543895538956389573895838959389603896138962389633896438965389663896738968389693897038971389723897338974389753897638977389783897938980389813898238983389843898538986389873898838989389903899138992389933899438995389963899738998389993900039001390023900339004390053900639007390083900939010390113901239013390143901539016390173901839019390203902139022390233902439025390263902739028390293903039031390323903339034390353903639037390383903939040390413904239043390443904539046390473904839049390503905139052390533905439055390563905739058390593906039061390623906339064390653906639067390683906939070390713907239073390743907539076390773907839079390803908139082390833908439085390863908739088390893909039091390923909339094390953909639097390983909939100391013910239103391043910539106391073910839109391103911139112391133911439115391163911739118391193912039121391223912339124391253912639127391283912939130391313913239133391343913539136391373913839139391403914139142391433914439145391463914739148391493915039151391523915339154391553915639157391583915939160391613916239163391643916539166391673916839169391703917139172391733917439175391763917739178391793918039181391823918339184391853918639187391883918939190391913919239193391943919539196391973919839199392003920139202392033920439205392063920739208392093921039211392123921339214392153921639217392183921939220392213922239223392243922539226392273922839229392303923139232392333923439235392363923739238392393924039241392423924339244392453924639247392483924939250392513925239253392543925539256392573925839259392603926139262392633926439265392663926739268392693927039271392723927339274392753927639277392783927939280392813928239283392843928539286392873928839289392903929139292392933929439295392963929739298392993930039301393023930339304393053930639307393083930939310393113931239313393143931539316393173931839319393203932139322393233932439325393263932739328393293933039331393323933339334393353933639337393383933939340393413934239343393443934539346393473934839349393503935139352393533935439355393563935739358393593936039361393623936339364393653936639367393683936939370393713937239373393743937539376393773937839379393803938139382393833938439385393863938739388393893939039391393923939339394393953939639397393983939939400394013940239403394043940539406394073940839409394103941139412394133941439415394163941739418394193942039421394223942339424394253942639427394283942939430394313943239433394343943539436394373943839439394403944139442394433944439445394463944739448394493945039451394523945339454394553945639457394583945939460394613946239463394643946539466394673946839469394703947139472394733947439475394763947739478394793948039481394823948339484394853948639487394883948939490394913949239493394943949539496394973949839499395003950139502395033950439505395063950739508395093951039511395123951339514395153951639517395183951939520395213952239523395243952539526395273952839529395303953139532395333953439535395363953739538395393954039541395423954339544395453954639547395483954939550395513955239553395543955539556395573955839559395603956139562395633956439565395663956739568395693957039571395723957339574395753957639577395783957939580395813958239583395843958539586395873958839589395903959139592395933959439595395963959739598395993960039601396023960339604396053960639607396083960939610396113961239613396143961539616396173961839619396203962139622396233962439625396263962739628396293963039631396323963339634396353963639637396383963939640396413964239643396443964539646396473964839649396503965139652396533965439655396563965739658396593966039661396623966339664396653966639667396683966939670396713967239673396743967539676396773967839679396803968139682396833968439685396863968739688396893969039691396923969339694396953969639697396983969939700397013970239703397043970539706397073970839709397103971139712397133971439715397163971739718397193972039721397223972339724397253972639727397283972939730397313973239733397343973539736397373973839739397403974139742397433974439745397463974739748397493975039751397523975339754397553975639757397583975939760397613976239763397643976539766397673976839769397703977139772397733977439775397763977739778397793978039781397823978339784397853978639787397883978939790397913979239793397943979539796397973979839799398003980139802398033980439805398063980739808398093981039811398123981339814398153981639817398183981939820398213982239823398243982539826398273982839829398303983139832398333983439835398363983739838398393984039841398423984339844398453984639847398483984939850398513985239853398543985539856398573985839859398603986139862398633986439865398663986739868398693987039871398723987339874398753987639877398783987939880398813988239883398843988539886398873988839889398903989139892398933989439895398963989739898398993990039901399023990339904399053990639907399083990939910399113991239913399143991539916399173991839919399203992139922399233992439925399263992739928399293993039931399323993339934399353993639937399383993939940399413994239943399443994539946399473994839949399503995139952399533995439955399563995739958399593996039961399623996339964399653996639967399683996939970399713997239973399743997539976399773997839979399803998139982399833998439985399863998739988399893999039991399923999339994399953999639997399983999940000400014000240003400044000540006400074000840009400104001140012400134001440015400164001740018400194002040021400224002340024400254002640027400284002940030400314003240033400344003540036400374003840039400404004140042400434004440045400464004740048400494005040051400524005340054400554005640057400584005940060400614006240063400644006540066400674006840069400704007140072400734007440075400764007740078400794008040081400824008340084400854008640087400884008940090400914009240093400944009540096400974009840099401004010140102401034010440105401064010740108401094011040111401124011340114401154011640117401184011940120401214012240123401244012540126401274012840129401304013140132401334013440135401364013740138401394014040141401424014340144401454014640147401484014940150401514015240153401544015540156401574015840159401604016140162401634016440165401664016740168401694017040171401724017340174401754017640177401784017940180401814018240183401844018540186401874018840189401904019140192401934019440195401964019740198401994020040201402024020340204402054020640207402084020940210402114021240213402144021540216402174021840219402204022140222402234022440225402264022740228402294023040231402324023340234402354023640237402384023940240402414024240243402444024540246402474024840249402504025140252402534025440255402564025740258402594026040261402624026340264402654026640267402684026940270402714027240273402744027540276402774027840279402804028140282402834028440285402864028740288402894029040291402924029340294402954029640297402984029940300403014030240303403044030540306403074030840309403104031140312403134031440315403164031740318403194032040321403224032340324403254032640327403284032940330403314033240333403344033540336403374033840339403404034140342403434034440345403464034740348403494035040351403524035340354403554035640357403584035940360403614036240363403644036540366403674036840369403704037140372403734037440375403764037740378403794038040381403824038340384403854038640387403884038940390403914039240393403944039540396403974039840399404004040140402404034040440405404064040740408404094041040411404124041340414404154041640417404184041940420404214042240423404244042540426404274042840429404304043140432404334043440435404364043740438404394044040441404424044340444404454044640447404484044940450404514045240453404544045540456404574045840459404604046140462404634046440465404664046740468404694047040471404724047340474404754047640477404784047940480404814048240483404844048540486404874048840489404904049140492404934049440495404964049740498404994050040501405024050340504405054050640507405084050940510405114051240513405144051540516405174051840519405204052140522405234052440525405264052740528405294053040531405324053340534405354053640537405384053940540405414054240543405444054540546405474054840549405504055140552405534055440555405564055740558405594056040561405624056340564405654056640567405684056940570405714057240573405744057540576405774057840579405804058140582405834058440585405864058740588405894059040591405924059340594405954059640597405984059940600406014060240603406044060540606406074060840609406104061140612406134061440615406164061740618406194062040621406224062340624406254062640627406284062940630406314063240633406344063540636406374063840639406404064140642406434064440645406464064740648406494065040651406524065340654406554065640657406584065940660406614066240663406644066540666406674066840669406704067140672406734067440675406764067740678406794068040681406824068340684406854068640687406884068940690406914069240693406944069540696406974069840699407004070140702407034070440705407064070740708407094071040711407124071340714407154071640717407184071940720407214072240723407244072540726407274072840729407304073140732407334073440735407364073740738407394074040741407424074340744407454074640747407484074940750407514075240753407544075540756407574075840759407604076140762407634076440765407664076740768407694077040771407724077340774407754077640777407784077940780407814078240783407844078540786407874078840789407904079140792407934079440795407964079740798407994080040801408024080340804408054080640807408084080940810408114081240813408144081540816408174081840819408204082140822408234082440825408264082740828408294083040831408324083340834408354083640837408384083940840408414084240843408444084540846408474084840849408504085140852408534085440855408564085740858408594086040861408624086340864408654086640867408684086940870408714087240873408744087540876408774087840879408804088140882408834088440885408864088740888408894089040891408924089340894408954089640897408984089940900409014090240903409044090540906409074090840909409104091140912409134091440915409164091740918409194092040921409224092340924409254092640927409284092940930409314093240933409344093540936409374093840939409404094140942409434094440945409464094740948409494095040951409524095340954409554095640957409584095940960409614096240963409644096540966409674096840969409704097140972409734097440975409764097740978409794098040981409824098340984409854098640987409884098940990409914099240993409944099540996409974099840999410004100141002410034100441005410064100741008410094101041011410124101341014410154101641017410184101941020410214102241023410244102541026410274102841029410304103141032410334103441035410364103741038410394104041041410424104341044410454104641047410484104941050410514105241053410544105541056410574105841059410604106141062410634106441065410664106741068410694107041071410724107341074410754107641077410784107941080410814108241083410844108541086410874108841089410904109141092410934109441095410964109741098410994110041101411024110341104411054110641107411084110941110411114111241113411144111541116411174111841119411204112141122411234112441125411264112741128411294113041131411324113341134411354113641137411384113941140411414114241143411444114541146411474114841149411504115141152411534115441155411564115741158411594116041161411624116341164411654116641167411684116941170411714117241173411744117541176411774117841179411804118141182411834118441185411864118741188411894119041191411924119341194411954119641197411984119941200412014120241203412044120541206412074120841209412104121141212412134121441215412164121741218412194122041221412224122341224412254122641227412284122941230412314123241233412344123541236412374123841239412404124141242412434124441245412464124741248412494125041251412524125341254412554125641257412584125941260412614126241263412644126541266412674126841269412704127141272412734127441275412764127741278412794128041281412824128341284412854128641287412884128941290412914129241293412944129541296412974129841299413004130141302413034130441305413064130741308413094131041311413124131341314413154131641317413184131941320413214132241323413244132541326413274132841329413304133141332413334133441335413364133741338413394134041341413424134341344413454134641347413484134941350413514135241353413544135541356413574135841359413604136141362413634136441365413664136741368413694137041371413724137341374413754137641377413784137941380413814138241383413844138541386413874138841389413904139141392413934139441395413964139741398413994140041401414024140341404414054140641407414084140941410414114141241413414144141541416414174141841419414204142141422414234142441425414264142741428414294143041431414324143341434414354143641437414384143941440414414144241443414444144541446414474144841449414504145141452414534145441455414564145741458414594146041461414624146341464414654146641467414684146941470414714147241473414744147541476414774147841479414804148141482414834148441485414864148741488414894149041491414924149341494414954149641497414984149941500415014150241503415044150541506415074150841509415104151141512415134151441515415164151741518415194152041521415224152341524415254152641527415284152941530415314153241533415344153541536415374153841539415404154141542415434154441545415464154741548415494155041551415524155341554415554155641557415584155941560415614156241563415644156541566415674156841569415704157141572415734157441575415764157741578415794158041581415824158341584415854158641587415884158941590415914159241593415944159541596415974159841599416004160141602416034160441605416064160741608416094161041611416124161341614416154161641617416184161941620416214162241623416244162541626416274162841629416304163141632416334163441635416364163741638416394164041641416424164341644416454164641647416484164941650416514165241653416544165541656416574165841659416604166141662416634166441665416664166741668416694167041671416724167341674416754167641677416784167941680416814168241683416844168541686416874168841689416904169141692416934169441695416964169741698416994170041701417024170341704417054170641707417084170941710417114171241713417144171541716417174171841719417204172141722417234172441725417264172741728417294173041731417324173341734417354173641737417384173941740417414174241743417444174541746417474174841749417504175141752417534175441755417564175741758417594176041761417624176341764417654176641767417684176941770417714177241773417744177541776417774177841779417804178141782417834178441785417864178741788417894179041791417924179341794417954179641797417984179941800418014180241803418044180541806418074180841809418104181141812418134181441815418164181741818418194182041821418224182341824418254182641827418284182941830418314183241833418344183541836418374183841839418404184141842418434184441845418464184741848418494185041851418524185341854418554185641857418584185941860418614186241863418644186541866418674186841869418704187141872418734187441875418764187741878418794188041881418824188341884418854188641887418884188941890418914189241893418944189541896418974189841899419004190141902419034190441905419064190741908419094191041911419124191341914419154191641917419184191941920419214192241923419244192541926419274192841929419304193141932419334193441935419364193741938419394194041941419424194341944419454194641947419484194941950419514195241953419544195541956419574195841959419604196141962419634196441965419664196741968419694197041971419724197341974419754197641977419784197941980419814198241983419844198541986419874198841989419904199141992419934199441995419964199741998419994200042001420024200342004420054200642007420084200942010420114201242013420144201542016420174201842019420204202142022420234202442025420264202742028420294203042031420324203342034420354203642037420384203942040420414204242043420444204542046420474204842049420504205142052420534205442055420564205742058420594206042061420624206342064420654206642067420684206942070420714207242073420744207542076420774207842079420804208142082420834208442085420864208742088420894209042091420924209342094420954209642097420984209942100421014210242103421044210542106421074210842109421104211142112421134211442115421164211742118421194212042121421224212342124421254212642127421284212942130421314213242133421344213542136421374213842139421404214142142421434214442145421464214742148421494215042151421524215342154421554215642157421584215942160421614216242163421644216542166421674216842169421704217142172421734217442175421764217742178421794218042181421824218342184421854218642187421884218942190421914219242193421944219542196421974219842199422004220142202422034220442205422064220742208422094221042211422124221342214422154221642217422184221942220422214222242223422244222542226422274222842229422304223142232422334223442235422364223742238422394224042241422424224342244422454224642247422484224942250422514225242253422544225542256422574225842259422604226142262422634226442265422664226742268422694227042271422724227342274422754227642277422784227942280422814228242283422844228542286422874228842289422904229142292422934229442295422964229742298422994230042301423024230342304423054230642307423084230942310423114231242313423144231542316423174231842319423204232142322423234232442325423264232742328423294233042331423324233342334423354233642337423384233942340423414234242343423444234542346423474234842349423504235142352423534235442355423564235742358423594236042361423624236342364423654236642367423684236942370423714237242373423744237542376423774237842379423804238142382423834238442385423864238742388423894239042391423924239342394423954239642397423984239942400424014240242403424044240542406424074240842409424104241142412424134241442415424164241742418424194242042421424224242342424424254242642427424284242942430424314243242433424344243542436424374243842439424404244142442424434244442445424464244742448424494245042451424524245342454424554245642457424584245942460424614246242463424644246542466424674246842469424704247142472424734247442475424764247742478424794248042481424824248342484424854248642487424884248942490424914249242493424944249542496424974249842499425004250142502425034250442505425064250742508425094251042511425124251342514425154251642517425184251942520425214252242523425244252542526425274252842529425304253142532425334253442535425364253742538425394254042541425424254342544425454254642547425484254942550425514255242553425544255542556425574255842559425604256142562425634256442565425664256742568425694257042571425724257342574425754257642577425784257942580425814258242583425844258542586425874258842589425904259142592425934259442595425964259742598425994260042601426024260342604426054260642607426084260942610426114261242613426144261542616426174261842619426204262142622426234262442625426264262742628426294263042631426324263342634426354263642637426384263942640426414264242643426444264542646426474264842649426504265142652426534265442655426564265742658426594266042661426624266342664426654266642667426684266942670426714267242673426744267542676426774267842679426804268142682426834268442685426864268742688426894269042691426924269342694426954269642697426984269942700427014270242703427044270542706427074270842709427104271142712427134271442715427164271742718427194272042721427224272342724427254272642727427284272942730427314273242733427344273542736427374273842739427404274142742427434274442745427464274742748427494275042751427524275342754427554275642757427584275942760427614276242763427644276542766427674276842769427704277142772427734277442775427764277742778427794278042781427824278342784427854278642787427884278942790427914279242793427944279542796427974279842799428004280142802428034280442805428064280742808428094281042811428124281342814428154281642817428184281942820428214282242823428244282542826428274282842829428304283142832428334283442835428364283742838428394284042841428424284342844428454284642847428484284942850428514285242853428544285542856428574285842859428604286142862428634286442865428664286742868428694287042871428724287342874428754287642877428784287942880428814288242883428844288542886428874288842889428904289142892428934289442895428964289742898428994290042901429024290342904429054290642907429084290942910429114291242913429144291542916429174291842919429204292142922429234292442925429264292742928429294293042931429324293342934429354293642937429384293942940429414294242943429444294542946429474294842949429504295142952429534295442955429564295742958429594296042961429624296342964429654296642967429684296942970429714297242973429744297542976429774297842979429804298142982429834298442985429864298742988429894299042991429924299342994429954299642997429984299943000430014300243003430044300543006430074300843009430104301143012430134301443015430164301743018430194302043021430224302343024430254302643027430284302943030430314303243033430344303543036430374303843039430404304143042430434304443045430464304743048430494305043051430524305343054430554305643057430584305943060430614306243063430644306543066430674306843069430704307143072430734307443075430764307743078430794308043081430824308343084430854308643087430884308943090430914309243093430944309543096430974309843099431004310143102431034310443105431064310743108431094311043111431124311343114431154311643117431184311943120431214312243123431244312543126431274312843129431304313143132431334313443135431364313743138431394314043141431424314343144431454314643147431484314943150431514315243153431544315543156431574315843159431604316143162431634316443165431664316743168431694317043171431724317343174431754317643177431784317943180431814318243183431844318543186431874318843189431904319143192431934319443195431964319743198431994320043201432024320343204432054320643207432084320943210432114321243213432144321543216432174321843219432204322143222432234322443225432264322743228432294323043231432324323343234432354323643237432384323943240432414324243243432444324543246432474324843249432504325143252432534325443255432564325743258432594326043261432624326343264432654326643267432684326943270432714327243273432744327543276432774327843279432804328143282432834328443285432864328743288432894329043291432924329343294432954329643297432984329943300433014330243303433044330543306433074330843309433104331143312433134331443315433164331743318433194332043321433224332343324433254332643327433284332943330433314333243333433344333543336433374333843339433404334143342433434334443345433464334743348433494335043351433524335343354433554335643357433584335943360433614336243363433644336543366433674336843369433704337143372433734337443375433764337743378433794338043381433824338343384433854338643387433884338943390433914339243393433944339543396433974339843399434004340143402434034340443405434064340743408434094341043411434124341343414434154341643417434184341943420434214342243423434244342543426434274342843429434304343143432434334343443435434364343743438434394344043441434424344343444434454344643447434484344943450434514345243453434544345543456434574345843459434604346143462434634346443465434664346743468434694347043471434724347343474434754347643477434784347943480434814348243483434844348543486434874348843489434904349143492434934349443495434964349743498434994350043501435024350343504435054350643507435084350943510435114351243513435144351543516435174351843519435204352143522435234352443525435264352743528435294353043531435324353343534435354353643537435384353943540435414354243543435444354543546435474354843549435504355143552435534355443555435564355743558435594356043561435624356343564435654356643567435684356943570435714357243573435744357543576435774357843579435804358143582435834358443585435864358743588435894359043591435924359343594435954359643597435984359943600436014360243603436044360543606436074360843609436104361143612436134361443615436164361743618436194362043621436224362343624436254362643627436284362943630436314363243633436344363543636436374363843639436404364143642436434364443645436464364743648436494365043651436524365343654436554365643657436584365943660436614366243663436644366543666436674366843669436704367143672436734367443675436764367743678436794368043681436824368343684436854368643687436884368943690436914369243693436944369543696436974369843699437004370143702437034370443705437064370743708437094371043711437124371343714437154371643717437184371943720437214372243723437244372543726437274372843729437304373143732437334373443735437364373743738437394374043741437424374343744437454374643747437484374943750437514375243753437544375543756437574375843759437604376143762437634376443765437664376743768437694377043771437724377343774437754377643777437784377943780437814378243783437844378543786437874378843789437904379143792437934379443795437964379743798437994380043801438024380343804438054380643807438084380943810438114381243813438144381543816438174381843819438204382143822438234382443825438264382743828438294383043831438324383343834438354383643837438384383943840438414384243843438444384543846438474384843849438504385143852438534385443855438564385743858438594386043861438624386343864438654386643867438684386943870438714387243873438744387543876438774387843879438804388143882438834388443885438864388743888438894389043891438924389343894438954389643897438984389943900439014390243903439044390543906439074390843909439104391143912439134391443915439164391743918439194392043921439224392343924439254392643927439284392943930439314393243933439344393543936439374393843939439404394143942439434394443945439464394743948439494395043951439524395343954439554395643957439584395943960439614396243963439644396543966439674396843969439704397143972439734397443975439764397743978439794398043981439824398343984439854398643987439884398943990439914399243993439944399543996439974399843999440004400144002440034400444005440064400744008440094401044011440124401344014440154401644017440184401944020440214402244023440244402544026440274402844029440304403144032440334403444035440364403744038440394404044041440424404344044440454404644047440484404944050440514405244053440544405544056440574405844059440604406144062440634406444065440664406744068440694407044071440724407344074440754407644077440784407944080440814408244083440844408544086440874408844089440904409144092440934409444095440964409744098440994410044101441024410344104441054410644107441084410944110441114411244113441144411544116441174411844119441204412144122441234412444125441264412744128441294413044131441324413344134441354413644137441384413944140441414414244143441444414544146441474414844149441504415144152441534415444155441564415744158441594416044161441624416344164441654416644167441684416944170441714417244173441744417544176441774417844179441804418144182441834418444185441864418744188441894419044191441924419344194441954419644197441984419944200442014420244203442044420544206442074420844209442104421144212442134421444215442164421744218442194422044221442224422344224442254422644227442284422944230442314423244233442344423544236442374423844239442404424144242442434424444245442464424744248442494425044251442524425344254442554425644257442584425944260442614426244263442644426544266442674426844269442704427144272442734427444275442764427744278442794428044281442824428344284442854428644287442884428944290442914429244293442944429544296442974429844299443004430144302443034430444305443064430744308443094431044311443124431344314443154431644317443184431944320443214432244323443244432544326443274432844329443304433144332443334433444335443364433744338443394434044341443424434344344443454434644347443484434944350443514435244353443544435544356443574435844359443604436144362443634436444365443664436744368443694437044371443724437344374443754437644377443784437944380443814438244383443844438544386443874438844389443904439144392443934439444395443964439744398443994440044401444024440344404444054440644407444084440944410444114441244413444144441544416444174441844419444204442144422444234442444425444264442744428444294443044431444324443344434444354443644437444384443944440444414444244443444444444544446444474444844449444504445144452444534445444455444564445744458444594446044461444624446344464444654446644467444684446944470444714447244473444744447544476444774447844479444804448144482444834448444485444864448744488444894449044491444924449344494444954449644497444984449944500445014450244503445044450544506445074450844509445104451144512445134451444515445164451744518445194452044521445224452344524445254452644527445284452944530445314453244533445344453544536445374453844539445404454144542445434454444545445464454744548445494455044551445524455344554445554455644557445584455944560445614456244563445644456544566445674456844569445704457144572445734457444575445764457744578445794458044581445824458344584445854458644587445884458944590445914459244593445944459544596445974459844599446004460144602446034460444605446064460744608446094461044611446124461344614446154461644617446184461944620446214462244623446244462544626446274462844629446304463144632446334463444635446364463744638446394464044641446424464344644446454464644647446484464944650446514465244653446544465544656446574465844659446604466144662446634466444665446664466744668446694467044671446724467344674446754467644677446784467944680446814468244683446844468544686446874468844689446904469144692446934469444695446964469744698446994470044701447024470344704447054470644707447084470944710447114471244713447144471544716447174471844719447204472144722447234472444725447264472744728447294473044731447324473344734447354473644737447384473944740447414474244743447444474544746447474474844749447504475144752447534475444755447564475744758447594476044761447624476344764447654476644767447684476944770447714477244773447744477544776447774477844779447804478144782447834478444785447864478744788447894479044791447924479344794447954479644797447984479944800448014480244803448044480544806448074480844809448104481144812448134481444815448164481744818448194482044821448224482344824448254482644827448284482944830448314483244833448344483544836448374483844839448404484144842448434484444845448464484744848448494485044851448524485344854448554485644857448584485944860448614486244863448644486544866448674486844869448704487144872448734487444875448764487744878448794488044881448824488344884448854488644887448884488944890448914489244893448944489544896448974489844899449004490144902449034490444905449064490744908449094491044911449124491344914449154491644917449184491944920449214492244923449244492544926449274492844929449304493144932449334493444935449364493744938449394494044941449424494344944449454494644947449484494944950449514495244953449544495544956449574495844959449604496144962449634496444965449664496744968449694497044971449724497344974449754497644977449784497944980449814498244983449844498544986449874498844989449904499144992449934499444995449964499744998449994500045001450024500345004450054500645007450084500945010450114501245013450144501545016450174501845019450204502145022450234502445025450264502745028450294503045031450324503345034450354503645037450384503945040450414504245043450444504545046450474504845049450504505145052450534505445055450564505745058450594506045061450624506345064450654506645067450684506945070450714507245073450744507545076450774507845079450804508145082450834508445085450864508745088450894509045091450924509345094450954509645097450984509945100451014510245103451044510545106451074510845109451104511145112451134511445115451164511745118451194512045121451224512345124451254512645127451284512945130451314513245133451344513545136451374513845139451404514145142451434514445145451464514745148451494515045151451524515345154451554515645157451584515945160451614516245163451644516545166451674516845169451704517145172451734517445175451764517745178451794518045181451824518345184451854518645187451884518945190451914519245193451944519545196451974519845199452004520145202452034520445205452064520745208452094521045211452124521345214452154521645217452184521945220452214522245223452244522545226452274522845229452304523145232452334523445235452364523745238452394524045241452424524345244452454524645247452484524945250452514525245253452544525545256452574525845259452604526145262452634526445265452664526745268452694527045271452724527345274452754527645277452784527945280452814528245283452844528545286452874528845289452904529145292452934529445295452964529745298452994530045301453024530345304453054530645307453084530945310453114531245313453144531545316453174531845319453204532145322453234532445325453264532745328453294533045331453324533345334453354533645337453384533945340453414534245343453444534545346453474534845349453504535145352453534535445355453564535745358453594536045361453624536345364453654536645367453684536945370453714537245373453744537545376453774537845379453804538145382453834538445385453864538745388453894539045391453924539345394453954539645397453984539945400454014540245403454044540545406454074540845409454104541145412454134541445415454164541745418454194542045421454224542345424454254542645427454284542945430454314543245433454344543545436454374543845439454404544145442454434544445445454464544745448454494545045451454524545345454454554545645457454584545945460454614546245463454644546545466454674546845469454704547145472454734547445475454764547745478454794548045481454824548345484454854548645487454884548945490454914549245493454944549545496454974549845499455004550145502455034550445505455064550745508455094551045511455124551345514455154551645517455184551945520455214552245523455244552545526455274552845529455304553145532455334553445535455364553745538455394554045541455424554345544455454554645547455484554945550455514555245553455544555545556455574555845559455604556145562455634556445565455664556745568455694557045571455724557345574455754557645577455784557945580455814558245583455844558545586455874558845589455904559145592455934559445595455964559745598455994560045601456024560345604456054560645607456084560945610456114561245613456144561545616456174561845619456204562145622456234562445625456264562745628456294563045631456324563345634456354563645637456384563945640456414564245643456444564545646456474564845649456504565145652456534565445655456564565745658456594566045661456624566345664456654566645667456684566945670456714567245673456744567545676456774567845679456804568145682456834568445685456864568745688456894569045691456924569345694456954569645697456984569945700457014570245703457044570545706457074570845709457104571145712457134571445715457164571745718457194572045721457224572345724457254572645727457284572945730457314573245733457344573545736457374573845739457404574145742457434574445745457464574745748457494575045751457524575345754457554575645757457584575945760457614576245763457644576545766457674576845769457704577145772457734577445775457764577745778457794578045781457824578345784457854578645787457884578945790457914579245793457944579545796457974579845799458004580145802458034580445805458064580745808458094581045811458124581345814458154581645817458184581945820458214582245823458244582545826458274582845829458304583145832458334583445835458364583745838458394584045841458424584345844458454584645847458484584945850458514585245853458544585545856458574585845859458604586145862458634586445865458664586745868458694587045871458724587345874458754587645877458784587945880458814588245883458844588545886458874588845889458904589145892458934589445895458964589745898458994590045901459024590345904459054590645907459084590945910459114591245913459144591545916459174591845919459204592145922459234592445925459264592745928459294593045931459324593345934459354593645937459384593945940459414594245943459444594545946459474594845949459504595145952459534595445955459564595745958459594596045961459624596345964459654596645967459684596945970459714597245973459744597545976459774597845979459804598145982459834598445985459864598745988459894599045991459924599345994459954599645997459984599946000460014600246003460044600546006460074600846009460104601146012460134601446015460164601746018460194602046021460224602346024460254602646027460284602946030460314603246033460344603546036460374603846039460404604146042460434604446045460464604746048460494605046051460524605346054460554605646057460584605946060460614606246063460644606546066460674606846069460704607146072460734607446075460764607746078460794608046081460824608346084460854608646087460884608946090460914609246093460944609546096460974609846099461004610146102461034610446105461064610746108461094611046111461124611346114461154611646117461184611946120461214612246123461244612546126461274612846129461304613146132461334613446135461364613746138461394614046141461424614346144461454614646147461484614946150461514615246153461544615546156461574615846159461604616146162461634616446165461664616746168461694617046171461724617346174461754617646177461784617946180461814618246183461844618546186461874618846189461904619146192461934619446195461964619746198461994620046201462024620346204462054620646207462084620946210462114621246213462144621546216462174621846219462204622146222462234622446225462264622746228462294623046231462324623346234462354623646237462384623946240462414624246243462444624546246462474624846249462504625146252462534625446255462564625746258462594626046261462624626346264462654626646267462684626946270462714627246273462744627546276462774627846279462804628146282462834628446285462864628746288462894629046291462924629346294462954629646297462984629946300463014630246303463044630546306463074630846309463104631146312463134631446315463164631746318463194632046321463224632346324463254632646327463284632946330463314633246333463344633546336463374633846339463404634146342463434634446345463464634746348463494635046351463524635346354463554635646357463584635946360463614636246363463644636546366463674636846369463704637146372463734637446375463764637746378463794638046381463824638346384463854638646387463884638946390463914639246393463944639546396463974639846399464004640146402464034640446405464064640746408464094641046411464124641346414464154641646417464184641946420464214642246423464244642546426464274642846429464304643146432464334643446435464364643746438464394644046441464424644346444464454644646447464484644946450464514645246453464544645546456464574645846459464604646146462464634646446465464664646746468464694647046471464724647346474464754647646477464784647946480464814648246483464844648546486464874648846489464904649146492464934649446495464964649746498464994650046501465024650346504465054650646507465084650946510465114651246513465144651546516465174651846519465204652146522465234652446525465264652746528465294653046531465324653346534465354653646537465384653946540465414654246543465444654546546465474654846549465504655146552465534655446555465564655746558465594656046561465624656346564465654656646567465684656946570465714657246573465744657546576465774657846579465804658146582465834658446585465864658746588465894659046591465924659346594465954659646597465984659946600466014660246603466044660546606466074660846609466104661146612466134661446615466164661746618466194662046621466224662346624466254662646627466284662946630466314663246633466344663546636466374663846639466404664146642466434664446645466464664746648466494665046651466524665346654466554665646657466584665946660466614666246663466644666546666466674666846669466704667146672466734667446675466764667746678466794668046681466824668346684466854668646687466884668946690466914669246693466944669546696466974669846699467004670146702467034670446705467064670746708467094671046711467124671346714467154671646717467184671946720467214672246723467244672546726467274672846729467304673146732467334673446735467364673746738467394674046741467424674346744467454674646747467484674946750467514675246753467544675546756467574675846759467604676146762467634676446765467664676746768467694677046771467724677346774467754677646777467784677946780467814678246783467844678546786467874678846789467904679146792467934679446795467964679746798467994680046801468024680346804468054680646807468084680946810468114681246813468144681546816468174681846819468204682146822468234682446825468264682746828468294683046831468324683346834468354683646837468384683946840468414684246843468444684546846468474684846849468504685146852468534685446855468564685746858468594686046861468624686346864468654686646867468684686946870468714687246873468744687546876468774687846879468804688146882468834688446885468864688746888468894689046891468924689346894468954689646897468984689946900469014690246903469044690546906469074690846909469104691146912469134691446915469164691746918469194692046921469224692346924469254692646927469284692946930469314693246933469344693546936469374693846939469404694146942469434694446945469464694746948469494695046951469524695346954469554695646957469584695946960469614696246963469644696546966469674696846969469704697146972469734697446975469764697746978469794698046981469824698346984469854698646987469884698946990469914699246993469944699546996469974699846999470004700147002470034700447005470064700747008470094701047011470124701347014470154701647017470184701947020470214702247023470244702547026470274702847029470304703147032470334703447035470364703747038470394704047041470424704347044470454704647047470484704947050470514705247053470544705547056470574705847059470604706147062470634706447065470664706747068470694707047071470724707347074470754707647077470784707947080470814708247083470844708547086470874708847089470904709147092470934709447095470964709747098470994710047101471024710347104471054710647107471084710947110471114711247113471144711547116471174711847119471204712147122471234712447125471264712747128471294713047131471324713347134471354713647137471384713947140471414714247143471444714547146471474714847149471504715147152471534715447155471564715747158471594716047161471624716347164471654716647167471684716947170471714717247173471744717547176471774717847179471804718147182471834718447185471864718747188471894719047191471924719347194471954719647197471984719947200472014720247203472044720547206472074720847209472104721147212472134721447215472164721747218472194722047221472224722347224472254722647227472284722947230472314723247233472344723547236472374723847239472404724147242472434724447245472464724747248472494725047251472524725347254472554725647257472584725947260472614726247263472644726547266472674726847269472704727147272472734727447275472764727747278472794728047281472824728347284472854728647287472884728947290472914729247293472944729547296472974729847299473004730147302473034730447305473064730747308473094731047311473124731347314473154731647317473184731947320473214732247323473244732547326473274732847329473304733147332473334733447335473364733747338473394734047341473424734347344473454734647347473484734947350473514735247353473544735547356473574735847359473604736147362473634736447365473664736747368473694737047371473724737347374473754737647377473784737947380473814738247383473844738547386473874738847389473904739147392473934739447395473964739747398473994740047401474024740347404474054740647407474084740947410474114741247413474144741547416474174741847419474204742147422474234742447425474264742747428474294743047431474324743347434474354743647437474384743947440474414744247443474444744547446474474744847449474504745147452474534745447455474564745747458474594746047461474624746347464474654746647467474684746947470474714747247473474744747547476474774747847479474804748147482474834748447485474864748747488474894749047491474924749347494474954749647497474984749947500475014750247503475044750547506475074750847509475104751147512475134751447515475164751747518475194752047521475224752347524475254752647527475284752947530475314753247533475344753547536475374753847539475404754147542475434754447545475464754747548475494755047551475524755347554475554755647557475584755947560475614756247563475644756547566475674756847569475704757147572475734757447575475764757747578475794758047581475824758347584475854758647587475884758947590475914759247593475944759547596475974759847599476004760147602476034760447605476064760747608476094761047611476124761347614476154761647617476184761947620476214762247623476244762547626476274762847629476304763147632476334763447635476364763747638476394764047641476424764347644476454764647647476484764947650476514765247653476544765547656476574765847659476604766147662476634766447665476664766747668476694767047671476724767347674476754767647677476784767947680476814768247683476844768547686476874768847689476904769147692476934769447695476964769747698476994770047701477024770347704477054770647707477084770947710477114771247713477144771547716477174771847719477204772147722477234772447725477264772747728477294773047731477324773347734477354773647737477384773947740477414774247743477444774547746477474774847749477504775147752477534775447755477564775747758477594776047761477624776347764477654776647767477684776947770477714777247773477744777547776477774777847779477804778147782477834778447785477864778747788477894779047791477924779347794477954779647797477984779947800478014780247803478044780547806478074780847809478104781147812478134781447815478164781747818478194782047821478224782347824478254782647827478284782947830478314783247833478344783547836478374783847839478404784147842478434784447845478464784747848478494785047851478524785347854478554785647857478584785947860478614786247863478644786547866478674786847869478704787147872478734787447875478764787747878478794788047881478824788347884478854788647887478884788947890478914789247893478944789547896478974789847899479004790147902479034790447905479064790747908479094791047911479124791347914479154791647917479184791947920479214792247923479244792547926479274792847929479304793147932479334793447935479364793747938479394794047941479424794347944479454794647947479484794947950479514795247953479544795547956479574795847959479604796147962479634796447965479664796747968479694797047971479724797347974479754797647977479784797947980479814798247983479844798547986479874798847989479904799147992479934799447995479964799747998479994800048001480024800348004480054800648007480084800948010480114801248013480144801548016480174801848019480204802148022480234802448025480264802748028480294803048031480324803348034480354803648037480384803948040480414804248043480444804548046480474804848049480504805148052480534805448055480564805748058480594806048061480624806348064480654806648067480684806948070480714807248073480744807548076480774807848079480804808148082480834808448085480864808748088480894809048091480924809348094480954809648097480984809948100481014810248103481044810548106481074810848109481104811148112481134811448115481164811748118481194812048121481224812348124481254812648127481284812948130481314813248133481344813548136481374813848139481404814148142481434814448145481464814748148481494815048151481524815348154481554815648157481584815948160481614816248163481644816548166481674816848169481704817148172481734817448175481764817748178481794818048181481824818348184481854818648187481884818948190481914819248193481944819548196481974819848199482004820148202482034820448205482064820748208482094821048211482124821348214482154821648217482184821948220482214822248223482244822548226482274822848229482304823148232482334823448235482364823748238482394824048241482424824348244482454824648247482484824948250482514825248253482544825548256482574825848259482604826148262482634826448265482664826748268482694827048271482724827348274482754827648277482784827948280482814828248283482844828548286482874828848289482904829148292482934829448295482964829748298482994830048301483024830348304483054830648307483084830948310483114831248313483144831548316483174831848319483204832148322483234832448325483264832748328483294833048331483324833348334483354833648337483384833948340483414834248343483444834548346483474834848349483504835148352483534835448355483564835748358483594836048361483624836348364483654836648367483684836948370483714837248373483744837548376483774837848379483804838148382483834838448385483864838748388483894839048391483924839348394483954839648397483984839948400484014840248403484044840548406484074840848409484104841148412484134841448415484164841748418484194842048421484224842348424484254842648427484284842948430484314843248433484344843548436484374843848439484404844148442484434844448445484464844748448484494845048451484524845348454484554845648457484584845948460484614846248463484644846548466484674846848469484704847148472484734847448475484764847748478484794848048481484824848348484484854848648487484884848948490484914849248493484944849548496484974849848499485004850148502485034850448505485064850748508485094851048511485124851348514485154851648517485184851948520485214852248523485244852548526485274852848529485304853148532485334853448535485364853748538485394854048541485424854348544485454854648547485484854948550485514855248553485544855548556485574855848559485604856148562485634856448565485664856748568485694857048571485724857348574485754857648577485784857948580485814858248583485844858548586485874858848589485904859148592485934859448595485964859748598485994860048601486024860348604486054860648607486084860948610486114861248613486144861548616486174861848619486204862148622486234862448625486264862748628486294863048631486324863348634486354863648637486384863948640486414864248643486444864548646486474864848649486504865148652486534865448655486564865748658486594866048661486624866348664486654866648667486684866948670486714867248673486744867548676486774867848679486804868148682486834868448685486864868748688486894869048691486924869348694486954869648697486984869948700487014870248703487044870548706487074870848709487104871148712487134871448715487164871748718487194872048721487224872348724487254872648727487284872948730487314873248733487344873548736487374873848739487404874148742487434874448745487464874748748487494875048751487524875348754487554875648757487584875948760487614876248763487644876548766487674876848769487704877148772487734877448775487764877748778487794878048781487824878348784487854878648787487884878948790487914879248793487944879548796487974879848799488004880148802488034880448805488064880748808488094881048811488124881348814488154881648817488184881948820488214882248823488244882548826488274882848829488304883148832488334883448835488364883748838488394884048841488424884348844488454884648847488484884948850488514885248853488544885548856488574885848859488604886148862488634886448865488664886748868488694887048871488724887348874488754887648877488784887948880488814888248883488844888548886488874888848889488904889148892488934889448895488964889748898488994890048901489024890348904489054890648907489084890948910489114891248913489144891548916489174891848919489204892148922489234892448925489264892748928489294893048931489324893348934489354893648937489384893948940489414894248943489444894548946489474894848949489504895148952489534895448955489564895748958489594896048961489624896348964489654896648967489684896948970489714897248973489744897548976489774897848979489804898148982489834898448985489864898748988489894899048991489924899348994489954899648997489984899949000490014900249003490044900549006490074900849009490104901149012490134901449015490164901749018490194902049021490224902349024490254902649027490284902949030490314903249033490344903549036490374903849039490404904149042490434904449045490464904749048490494905049051490524905349054490554905649057490584905949060490614906249063490644906549066490674906849069490704907149072490734907449075490764907749078490794908049081490824908349084490854908649087490884908949090490914909249093490944909549096490974909849099491004910149102491034910449105491064910749108491094911049111491124911349114491154911649117491184911949120491214912249123491244912549126491274912849129491304913149132491334913449135491364913749138491394914049141491424914349144491454914649147491484914949150491514915249153491544915549156491574915849159491604916149162491634916449165491664916749168491694917049171491724917349174491754917649177491784917949180491814918249183491844918549186491874918849189491904919149192491934919449195491964919749198491994920049201492024920349204492054920649207492084920949210492114921249213492144921549216492174921849219492204922149222492234922449225492264922749228492294923049231492324923349234492354923649237492384923949240492414924249243492444924549246492474924849249492504925149252492534925449255492564925749258492594926049261492624926349264492654926649267492684926949270492714927249273492744927549276492774927849279492804928149282492834928449285492864928749288492894929049291492924929349294492954929649297492984929949300493014930249303493044930549306493074930849309493104931149312493134931449315493164931749318493194932049321493224932349324493254932649327493284932949330493314933249333493344933549336493374933849339493404934149342493434934449345493464934749348493494935049351493524935349354493554935649357493584935949360493614936249363493644936549366493674936849369493704937149372493734937449375493764937749378493794938049381493824938349384493854938649387493884938949390493914939249393493944939549396493974939849399494004940149402494034940449405494064940749408494094941049411494124941349414494154941649417494184941949420494214942249423494244942549426494274942849429494304943149432494334943449435494364943749438494394944049441494424944349444494454944649447494484944949450494514945249453494544945549456494574945849459494604946149462494634946449465494664946749468494694947049471494724947349474494754947649477494784947949480494814948249483494844948549486494874948849489494904949149492494934949449495494964949749498494994950049501495024950349504495054950649507495084950949510495114951249513495144951549516495174951849519495204952149522495234952449525495264952749528495294953049531495324953349534495354953649537495384953949540495414954249543495444954549546495474954849549495504955149552495534955449555495564955749558495594956049561495624956349564495654956649567495684956949570495714957249573495744957549576495774957849579495804958149582495834958449585495864958749588495894959049591495924959349594495954959649597495984959949600496014960249603496044960549606496074960849609496104961149612496134961449615496164961749618496194962049621496224962349624496254962649627496284962949630496314963249633496344963549636496374963849639496404964149642496434964449645496464964749648496494965049651496524965349654496554965649657496584965949660496614966249663496644966549666496674966849669496704967149672496734967449675496764967749678496794968049681496824968349684496854968649687496884968949690496914969249693496944969549696496974969849699497004970149702497034970449705497064970749708497094971049711497124971349714497154971649717497184971949720497214972249723497244972549726497274972849729497304973149732497334973449735497364973749738497394974049741497424974349744497454974649747497484974949750497514975249753497544975549756497574975849759497604976149762497634976449765497664976749768497694977049771497724977349774497754977649777497784977949780497814978249783497844978549786497874978849789497904979149792497934979449795497964979749798497994980049801498024980349804498054980649807498084980949810498114981249813498144981549816498174981849819498204982149822498234982449825498264982749828498294983049831498324983349834498354983649837498384983949840498414984249843498444984549846498474984849849498504985149852498534985449855498564985749858498594986049861498624986349864498654986649867498684986949870498714987249873498744987549876498774987849879498804988149882498834988449885498864988749888498894989049891498924989349894498954989649897498984989949900499014990249903499044990549906499074990849909499104991149912499134991449915499164991749918499194992049921499224992349924499254992649927499284992949930499314993249933499344993549936499374993849939499404994149942499434994449945499464994749948499494995049951499524995349954499554995649957499584995949960499614996249963499644996549966499674996849969499704997149972499734997449975499764997749978499794998049981499824998349984499854998649987499884998949990499914999249993499944999549996499974999849999500005000150002500035000450005500065000750008500095001050011500125001350014500155001650017500185001950020500215002250023500245002550026500275002850029500305003150032500335003450035500365003750038500395004050041500425004350044500455004650047500485004950050500515005250053500545005550056500575005850059500605006150062500635006450065500665006750068500695007050071500725007350074500755007650077500785007950080500815008250083500845008550086500875008850089500905009150092500935009450095500965009750098500995010050101501025010350104501055010650107501085010950110501115011250113501145011550116501175011850119501205012150122501235012450125501265012750128501295013050131501325013350134501355013650137501385013950140501415014250143501445014550146501475014850149501505015150152501535015450155501565015750158501595016050161501625016350164501655016650167501685016950170501715017250173501745017550176501775017850179501805018150182501835018450185501865018750188501895019050191501925019350194501955019650197501985019950200502015020250203502045020550206502075020850209502105021150212502135021450215502165021750218502195022050221502225022350224502255022650227502285022950230502315023250233502345023550236502375023850239502405024150242502435024450245502465024750248502495025050251502525025350254502555025650257502585025950260502615026250263502645026550266502675026850269502705027150272502735027450275502765027750278502795028050281502825028350284502855028650287502885028950290502915029250293502945029550296502975029850299503005030150302503035030450305503065030750308503095031050311503125031350314503155031650317503185031950320503215032250323503245032550326503275032850329503305033150332503335033450335503365033750338503395034050341503425034350344503455034650347503485034950350503515035250353503545035550356503575035850359503605036150362503635036450365503665036750368503695037050371503725037350374503755037650377503785037950380503815038250383503845038550386503875038850389503905039150392503935039450395503965039750398503995040050401504025040350404504055040650407504085040950410504115041250413504145041550416504175041850419504205042150422504235042450425504265042750428504295043050431504325043350434504355043650437504385043950440504415044250443504445044550446504475044850449504505045150452504535045450455504565045750458504595046050461504625046350464504655046650467504685046950470504715047250473504745047550476504775047850479504805048150482504835048450485504865048750488504895049050491504925049350494504955049650497504985049950500505015050250503505045050550506505075050850509505105051150512505135051450515505165051750518505195052050521505225052350524505255052650527505285052950530505315053250533505345053550536505375053850539505405054150542505435054450545505465054750548505495055050551505525055350554505555055650557505585055950560505615056250563505645056550566505675056850569505705057150572505735057450575505765057750578505795058050581505825058350584505855058650587505885058950590505915059250593505945059550596505975059850599506005060150602506035060450605506065060750608506095061050611506125061350614506155061650617506185061950620506215062250623506245062550626506275062850629506305063150632506335063450635506365063750638506395064050641506425064350644506455064650647506485064950650506515065250653506545065550656506575065850659506605066150662506635066450665506665066750668506695067050671506725067350674506755067650677506785067950680506815068250683506845068550686506875068850689506905069150692506935069450695506965069750698506995070050701507025070350704507055070650707507085070950710507115071250713507145071550716507175071850719507205072150722507235072450725507265072750728507295073050731507325073350734507355073650737507385073950740507415074250743507445074550746507475074850749507505075150752507535075450755507565075750758507595076050761507625076350764507655076650767507685076950770507715077250773507745077550776507775077850779507805078150782507835078450785507865078750788507895079050791507925079350794507955079650797507985079950800508015080250803508045080550806508075080850809508105081150812508135081450815508165081750818508195082050821508225082350824508255082650827508285082950830508315083250833508345083550836508375083850839508405084150842508435084450845508465084750848508495085050851508525085350854508555085650857508585085950860508615086250863508645086550866508675086850869508705087150872508735087450875508765087750878508795088050881508825088350884508855088650887508885088950890508915089250893508945089550896508975089850899509005090150902509035090450905509065090750908509095091050911509125091350914509155091650917509185091950920509215092250923509245092550926509275092850929509305093150932509335093450935509365093750938509395094050941509425094350944509455094650947509485094950950509515095250953509545095550956509575095850959509605096150962509635096450965509665096750968509695097050971509725097350974509755097650977509785097950980509815098250983509845098550986509875098850989509905099150992509935099450995509965099750998509995100051001510025100351004510055100651007510085100951010510115101251013510145101551016510175101851019510205102151022510235102451025510265102751028510295103051031510325103351034510355103651037510385103951040510415104251043510445104551046510475104851049510505105151052510535105451055510565105751058510595106051061510625106351064510655106651067510685106951070510715107251073510745107551076510775107851079510805108151082510835108451085510865108751088510895109051091510925109351094510955109651097510985109951100511015110251103511045110551106511075110851109511105111151112511135111451115511165111751118511195112051121511225112351124511255112651127511285112951130511315113251133511345113551136511375113851139511405114151142511435114451145511465114751148511495115051151511525115351154511555115651157511585115951160511615116251163511645116551166511675116851169511705117151172511735117451175511765117751178511795118051181511825118351184511855118651187511885118951190511915119251193511945119551196511975119851199512005120151202512035120451205512065120751208512095121051211512125121351214512155121651217512185121951220512215122251223512245122551226512275122851229512305123151232512335123451235512365123751238512395124051241512425124351244512455124651247512485124951250512515125251253512545125551256512575125851259512605126151262512635126451265512665126751268512695127051271512725127351274512755127651277512785127951280512815128251283512845128551286512875128851289512905129151292512935129451295512965129751298512995130051301513025130351304513055130651307513085130951310513115131251313513145131551316513175131851319513205132151322513235132451325513265132751328513295133051331513325133351334513355133651337513385133951340513415134251343513445134551346513475134851349513505135151352513535135451355513565135751358513595136051361513625136351364513655136651367513685136951370513715137251373513745137551376513775137851379513805138151382513835138451385513865138751388513895139051391513925139351394513955139651397513985139951400514015140251403514045140551406514075140851409514105141151412514135141451415514165141751418514195142051421514225142351424514255142651427514285142951430514315143251433514345143551436514375143851439514405144151442514435144451445514465144751448514495145051451514525145351454514555145651457514585145951460514615146251463514645146551466514675146851469514705147151472514735147451475514765147751478514795148051481514825148351484514855148651487514885148951490514915149251493514945149551496514975149851499515005150151502515035150451505515065150751508515095151051511515125151351514515155151651517515185151951520515215152251523515245152551526515275152851529515305153151532515335153451535515365153751538515395154051541515425154351544515455154651547515485154951550515515155251553515545155551556515575155851559515605156151562515635156451565515665156751568515695157051571515725157351574515755157651577515785157951580515815158251583515845158551586515875158851589515905159151592515935159451595515965159751598515995160051601516025160351604516055160651607516085160951610516115161251613516145161551616516175161851619516205162151622516235162451625516265162751628516295163051631516325163351634516355163651637516385163951640516415164251643516445164551646516475164851649516505165151652516535165451655516565165751658516595166051661516625166351664516655166651667516685166951670516715167251673516745167551676516775167851679516805168151682516835168451685516865168751688516895169051691516925169351694516955169651697516985169951700517015170251703517045170551706517075170851709517105171151712517135171451715517165171751718517195172051721517225172351724517255172651727517285172951730517315173251733517345173551736517375173851739517405174151742517435174451745517465174751748517495175051751517525175351754517555175651757517585175951760517615176251763517645176551766517675176851769517705177151772517735177451775517765177751778517795178051781517825178351784517855178651787517885178951790517915179251793517945179551796517975179851799518005180151802518035180451805518065180751808518095181051811518125181351814518155181651817518185181951820518215182251823518245182551826518275182851829518305183151832518335183451835518365183751838518395184051841518425184351844518455184651847518485184951850518515185251853518545185551856518575185851859518605186151862518635186451865518665186751868518695187051871518725187351874518755187651877518785187951880518815188251883518845188551886518875188851889518905189151892518935189451895518965189751898518995190051901519025190351904519055190651907519085190951910519115191251913519145191551916519175191851919519205192151922519235192451925519265192751928519295193051931519325193351934519355193651937519385193951940519415194251943519445194551946519475194851949519505195151952519535195451955519565195751958519595196051961519625196351964519655196651967519685196951970519715197251973519745197551976519775197851979519805198151982519835198451985519865198751988519895199051991519925199351994519955199651997519985199952000520015200252003520045200552006520075200852009520105201152012520135201452015520165201752018520195202052021520225202352024520255202652027520285202952030520315203252033520345203552036520375203852039520405204152042520435204452045520465204752048520495205052051520525205352054520555205652057520585205952060520615206252063520645206552066520675206852069520705207152072520735207452075520765207752078520795208052081520825208352084520855208652087520885208952090520915209252093520945209552096520975209852099521005210152102521035210452105521065210752108521095211052111521125211352114521155211652117521185211952120521215212252123521245212552126521275212852129521305213152132521335213452135521365213752138521395214052141521425214352144521455214652147521485214952150521515215252153521545215552156521575215852159521605216152162521635216452165521665216752168521695217052171521725217352174521755217652177521785217952180521815218252183521845218552186521875218852189521905219152192521935219452195521965219752198521995220052201522025220352204522055220652207522085220952210522115221252213522145221552216522175221852219522205222152222522235222452225522265222752228522295223052231522325223352234522355223652237522385223952240522415224252243522445224552246522475224852249522505225152252522535225452255522565225752258522595226052261522625226352264522655226652267522685226952270522715227252273522745227552276522775227852279522805228152282522835228452285522865228752288522895229052291522925229352294522955229652297522985229952300523015230252303523045230552306523075230852309523105231152312523135231452315523165231752318523195232052321523225232352324523255232652327523285232952330523315233252333523345233552336523375233852339523405234152342523435234452345523465234752348523495235052351523525235352354523555235652357523585235952360523615236252363523645236552366523675236852369523705237152372523735237452375523765237752378523795238052381523825238352384523855238652387523885238952390523915239252393523945239552396523975239852399524005240152402524035240452405524065240752408524095241052411524125241352414524155241652417524185241952420524215242252423524245242552426524275242852429524305243152432524335243452435524365243752438524395244052441524425244352444524455244652447524485244952450524515245252453524545245552456524575245852459524605246152462524635246452465524665246752468524695247052471524725247352474524755247652477524785247952480524815248252483524845248552486524875248852489524905249152492524935249452495524965249752498524995250052501525025250352504525055250652507525085250952510525115251252513525145251552516525175251852519525205252152522525235252452525525265252752528525295253052531525325253352534525355253652537525385253952540525415254252543525445254552546525475254852549525505255152552525535255452555525565255752558525595256052561525625256352564525655256652567525685256952570525715257252573525745257552576525775257852579525805258152582525835258452585525865258752588525895259052591525925259352594525955259652597525985259952600526015260252603526045260552606526075260852609526105261152612526135261452615526165261752618526195262052621526225262352624526255262652627526285262952630526315263252633526345263552636526375263852639526405264152642526435264452645526465264752648526495265052651526525265352654526555265652657526585265952660526615266252663526645266552666526675266852669526705267152672526735267452675526765267752678526795268052681526825268352684526855268652687526885268952690526915269252693526945269552696526975269852699527005270152702527035270452705527065270752708527095271052711527125271352714527155271652717527185271952720527215272252723527245272552726527275272852729527305273152732527335273452735527365273752738527395274052741527425274352744527455274652747527485274952750527515275252753527545275552756527575275852759527605276152762527635276452765527665276752768527695277052771527725277352774527755277652777527785277952780527815278252783527845278552786527875278852789527905279152792527935279452795527965279752798527995280052801528025280352804528055280652807528085280952810528115281252813528145281552816528175281852819528205282152822528235282452825528265282752828528295283052831528325283352834528355283652837528385283952840528415284252843528445284552846528475284852849528505285152852528535285452855528565285752858528595286052861528625286352864528655286652867528685286952870528715287252873528745287552876528775287852879528805288152882528835288452885528865288752888528895289052891528925289352894528955289652897528985289952900529015290252903529045290552906529075290852909529105291152912529135291452915529165291752918529195292052921529225292352924529255292652927529285292952930529315293252933529345293552936529375293852939529405294152942529435294452945529465294752948529495295052951529525295352954529555295652957529585295952960529615296252963529645296552966529675296852969529705297152972529735297452975529765297752978529795298052981529825298352984529855298652987529885298952990529915299252993529945299552996529975299852999530005300153002530035300453005530065300753008530095301053011530125301353014530155301653017530185301953020530215302253023530245302553026530275302853029530305303153032530335303453035530365303753038530395304053041530425304353044530455304653047530485304953050530515305253053530545305553056530575305853059530605306153062530635306453065530665306753068530695307053071530725307353074530755307653077530785307953080530815308253083530845308553086530875308853089530905309153092530935309453095530965309753098530995310053101531025310353104531055310653107531085310953110531115311253113531145311553116531175311853119531205312153122531235312453125531265312753128531295313053131531325313353134531355313653137531385313953140531415314253143531445314553146531475314853149531505315153152531535315453155531565315753158531595316053161531625316353164531655316653167531685316953170531715317253173531745317553176531775317853179531805318153182531835318453185531865318753188531895319053191531925319353194531955319653197531985319953200532015320253203532045320553206532075320853209532105321153212532135321453215532165321753218532195322053221532225322353224532255322653227532285322953230532315323253233532345323553236532375323853239532405324153242532435324453245532465324753248532495325053251532525325353254532555325653257532585325953260532615326253263532645326553266532675326853269532705327153272532735327453275532765327753278532795328053281532825328353284532855328653287532885328953290532915329253293532945329553296532975329853299533005330153302533035330453305533065330753308533095331053311533125331353314533155331653317533185331953320533215332253323533245332553326533275332853329533305333153332533335333453335533365333753338533395334053341533425334353344533455334653347533485334953350533515335253353533545335553356533575335853359533605336153362533635336453365533665336753368533695337053371533725337353374533755337653377533785337953380533815338253383533845338553386533875338853389533905339153392533935339453395533965339753398533995340053401534025340353404534055340653407534085340953410534115341253413534145341553416534175341853419534205342153422534235342453425534265342753428534295343053431534325343353434534355343653437534385343953440534415344253443534445344553446534475344853449534505345153452534535345453455534565345753458534595346053461534625346353464534655346653467534685346953470534715347253473534745347553476534775347853479534805348153482534835348453485534865348753488534895349053491534925349353494534955349653497534985349953500535015350253503535045350553506535075350853509535105351153512535135351453515535165351753518535195352053521535225352353524535255352653527535285352953530535315353253533535345353553536535375353853539535405354153542535435354453545535465354753548535495355053551535525355353554535555355653557535585355953560535615356253563535645356553566535675356853569535705357153572535735357453575535765357753578535795358053581535825358353584535855358653587535885358953590535915359253593535945359553596535975359853599536005360153602536035360453605536065360753608 |
- /******/ (function(modules) { // webpackBootstrap
- /******/ // install a JSONP callback for chunk loading
- /******/ var parentJsonpFunction = window["webpackJsonp"];
- /******/ window["webpackJsonp"] = function webpackJsonpCallback(chunkIds, moreModules, executeModules) {
- /******/ // add "moreModules" to the modules object,
- /******/ // then flag all "chunkIds" as loaded and fire callback
- /******/ var moduleId, chunkId, i = 0, resolves = [], result;
- /******/ for(;i < chunkIds.length; i++) {
- /******/ chunkId = chunkIds[i];
- /******/ if(installedChunks[chunkId]) {
- /******/ resolves.push(installedChunks[chunkId][0]);
- /******/ }
- /******/ installedChunks[chunkId] = 0;
- /******/ }
- /******/ for(moduleId in moreModules) {
- /******/ if(Object.prototype.hasOwnProperty.call(moreModules, moduleId)) {
- /******/ modules[moduleId] = moreModules[moduleId];
- /******/ }
- /******/ }
- /******/ if(parentJsonpFunction) parentJsonpFunction(chunkIds, moreModules, executeModules);
- /******/ while(resolves.length) {
- /******/ resolves.shift()();
- /******/ }
- /******/
- /******/ };
- /******/ function hotDisposeChunk(chunkId) {
- /******/ delete installedChunks[chunkId];
- /******/ }
- /******/ var parentHotUpdateCallback = this["webpackHotUpdate"];
- /******/ this["webpackHotUpdate"] =
- /******/ function webpackHotUpdateCallback(chunkId, moreModules) { // eslint-disable-line no-unused-vars
- /******/ hotAddUpdateChunk(chunkId, moreModules);
- /******/ if(parentHotUpdateCallback) parentHotUpdateCallback(chunkId, moreModules);
- /******/ } ;
- /******/
- /******/ function hotDownloadUpdateChunk(chunkId) { // eslint-disable-line no-unused-vars
- /******/ var head = document.getElementsByTagName("head")[0];
- /******/ var script = document.createElement("script");
- /******/ script.type = "text/javascript";
- /******/ script.charset = "utf-8";
- /******/ script.src = __webpack_require__.p + "" + chunkId + "." + hotCurrentHash + ".hot-update.js";
- /******/ ;
- /******/ head.appendChild(script);
- /******/ }
- /******/
- /******/ function hotDownloadManifest(requestTimeout) { // eslint-disable-line no-unused-vars
- /******/ requestTimeout = requestTimeout || 10000;
- /******/ return new Promise(function(resolve, reject) {
- /******/ if(typeof XMLHttpRequest === "undefined")
- /******/ return reject(new Error("No browser support"));
- /******/ try {
- /******/ var request = new XMLHttpRequest();
- /******/ var requestPath = __webpack_require__.p + "" + hotCurrentHash + ".hot-update.json";
- /******/ request.open("GET", requestPath, true);
- /******/ request.timeout = requestTimeout;
- /******/ request.send(null);
- /******/ } catch(err) {
- /******/ return reject(err);
- /******/ }
- /******/ request.onreadystatechange = function() {
- /******/ if(request.readyState !== 4) return;
- /******/ if(request.status === 0) {
- /******/ // timeout
- /******/ reject(new Error("Manifest request to " + requestPath + " timed out."));
- /******/ } else if(request.status === 404) {
- /******/ // no update available
- /******/ resolve();
- /******/ } else if(request.status !== 200 && request.status !== 304) {
- /******/ // other failure
- /******/ reject(new Error("Manifest request to " + requestPath + " failed."));
- /******/ } else {
- /******/ // success
- /******/ try {
- /******/ var update = JSON.parse(request.responseText);
- /******/ } catch(e) {
- /******/ reject(e);
- /******/ return;
- /******/ }
- /******/ resolve(update);
- /******/ }
- /******/ };
- /******/ });
- /******/ }
- /******/
- /******/
- /******/
- /******/ var hotApplyOnUpdate = true;
- /******/ var hotCurrentHash = "6b0de470e57b6d1a81a7"; // eslint-disable-line no-unused-vars
- /******/ var hotRequestTimeout = 10000;
- /******/ var hotCurrentModuleData = {};
- /******/ var hotCurrentChildModule; // eslint-disable-line no-unused-vars
- /******/ var hotCurrentParents = []; // eslint-disable-line no-unused-vars
- /******/ var hotCurrentParentsTemp = []; // eslint-disable-line no-unused-vars
- /******/
- /******/ function hotCreateRequire(moduleId) { // eslint-disable-line no-unused-vars
- /******/ var me = installedModules[moduleId];
- /******/ if(!me) return __webpack_require__;
- /******/ var fn = function(request) {
- /******/ if(me.hot.active) {
- /******/ if(installedModules[request]) {
- /******/ if(installedModules[request].parents.indexOf(moduleId) < 0)
- /******/ installedModules[request].parents.push(moduleId);
- /******/ } else {
- /******/ hotCurrentParents = [moduleId];
- /******/ hotCurrentChildModule = request;
- /******/ }
- /******/ if(me.children.indexOf(request) < 0)
- /******/ me.children.push(request);
- /******/ } else {
- /******/ console.warn("[HMR] unexpected require(" + request + ") from disposed module " + moduleId);
- /******/ hotCurrentParents = [];
- /******/ }
- /******/ return __webpack_require__(request);
- /******/ };
- /******/ var ObjectFactory = function ObjectFactory(name) {
- /******/ return {
- /******/ configurable: true,
- /******/ enumerable: true,
- /******/ get: function() {
- /******/ return __webpack_require__[name];
- /******/ },
- /******/ set: function(value) {
- /******/ __webpack_require__[name] = value;
- /******/ }
- /******/ };
- /******/ };
- /******/ for(var name in __webpack_require__) {
- /******/ if(Object.prototype.hasOwnProperty.call(__webpack_require__, name) && name !== "e") {
- /******/ Object.defineProperty(fn, name, ObjectFactory(name));
- /******/ }
- /******/ }
- /******/ fn.e = function(chunkId) {
- /******/ if(hotStatus === "ready")
- /******/ hotSetStatus("prepare");
- /******/ hotChunksLoading++;
- /******/ return __webpack_require__.e(chunkId).then(finishChunkLoading, function(err) {
- /******/ finishChunkLoading();
- /******/ throw err;
- /******/ });
- /******/
- /******/ function finishChunkLoading() {
- /******/ hotChunksLoading--;
- /******/ if(hotStatus === "prepare") {
- /******/ if(!hotWaitingFilesMap[chunkId]) {
- /******/ hotEnsureUpdateChunk(chunkId);
- /******/ }
- /******/ if(hotChunksLoading === 0 && hotWaitingFiles === 0) {
- /******/ hotUpdateDownloaded();
- /******/ }
- /******/ }
- /******/ }
- /******/ };
- /******/ return fn;
- /******/ }
- /******/
- /******/ function hotCreateModule(moduleId) { // eslint-disable-line no-unused-vars
- /******/ var hot = {
- /******/ // private stuff
- /******/ _acceptedDependencies: {},
- /******/ _declinedDependencies: {},
- /******/ _selfAccepted: false,
- /******/ _selfDeclined: false,
- /******/ _disposeHandlers: [],
- /******/ _main: hotCurrentChildModule !== moduleId,
- /******/
- /******/ // Module API
- /******/ active: true,
- /******/ accept: function(dep, callback) {
- /******/ if(typeof dep === "undefined")
- /******/ hot._selfAccepted = true;
- /******/ else if(typeof dep === "function")
- /******/ hot._selfAccepted = dep;
- /******/ else if(typeof dep === "object")
- /******/ for(var i = 0; i < dep.length; i++)
- /******/ hot._acceptedDependencies[dep[i]] = callback || function() {};
- /******/ else
- /******/ hot._acceptedDependencies[dep] = callback || function() {};
- /******/ },
- /******/ decline: function(dep) {
- /******/ if(typeof dep === "undefined")
- /******/ hot._selfDeclined = true;
- /******/ else if(typeof dep === "object")
- /******/ for(var i = 0; i < dep.length; i++)
- /******/ hot._declinedDependencies[dep[i]] = true;
- /******/ else
- /******/ hot._declinedDependencies[dep] = true;
- /******/ },
- /******/ dispose: function(callback) {
- /******/ hot._disposeHandlers.push(callback);
- /******/ },
- /******/ addDisposeHandler: function(callback) {
- /******/ hot._disposeHandlers.push(callback);
- /******/ },
- /******/ removeDisposeHandler: function(callback) {
- /******/ var idx = hot._disposeHandlers.indexOf(callback);
- /******/ if(idx >= 0) hot._disposeHandlers.splice(idx, 1);
- /******/ },
- /******/
- /******/ // Management API
- /******/ check: hotCheck,
- /******/ apply: hotApply,
- /******/ status: function(l) {
- /******/ if(!l) return hotStatus;
- /******/ hotStatusHandlers.push(l);
- /******/ },
- /******/ addStatusHandler: function(l) {
- /******/ hotStatusHandlers.push(l);
- /******/ },
- /******/ removeStatusHandler: function(l) {
- /******/ var idx = hotStatusHandlers.indexOf(l);
- /******/ if(idx >= 0) hotStatusHandlers.splice(idx, 1);
- /******/ },
- /******/
- /******/ //inherit from previous dispose call
- /******/ data: hotCurrentModuleData[moduleId]
- /******/ };
- /******/ hotCurrentChildModule = undefined;
- /******/ return hot;
- /******/ }
- /******/
- /******/ var hotStatusHandlers = [];
- /******/ var hotStatus = "idle";
- /******/
- /******/ function hotSetStatus(newStatus) {
- /******/ hotStatus = newStatus;
- /******/ for(var i = 0; i < hotStatusHandlers.length; i++)
- /******/ hotStatusHandlers[i].call(null, newStatus);
- /******/ }
- /******/
- /******/ // while downloading
- /******/ var hotWaitingFiles = 0;
- /******/ var hotChunksLoading = 0;
- /******/ var hotWaitingFilesMap = {};
- /******/ var hotRequestedFilesMap = {};
- /******/ var hotAvailableFilesMap = {};
- /******/ var hotDeferred;
- /******/
- /******/ // The update info
- /******/ var hotUpdate, hotUpdateNewHash;
- /******/
- /******/ function toModuleId(id) {
- /******/ var isNumber = (+id) + "" === id;
- /******/ return isNumber ? +id : id;
- /******/ }
- /******/
- /******/ function hotCheck(apply) {
- /******/ if(hotStatus !== "idle") throw new Error("check() is only allowed in idle status");
- /******/ hotApplyOnUpdate = apply;
- /******/ hotSetStatus("check");
- /******/ return hotDownloadManifest(hotRequestTimeout).then(function(update) {
- /******/ if(!update) {
- /******/ hotSetStatus("idle");
- /******/ return null;
- /******/ }
- /******/ hotRequestedFilesMap = {};
- /******/ hotWaitingFilesMap = {};
- /******/ hotAvailableFilesMap = update.c;
- /******/ hotUpdateNewHash = update.h;
- /******/
- /******/ hotSetStatus("prepare");
- /******/ var promise = new Promise(function(resolve, reject) {
- /******/ hotDeferred = {
- /******/ resolve: resolve,
- /******/ reject: reject
- /******/ };
- /******/ });
- /******/ hotUpdate = {};
- /******/ for(var chunkId in installedChunks)
- /******/ { // eslint-disable-line no-lone-blocks
- /******/ /*globals chunkId */
- /******/ hotEnsureUpdateChunk(chunkId);
- /******/ }
- /******/ if(hotStatus === "prepare" && hotChunksLoading === 0 && hotWaitingFiles === 0) {
- /******/ hotUpdateDownloaded();
- /******/ }
- /******/ return promise;
- /******/ });
- /******/ }
- /******/
- /******/ function hotAddUpdateChunk(chunkId, moreModules) { // eslint-disable-line no-unused-vars
- /******/ if(!hotAvailableFilesMap[chunkId] || !hotRequestedFilesMap[chunkId])
- /******/ return;
- /******/ hotRequestedFilesMap[chunkId] = false;
- /******/ for(var moduleId in moreModules) {
- /******/ if(Object.prototype.hasOwnProperty.call(moreModules, moduleId)) {
- /******/ hotUpdate[moduleId] = moreModules[moduleId];
- /******/ }
- /******/ }
- /******/ if(--hotWaitingFiles === 0 && hotChunksLoading === 0) {
- /******/ hotUpdateDownloaded();
- /******/ }
- /******/ }
- /******/
- /******/ function hotEnsureUpdateChunk(chunkId) {
- /******/ if(!hotAvailableFilesMap[chunkId]) {
- /******/ hotWaitingFilesMap[chunkId] = true;
- /******/ } else {
- /******/ hotRequestedFilesMap[chunkId] = true;
- /******/ hotWaitingFiles++;
- /******/ hotDownloadUpdateChunk(chunkId);
- /******/ }
- /******/ }
- /******/
- /******/ function hotUpdateDownloaded() {
- /******/ hotSetStatus("ready");
- /******/ var deferred = hotDeferred;
- /******/ hotDeferred = null;
- /******/ if(!deferred) return;
- /******/ if(hotApplyOnUpdate) {
- /******/ // Wrap deferred object in Promise to mark it as a well-handled Promise to
- /******/ // avoid triggering uncaught exception warning in Chrome.
- /******/ // See https://bugs.chromium.org/p/chromium/issues/detail?id=465666
- /******/ Promise.resolve().then(function() {
- /******/ return hotApply(hotApplyOnUpdate);
- /******/ }).then(
- /******/ function(result) {
- /******/ deferred.resolve(result);
- /******/ },
- /******/ function(err) {
- /******/ deferred.reject(err);
- /******/ }
- /******/ );
- /******/ } else {
- /******/ var outdatedModules = [];
- /******/ for(var id in hotUpdate) {
- /******/ if(Object.prototype.hasOwnProperty.call(hotUpdate, id)) {
- /******/ outdatedModules.push(toModuleId(id));
- /******/ }
- /******/ }
- /******/ deferred.resolve(outdatedModules);
- /******/ }
- /******/ }
- /******/
- /******/ function hotApply(options) {
- /******/ if(hotStatus !== "ready") throw new Error("apply() is only allowed in ready status");
- /******/ options = options || {};
- /******/
- /******/ var cb;
- /******/ var i;
- /******/ var j;
- /******/ var module;
- /******/ var moduleId;
- /******/
- /******/ function getAffectedStuff(updateModuleId) {
- /******/ var outdatedModules = [updateModuleId];
- /******/ var outdatedDependencies = {};
- /******/
- /******/ var queue = outdatedModules.slice().map(function(id) {
- /******/ return {
- /******/ chain: [id],
- /******/ id: id
- /******/ };
- /******/ });
- /******/ while(queue.length > 0) {
- /******/ var queueItem = queue.pop();
- /******/ var moduleId = queueItem.id;
- /******/ var chain = queueItem.chain;
- /******/ module = installedModules[moduleId];
- /******/ if(!module || module.hot._selfAccepted)
- /******/ continue;
- /******/ if(module.hot._selfDeclined) {
- /******/ return {
- /******/ type: "self-declined",
- /******/ chain: chain,
- /******/ moduleId: moduleId
- /******/ };
- /******/ }
- /******/ if(module.hot._main) {
- /******/ return {
- /******/ type: "unaccepted",
- /******/ chain: chain,
- /******/ moduleId: moduleId
- /******/ };
- /******/ }
- /******/ for(var i = 0; i < module.parents.length; i++) {
- /******/ var parentId = module.parents[i];
- /******/ var parent = installedModules[parentId];
- /******/ if(!parent) continue;
- /******/ if(parent.hot._declinedDependencies[moduleId]) {
- /******/ return {
- /******/ type: "declined",
- /******/ chain: chain.concat([parentId]),
- /******/ moduleId: moduleId,
- /******/ parentId: parentId
- /******/ };
- /******/ }
- /******/ if(outdatedModules.indexOf(parentId) >= 0) continue;
- /******/ if(parent.hot._acceptedDependencies[moduleId]) {
- /******/ if(!outdatedDependencies[parentId])
- /******/ outdatedDependencies[parentId] = [];
- /******/ addAllToSet(outdatedDependencies[parentId], [moduleId]);
- /******/ continue;
- /******/ }
- /******/ delete outdatedDependencies[parentId];
- /******/ outdatedModules.push(parentId);
- /******/ queue.push({
- /******/ chain: chain.concat([parentId]),
- /******/ id: parentId
- /******/ });
- /******/ }
- /******/ }
- /******/
- /******/ return {
- /******/ type: "accepted",
- /******/ moduleId: updateModuleId,
- /******/ outdatedModules: outdatedModules,
- /******/ outdatedDependencies: outdatedDependencies
- /******/ };
- /******/ }
- /******/
- /******/ function addAllToSet(a, b) {
- /******/ for(var i = 0; i < b.length; i++) {
- /******/ var item = b[i];
- /******/ if(a.indexOf(item) < 0)
- /******/ a.push(item);
- /******/ }
- /******/ }
- /******/
- /******/ // at begin all updates modules are outdated
- /******/ // the "outdated" status can propagate to parents if they don't accept the children
- /******/ var outdatedDependencies = {};
- /******/ var outdatedModules = [];
- /******/ var appliedUpdate = {};
- /******/
- /******/ var warnUnexpectedRequire = function warnUnexpectedRequire() {
- /******/ console.warn("[HMR] unexpected require(" + result.moduleId + ") to disposed module");
- /******/ };
- /******/
- /******/ for(var id in hotUpdate) {
- /******/ if(Object.prototype.hasOwnProperty.call(hotUpdate, id)) {
- /******/ moduleId = toModuleId(id);
- /******/ var result;
- /******/ if(hotUpdate[id]) {
- /******/ result = getAffectedStuff(moduleId);
- /******/ } else {
- /******/ result = {
- /******/ type: "disposed",
- /******/ moduleId: id
- /******/ };
- /******/ }
- /******/ var abortError = false;
- /******/ var doApply = false;
- /******/ var doDispose = false;
- /******/ var chainInfo = "";
- /******/ if(result.chain) {
- /******/ chainInfo = "\nUpdate propagation: " + result.chain.join(" -> ");
- /******/ }
- /******/ switch(result.type) {
- /******/ case "self-declined":
- /******/ if(options.onDeclined)
- /******/ options.onDeclined(result);
- /******/ if(!options.ignoreDeclined)
- /******/ abortError = new Error("Aborted because of self decline: " + result.moduleId + chainInfo);
- /******/ break;
- /******/ case "declined":
- /******/ if(options.onDeclined)
- /******/ options.onDeclined(result);
- /******/ if(!options.ignoreDeclined)
- /******/ abortError = new Error("Aborted because of declined dependency: " + result.moduleId + " in " + result.parentId + chainInfo);
- /******/ break;
- /******/ case "unaccepted":
- /******/ if(options.onUnaccepted)
- /******/ options.onUnaccepted(result);
- /******/ if(!options.ignoreUnaccepted)
- /******/ abortError = new Error("Aborted because " + moduleId + " is not accepted" + chainInfo);
- /******/ break;
- /******/ case "accepted":
- /******/ if(options.onAccepted)
- /******/ options.onAccepted(result);
- /******/ doApply = true;
- /******/ break;
- /******/ case "disposed":
- /******/ if(options.onDisposed)
- /******/ options.onDisposed(result);
- /******/ doDispose = true;
- /******/ break;
- /******/ default:
- /******/ throw new Error("Unexception type " + result.type);
- /******/ }
- /******/ if(abortError) {
- /******/ hotSetStatus("abort");
- /******/ return Promise.reject(abortError);
- /******/ }
- /******/ if(doApply) {
- /******/ appliedUpdate[moduleId] = hotUpdate[moduleId];
- /******/ addAllToSet(outdatedModules, result.outdatedModules);
- /******/ for(moduleId in result.outdatedDependencies) {
- /******/ if(Object.prototype.hasOwnProperty.call(result.outdatedDependencies, moduleId)) {
- /******/ if(!outdatedDependencies[moduleId])
- /******/ outdatedDependencies[moduleId] = [];
- /******/ addAllToSet(outdatedDependencies[moduleId], result.outdatedDependencies[moduleId]);
- /******/ }
- /******/ }
- /******/ }
- /******/ if(doDispose) {
- /******/ addAllToSet(outdatedModules, [result.moduleId]);
- /******/ appliedUpdate[moduleId] = warnUnexpectedRequire;
- /******/ }
- /******/ }
- /******/ }
- /******/
- /******/ // Store self accepted outdated modules to require them later by the module system
- /******/ var outdatedSelfAcceptedModules = [];
- /******/ for(i = 0; i < outdatedModules.length; i++) {
- /******/ moduleId = outdatedModules[i];
- /******/ if(installedModules[moduleId] && installedModules[moduleId].hot._selfAccepted)
- /******/ outdatedSelfAcceptedModules.push({
- /******/ module: moduleId,
- /******/ errorHandler: installedModules[moduleId].hot._selfAccepted
- /******/ });
- /******/ }
- /******/
- /******/ // Now in "dispose" phase
- /******/ hotSetStatus("dispose");
- /******/ Object.keys(hotAvailableFilesMap).forEach(function(chunkId) {
- /******/ if(hotAvailableFilesMap[chunkId] === false) {
- /******/ hotDisposeChunk(chunkId);
- /******/ }
- /******/ });
- /******/
- /******/ var idx;
- /******/ var queue = outdatedModules.slice();
- /******/ while(queue.length > 0) {
- /******/ moduleId = queue.pop();
- /******/ module = installedModules[moduleId];
- /******/ if(!module) continue;
- /******/
- /******/ var data = {};
- /******/
- /******/ // Call dispose handlers
- /******/ var disposeHandlers = module.hot._disposeHandlers;
- /******/ for(j = 0; j < disposeHandlers.length; j++) {
- /******/ cb = disposeHandlers[j];
- /******/ cb(data);
- /******/ }
- /******/ hotCurrentModuleData[moduleId] = data;
- /******/
- /******/ // disable module (this disables requires from this module)
- /******/ module.hot.active = false;
- /******/
- /******/ // remove module from cache
- /******/ delete installedModules[moduleId];
- /******/
- /******/ // when disposing there is no need to call dispose handler
- /******/ delete outdatedDependencies[moduleId];
- /******/
- /******/ // remove "parents" references from all children
- /******/ for(j = 0; j < module.children.length; j++) {
- /******/ var child = installedModules[module.children[j]];
- /******/ if(!child) continue;
- /******/ idx = child.parents.indexOf(moduleId);
- /******/ if(idx >= 0) {
- /******/ child.parents.splice(idx, 1);
- /******/ }
- /******/ }
- /******/ }
- /******/
- /******/ // remove outdated dependency from module children
- /******/ var dependency;
- /******/ var moduleOutdatedDependencies;
- /******/ for(moduleId in outdatedDependencies) {
- /******/ if(Object.prototype.hasOwnProperty.call(outdatedDependencies, moduleId)) {
- /******/ module = installedModules[moduleId];
- /******/ if(module) {
- /******/ moduleOutdatedDependencies = outdatedDependencies[moduleId];
- /******/ for(j = 0; j < moduleOutdatedDependencies.length; j++) {
- /******/ dependency = moduleOutdatedDependencies[j];
- /******/ idx = module.children.indexOf(dependency);
- /******/ if(idx >= 0) module.children.splice(idx, 1);
- /******/ }
- /******/ }
- /******/ }
- /******/ }
- /******/
- /******/ // Not in "apply" phase
- /******/ hotSetStatus("apply");
- /******/
- /******/ hotCurrentHash = hotUpdateNewHash;
- /******/
- /******/ // insert new code
- /******/ for(moduleId in appliedUpdate) {
- /******/ if(Object.prototype.hasOwnProperty.call(appliedUpdate, moduleId)) {
- /******/ modules[moduleId] = appliedUpdate[moduleId];
- /******/ }
- /******/ }
- /******/
- /******/ // call accept handlers
- /******/ var error = null;
- /******/ for(moduleId in outdatedDependencies) {
- /******/ if(Object.prototype.hasOwnProperty.call(outdatedDependencies, moduleId)) {
- /******/ module = installedModules[moduleId];
- /******/ if(module) {
- /******/ moduleOutdatedDependencies = outdatedDependencies[moduleId];
- /******/ var callbacks = [];
- /******/ for(i = 0; i < moduleOutdatedDependencies.length; i++) {
- /******/ dependency = moduleOutdatedDependencies[i];
- /******/ cb = module.hot._acceptedDependencies[dependency];
- /******/ if(cb) {
- /******/ if(callbacks.indexOf(cb) >= 0) continue;
- /******/ callbacks.push(cb);
- /******/ }
- /******/ }
- /******/ for(i = 0; i < callbacks.length; i++) {
- /******/ cb = callbacks[i];
- /******/ try {
- /******/ cb(moduleOutdatedDependencies);
- /******/ } catch(err) {
- /******/ if(options.onErrored) {
- /******/ options.onErrored({
- /******/ type: "accept-errored",
- /******/ moduleId: moduleId,
- /******/ dependencyId: moduleOutdatedDependencies[i],
- /******/ error: err
- /******/ });
- /******/ }
- /******/ if(!options.ignoreErrored) {
- /******/ if(!error)
- /******/ error = err;
- /******/ }
- /******/ }
- /******/ }
- /******/ }
- /******/ }
- /******/ }
- /******/
- /******/ // Load self accepted modules
- /******/ for(i = 0; i < outdatedSelfAcceptedModules.length; i++) {
- /******/ var item = outdatedSelfAcceptedModules[i];
- /******/ moduleId = item.module;
- /******/ hotCurrentParents = [moduleId];
- /******/ try {
- /******/ __webpack_require__(moduleId);
- /******/ } catch(err) {
- /******/ if(typeof item.errorHandler === "function") {
- /******/ try {
- /******/ item.errorHandler(err);
- /******/ } catch(err2) {
- /******/ if(options.onErrored) {
- /******/ options.onErrored({
- /******/ type: "self-accept-error-handler-errored",
- /******/ moduleId: moduleId,
- /******/ error: err2,
- /******/ orginalError: err, // TODO remove in webpack 4
- /******/ originalError: err
- /******/ });
- /******/ }
- /******/ if(!options.ignoreErrored) {
- /******/ if(!error)
- /******/ error = err2;
- /******/ }
- /******/ if(!error)
- /******/ error = err;
- /******/ }
- /******/ } else {
- /******/ if(options.onErrored) {
- /******/ options.onErrored({
- /******/ type: "self-accept-errored",
- /******/ moduleId: moduleId,
- /******/ error: err
- /******/ });
- /******/ }
- /******/ if(!options.ignoreErrored) {
- /******/ if(!error)
- /******/ error = err;
- /******/ }
- /******/ }
- /******/ }
- /******/ }
- /******/
- /******/ // handle errors in accept handlers and self accepted module load
- /******/ if(error) {
- /******/ hotSetStatus("fail");
- /******/ return Promise.reject(error);
- /******/ }
- /******/
- /******/ hotSetStatus("idle");
- /******/ return new Promise(function(resolve) {
- /******/ resolve(outdatedModules);
- /******/ });
- /******/ }
- /******/
- /******/ // The module cache
- /******/ var installedModules = {};
- /******/
- /******/ // objects to store loaded and loading chunks
- /******/ var installedChunks = {
- /******/ 3: 0
- /******/ };
- /******/
- /******/ // The require function
- /******/ function __webpack_require__(moduleId) {
- /******/
- /******/ // Check if module is in cache
- /******/ if(installedModules[moduleId]) {
- /******/ return installedModules[moduleId].exports;
- /******/ }
- /******/ // Create a new module (and put it into the cache)
- /******/ var module = installedModules[moduleId] = {
- /******/ i: moduleId,
- /******/ l: false,
- /******/ exports: {},
- /******/ hot: hotCreateModule(moduleId),
- /******/ parents: (hotCurrentParentsTemp = hotCurrentParents, hotCurrentParents = [], hotCurrentParentsTemp),
- /******/ children: []
- /******/ };
- /******/
- /******/ // Execute the module function
- /******/ modules[moduleId].call(module.exports, module, module.exports, hotCreateRequire(moduleId));
- /******/
- /******/ // Flag the module as loaded
- /******/ module.l = true;
- /******/
- /******/ // Return the exports of the module
- /******/ return module.exports;
- /******/ }
- /******/
- /******/ // This file contains only the entry chunk.
- /******/ // The chunk loading function for additional chunks
- /******/ __webpack_require__.e = function requireEnsure(chunkId) {
- /******/ var installedChunkData = installedChunks[chunkId];
- /******/ if(installedChunkData === 0) {
- /******/ return new Promise(function(resolve) { resolve(); });
- /******/ }
- /******/
- /******/ // a Promise means "currently loading".
- /******/ if(installedChunkData) {
- /******/ return installedChunkData[2];
- /******/ }
- /******/
- /******/ // setup Promise in chunk cache
- /******/ var promise = new Promise(function(resolve, reject) {
- /******/ installedChunkData = installedChunks[chunkId] = [resolve, reject];
- /******/ });
- /******/ installedChunkData[2] = promise;
- /******/
- /******/ // start chunk loading
- /******/ var head = document.getElementsByTagName('head')[0];
- /******/ var script = document.createElement('script');
- /******/ script.type = 'text/javascript';
- /******/ script.charset = 'utf-8';
- /******/ script.async = true;
- /******/ script.timeout = 120000;
- /******/
- /******/ if (__webpack_require__.nc) {
- /******/ script.setAttribute("nonce", __webpack_require__.nc);
- /******/ }
- /******/ script.src = __webpack_require__.p + "static/js/" + ({}[chunkId]||chunkId) + ".chunk.js";
- /******/ var timeout = setTimeout(onScriptComplete, 120000);
- /******/ script.onerror = script.onload = onScriptComplete;
- /******/ function onScriptComplete() {
- /******/ // avoid mem leaks in IE.
- /******/ script.onerror = script.onload = null;
- /******/ clearTimeout(timeout);
- /******/ var chunk = installedChunks[chunkId];
- /******/ if(chunk !== 0) {
- /******/ if(chunk) {
- /******/ chunk[1](new Error('Loading chunk ' + chunkId + ' failed.'));
- /******/ }
- /******/ installedChunks[chunkId] = undefined;
- /******/ }
- /******/ };
- /******/ head.appendChild(script);
- /******/
- /******/ return promise;
- /******/ };
- /******/
- /******/ // expose the modules object (__webpack_modules__)
- /******/ __webpack_require__.m = modules;
- /******/
- /******/ // expose the module cache
- /******/ __webpack_require__.c = installedModules;
- /******/
- /******/ // define getter function for harmony exports
- /******/ __webpack_require__.d = function(exports, name, getter) {
- /******/ if(!__webpack_require__.o(exports, name)) {
- /******/ Object.defineProperty(exports, name, {
- /******/ configurable: false,
- /******/ enumerable: true,
- /******/ get: getter
- /******/ });
- /******/ }
- /******/ };
- /******/
- /******/ // getDefaultExport function for compatibility with non-harmony modules
- /******/ __webpack_require__.n = function(module) {
- /******/ var getter = module && module.__esModule ?
- /******/ function getDefault() { return module['default']; } :
- /******/ function getModuleExports() { return module; };
- /******/ __webpack_require__.d(getter, 'a', getter);
- /******/ return getter;
- /******/ };
- /******/
- /******/ // Object.prototype.hasOwnProperty.call
- /******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
- /******/
- /******/ // __webpack_public_path__
- /******/ __webpack_require__.p = "/";
- /******/
- /******/ // on error function for async loading
- /******/ __webpack_require__.oe = function(err) { console.error(err); throw err; };
- /******/
- /******/ // __webpack_hash__
- /******/ __webpack_require__.h = function() { return hotCurrentHash; };
- /******/
- /******/ // Load entry module and return exports
- /******/ return hotCreateRequire(0)(__webpack_require__.s = 0);
- /******/ })
- /************************************************************************/
- /******/ ({
- /***/ "./config/polyfills.js":
- /*!*****************************!*\
- !*** ./config/polyfills.js ***!
- \*****************************/
- /*! dynamic exports provided */
- /*! all exports used */
- /***/ (function(module, exports, __webpack_require__) {
- "use strict";
- if (typeof Promise === 'undefined') {
- // Rejection tracking prevents a common issue where React gets into an
- // inconsistent state due to an error, but it gets swallowed by a Promise,
- // and the user has no idea what causes React's erratic future behavior.
- __webpack_require__(/*! promise/lib/rejection-tracking */ "./node_modules/promise/lib/rejection-tracking.js").enable();
- window.Promise = __webpack_require__(/*! promise/lib/es6-extensions.js */ "./node_modules/promise/lib/es6-extensions.js");
- }
- // fetch() polyfill for making API calls.
- __webpack_require__(/*! whatwg-fetch */ "./node_modules/whatwg-fetch/fetch.js");
- // Object.assign() is commonly used with React.
- // It will use the native implementation if it's present and isn't buggy.
- Object.assign = __webpack_require__(/*! object-assign */ "./node_modules/object-assign/index.js");
- // In tests, polyfill requestAnimationFrame since jsdom doesn't provide it yet.
- // We don't polyfill it in the browser--this is user's responsibility.
- if (false) {
- require('raf').polyfill(global);
- }
- /***/ }),
- /***/ "./node_modules/@babel/runtime/helpers/esm/assertThisInitialized.js":
- /*!**************************************************************************!*\
- !*** ./node_modules/@babel/runtime/helpers/esm/assertThisInitialized.js ***!
- \**************************************************************************/
- /*! exports provided: default */
- /*! exports used: default */
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
- "use strict";
- /* harmony export (immutable) */ __webpack_exports__["a"] = _assertThisInitialized;
- function _assertThisInitialized(self) {
- if (self === void 0) {
- throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
- }
- return self;
- }
- /***/ }),
- /***/ "./node_modules/@babel/runtime/helpers/esm/extends.js":
- /*!************************************************************!*\
- !*** ./node_modules/@babel/runtime/helpers/esm/extends.js ***!
- \************************************************************/
- /*! exports provided: default */
- /*! exports used: default */
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
- "use strict";
- /* harmony export (immutable) */ __webpack_exports__["a"] = _extends;
- function _extends() {
- _extends = Object.assign ? Object.assign.bind() : function (target) {
- for (var i = 1; i < arguments.length; i++) {
- var source = arguments[i];
- for (var key in source) {
- if (Object.prototype.hasOwnProperty.call(source, key)) {
- target[key] = source[key];
- }
- }
- }
- return target;
- };
- return _extends.apply(this, arguments);
- }
- /***/ }),
- /***/ "./node_modules/@babel/runtime/helpers/esm/inheritsLoose.js":
- /*!******************************************************************!*\
- !*** ./node_modules/@babel/runtime/helpers/esm/inheritsLoose.js ***!
- \******************************************************************/
- /*! exports provided: default */
- /*! exports used: default */
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
- "use strict";
- /* harmony export (immutable) */ __webpack_exports__["a"] = _inheritsLoose;
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__setPrototypeOf_js__ = __webpack_require__(/*! ./setPrototypeOf.js */ "./node_modules/@babel/runtime/helpers/esm/setPrototypeOf.js");
- function _inheritsLoose(subClass, superClass) {
- subClass.prototype = Object.create(superClass.prototype);
- subClass.prototype.constructor = subClass;
- Object(__WEBPACK_IMPORTED_MODULE_0__setPrototypeOf_js__["a" /* default */])(subClass, superClass);
- }
- /***/ }),
- /***/ "./node_modules/@babel/runtime/helpers/esm/objectWithoutPropertiesLoose.js":
- /*!*********************************************************************************!*\
- !*** ./node_modules/@babel/runtime/helpers/esm/objectWithoutPropertiesLoose.js ***!
- \*********************************************************************************/
- /*! exports provided: default */
- /*! exports used: default */
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
- "use strict";
- /* harmony export (immutable) */ __webpack_exports__["a"] = _objectWithoutPropertiesLoose;
- function _objectWithoutPropertiesLoose(source, excluded) {
- if (source == null) return {};
- var target = {};
- var sourceKeys = Object.keys(source);
- var key, i;
- for (i = 0; i < sourceKeys.length; i++) {
- key = sourceKeys[i];
- if (excluded.indexOf(key) >= 0) continue;
- target[key] = source[key];
- }
- return target;
- }
- /***/ }),
- /***/ "./node_modules/@babel/runtime/helpers/esm/setPrototypeOf.js":
- /*!*******************************************************************!*\
- !*** ./node_modules/@babel/runtime/helpers/esm/setPrototypeOf.js ***!
- \*******************************************************************/
- /*! exports provided: default */
- /*! exports used: default */
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
- "use strict";
- /* harmony export (immutable) */ __webpack_exports__["a"] = _setPrototypeOf;
- function _setPrototypeOf(o, p) {
- _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) {
- o.__proto__ = p;
- return o;
- };
- return _setPrototypeOf(o, p);
- }
- /***/ }),
- /***/ "./node_modules/ansi-regex/index.js":
- /*!******************************************!*\
- !*** ./node_modules/ansi-regex/index.js ***!
- \******************************************/
- /*! dynamic exports provided */
- /*! all exports used */
- /***/ (function(module, exports, __webpack_require__) {
- "use strict";
- module.exports = function () {
- return /[\u001b\u009b][[()#;?]*(?:[0-9]{1,4}(?:;[0-9]{0,4})*)?[0-9A-PRZcf-nqry=><]/g;
- };
- /***/ }),
- /***/ "./node_modules/asap/browser-raw.js":
- /*!******************************************!*\
- !*** ./node_modules/asap/browser-raw.js ***!
- \******************************************/
- /*! dynamic exports provided */
- /*! all exports used */
- /***/ (function(module, exports, __webpack_require__) {
- "use strict";
- /* WEBPACK VAR INJECTION */(function(global) {
- // Use the fastest means possible to execute a task in its own turn, with
- // priority over other events including IO, animation, reflow, and redraw
- // events in browsers.
- //
- // An exception thrown by a task will permanently interrupt the processing of
- // subsequent tasks. The higher level `asap` function ensures that if an
- // exception is thrown by a task, that the task queue will continue flushing as
- // soon as possible, but if you use `rawAsap` directly, you are responsible to
- // either ensure that no exceptions are thrown from your task, or to manually
- // call `rawAsap.requestFlush` if an exception is thrown.
- module.exports = rawAsap;
- function rawAsap(task) {
- if (!queue.length) {
- requestFlush();
- flushing = true;
- }
- // Equivalent to push, but avoids a function call.
- queue[queue.length] = task;
- }
- var queue = [];
- // Once a flush has been requested, no further calls to `requestFlush` are
- // necessary until the next `flush` completes.
- var flushing = false;
- // `requestFlush` is an implementation-specific method that attempts to kick
- // off a `flush` event as quickly as possible. `flush` will attempt to exhaust
- // the event queue before yielding to the browser's own event loop.
- var requestFlush;
- // The position of the next task to execute in the task queue. This is
- // preserved between calls to `flush` so that it can be resumed if
- // a task throws an exception.
- var index = 0;
- // If a task schedules additional tasks recursively, the task queue can grow
- // unbounded. To prevent memory exhaustion, the task queue will periodically
- // truncate already-completed tasks.
- var capacity = 1024;
- // The flush function processes all tasks that have been scheduled with
- // `rawAsap` unless and until one of those tasks throws an exception.
- // If a task throws an exception, `flush` ensures that its state will remain
- // consistent and will resume where it left off when called again.
- // However, `flush` does not make any arrangements to be called again if an
- // exception is thrown.
- function flush() {
- while (index < queue.length) {
- var currentIndex = index;
- // Advance the index before calling the task. This ensures that we will
- // begin flushing on the next task the task throws an error.
- index = index + 1;
- queue[currentIndex].call();
- // Prevent leaking memory for long chains of recursive calls to `asap`.
- // If we call `asap` within tasks scheduled by `asap`, the queue will
- // grow, but to avoid an O(n) walk for every task we execute, we don't
- // shift tasks off the queue after they have been executed.
- // Instead, we periodically shift 1024 tasks off the queue.
- if (index > capacity) {
- // Manually shift all values starting at the index back to the
- // beginning of the queue.
- for (var scan = 0, newLength = queue.length - index; scan < newLength; scan++) {
- queue[scan] = queue[scan + index];
- }
- queue.length -= index;
- index = 0;
- }
- }
- queue.length = 0;
- index = 0;
- flushing = false;
- }
- // `requestFlush` is implemented using a strategy based on data collected from
- // every available SauceLabs Selenium web driver worker at time of writing.
- // https://docs.google.com/spreadsheets/d/1mG-5UYGup5qxGdEMWkhP6BWCz053NUb2E1QoUTU16uA/edit#gid=783724593
- // Safari 6 and 6.1 for desktop, iPad, and iPhone are the only browsers that
- // have WebKitMutationObserver but not un-prefixed MutationObserver.
- // Must use `global` or `self` instead of `window` to work in both frames and web
- // workers. `global` is a provision of Browserify, Mr, Mrs, or Mop.
- /* globals self */
- var scope = typeof global !== "undefined" ? global : self;
- var BrowserMutationObserver = scope.MutationObserver || scope.WebKitMutationObserver;
- // MutationObservers are desirable because they have high priority and work
- // reliably everywhere they are implemented.
- // They are implemented in all modern browsers.
- //
- // - Android 4-4.3
- // - Chrome 26-34
- // - Firefox 14-29
- // - Internet Explorer 11
- // - iPad Safari 6-7.1
- // - iPhone Safari 7-7.1
- // - Safari 6-7
- if (typeof BrowserMutationObserver === "function") {
- requestFlush = makeRequestCallFromMutationObserver(flush);
- // MessageChannels are desirable because they give direct access to the HTML
- // task queue, are implemented in Internet Explorer 10, Safari 5.0-1, and Opera
- // 11-12, and in web workers in many engines.
- // Although message channels yield to any queued rendering and IO tasks, they
- // would be better than imposing the 4ms delay of timers.
- // However, they do not work reliably in Internet Explorer or Safari.
- // Internet Explorer 10 is the only browser that has setImmediate but does
- // not have MutationObservers.
- // Although setImmediate yields to the browser's renderer, it would be
- // preferrable to falling back to setTimeout since it does not have
- // the minimum 4ms penalty.
- // Unfortunately there appears to be a bug in Internet Explorer 10 Mobile (and
- // Desktop to a lesser extent) that renders both setImmediate and
- // MessageChannel useless for the purposes of ASAP.
- // https://github.com/kriskowal/q/issues/396
- // Timers are implemented universally.
- // We fall back to timers in workers in most engines, and in foreground
- // contexts in the following browsers.
- // However, note that even this simple case requires nuances to operate in a
- // broad spectrum of browsers.
- //
- // - Firefox 3-13
- // - Internet Explorer 6-9
- // - iPad Safari 4.3
- // - Lynx 2.8.7
- } else {
- requestFlush = makeRequestCallFromTimer(flush);
- }
- // `requestFlush` requests that the high priority event queue be flushed as
- // soon as possible.
- // This is useful to prevent an error thrown in a task from stalling the event
- // queue if the exception handled by Node.js’s
- // `process.on("uncaughtException")` or by a domain.
- rawAsap.requestFlush = requestFlush;
- // To request a high priority event, we induce a mutation observer by toggling
- // the text of a text node between "1" and "-1".
- function makeRequestCallFromMutationObserver(callback) {
- var toggle = 1;
- var observer = new BrowserMutationObserver(callback);
- var node = document.createTextNode("");
- observer.observe(node, {characterData: true});
- return function requestCall() {
- toggle = -toggle;
- node.data = toggle;
- };
- }
- // The message channel technique was discovered by Malte Ubl and was the
- // original foundation for this library.
- // http://www.nonblocking.io/2011/06/windownexttick.html
- // Safari 6.0.5 (at least) intermittently fails to create message ports on a
- // page's first load. Thankfully, this version of Safari supports
- // MutationObservers, so we don't need to fall back in that case.
- // function makeRequestCallFromMessageChannel(callback) {
- // var channel = new MessageChannel();
- // channel.port1.onmessage = callback;
- // return function requestCall() {
- // channel.port2.postMessage(0);
- // };
- // }
- // For reasons explained above, we are also unable to use `setImmediate`
- // under any circumstances.
- // Even if we were, there is another bug in Internet Explorer 10.
- // It is not sufficient to assign `setImmediate` to `requestFlush` because
- // `setImmediate` must be called *by name* and therefore must be wrapped in a
- // closure.
- // Never forget.
- // function makeRequestCallFromSetImmediate(callback) {
- // return function requestCall() {
- // setImmediate(callback);
- // };
- // }
- // Safari 6.0 has a problem where timers will get lost while the user is
- // scrolling. This problem does not impact ASAP because Safari 6.0 supports
- // mutation observers, so that implementation is used instead.
- // However, if we ever elect to use timers in Safari, the prevalent work-around
- // is to add a scroll event listener that calls for a flush.
- // `setTimeout` does not call the passed callback if the delay is less than
- // approximately 7 in web workers in Firefox 8 through 18, and sometimes not
- // even then.
- function makeRequestCallFromTimer(callback) {
- return function requestCall() {
- // We dispatch a timeout with a specified delay of 0 for engines that
- // can reliably accommodate that request. This will usually be snapped
- // to a 4 milisecond delay, but once we're flushing, there's no delay
- // between events.
- var timeoutHandle = setTimeout(handleTimer, 0);
- // However, since this timer gets frequently dropped in Firefox
- // workers, we enlist an interval handle that will try to fire
- // an event 20 times per second until it succeeds.
- var intervalHandle = setInterval(handleTimer, 50);
- function handleTimer() {
- // Whichever timer succeeds will cancel both timers and
- // execute the callback.
- clearTimeout(timeoutHandle);
- clearInterval(intervalHandle);
- callback();
- }
- };
- }
- // This is for `asap.js` only.
- // Its name will be periodically randomized to break any code that depends on
- // its existence.
- rawAsap.makeRequestCallFromTimer = makeRequestCallFromTimer;
- // ASAP was originally a nextTick shim included in Q. This was factored out
- // into this ASAP package. It was later adapted to RSVP which made further
- // amendments. These decisions, particularly to marginalize MessageChannel and
- // to capture the MutationObserver implementation in a closure, were integrated
- // back into ASAP proper.
- // https://github.com/tildeio/rsvp.js/blob/cddf7232546a9cf858524b75cde6f9edf72620a7/lib/rsvp/asap.js
- /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(/*! ./../webpack/buildin/global.js */ "./node_modules/webpack/buildin/global.js")))
- /***/ }),
- /***/ "./node_modules/chalk/index.js":
- /*!*************************************!*\
- !*** ./node_modules/chalk/index.js ***!
- \*************************************/
- /*! dynamic exports provided */
- /*! all exports used */
- /***/ (function(module, exports, __webpack_require__) {
- "use strict";
- /* WEBPACK VAR INJECTION */(function(process) {
- var escapeStringRegexp = __webpack_require__(/*! escape-string-regexp */ "./node_modules/escape-string-regexp/index.js");
- var ansiStyles = __webpack_require__(/*! ansi-styles */ "./node_modules/chalk/node_modules/ansi-styles/index.js");
- var stripAnsi = __webpack_require__(/*! strip-ansi */ "./node_modules/strip-ansi/index.js");
- var hasAnsi = __webpack_require__(/*! has-ansi */ "./node_modules/has-ansi/index.js");
- var supportsColor = __webpack_require__(/*! supports-color */ "./node_modules/chalk/node_modules/supports-color/index.js");
- var defineProps = Object.defineProperties;
- var isSimpleWindowsTerm = process.platform === 'win32' && !/^xterm/i.test(Object({"NODE_ENV":"development","PUBLIC_URL":""}).TERM);
- function Chalk(options) {
- // detect mode if not set manually
- this.enabled = !options || options.enabled === undefined ? supportsColor : options.enabled;
- }
- // use bright blue on Windows as the normal blue color is illegible
- if (isSimpleWindowsTerm) {
- ansiStyles.blue.open = '\u001b[94m';
- }
- var styles = (function () {
- var ret = {};
- Object.keys(ansiStyles).forEach(function (key) {
- ansiStyles[key].closeRe = new RegExp(escapeStringRegexp(ansiStyles[key].close), 'g');
- ret[key] = {
- get: function () {
- return build.call(this, this._styles.concat(key));
- }
- };
- });
- return ret;
- })();
- var proto = defineProps(function chalk() {}, styles);
- function build(_styles) {
- var builder = function () {
- return applyStyle.apply(builder, arguments);
- };
- builder._styles = _styles;
- builder.enabled = this.enabled;
- // __proto__ is used because we must return a function, but there is
- // no way to create a function with a different prototype.
- /* eslint-disable no-proto */
- builder.__proto__ = proto;
- return builder;
- }
- function applyStyle() {
- // support varags, but simply cast to string in case there's only one arg
- var args = arguments;
- var argsLen = args.length;
- var str = argsLen !== 0 && String(arguments[0]);
- if (argsLen > 1) {
- // don't slice `arguments`, it prevents v8 optimizations
- for (var a = 1; a < argsLen; a++) {
- str += ' ' + args[a];
- }
- }
- if (!this.enabled || !str) {
- return str;
- }
- var nestedStyles = this._styles;
- var i = nestedStyles.length;
- // Turns out that on Windows dimmed gray text becomes invisible in cmd.exe,
- // see https://github.com/chalk/chalk/issues/58
- // If we're on Windows and we're dealing with a gray color, temporarily make 'dim' a noop.
- var originalDim = ansiStyles.dim.open;
- if (isSimpleWindowsTerm && (nestedStyles.indexOf('gray') !== -1 || nestedStyles.indexOf('grey') !== -1)) {
- ansiStyles.dim.open = '';
- }
- while (i--) {
- var code = ansiStyles[nestedStyles[i]];
- // Replace any instances already present with a re-opening code
- // otherwise only the part of the string until said closing code
- // will be colored, and the rest will simply be 'plain'.
- str = code.open + str.replace(code.closeRe, code.open) + code.close;
- }
- // Reset the original 'dim' if we changed it to work around the Windows dimmed gray issue.
- ansiStyles.dim.open = originalDim;
- return str;
- }
- function init() {
- var ret = {};
- Object.keys(styles).forEach(function (name) {
- ret[name] = {
- get: function () {
- return build.call(this, [name]);
- }
- };
- });
- return ret;
- }
- defineProps(Chalk.prototype, init());
- module.exports = new Chalk();
- module.exports.styles = ansiStyles;
- module.exports.hasColor = hasAnsi;
- module.exports.stripColor = stripAnsi;
- module.exports.supportsColor = supportsColor;
- /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(/*! ./../process/browser.js */ "./node_modules/process/browser.js")))
- /***/ }),
- /***/ "./node_modules/chalk/node_modules/ansi-styles/index.js":
- /*!**************************************************************!*\
- !*** ./node_modules/chalk/node_modules/ansi-styles/index.js ***!
- \**************************************************************/
- /*! dynamic exports provided */
- /*! all exports used */
- /***/ (function(module, exports, __webpack_require__) {
- "use strict";
- /* WEBPACK VAR INJECTION */(function(module) {
- function assembleStyles () {
- var styles = {
- modifiers: {
- reset: [0, 0],
- bold: [1, 22], // 21 isn't widely supported and 22 does the same thing
- dim: [2, 22],
- italic: [3, 23],
- underline: [4, 24],
- inverse: [7, 27],
- hidden: [8, 28],
- strikethrough: [9, 29]
- },
- colors: {
- black: [30, 39],
- red: [31, 39],
- green: [32, 39],
- yellow: [33, 39],
- blue: [34, 39],
- magenta: [35, 39],
- cyan: [36, 39],
- white: [37, 39],
- gray: [90, 39]
- },
- bgColors: {
- bgBlack: [40, 49],
- bgRed: [41, 49],
- bgGreen: [42, 49],
- bgYellow: [43, 49],
- bgBlue: [44, 49],
- bgMagenta: [45, 49],
- bgCyan: [46, 49],
- bgWhite: [47, 49]
- }
- };
- // fix humans
- styles.colors.grey = styles.colors.gray;
- Object.keys(styles).forEach(function (groupName) {
- var group = styles[groupName];
- Object.keys(group).forEach(function (styleName) {
- var style = group[styleName];
- styles[styleName] = group[styleName] = {
- open: '\u001b[' + style[0] + 'm',
- close: '\u001b[' + style[1] + 'm'
- };
- });
- Object.defineProperty(styles, groupName, {
- value: group,
- enumerable: false
- });
- });
- return styles;
- }
- Object.defineProperty(module, 'exports', {
- enumerable: true,
- get: assembleStyles
- });
- /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(/*! ./../../../webpack/buildin/module.js */ "./node_modules/webpack/buildin/module.js")(module)))
- /***/ }),
- /***/ "./node_modules/chalk/node_modules/supports-color/index.js":
- /*!*****************************************************************!*\
- !*** ./node_modules/chalk/node_modules/supports-color/index.js ***!
- \*****************************************************************/
- /*! dynamic exports provided */
- /*! all exports used */
- /***/ (function(module, exports, __webpack_require__) {
- "use strict";
- /* WEBPACK VAR INJECTION */(function(process) {
- var argv = process.argv;
- var terminator = argv.indexOf('--');
- var hasFlag = function (flag) {
- flag = '--' + flag;
- var pos = argv.indexOf(flag);
- return pos !== -1 && (terminator !== -1 ? pos < terminator : true);
- };
- module.exports = (function () {
- if ('FORCE_COLOR' in Object({"NODE_ENV":"development","PUBLIC_URL":""})) {
- return true;
- }
- if (hasFlag('no-color') ||
- hasFlag('no-colors') ||
- hasFlag('color=false')) {
- return false;
- }
- if (hasFlag('color') ||
- hasFlag('colors') ||
- hasFlag('color=true') ||
- hasFlag('color=always')) {
- return true;
- }
- if (process.stdout && !process.stdout.isTTY) {
- return false;
- }
- if (process.platform === 'win32') {
- return true;
- }
- if ('COLORTERM' in Object({"NODE_ENV":"development","PUBLIC_URL":""})) {
- return true;
- }
- if (Object({"NODE_ENV":"development","PUBLIC_URL":""}).TERM === 'dumb') {
- return false;
- }
- if (/^screen|^xterm|^vt100|color|ansi|cygwin|linux/i.test(Object({"NODE_ENV":"development","PUBLIC_URL":""}).TERM)) {
- return true;
- }
- return false;
- })();
- /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(/*! ./../../../process/browser.js */ "./node_modules/process/browser.js")))
- /***/ }),
- /***/ "./node_modules/css-loader/index.js?{\"importLoaders\":1}!./node_modules/postcss-loader/lib/index.js?{\"ident\":\"postcss\"}!./src/assets/css/common.css":
- /*!***************************************************************************************************************************************!*\
- !*** ./node_modules/css-loader?{"importLoaders":1}!./node_modules/postcss-loader/lib?{"ident":"postcss"}!./src/assets/css/common.css ***!
- \***************************************************************************************************************************************/
- /*! dynamic exports provided */
- /*! all exports used */
- /***/ (function(module, exports, __webpack_require__) {
- exports = module.exports = __webpack_require__(/*! ../../../node_modules/css-loader/lib/css-base.js */ "./node_modules/css-loader/lib/css-base.js")(undefined);
- // imports
- // module
- exports.push([module.i, "* {\r\n margin: 0;\r\n padding: 0;\r\n}\r\n\r\nbody {\r\n margin: 0;\r\n padding: 0;\r\n font-size: 1.867vw;\r\n font-family: sans-serif;\r\n overflow-x: hidden;\r\n background-color: #fcfcfd;\r\n}\r\n\r\nli {\r\n list-style: none;\r\n}\r\n\r\nimg {\r\n display: block;\r\n max-width: 100%;\r\n}\r\n\r\ni {\r\n font-style: normal;\r\n}\r\n\r\na {\r\n display: block;\r\n color: #333;\r\n text-decoration: none;\r\n}\r\n\r\nh1, h2, h3, h4, h5 {\r\n font-weight: normal;\r\n}", ""]);
- // exports
- /***/ }),
- /***/ "./node_modules/css-loader/index.js?{\"importLoaders\":1}!./node_modules/postcss-loader/lib/index.js?{\"ident\":\"postcss\"}!./src/index.css":
- /*!***************************************************************************************************************************!*\
- !*** ./node_modules/css-loader?{"importLoaders":1}!./node_modules/postcss-loader/lib?{"ident":"postcss"}!./src/index.css ***!
- \***************************************************************************************************************************/
- /*! dynamic exports provided */
- /*! all exports used */
- /***/ (function(module, exports, __webpack_require__) {
- exports = module.exports = __webpack_require__(/*! ../node_modules/css-loader/lib/css-base.js */ "./node_modules/css-loader/lib/css-base.js")(undefined);
- // imports
- // module
- exports.push([module.i, "/* common\r\n=================================================================*/\r\n.icon_play {\r\n position: absolute;\r\n top: 1.6vw;\r\n right: 1.333vw;\r\n width: 3.2vw;\r\n height: 3.2vw;\r\n background: url(" + __webpack_require__(/*! ./assets/images/index_icon_2x.png */ "./src/assets/images/index_icon_2x.png") + ") no-repeat;\r\n background-size: 24vw;\r\n background-position: -3.467vw 0;\r\n}\r\n\r\n.sq {\r\n display: inline-block;\r\n width: 2.133vw;\r\n height: 1.2vw;\r\n background: url(" + __webpack_require__(/*! ./assets/images/index_icon_2x.png */ "./src/assets/images/index_icon_2x.png") + ") no-repeat;\r\n background-size: 24vw;\r\n}\r\n\r\n/* component-index\r\n=================================================================*/\r\n.cmp_index {\r\n padding-top: 13.867vw;\r\n}\r\n\r\n.top_bar {\r\n position: fixed;\r\n top: 0;\r\n left: 0;\r\n z-index: 1000;\r\n display: -ms-flexbox;\r\n display: flex;\r\n width: 100%;\r\n height: 8.533vw;\r\n padding: 0 1.333vw;\r\n -webkit-box-sizing: border-box;\r\n box-sizing: border-box;\r\n -ms-flex-pack: justify;\r\n justify-content: space-between;\r\n -ms-flex-align: center;\r\n align-items: center;\r\n background-color: #d43c33;\r\n}\r\n\r\n.top_bar .logo {\r\n width: 18.933vw;\r\n height: 3.333vw;\r\n}\r\n\r\n.top_bar .download {\r\n width: 13.333vw;\r\n height: 4vw;\r\n line-height: 4vw;\r\n text-align: center;\r\n color: #fff;\r\n font-size: 2.133vw;\r\n border: 1px solid #fff;\r\n border-radius: 4vw;\r\n}\r\n\r\n/* nav_bar */\r\n.nav_bar {\r\n position: fixed;\r\n top: 8.533vw;\r\n left: 0;\r\n z-index: 1000;\r\n}\r\n\r\n.nav_bar,\r\n.nav_bar ul {\r\n width: 100%;\r\n height: 5.333vw;\r\n background-color: #fff;\r\n}\r\n\r\n.nav_bar ul {\r\n display: -ms-flexbox;\r\n display: flex;\r\n padding: 0 2vw;\r\n -webkit-box-sizing: border-box;\r\n box-sizing: border-box;\r\n border-bottom: 1px solid #f1f1f1;\r\n -webkit-box-shadow: 0 1px 2vw rgba(204, 204, 204, 0.5);\r\n box-shadow: 0 1px 2vw rgba(204, 204, 204, 0.5);\r\n}\r\n\r\n.nav_bar ul li {\r\n -ms-flex: 1 1;\r\n flex: 1 1;\r\n height: 5.333vw;\r\n line-height: 5.333vw;\r\n text-align: center;\r\n -webkit-tap-highlight-color: transparent;\r\n tap-highlight-color: transparent;\r\n}\r\n\r\n.nav_bar ul li:nth-of-type(2) {\r\n margin: 0 2vw;\r\n}\r\n\r\n.nav_bar ul li.active {\r\n -webkit-box-sizing: border-box;\r\n box-sizing: border-box;\r\n border-bottom: 0.267vw solid #d43c33;\r\n}\r\n\r\n/* 推荐歌单 */\r\n.cmp_recommend .rmd_title {\r\n position: relative;\r\n font-size: 2.133vw;\r\n text-indent: 1.333vw;\r\n padding: 2.667vw 0 2vw 0;\r\n}\r\n\r\n.cmp_recommend .rmd_title:after {\r\n position: absolute;\r\n bottom: 2.4vw;\r\n left: 0;\r\n z-index: 10;\r\n width: 0.267vw;\r\n height: 2vw;\r\n content: \"\";\r\n background-color: #d43c33;\r\n}\r\n\r\n.rmd_sheet:after {\r\n display: block;\r\n visibility: hidden;\r\n clear: both;\r\n height: 0;\r\n overflow: hidden;\r\n content: \".\";\r\n}\r\n\r\n.rmd_sheet .song_sheet_item {\r\n width: 33.3%;\r\n float: left;\r\n margin-bottom: 2vw;\r\n -webkit-box-sizing: border-box;\r\n box-sizing: border-box;\r\n}\r\n\r\n.rmd_sheet .song_sheet_item:nth-of-type(1),\r\n.rmd_sheet .song_sheet_item:nth-of-type(4) {\r\n padding: 0 0.267vw 0 0;\r\n}\r\n\r\n.rmd_sheet .song_sheet_item:nth-of-type(2),\r\n.rmd_sheet .song_sheet_item:nth-of-type(5) {\r\n padding: 0 1px;\r\n}\r\n\r\n.rmd_sheet .song_sheet_item:nth-of-type(3),\r\n.rmd_sheet .song_sheet_item:nth-of-type(6) {\r\n padding: 0 0 0 0.267vw;\r\n}\r\n\r\n.rmd_sheet .song_sheet_item .rmd_sht_img {\r\n position: relative;\r\n}\r\n\r\n.rmd_sheet .song_sheet_item .rmd_sht_img:after {\r\n position: absolute;\r\n left: 0;\r\n top: 0;\r\n width: 100%;\r\n height: 2.667vw;\r\n content: \" \";\r\n z-index: 2;\r\n background-image: -webkit-gradient(linear, left top, left bottom, from(rgba(0, 0, 0, .2)), to(transparent));\r\n background-image: -webkit-linear-gradient(top, rgba(0, 0, 0, .2), transparent);\r\n background-image: -o-linear-gradient(top, rgba(0, 0, 0, .2), transparent);\r\n background-image: linear-gradient(180deg, rgba(0, 0, 0, .2), transparent);\r\n}\r\n\r\n.rmd_sheet .song_sheet_item .rmd_sht_img .earp {\r\n position: absolute;\r\n top: 0.667vw;\r\n right: 0.667vw;\r\n z-index: 10;\r\n color: #fff;\r\n font-size: 1.6vw;\r\n}\r\n\r\n.rmd_sheet .song_sheet_item .rmd_sht_img .earp:after {\r\n position: absolute;\r\n top: 0.4vw;\r\n left: -2.4vw;\r\n z-index: 10;\r\n width: 1.6vw;\r\n height: 1.333vw;\r\n content: \"\";\r\n background: url(" + __webpack_require__(/*! ./assets/images/earp.png */ "./src/assets/images/earp.png") + ") no-repeat;\r\n background-size: cover;\r\n}\r\n\r\n.rmd_sheet .song_sheet_item .rmd_sht_text {\r\n height: 4vw;\r\n line-height: 2vw;\r\n margin-top: 0.667vw;\r\n font-size: 1.6vw;\r\n padding: 0 0.667vw;\r\n overflow: hidden;\r\n}\r\n\r\n/* 最新音乐 */\r\n.rmd_new_song {\r\n padding-left: 1.333vw;\r\n -webkit-box-sizing: border-box;\r\n box-sizing: border-box;\r\n}\r\n\r\n.song_item {\r\n position: relative;\r\n padding: 0.8vw 0;\r\n vertical-align: top;\r\n}\r\n\r\n.song_item:after {\r\n position: absolute;\r\n left: 0;\r\n bottom: -0.267vw;\r\n right: 0;\r\n z-index: 2;\r\n height: 1px;\r\n border-bottom: 1px solid #e5e5e5;\r\n color: #e5e5e5;\r\n content: \" \";\r\n -webkit-transform-origin: 0 0;\r\n -ms-transform-origin: 0 0;\r\n transform-origin: 0 0;\r\n -webkit-transform: scaleY(0.5);\r\n -ms-transform: scaleY(0.5);\r\n transform: scaleY(0.5);\r\n\r\n}\r\n\r\n.song_item h3 {\r\n color: #333;\r\n}\r\n\r\n.song_item p {\r\n color: #888;\r\n font-size: 1.6vw;\r\n vertical-align: middle;\r\n}\r\n\r\n/* 热歌榜 */\r\n.cmp_hot_songs .hot_brand {\r\n width: 100%;\r\n height: 20vw;\r\n padding: 2.667vw 0 0 2.667vw;\r\n -webkit-box-sizing: border-box;\r\n box-sizing: border-box;\r\n background: url(" + __webpack_require__(/*! ./assets/images/hot_music_bg_2x.jpg */ "./src/assets/images/hot_music_bg_2x.jpg") + ") no-repeat;\r\n background-size: cover;\r\n}\r\n\r\n.cmp_hot_songs .big_icon {\r\n width: 18.933vw;\r\n height: 8.933vw;\r\n background: url(" + __webpack_require__(/*! ./assets/images/index_icon_2x.png */ "./src/assets/images/index_icon_2x.png") + ") no-repeat;\r\n background-size: 22.133vw 12.933vw;\r\n background-position: -3.2vw -4vw;\r\n}\r\n\r\n.cmp_hot_songs .update_date {\r\n color: #fff;\r\n font-size: 1.333vw;\r\n margin-top: 1.333vw;\r\n}\r\n\r\n.cmp_hot_songs .item {\r\n position: relative;\r\n padding-left: 5.333vw;\r\n -webkit-box-sizing: border-box;\r\n box-sizing: border-box;\r\n}\r\n\r\n.cmp_hot_songs .item .song_no {\r\n position: absolute;\r\n top: 2vw;\r\n left: 1.333vw;\r\n z-index: 2;\r\n display: block;\r\n color: #999;\r\n font-size: 2.133vw;\r\n}\r\n\r\n.cmp_hot_songs .item:nth-of-type(1) .song_no,\r\n.cmp_hot_songs .item:nth-of-type(2) .song_no,\r\n.cmp_hot_songs .item:nth-of-type(3) .song_no {\r\n color: #d43c33;\r\n}\r\n\r\n.cmp_hot_songs .go_all_songs {\r\n text-align: center;\r\n padding: 2vw 0;\r\n color: #999;\r\n font-size: 1.867vw;\r\n}\r\n\r\n/* 搜索 */\r\n.cmp_search .search_box {\r\n position: relative;\r\n padding: 2vw 1.333vw;\r\n}\r\n\r\n.cmp_search .search_box:after {\r\n position: absolute;\r\n left: 0;\r\n bottom: -0.267vw;\r\n right: 0;\r\n z-index: 2;\r\n height: 1px;\r\n border-bottom: 1px solid #e5e5e5;\r\n color: #e5e5e5;\r\n content: \" \";\r\n -webkit-transform-origin: 0 0;\r\n -ms-transform-origin: 0 0;\r\n transform-origin: 0 0;\r\n -webkit-transform: scaleY(0.5);\r\n -ms-transform: scaleY(0.5);\r\n transform: scaleY(0.5);\r\n}\r\n\r\n.cmp_search .search_main {\r\n padding: 0.667vw 1.333vw 0.667vw 4vw;\r\n border-radius: 2.667vw;\r\n -webkit-box-sizing: border-box;\r\n box-sizing: border-box;\r\n background: #ebecec url(" + __webpack_require__(/*! ./assets/images/search.png */ "./src/assets/images/search.png") + ") no-repeat;\r\n background-size: 2.667vw;\r\n background-position: 0.667vw center;\r\n}\r\n\r\n.cmp_search .search_main input {\r\n outline: none;\r\n border: 0;\r\n background-color: transparent;\r\n}\r\n\r\n.cmp_search .hot_search {\r\n padding: 1.333vw;\r\n}\r\n\r\n.cmp_search .hot_search .title {\r\n color: #888;\r\n font-size: 1.333vw;\r\n margin-bottom: 1.333vw;\r\n}\r\n\r\n.cmp_search .songs ul {\r\n font-size: 0;\r\n}\r\n\r\n.cmp_search .songs ul li {\r\n display: inline-block;\r\n color: #666;\r\n font-size: 1.867vw;\r\n padding: 0.667vw 1.333vw;\r\n margin-right: 2vw;\r\n margin-bottom: 1.333vw;\r\n border: 1px solid #eaeaea;\r\n border-radius: 4vw;\r\n}\r\n\r\n.cmp_search .history {\r\n padding-left: 4vw;\r\n -webkit-box-sizing: border-box;\r\n box-sizing: border-box;\r\n}\r\n\r\n.cmp_search .history .item {\r\n position: relative;\r\n padding: 1.333vw 0;\r\n color: #666;\r\n font-size: 1.867vw;\r\n border-bottom: 1px solid #f1f1f1;\r\n}\r\n\r\n.cmp_search .history .item:after {\r\n position: absolute;\r\n top: 1.6vw;\r\n left: -3.333vw;\r\n z-index: 2;\r\n display: block;\r\n width: 2.667vw;\r\n height: 2.667vw;\r\n content: \"\";\r\n background: url(" + __webpack_require__(/*! ./assets/images/time.png */ "./src/assets/images/time.png") + ") no-repeat;\r\n background-size: 2.4vw;\r\n}\r\n\r\n.cmp_search .history .close {\r\n position: absolute;\r\n top: 1.333vw;\r\n right: 1.333vw;\r\n z-index: 2;\r\n display: block;\r\n width: 4vw;\r\n height: 4vw;\r\n content: \"\";\r\n background: url(" + __webpack_require__(/*! ./assets/images/close.png */ "./src/assets/images/close.png") + ") no-repeat;\r\n background-size: 2.933vw;\r\n}\r\n\r\n/* Footer\r\n=================================================================*/\r\n.footer {\r\n position: relative;\r\n width: 100%;\r\n height: 26.667vw;\r\n overflow: hidden;\r\n background: url(" + __webpack_require__(/*! ./assets/images/recommand_bg_2x.png */ "./src/assets/images/recommand_bg_2x.png") + ") no-repeat;\r\n background-size: cover;\r\n}\r\n\r\n.footer .logo {\r\n width: 30.667vw;\r\n height: 5.333vw;\r\n margin: 8.4vw auto 0 auto;\r\n}\r\n\r\n.footer .find_more {\r\n width: 40vw;\r\n height: 5.067vw;\r\n line-height: 5.067vw;\r\n text-align: center;\r\n color: #d43c33;\r\n font-size: 2.133vw;\r\n margin: 2vw auto 0.667vw auto;\r\n border: 1px solid #d43c33;\r\n border-radius: 5.067vw;\r\n}\r\n\r\n.footer .copyright {\r\n color: #888;\r\n font-size: 1.6vw;\r\n line-height: 2.133vw;\r\n text-align: center;\r\n -webkit-transform: scale(.75);\r\n -ms-transform: scale(.75);\r\n transform: scale(.75);\r\n}\r\n\r\n/* Play\r\n=================================================================*/\r\n.cmp_play .play_bg {\r\n position: fixed;\r\n top: 0;\r\n left: 0;\r\n z-index: 1;\r\n display: block;\r\n width: 100vw;\r\n height: 100vh;\r\n}\r\n\r\n.cmp_play .play_bg img {\r\n display: block;\r\n width: 100%;\r\n height: 100%;\r\n\r\n}\r\n\r\n.cmp_play .play_main {\r\n position: relative;\r\n z-index: 5;\r\n padding-top: 9.333vw;\r\n}\r\n\r\n.cmp_play .play_main .logo {\r\n position: absolute;\r\n top: 1.6vw;\r\n left: 1.333vw;\r\n display: block;\r\n width: 13.333vw;\r\n height: 2.267vw;\r\n background: url(" + __webpack_require__(/*! ./assets/images/logo.png */ "./src/assets/images/logo.png") + ") no-repeat;\r\n background-size: 13.333vw auto;\r\n}\r\n\r\n.cmp_play .control {\r\n width: 40vw;\r\n height: 40vw;\r\n margin: 0 auto;\r\n padding: 0.667vw;\r\n -webkit-box-sizing: border-box;\r\n box-sizing: border-box;\r\n background-color: rgba(0, 0, 0, 0.5);\r\n border-radius: 100%;\r\n overflow: hidden;\r\n}\r\n\r\n.cmp_play .disc {\r\n position: relative;\r\n width: 100%;\r\n height: 100%;\r\n border-radius: 100%;\r\n background: url(" + __webpack_require__(/*! ./assets/images/play_disc.png */ "./src/assets/images/play_disc.png") + ") no-repeat;\r\n background-size: cover;\r\n cursor:pointer;\r\n}\r\n\r\n.cmp_play .btn_play,\r\n.cmp_play .btn_stop {\r\n position: absolute;\r\n top: 50%;\r\n left: 50%;\r\n z-index: 5;\r\n display: block;\r\n width: 7.467vw;\r\n height: 7.467vw;\r\n margin: -3.733vw 0 0 -3.733vw;\r\n}\r\n\r\n.cmp_play .btn_play {\r\n background: url(" + __webpack_require__(/*! ./assets/images/play.png */ "./src/assets/images/play.png") + ") no-repeat;\r\n background-size: cover;\r\n}\r\n\r\n.cmp_play .btn_stop {\r\n background: url(" + __webpack_require__(/*! ./assets/images/stop.png */ "./src/assets/images/stop.png") + ") no-repeat;\r\n background-size: cover;\r\n\r\n}\r\n\r\n.cmp_play .handler {\r\n position: absolute;\r\n top: -4.667vw;\r\n left: 50%;\r\n z-index: 2;\r\n width: 12.8vw;\r\n height: 19.467vw;\r\n margin-left: -2.933vw;\r\n background: url(" + __webpack_require__(/*! ./assets/images/needle-ip6.png */ "./src/assets/images/needle-ip6.png") + ") no-repeat;\r\n background-size: 100% 100%;\r\n -webkit-transform: rotate(-25deg);\r\n -ms-transform: rotate(-25deg);\r\n transform: rotate(-25deg);\r\n -webkit-transition: transform .3s linear 0s;\r\n -webkit-transition: -webkit-transform .3s linear 0s;\r\n transition: -webkit-transform .3s linear 0s;\r\n -o-transition: transform .3s linear 0s;\r\n transition: transform .3s linear 0s;\r\n transition: transform .3s linear 0s, -webkit-transform .3s linear 0s;\r\n}\r\n\r\n.cmp_play .handler.play {\r\n -webkit-transform: rotate(15deg);\r\n -ms-transform: rotate(15deg);\r\n transform: rotate(15deg);\r\n}\r\n\r\n.cmp_play .brand {\r\n width: 100%;\r\n height: 100%;\r\n padding: 6.667vw;\r\n -webkit-box-sizing: border-box;\r\n box-sizing: border-box;\r\n}\r\n\r\n.cmp_play .brand img {\r\n border-radius: 100%;\r\n}\r\n\r\n.cmp_play .brand.spin {\r\n -webkit-animation: spin 15s linear 0s infinite;\r\n animation: spin 15s linear 0s infinite;\r\n}\r\n\r\n@-webkit-keyframes spin {\r\n 100% {\r\n -webkit-transform: rotate(1turn);\r\n transform: rotate(1turn);\r\n }\r\n}\r\n\r\n@keyframes spin {\r\n 100% {\r\n -webkit-transform: rotate(1turn);\r\n transform: rotate(1turn);\r\n }\r\n}\r\n\r\n.cmp_play .lyric {\r\n text-align: center;\r\n color: #fff;\r\n padding: 3.333vw 4.667vw 0 4.667vw;\r\n -webkit-box-sizing: border-box;\r\n box-sizing: border-box;\r\n}\r\n\r\n.cmp_play .lyric .song_title {\r\n font-size: 2.4vw;\r\n margin-bottom: 1.333vw;\r\n}\r\n\r\n.cmp_play .lyric .lyric_main {\r\n width: 100%;\r\n height: 12vw;\r\n overflow: hidden;\r\n}\r\n\r\n.cmp_play .lyric_cont {\r\n -webkit-transition: -webkit-transform .3s linear 0s;\r\n transition: -webkit-transform .3s linear 0s;\r\n -o-transition: transform .3s linear 0s;\r\n transition: transform .3s linear 0s;\r\n transition: transform .3s linear 0s, -webkit-transform .3s linear 0s;\r\n -webkit-transition: transform .3s linear 0s;\r\n}\r\n\r\n.cmp_play .lyric_cont p {\r\n height: 4vw;\r\n line-height: 4vw;\r\n color: #fff;\r\n font-size: 2.133vw;\r\n -webkit-transition: all .5s linear 0s;\r\n -o-transition: all .5s linear 0s;\r\n transition: all .5s linear 0s;\r\n}\r\n\r\n.cmp_play .lyric_cont p.active {\r\n color: #d43c33;\r\n}\r\n\r\n.cmp_play .btns {\r\n position: absolute;\r\n left: 0;\r\n right: 0;\r\n bottom: 1.333vw;\r\n z-index: 6;\r\n display: -ms-flexbox;\r\n display: flex;\r\n padding: 1.333vw;\r\n -webkit-box-sizing: border-box;\r\n box-sizing: border-box;\r\n}\r\n\r\n.cmp_play .btns span {\r\n -ms-flex: 1 1;\r\n flex: 1 1;\r\n height: 5.333vw;\r\n line-height: 5.333vw;\r\n text-align: center;\r\n color: #fff;\r\n font-size: 2.133vw;\r\n border: 1px solid #d43c33;\r\n border-radius: 2.667vw;\r\n}\r\n\r\n.cmp_play .btns .open {\r\n margin-right: 0.667vw;\r\n}\r\n\r\n.cmp_play .btns .download {\r\n margin-left: 0.667vw;\r\n background-color: #d33a31;\r\n}\r\n\r\n.cmp_play .arrow {\r\n position: absolute;\r\n left: 50%;\r\n bottom: 9.333vw;\r\n display: block;\r\n width: 2.267vw;\r\n height: 1.6vw;\r\n margin-left: -1.067vw;\r\n background-repeat: no-repeat;\r\n background-size: 2.267vw auto;\r\n background-image: url(" + __webpack_require__(/*! ./assets/images/arrow.png */ "./src/assets/images/arrow.png") + ");\r\n background-position: 0 0;\r\n}\r\n\r\n.cmp_play .arrow.ani {\r\n -webkit-animation: shining 1.2s steps(1) infinite;\r\n animation: shining 1.2s steps(1) infinite;\r\n}\r\n\r\n@-webkit-keyframes shining {\r\n 0% {\r\n background-position: 0 0\r\n }\r\n\r\n 15% {\r\n background-position: 0 -12px\r\n }\r\n\r\n 30% {\r\n background-position: 0 -24px\r\n }\r\n\r\n 45% {\r\n background-position: 0 -36px\r\n }\r\n\r\n 60% {\r\n background-position: 0 -48px\r\n }\r\n\r\n 75% {\r\n background-position: 0 -60px\r\n }\r\n\r\n 90% {\r\n background-position: 0 -72px\r\n }\r\n\r\n to {\r\n background-position: 0 -84px\r\n }\r\n}\r\n\r\n@keyframes shining {\r\n 0% {\r\n background-position: 0 0\r\n }\r\n\r\n 15% {\r\n background-position: 0 -12px\r\n }\r\n\r\n 30% {\r\n background-position: 0 -24px\r\n }\r\n\r\n 45% {\r\n background-position: 0 -36px\r\n }\r\n\r\n 60% {\r\n background-position: 0 -48px\r\n }\r\n\r\n 75% {\r\n background-position: 0 -60px\r\n }\r\n\r\n 90% {\r\n background-position: 0 -72px\r\n }\r\n\r\n to {\r\n background-position: 0 -84px\r\n }\r\n}\r\n\r\n/* PlayList\r\n=================================================================*/\r\n.cmp_play_list .header {\r\n padding: 4vw 2vw;\r\n background: url(" + __webpack_require__(/*! ./assets/images/play_bg.jpg */ "./src/assets/images/play_bg.jpg") + ") no-repeat;\r\n background-size: 500% 1000%;\r\n -webkit-box-sizing: border-box;\r\n box-sizing: border-box;\r\n}\r\n\r\n.cmp_play_list .hdr_main {\r\n display: -ms-flexbox;\r\n display: flex;\r\n height: 16.8vw;\r\n}\r\n\r\n.cmp_play_list .picture {\r\n position: relative;\r\n width: 16.8vw;\r\n height: 100%;\r\n margin-right: 2.667vw;\r\n}\r\n\r\n.cmp_play_list .picture img {\r\n display: block;\r\n position: absolute;\r\n top: 0;\r\n left: 0;\r\n}\r\n\r\n.cmp_play_list .picture .tag {\r\n position: absolute;\r\n top: 2vw;\r\n left: 0;\r\n z-index: 2;\r\n display: inline-block;\r\n color: #fff;\r\n font-size: 1.333vw;\r\n padding: 0 1.333vw;\r\n border-top-right-radius: 0.667vw;\r\n border-bottom-right-radius: 0.667vw;\r\n background-color: #d43c33;\r\n\r\n}\r\n\r\n.cmp_play_list .picture .num {\r\n position: absolute;\r\n top: 0;\r\n right: 0;\r\n z-index: 2;\r\n color: #fff;\r\n font-size: 1.333vw;\r\n padding-left: 2.667vw;\r\n background: url(" + __webpack_require__(/*! ./assets/images/earp.png */ "./src/assets/images/earp.png") + ") no-repeat;\r\n background-size: 1.6vw;\r\n background-position: 0.667vw center;\r\n}\r\n\r\n.cmp_play_list .info {\r\n min-width: 10%;\r\n -ms-flex: 1 1;\r\n flex: 1 1;\r\n color: #fff;\r\n}\r\n\r\n.cmp_play_list .info .desc {\r\n font-size: 2.133vw;\r\n}\r\n\r\n.cmp_play_list .info .photo {\r\n position: relative;\r\n height: 4vw;\r\n line-height: 4vw;\r\n margin-top: 2.667vw;\r\n white-space: nowrap;\r\n -o-text-overflow: ellipsis;\r\n text-overflow: ellipsis;\r\n overflow: hidden;\r\n}\r\n\r\n.cmp_play_list .info .photo img {\r\n display: block;\r\n width: 4vw;\r\n height: 4vw;\r\n float: left;\r\n margin-right: 0.667vw;\r\n border-radius: 4vw;\r\n}\r\n\r\n.cmp_play_list .info .photo:after {\r\n position: absolute;\r\n top: 2.133vw;\r\n left: 2.667vw;\r\n bottom: 0;\r\n z-index: 2;\r\n display: block;\r\n width: 2vw;\r\n height: 2vw;\r\n content: \"\";\r\n background: url(" + __webpack_require__(/*! ./assets/images/usericn_2x.png */ "./src/assets/images/usericn_2x.png") + ") no-repeat;\r\n background-size: 10.667vw;\r\n background-position: -5.6vw 0;\r\n}\r\n\r\n.cmp_play_list .texts {\r\n padding: 1.333vw;\r\n color: #666;\r\n}\r\n\r\n.cmp_play_list .tags {\r\n margin-bottom: 1.333vw;\r\n font-size: 1.6vw;\r\n}\r\n\r\n.cmp_play_list .tags i {\r\n display: inline-block;\r\n padding: 1px 0.667vw;\r\n margin-right: 1.333vw;\r\n border: 1px solid #eaeaea;\r\n border-radius: 1.333vw;\r\n}\r\n\r\n.cmp_play_list .introduction {\r\n font-size: 1.867vw;\r\n}\r\n\r\n.cmp_play_list .introduction p {\r\n margin-bottom: 2.667vw;\r\n}", ""]);
- // exports
- /***/ }),
- /***/ "./node_modules/css-loader/lib/css-base.js":
- /*!*************************************************!*\
- !*** ./node_modules/css-loader/lib/css-base.js ***!
- \*************************************************/
- /*! dynamic exports provided */
- /*! all exports used */
- /***/ (function(module, exports) {
- /*
- MIT License http://www.opensource.org/licenses/mit-license.php
- Author Tobias Koppers @sokra
- */
- // css base code, injected by the css-loader
- module.exports = function(useSourceMap) {
- var list = [];
- // return the list of modules as css string
- list.toString = function toString() {
- return this.map(function (item) {
- var content = cssWithMappingToString(item, useSourceMap);
- if(item[2]) {
- return "@media " + item[2] + "{" + content + "}";
- } else {
- return content;
- }
- }).join("");
- };
- // import a list of modules into the list
- list.i = function(modules, mediaQuery) {
- if(typeof modules === "string")
- modules = [[null, modules, ""]];
- var alreadyImportedModules = {};
- for(var i = 0; i < this.length; i++) {
- var id = this[i][0];
- if(typeof id === "number")
- alreadyImportedModules[id] = true;
- }
- for(i = 0; i < modules.length; i++) {
- var item = modules[i];
- // skip already imported module
- // this implementation is not 100% perfect for weird media query combinations
- // when a module is imported multiple times with different media queries.
- // I hope this will never occur (Hey this way we have smaller bundles)
- if(typeof item[0] !== "number" || !alreadyImportedModules[item[0]]) {
- if(mediaQuery && !item[2]) {
- item[2] = mediaQuery;
- } else if(mediaQuery) {
- item[2] = "(" + item[2] + ") and (" + mediaQuery + ")";
- }
- list.push(item);
- }
- }
- };
- return list;
- };
- function cssWithMappingToString(item, useSourceMap) {
- var content = item[1] || '';
- var cssMapping = item[3];
- if (!cssMapping) {
- return content;
- }
- if (useSourceMap && typeof btoa === 'function') {
- var sourceMapping = toComment(cssMapping);
- var sourceURLs = cssMapping.sources.map(function (source) {
- return '/*# sourceURL=' + cssMapping.sourceRoot + source + ' */'
- });
- return [content].concat(sourceURLs).concat([sourceMapping]).join('\n');
- }
- return [content].join('\n');
- }
- // Adapted from convert-source-map (MIT)
- function toComment(sourceMap) {
- // eslint-disable-next-line no-undef
- var base64 = btoa(unescape(encodeURIComponent(JSON.stringify(sourceMap))));
- var data = 'sourceMappingURL=data:application/json;charset=utf-8;base64,' + base64;
- return '/*# ' + data + ' */';
- }
- /***/ }),
- /***/ "./node_modules/debug/src/browser.js":
- /*!*******************************************!*\
- !*** ./node_modules/debug/src/browser.js ***!
- \*******************************************/
- /*! dynamic exports provided */
- /*! all exports used */
- /***/ (function(module, exports, __webpack_require__) {
- /* WEBPACK VAR INJECTION */(function(process) {/**
- * This is the web browser implementation of `debug()`.
- *
- * Expose `debug()` as the module.
- */
- exports = module.exports = __webpack_require__(/*! ./debug */ "./node_modules/debug/src/debug.js");
- exports.log = log;
- exports.formatArgs = formatArgs;
- exports.save = save;
- exports.load = load;
- exports.useColors = useColors;
- exports.storage = 'undefined' != typeof chrome
- && 'undefined' != typeof chrome.storage
- ? chrome.storage.local
- : localstorage();
- /**
- * Colors.
- */
- exports.colors = [
- 'lightseagreen',
- 'forestgreen',
- 'goldenrod',
- 'dodgerblue',
- 'darkorchid',
- 'crimson'
- ];
- /**
- * Currently only WebKit-based Web Inspectors, Firefox >= v31,
- * and the Firebug extension (any Firefox version) are known
- * to support "%c" CSS customizations.
- *
- * TODO: add a `localStorage` variable to explicitly enable/disable colors
- */
- function useColors() {
- // NB: In an Electron preload script, document will be defined but not fully
- // initialized. Since we know we're in Chrome, we'll just detect this case
- // explicitly
- if (typeof window !== 'undefined' && window.process && window.process.type === 'renderer') {
- return true;
- }
- // is webkit? http://stackoverflow.com/a/16459606/376773
- // document is undefined in react-native: https://github.com/facebook/react-native/pull/1632
- return (typeof document !== 'undefined' && document.documentElement && document.documentElement.style && document.documentElement.style.WebkitAppearance) ||
- // is firebug? http://stackoverflow.com/a/398120/376773
- (typeof window !== 'undefined' && window.console && (window.console.firebug || (window.console.exception && window.console.table))) ||
- // is firefox >= v31?
- // https://developer.mozilla.org/en-US/docs/Tools/Web_Console#Styling_messages
- (typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/) && parseInt(RegExp.$1, 10) >= 31) ||
- // double check webkit in userAgent just in case we are in a worker
- (typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/));
- }
- /**
- * Map %j to `JSON.stringify()`, since no Web Inspectors do that by default.
- */
- exports.formatters.j = function(v) {
- try {
- return JSON.stringify(v);
- } catch (err) {
- return '[UnexpectedJSONParseError]: ' + err.message;
- }
- };
- /**
- * Colorize log arguments if enabled.
- *
- * @api public
- */
- function formatArgs(args) {
- var useColors = this.useColors;
- args[0] = (useColors ? '%c' : '')
- + this.namespace
- + (useColors ? ' %c' : ' ')
- + args[0]
- + (useColors ? '%c ' : ' ')
- + '+' + exports.humanize(this.diff);
- if (!useColors) return;
- var c = 'color: ' + this.color;
- args.splice(1, 0, c, 'color: inherit')
- // the final "%c" is somewhat tricky, because there could be other
- // arguments passed either before or after the %c, so we need to
- // figure out the correct index to insert the CSS into
- var index = 0;
- var lastC = 0;
- args[0].replace(/%[a-zA-Z%]/g, function(match) {
- if ('%%' === match) return;
- index++;
- if ('%c' === match) {
- // we only are interested in the *last* %c
- // (the user may have provided their own)
- lastC = index;
- }
- });
- args.splice(lastC, 0, c);
- }
- /**
- * Invokes `console.log()` when available.
- * No-op when `console.log` is not a "function".
- *
- * @api public
- */
- function log() {
- // this hackery is required for IE8/9, where
- // the `console.log` function doesn't have 'apply'
- return 'object' === typeof console
- && console.log
- && Function.prototype.apply.call(console.log, console, arguments);
- }
- /**
- * Save `namespaces`.
- *
- * @param {String} namespaces
- * @api private
- */
- function save(namespaces) {
- try {
- if (null == namespaces) {
- exports.storage.removeItem('debug');
- } else {
- exports.storage.debug = namespaces;
- }
- } catch(e) {}
- }
- /**
- * Load `namespaces`.
- *
- * @return {String} returns the previously persisted debug modes
- * @api private
- */
- function load() {
- var r;
- try {
- r = exports.storage.debug;
- } catch(e) {}
- // If debug isn't set in LS, and we're in Electron, try to load $DEBUG
- if (!r && typeof process !== 'undefined' && 'env' in process) {
- r = Object({"NODE_ENV":"development","PUBLIC_URL":""}).DEBUG;
- }
- return r;
- }
- /**
- * Enable namespaces listed in `localStorage.debug` initially.
- */
- exports.enable(load());
- /**
- * Localstorage attempts to return the localstorage.
- *
- * This is necessary because safari throws
- * when a user disables cookies/localstorage
- * and you attempt to access it.
- *
- * @return {LocalStorage}
- * @api private
- */
- function localstorage() {
- try {
- return window.localStorage;
- } catch (e) {}
- }
- /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(/*! ./../../process/browser.js */ "./node_modules/process/browser.js")))
- /***/ }),
- /***/ "./node_modules/debug/src/debug.js":
- /*!*****************************************!*\
- !*** ./node_modules/debug/src/debug.js ***!
- \*****************************************/
- /*! dynamic exports provided */
- /*! all exports used */
- /***/ (function(module, exports, __webpack_require__) {
- /**
- * This is the common logic for both the Node.js and web browser
- * implementations of `debug()`.
- *
- * Expose `debug()` as the module.
- */
- exports = module.exports = createDebug.debug = createDebug['default'] = createDebug;
- exports.coerce = coerce;
- exports.disable = disable;
- exports.enable = enable;
- exports.enabled = enabled;
- exports.humanize = __webpack_require__(/*! ms */ "./node_modules/ms/index.js");
- /**
- * The currently active debug mode names, and names to skip.
- */
- exports.names = [];
- exports.skips = [];
- /**
- * Map of special "%n" handling functions, for the debug "format" argument.
- *
- * Valid key names are a single, lower or upper-case letter, i.e. "n" and "N".
- */
- exports.formatters = {};
- /**
- * Previous log timestamp.
- */
- var prevTime;
- /**
- * Select a color.
- * @param {String} namespace
- * @return {Number}
- * @api private
- */
- function selectColor(namespace) {
- var hash = 0, i;
- for (i in namespace) {
- hash = ((hash << 5) - hash) + namespace.charCodeAt(i);
- hash |= 0; // Convert to 32bit integer
- }
- return exports.colors[Math.abs(hash) % exports.colors.length];
- }
- /**
- * Create a debugger with the given `namespace`.
- *
- * @param {String} namespace
- * @return {Function}
- * @api public
- */
- function createDebug(namespace) {
- function debug() {
- // disabled?
- if (!debug.enabled) return;
- var self = debug;
- // set `diff` timestamp
- var curr = +new Date();
- var ms = curr - (prevTime || curr);
- self.diff = ms;
- self.prev = prevTime;
- self.curr = curr;
- prevTime = curr;
- // turn the `arguments` into a proper Array
- var args = new Array(arguments.length);
- for (var i = 0; i < args.length; i++) {
- args[i] = arguments[i];
- }
- args[0] = exports.coerce(args[0]);
- if ('string' !== typeof args[0]) {
- // anything else let's inspect with %O
- args.unshift('%O');
- }
- // apply any `formatters` transformations
- var index = 0;
- args[0] = args[0].replace(/%([a-zA-Z%])/g, function(match, format) {
- // if we encounter an escaped % then don't increase the array index
- if (match === '%%') return match;
- index++;
- var formatter = exports.formatters[format];
- if ('function' === typeof formatter) {
- var val = args[index];
- match = formatter.call(self, val);
- // now we need to remove `args[index]` since it's inlined in the `format`
- args.splice(index, 1);
- index--;
- }
- return match;
- });
- // apply env-specific formatting (colors, etc.)
- exports.formatArgs.call(self, args);
- var logFn = debug.log || exports.log || console.log.bind(console);
- logFn.apply(self, args);
- }
- debug.namespace = namespace;
- debug.enabled = exports.enabled(namespace);
- debug.useColors = exports.useColors();
- debug.color = selectColor(namespace);
- // env-specific initialization logic for debug instances
- if ('function' === typeof exports.init) {
- exports.init(debug);
- }
- return debug;
- }
- /**
- * Enables a debug mode by namespaces. This can include modes
- * separated by a colon and wildcards.
- *
- * @param {String} namespaces
- * @api public
- */
- function enable(namespaces) {
- exports.save(namespaces);
- exports.names = [];
- exports.skips = [];
- var split = (typeof namespaces === 'string' ? namespaces : '').split(/[\s,]+/);
- var len = split.length;
- for (var i = 0; i < len; i++) {
- if (!split[i]) continue; // ignore empty strings
- namespaces = split[i].replace(/\*/g, '.*?');
- if (namespaces[0] === '-') {
- exports.skips.push(new RegExp('^' + namespaces.substr(1) + '$'));
- } else {
- exports.names.push(new RegExp('^' + namespaces + '$'));
- }
- }
- }
- /**
- * Disable debug output.
- *
- * @api public
- */
- function disable() {
- exports.enable('');
- }
- /**
- * Returns true if the given mode name is enabled, false otherwise.
- *
- * @param {String} name
- * @return {Boolean}
- * @api public
- */
- function enabled(name) {
- var i, len;
- for (i = 0, len = exports.skips.length; i < len; i++) {
- if (exports.skips[i].test(name)) {
- return false;
- }
- }
- for (i = 0, len = exports.names.length; i < len; i++) {
- if (exports.names[i].test(name)) {
- return true;
- }
- }
- return false;
- }
- /**
- * Coerce `val`.
- *
- * @param {Mixed} val
- * @return {Mixed}
- * @api private
- */
- function coerce(val) {
- if (val instanceof Error) return val.stack || val.message;
- return val;
- }
- /***/ }),
- /***/ "./node_modules/escape-string-regexp/index.js":
- /*!****************************************************!*\
- !*** ./node_modules/escape-string-regexp/index.js ***!
- \****************************************************/
- /*! dynamic exports provided */
- /*! all exports used */
- /***/ (function(module, exports, __webpack_require__) {
- "use strict";
- var matchOperatorsRe = /[|\\{}()[\]^$+*?.]/g;
- module.exports = function (str) {
- if (typeof str !== 'string') {
- throw new TypeError('Expected a string');
- }
- return str.replace(matchOperatorsRe, '\\$&');
- };
- /***/ }),
- /***/ "./node_modules/has-ansi/index.js":
- /*!****************************************!*\
- !*** ./node_modules/has-ansi/index.js ***!
- \****************************************/
- /*! dynamic exports provided */
- /*! all exports used */
- /***/ (function(module, exports, __webpack_require__) {
- "use strict";
- var ansiRegex = __webpack_require__(/*! ansi-regex */ "./node_modules/ansi-regex/index.js");
- var re = new RegExp(ansiRegex().source); // remove the `g` flag
- module.exports = re.test.bind(re);
- /***/ }),
- /***/ "./node_modules/history/esm/history.js":
- /*!*********************************************!*\
- !*** ./node_modules/history/esm/history.js ***!
- \*********************************************/
- /*! exports provided: createBrowserHistory, createHashHistory, createMemoryHistory, createLocation, locationsAreEqual, parsePath, createPath */
- /*! exports used: createBrowserHistory, createHashHistory, createLocation, createMemoryHistory, createPath, locationsAreEqual */
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
- "use strict";
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return createBrowserHistory; });
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return createHashHistory; });
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "d", function() { return createMemoryHistory; });
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "c", function() { return createLocation; });
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "f", function() { return locationsAreEqual; });
- /* unused harmony export parsePath */
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "e", function() { return createPath; });
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__babel_runtime_helpers_esm_extends__ = __webpack_require__(/*! @babel/runtime/helpers/esm/extends */ "./node_modules/@babel/runtime/helpers/esm/extends.js");
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_resolve_pathname__ = __webpack_require__(/*! resolve-pathname */ "./node_modules/resolve-pathname/esm/resolve-pathname.js");
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_value_equal__ = __webpack_require__(/*! value-equal */ "./node_modules/value-equal/esm/value-equal.js");
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_tiny_warning__ = __webpack_require__(/*! tiny-warning */ "./node_modules/tiny-warning/dist/tiny-warning.esm.js");
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_tiny_invariant__ = __webpack_require__(/*! tiny-invariant */ "./node_modules/tiny-invariant/dist/tiny-invariant.esm.js");
- function addLeadingSlash(path) {
- return path.charAt(0) === '/' ? path : '/' + path;
- }
- function stripLeadingSlash(path) {
- return path.charAt(0) === '/' ? path.substr(1) : path;
- }
- function hasBasename(path, prefix) {
- return path.toLowerCase().indexOf(prefix.toLowerCase()) === 0 && '/?#'.indexOf(path.charAt(prefix.length)) !== -1;
- }
- function stripBasename(path, prefix) {
- return hasBasename(path, prefix) ? path.substr(prefix.length) : path;
- }
- function stripTrailingSlash(path) {
- return path.charAt(path.length - 1) === '/' ? path.slice(0, -1) : path;
- }
- function parsePath(path) {
- var pathname = path || '/';
- var search = '';
- var hash = '';
- var hashIndex = pathname.indexOf('#');
- if (hashIndex !== -1) {
- hash = pathname.substr(hashIndex);
- pathname = pathname.substr(0, hashIndex);
- }
- var searchIndex = pathname.indexOf('?');
- if (searchIndex !== -1) {
- search = pathname.substr(searchIndex);
- pathname = pathname.substr(0, searchIndex);
- }
- return {
- pathname: pathname,
- search: search === '?' ? '' : search,
- hash: hash === '#' ? '' : hash
- };
- }
- function createPath(location) {
- var pathname = location.pathname,
- search = location.search,
- hash = location.hash;
- var path = pathname || '/';
- if (search && search !== '?') path += search.charAt(0) === '?' ? search : "?" + search;
- if (hash && hash !== '#') path += hash.charAt(0) === '#' ? hash : "#" + hash;
- return path;
- }
- function createLocation(path, state, key, currentLocation) {
- var location;
- if (typeof path === 'string') {
- // Two-arg form: push(path, state)
- location = parsePath(path);
- location.state = state;
- } else {
- // One-arg form: push(location)
- location = Object(__WEBPACK_IMPORTED_MODULE_0__babel_runtime_helpers_esm_extends__["a" /* default */])({}, path);
- if (location.pathname === undefined) location.pathname = '';
- if (location.search) {
- if (location.search.charAt(0) !== '?') location.search = '?' + location.search;
- } else {
- location.search = '';
- }
- if (location.hash) {
- if (location.hash.charAt(0) !== '#') location.hash = '#' + location.hash;
- } else {
- location.hash = '';
- }
- if (state !== undefined && location.state === undefined) location.state = state;
- }
- try {
- location.pathname = decodeURI(location.pathname);
- } catch (e) {
- if (e instanceof URIError) {
- throw new URIError('Pathname "' + location.pathname + '" could not be decoded. ' + 'This is likely caused by an invalid percent-encoding.');
- } else {
- throw e;
- }
- }
- if (key) location.key = key;
- if (currentLocation) {
- // Resolve incomplete/relative pathname relative to current location.
- if (!location.pathname) {
- location.pathname = currentLocation.pathname;
- } else if (location.pathname.charAt(0) !== '/') {
- location.pathname = Object(__WEBPACK_IMPORTED_MODULE_1_resolve_pathname__["a" /* default */])(location.pathname, currentLocation.pathname);
- }
- } else {
- // When there is no prior location and pathname is empty, set it to /
- if (!location.pathname) {
- location.pathname = '/';
- }
- }
- return location;
- }
- function locationsAreEqual(a, b) {
- return a.pathname === b.pathname && a.search === b.search && a.hash === b.hash && a.key === b.key && Object(__WEBPACK_IMPORTED_MODULE_2_value_equal__["a" /* default */])(a.state, b.state);
- }
- function createTransitionManager() {
- var prompt = null;
- function setPrompt(nextPrompt) {
- true ? Object(__WEBPACK_IMPORTED_MODULE_3_tiny_warning__["a" /* default */])(prompt == null, 'A history supports only one prompt at a time') : void 0;
- prompt = nextPrompt;
- return function () {
- if (prompt === nextPrompt) prompt = null;
- };
- }
- function confirmTransitionTo(location, action, getUserConfirmation, callback) {
- // TODO: If another transition starts while we're still confirming
- // the previous one, we may end up in a weird state. Figure out the
- // best way to handle this.
- if (prompt != null) {
- var result = typeof prompt === 'function' ? prompt(location, action) : prompt;
- if (typeof result === 'string') {
- if (typeof getUserConfirmation === 'function') {
- getUserConfirmation(result, callback);
- } else {
- true ? Object(__WEBPACK_IMPORTED_MODULE_3_tiny_warning__["a" /* default */])(false, 'A history needs a getUserConfirmation function in order to use a prompt message') : void 0;
- callback(true);
- }
- } else {
- // Return false from a transition hook to cancel the transition.
- callback(result !== false);
- }
- } else {
- callback(true);
- }
- }
- var listeners = [];
- function appendListener(fn) {
- var isActive = true;
- function listener() {
- if (isActive) fn.apply(void 0, arguments);
- }
- listeners.push(listener);
- return function () {
- isActive = false;
- listeners = listeners.filter(function (item) {
- return item !== listener;
- });
- };
- }
- function notifyListeners() {
- for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
- args[_key] = arguments[_key];
- }
- listeners.forEach(function (listener) {
- return listener.apply(void 0, args);
- });
- }
- return {
- setPrompt: setPrompt,
- confirmTransitionTo: confirmTransitionTo,
- appendListener: appendListener,
- notifyListeners: notifyListeners
- };
- }
- var canUseDOM = !!(typeof window !== 'undefined' && window.document && window.document.createElement);
- function getConfirmation(message, callback) {
- callback(window.confirm(message)); // eslint-disable-line no-alert
- }
- /**
- * Returns true if the HTML5 history API is supported. Taken from Modernizr.
- *
- * https://github.com/Modernizr/Modernizr/blob/master/LICENSE
- * https://github.com/Modernizr/Modernizr/blob/master/feature-detects/history.js
- * changed to avoid false negatives for Windows Phones: https://github.com/reactjs/react-router/issues/586
- */
- function supportsHistory() {
- var ua = window.navigator.userAgent;
- if ((ua.indexOf('Android 2.') !== -1 || ua.indexOf('Android 4.0') !== -1) && ua.indexOf('Mobile Safari') !== -1 && ua.indexOf('Chrome') === -1 && ua.indexOf('Windows Phone') === -1) return false;
- return window.history && 'pushState' in window.history;
- }
- /**
- * Returns true if browser fires popstate on hash change.
- * IE10 and IE11 do not.
- */
- function supportsPopStateOnHashChange() {
- return window.navigator.userAgent.indexOf('Trident') === -1;
- }
- /**
- * Returns false if using go(n) with hash history causes a full page reload.
- */
- function supportsGoWithoutReloadUsingHash() {
- return window.navigator.userAgent.indexOf('Firefox') === -1;
- }
- /**
- * Returns true if a given popstate event is an extraneous WebKit event.
- * Accounts for the fact that Chrome on iOS fires real popstate events
- * containing undefined state when pressing the back button.
- */
- function isExtraneousPopstateEvent(event) {
- return event.state === undefined && navigator.userAgent.indexOf('CriOS') === -1;
- }
- var PopStateEvent = 'popstate';
- var HashChangeEvent = 'hashchange';
- function getHistoryState() {
- try {
- return window.history.state || {};
- } catch (e) {
- // IE 11 sometimes throws when accessing window.history.state
- // See https://github.com/ReactTraining/history/pull/289
- return {};
- }
- }
- /**
- * Creates a history object that uses the HTML5 history API including
- * pushState, replaceState, and the popstate event.
- */
- function createBrowserHistory(props) {
- if (props === void 0) {
- props = {};
- }
- !canUseDOM ? true ? Object(__WEBPACK_IMPORTED_MODULE_4_tiny_invariant__["a" /* default */])(false, 'Browser history needs a DOM') : invariant(false) : void 0;
- var globalHistory = window.history;
- var canUseHistory = supportsHistory();
- var needsHashChangeListener = !supportsPopStateOnHashChange();
- var _props = props,
- _props$forceRefresh = _props.forceRefresh,
- forceRefresh = _props$forceRefresh === void 0 ? false : _props$forceRefresh,
- _props$getUserConfirm = _props.getUserConfirmation,
- getUserConfirmation = _props$getUserConfirm === void 0 ? getConfirmation : _props$getUserConfirm,
- _props$keyLength = _props.keyLength,
- keyLength = _props$keyLength === void 0 ? 6 : _props$keyLength;
- var basename = props.basename ? stripTrailingSlash(addLeadingSlash(props.basename)) : '';
- function getDOMLocation(historyState) {
- var _ref = historyState || {},
- key = _ref.key,
- state = _ref.state;
- var _window$location = window.location,
- pathname = _window$location.pathname,
- search = _window$location.search,
- hash = _window$location.hash;
- var path = pathname + search + hash;
- true ? Object(__WEBPACK_IMPORTED_MODULE_3_tiny_warning__["a" /* default */])(!basename || hasBasename(path, basename), 'You are attempting to use a basename on a page whose URL path does not begin ' + 'with the basename. Expected path "' + path + '" to begin with "' + basename + '".') : void 0;
- if (basename) path = stripBasename(path, basename);
- return createLocation(path, state, key);
- }
- function createKey() {
- return Math.random().toString(36).substr(2, keyLength);
- }
- var transitionManager = createTransitionManager();
- function setState(nextState) {
- Object(__WEBPACK_IMPORTED_MODULE_0__babel_runtime_helpers_esm_extends__["a" /* default */])(history, nextState);
- history.length = globalHistory.length;
- transitionManager.notifyListeners(history.location, history.action);
- }
- function handlePopState(event) {
- // Ignore extraneous popstate events in WebKit.
- if (isExtraneousPopstateEvent(event)) return;
- handlePop(getDOMLocation(event.state));
- }
- function handleHashChange() {
- handlePop(getDOMLocation(getHistoryState()));
- }
- var forceNextPop = false;
- function handlePop(location) {
- if (forceNextPop) {
- forceNextPop = false;
- setState();
- } else {
- var action = 'POP';
- transitionManager.confirmTransitionTo(location, action, getUserConfirmation, function (ok) {
- if (ok) {
- setState({
- action: action,
- location: location
- });
- } else {
- revertPop(location);
- }
- });
- }
- }
- function revertPop(fromLocation) {
- var toLocation = history.location; // TODO: We could probably make this more reliable by
- // keeping a list of keys we've seen in sessionStorage.
- // Instead, we just default to 0 for keys we don't know.
- var toIndex = allKeys.indexOf(toLocation.key);
- if (toIndex === -1) toIndex = 0;
- var fromIndex = allKeys.indexOf(fromLocation.key);
- if (fromIndex === -1) fromIndex = 0;
- var delta = toIndex - fromIndex;
- if (delta) {
- forceNextPop = true;
- go(delta);
- }
- }
- var initialLocation = getDOMLocation(getHistoryState());
- var allKeys = [initialLocation.key]; // Public interface
- function createHref(location) {
- return basename + createPath(location);
- }
- function push(path, state) {
- true ? Object(__WEBPACK_IMPORTED_MODULE_3_tiny_warning__["a" /* default */])(!(typeof path === 'object' && path.state !== undefined && state !== undefined), 'You should avoid providing a 2nd state argument to push when the 1st ' + 'argument is a location-like object that already has state; it is ignored') : void 0;
- var action = 'PUSH';
- var location = createLocation(path, state, createKey(), history.location);
- transitionManager.confirmTransitionTo(location, action, getUserConfirmation, function (ok) {
- if (!ok) return;
- var href = createHref(location);
- var key = location.key,
- state = location.state;
- if (canUseHistory) {
- globalHistory.pushState({
- key: key,
- state: state
- }, null, href);
- if (forceRefresh) {
- window.location.href = href;
- } else {
- var prevIndex = allKeys.indexOf(history.location.key);
- var nextKeys = allKeys.slice(0, prevIndex + 1);
- nextKeys.push(location.key);
- allKeys = nextKeys;
- setState({
- action: action,
- location: location
- });
- }
- } else {
- true ? Object(__WEBPACK_IMPORTED_MODULE_3_tiny_warning__["a" /* default */])(state === undefined, 'Browser history cannot push state in browsers that do not support HTML5 history') : void 0;
- window.location.href = href;
- }
- });
- }
- function replace(path, state) {
- true ? Object(__WEBPACK_IMPORTED_MODULE_3_tiny_warning__["a" /* default */])(!(typeof path === 'object' && path.state !== undefined && state !== undefined), 'You should avoid providing a 2nd state argument to replace when the 1st ' + 'argument is a location-like object that already has state; it is ignored') : void 0;
- var action = 'REPLACE';
- var location = createLocation(path, state, createKey(), history.location);
- transitionManager.confirmTransitionTo(location, action, getUserConfirmation, function (ok) {
- if (!ok) return;
- var href = createHref(location);
- var key = location.key,
- state = location.state;
- if (canUseHistory) {
- globalHistory.replaceState({
- key: key,
- state: state
- }, null, href);
- if (forceRefresh) {
- window.location.replace(href);
- } else {
- var prevIndex = allKeys.indexOf(history.location.key);
- if (prevIndex !== -1) allKeys[prevIndex] = location.key;
- setState({
- action: action,
- location: location
- });
- }
- } else {
- true ? Object(__WEBPACK_IMPORTED_MODULE_3_tiny_warning__["a" /* default */])(state === undefined, 'Browser history cannot replace state in browsers that do not support HTML5 history') : void 0;
- window.location.replace(href);
- }
- });
- }
- function go(n) {
- globalHistory.go(n);
- }
- function goBack() {
- go(-1);
- }
- function goForward() {
- go(1);
- }
- var listenerCount = 0;
- function checkDOMListeners(delta) {
- listenerCount += delta;
- if (listenerCount === 1 && delta === 1) {
- window.addEventListener(PopStateEvent, handlePopState);
- if (needsHashChangeListener) window.addEventListener(HashChangeEvent, handleHashChange);
- } else if (listenerCount === 0) {
- window.removeEventListener(PopStateEvent, handlePopState);
- if (needsHashChangeListener) window.removeEventListener(HashChangeEvent, handleHashChange);
- }
- }
- var isBlocked = false;
- function block(prompt) {
- if (prompt === void 0) {
- prompt = false;
- }
- var unblock = transitionManager.setPrompt(prompt);
- if (!isBlocked) {
- checkDOMListeners(1);
- isBlocked = true;
- }
- return function () {
- if (isBlocked) {
- isBlocked = false;
- checkDOMListeners(-1);
- }
- return unblock();
- };
- }
- function listen(listener) {
- var unlisten = transitionManager.appendListener(listener);
- checkDOMListeners(1);
- return function () {
- checkDOMListeners(-1);
- unlisten();
- };
- }
- var history = {
- length: globalHistory.length,
- action: 'POP',
- location: initialLocation,
- createHref: createHref,
- push: push,
- replace: replace,
- go: go,
- goBack: goBack,
- goForward: goForward,
- block: block,
- listen: listen
- };
- return history;
- }
- var HashChangeEvent$1 = 'hashchange';
- var HashPathCoders = {
- hashbang: {
- encodePath: function encodePath(path) {
- return path.charAt(0) === '!' ? path : '!/' + stripLeadingSlash(path);
- },
- decodePath: function decodePath(path) {
- return path.charAt(0) === '!' ? path.substr(1) : path;
- }
- },
- noslash: {
- encodePath: stripLeadingSlash,
- decodePath: addLeadingSlash
- },
- slash: {
- encodePath: addLeadingSlash,
- decodePath: addLeadingSlash
- }
- };
- function stripHash(url) {
- var hashIndex = url.indexOf('#');
- return hashIndex === -1 ? url : url.slice(0, hashIndex);
- }
- function getHashPath() {
- // We can't use window.location.hash here because it's not
- // consistent across browsers - Firefox will pre-decode it!
- var href = window.location.href;
- var hashIndex = href.indexOf('#');
- return hashIndex === -1 ? '' : href.substring(hashIndex + 1);
- }
- function pushHashPath(path) {
- window.location.hash = path;
- }
- function replaceHashPath(path) {
- window.location.replace(stripHash(window.location.href) + '#' + path);
- }
- function createHashHistory(props) {
- if (props === void 0) {
- props = {};
- }
- !canUseDOM ? true ? Object(__WEBPACK_IMPORTED_MODULE_4_tiny_invariant__["a" /* default */])(false, 'Hash history needs a DOM') : invariant(false) : void 0;
- var globalHistory = window.history;
- var canGoWithoutReload = supportsGoWithoutReloadUsingHash();
- var _props = props,
- _props$getUserConfirm = _props.getUserConfirmation,
- getUserConfirmation = _props$getUserConfirm === void 0 ? getConfirmation : _props$getUserConfirm,
- _props$hashType = _props.hashType,
- hashType = _props$hashType === void 0 ? 'slash' : _props$hashType;
- var basename = props.basename ? stripTrailingSlash(addLeadingSlash(props.basename)) : '';
- var _HashPathCoders$hashT = HashPathCoders[hashType],
- encodePath = _HashPathCoders$hashT.encodePath,
- decodePath = _HashPathCoders$hashT.decodePath;
- function getDOMLocation() {
- var path = decodePath(getHashPath());
- true ? Object(__WEBPACK_IMPORTED_MODULE_3_tiny_warning__["a" /* default */])(!basename || hasBasename(path, basename), 'You are attempting to use a basename on a page whose URL path does not begin ' + 'with the basename. Expected path "' + path + '" to begin with "' + basename + '".') : void 0;
- if (basename) path = stripBasename(path, basename);
- return createLocation(path);
- }
- var transitionManager = createTransitionManager();
- function setState(nextState) {
- Object(__WEBPACK_IMPORTED_MODULE_0__babel_runtime_helpers_esm_extends__["a" /* default */])(history, nextState);
- history.length = globalHistory.length;
- transitionManager.notifyListeners(history.location, history.action);
- }
- var forceNextPop = false;
- var ignorePath = null;
- function locationsAreEqual$$1(a, b) {
- return a.pathname === b.pathname && a.search === b.search && a.hash === b.hash;
- }
- function handleHashChange() {
- var path = getHashPath();
- var encodedPath = encodePath(path);
- if (path !== encodedPath) {
- // Ensure we always have a properly-encoded hash.
- replaceHashPath(encodedPath);
- } else {
- var location = getDOMLocation();
- var prevLocation = history.location;
- if (!forceNextPop && locationsAreEqual$$1(prevLocation, location)) return; // A hashchange doesn't always == location change.
- if (ignorePath === createPath(location)) return; // Ignore this change; we already setState in push/replace.
- ignorePath = null;
- handlePop(location);
- }
- }
- function handlePop(location) {
- if (forceNextPop) {
- forceNextPop = false;
- setState();
- } else {
- var action = 'POP';
- transitionManager.confirmTransitionTo(location, action, getUserConfirmation, function (ok) {
- if (ok) {
- setState({
- action: action,
- location: location
- });
- } else {
- revertPop(location);
- }
- });
- }
- }
- function revertPop(fromLocation) {
- var toLocation = history.location; // TODO: We could probably make this more reliable by
- // keeping a list of paths we've seen in sessionStorage.
- // Instead, we just default to 0 for paths we don't know.
- var toIndex = allPaths.lastIndexOf(createPath(toLocation));
- if (toIndex === -1) toIndex = 0;
- var fromIndex = allPaths.lastIndexOf(createPath(fromLocation));
- if (fromIndex === -1) fromIndex = 0;
- var delta = toIndex - fromIndex;
- if (delta) {
- forceNextPop = true;
- go(delta);
- }
- } // Ensure the hash is encoded properly before doing anything else.
- var path = getHashPath();
- var encodedPath = encodePath(path);
- if (path !== encodedPath) replaceHashPath(encodedPath);
- var initialLocation = getDOMLocation();
- var allPaths = [createPath(initialLocation)]; // Public interface
- function createHref(location) {
- var baseTag = document.querySelector('base');
- var href = '';
- if (baseTag && baseTag.getAttribute('href')) {
- href = stripHash(window.location.href);
- }
- return href + '#' + encodePath(basename + createPath(location));
- }
- function push(path, state) {
- true ? Object(__WEBPACK_IMPORTED_MODULE_3_tiny_warning__["a" /* default */])(state === undefined, 'Hash history cannot push state; it is ignored') : void 0;
- var action = 'PUSH';
- var location = createLocation(path, undefined, undefined, history.location);
- transitionManager.confirmTransitionTo(location, action, getUserConfirmation, function (ok) {
- if (!ok) return;
- var path = createPath(location);
- var encodedPath = encodePath(basename + path);
- var hashChanged = getHashPath() !== encodedPath;
- if (hashChanged) {
- // We cannot tell if a hashchange was caused by a PUSH, so we'd
- // rather setState here and ignore the hashchange. The caveat here
- // is that other hash histories in the page will consider it a POP.
- ignorePath = path;
- pushHashPath(encodedPath);
- var prevIndex = allPaths.lastIndexOf(createPath(history.location));
- var nextPaths = allPaths.slice(0, prevIndex + 1);
- nextPaths.push(path);
- allPaths = nextPaths;
- setState({
- action: action,
- location: location
- });
- } else {
- true ? Object(__WEBPACK_IMPORTED_MODULE_3_tiny_warning__["a" /* default */])(false, 'Hash history cannot PUSH the same path; a new entry will not be added to the history stack') : void 0;
- setState();
- }
- });
- }
- function replace(path, state) {
- true ? Object(__WEBPACK_IMPORTED_MODULE_3_tiny_warning__["a" /* default */])(state === undefined, 'Hash history cannot replace state; it is ignored') : void 0;
- var action = 'REPLACE';
- var location = createLocation(path, undefined, undefined, history.location);
- transitionManager.confirmTransitionTo(location, action, getUserConfirmation, function (ok) {
- if (!ok) return;
- var path = createPath(location);
- var encodedPath = encodePath(basename + path);
- var hashChanged = getHashPath() !== encodedPath;
- if (hashChanged) {
- // We cannot tell if a hashchange was caused by a REPLACE, so we'd
- // rather setState here and ignore the hashchange. The caveat here
- // is that other hash histories in the page will consider it a POP.
- ignorePath = path;
- replaceHashPath(encodedPath);
- }
- var prevIndex = allPaths.indexOf(createPath(history.location));
- if (prevIndex !== -1) allPaths[prevIndex] = path;
- setState({
- action: action,
- location: location
- });
- });
- }
- function go(n) {
- true ? Object(__WEBPACK_IMPORTED_MODULE_3_tiny_warning__["a" /* default */])(canGoWithoutReload, 'Hash history go(n) causes a full page reload in this browser') : void 0;
- globalHistory.go(n);
- }
- function goBack() {
- go(-1);
- }
- function goForward() {
- go(1);
- }
- var listenerCount = 0;
- function checkDOMListeners(delta) {
- listenerCount += delta;
- if (listenerCount === 1 && delta === 1) {
- window.addEventListener(HashChangeEvent$1, handleHashChange);
- } else if (listenerCount === 0) {
- window.removeEventListener(HashChangeEvent$1, handleHashChange);
- }
- }
- var isBlocked = false;
- function block(prompt) {
- if (prompt === void 0) {
- prompt = false;
- }
- var unblock = transitionManager.setPrompt(prompt);
- if (!isBlocked) {
- checkDOMListeners(1);
- isBlocked = true;
- }
- return function () {
- if (isBlocked) {
- isBlocked = false;
- checkDOMListeners(-1);
- }
- return unblock();
- };
- }
- function listen(listener) {
- var unlisten = transitionManager.appendListener(listener);
- checkDOMListeners(1);
- return function () {
- checkDOMListeners(-1);
- unlisten();
- };
- }
- var history = {
- length: globalHistory.length,
- action: 'POP',
- location: initialLocation,
- createHref: createHref,
- push: push,
- replace: replace,
- go: go,
- goBack: goBack,
- goForward: goForward,
- block: block,
- listen: listen
- };
- return history;
- }
- function clamp(n, lowerBound, upperBound) {
- return Math.min(Math.max(n, lowerBound), upperBound);
- }
- /**
- * Creates a history object that stores locations in memory.
- */
- function createMemoryHistory(props) {
- if (props === void 0) {
- props = {};
- }
- var _props = props,
- getUserConfirmation = _props.getUserConfirmation,
- _props$initialEntries = _props.initialEntries,
- initialEntries = _props$initialEntries === void 0 ? ['/'] : _props$initialEntries,
- _props$initialIndex = _props.initialIndex,
- initialIndex = _props$initialIndex === void 0 ? 0 : _props$initialIndex,
- _props$keyLength = _props.keyLength,
- keyLength = _props$keyLength === void 0 ? 6 : _props$keyLength;
- var transitionManager = createTransitionManager();
- function setState(nextState) {
- Object(__WEBPACK_IMPORTED_MODULE_0__babel_runtime_helpers_esm_extends__["a" /* default */])(history, nextState);
- history.length = history.entries.length;
- transitionManager.notifyListeners(history.location, history.action);
- }
- function createKey() {
- return Math.random().toString(36).substr(2, keyLength);
- }
- var index = clamp(initialIndex, 0, initialEntries.length - 1);
- var entries = initialEntries.map(function (entry) {
- return typeof entry === 'string' ? createLocation(entry, undefined, createKey()) : createLocation(entry, undefined, entry.key || createKey());
- }); // Public interface
- var createHref = createPath;
- function push(path, state) {
- true ? Object(__WEBPACK_IMPORTED_MODULE_3_tiny_warning__["a" /* default */])(!(typeof path === 'object' && path.state !== undefined && state !== undefined), 'You should avoid providing a 2nd state argument to push when the 1st ' + 'argument is a location-like object that already has state; it is ignored') : void 0;
- var action = 'PUSH';
- var location = createLocation(path, state, createKey(), history.location);
- transitionManager.confirmTransitionTo(location, action, getUserConfirmation, function (ok) {
- if (!ok) return;
- var prevIndex = history.index;
- var nextIndex = prevIndex + 1;
- var nextEntries = history.entries.slice(0);
- if (nextEntries.length > nextIndex) {
- nextEntries.splice(nextIndex, nextEntries.length - nextIndex, location);
- } else {
- nextEntries.push(location);
- }
- setState({
- action: action,
- location: location,
- index: nextIndex,
- entries: nextEntries
- });
- });
- }
- function replace(path, state) {
- true ? Object(__WEBPACK_IMPORTED_MODULE_3_tiny_warning__["a" /* default */])(!(typeof path === 'object' && path.state !== undefined && state !== undefined), 'You should avoid providing a 2nd state argument to replace when the 1st ' + 'argument is a location-like object that already has state; it is ignored') : void 0;
- var action = 'REPLACE';
- var location = createLocation(path, state, createKey(), history.location);
- transitionManager.confirmTransitionTo(location, action, getUserConfirmation, function (ok) {
- if (!ok) return;
- history.entries[history.index] = location;
- setState({
- action: action,
- location: location
- });
- });
- }
- function go(n) {
- var nextIndex = clamp(history.index + n, 0, history.entries.length - 1);
- var action = 'POP';
- var location = history.entries[nextIndex];
- transitionManager.confirmTransitionTo(location, action, getUserConfirmation, function (ok) {
- if (ok) {
- setState({
- action: action,
- location: location,
- index: nextIndex
- });
- } else {
- // Mimic the behavior of DOM histories by
- // causing a render after a cancelled POP.
- setState();
- }
- });
- }
- function goBack() {
- go(-1);
- }
- function goForward() {
- go(1);
- }
- function canGo(n) {
- var nextIndex = history.index + n;
- return nextIndex >= 0 && nextIndex < history.entries.length;
- }
- function block(prompt) {
- if (prompt === void 0) {
- prompt = false;
- }
- return transitionManager.setPrompt(prompt);
- }
- function listen(listener) {
- return transitionManager.appendListener(listener);
- }
- var history = {
- length: entries.length,
- action: 'POP',
- location: entries[index],
- index: index,
- entries: entries,
- createHref: createHref,
- push: push,
- replace: replace,
- go: go,
- goBack: goBack,
- goForward: goForward,
- canGo: canGo,
- block: block,
- listen: listen
- };
- return history;
- }
- /***/ }),
- /***/ "./node_modules/hoist-non-react-statics/dist/hoist-non-react-statics.cjs.js":
- /*!**********************************************************************************!*\
- !*** ./node_modules/hoist-non-react-statics/dist/hoist-non-react-statics.cjs.js ***!
- \**********************************************************************************/
- /*! dynamic exports provided */
- /*! exports used: default */
- /***/ (function(module, exports, __webpack_require__) {
- "use strict";
- var reactIs = __webpack_require__(/*! react-is */ "./node_modules/react-is/index.js");
- /**
- * Copyright 2015, Yahoo! Inc.
- * Copyrights licensed under the New BSD License. See the accompanying LICENSE file for terms.
- */
- var REACT_STATICS = {
- childContextTypes: true,
- contextType: true,
- contextTypes: true,
- defaultProps: true,
- displayName: true,
- getDefaultProps: true,
- getDerivedStateFromError: true,
- getDerivedStateFromProps: true,
- mixins: true,
- propTypes: true,
- type: true
- };
- var KNOWN_STATICS = {
- name: true,
- length: true,
- prototype: true,
- caller: true,
- callee: true,
- arguments: true,
- arity: true
- };
- var FORWARD_REF_STATICS = {
- '$$typeof': true,
- render: true,
- defaultProps: true,
- displayName: true,
- propTypes: true
- };
- var MEMO_STATICS = {
- '$$typeof': true,
- compare: true,
- defaultProps: true,
- displayName: true,
- propTypes: true,
- type: true
- };
- var TYPE_STATICS = {};
- TYPE_STATICS[reactIs.ForwardRef] = FORWARD_REF_STATICS;
- TYPE_STATICS[reactIs.Memo] = MEMO_STATICS;
- function getStatics(component) {
- // React v16.11 and below
- if (reactIs.isMemo(component)) {
- return MEMO_STATICS;
- } // React v16.12 and above
- return TYPE_STATICS[component['$$typeof']] || REACT_STATICS;
- }
- var defineProperty = Object.defineProperty;
- var getOwnPropertyNames = Object.getOwnPropertyNames;
- var getOwnPropertySymbols = Object.getOwnPropertySymbols;
- var getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;
- var getPrototypeOf = Object.getPrototypeOf;
- var objectPrototype = Object.prototype;
- function hoistNonReactStatics(targetComponent, sourceComponent, blacklist) {
- if (typeof sourceComponent !== 'string') {
- // don't hoist over string (html) components
- if (objectPrototype) {
- var inheritedComponent = getPrototypeOf(sourceComponent);
- if (inheritedComponent && inheritedComponent !== objectPrototype) {
- hoistNonReactStatics(targetComponent, inheritedComponent, blacklist);
- }
- }
- var keys = getOwnPropertyNames(sourceComponent);
- if (getOwnPropertySymbols) {
- keys = keys.concat(getOwnPropertySymbols(sourceComponent));
- }
- var targetStatics = getStatics(targetComponent);
- var sourceStatics = getStatics(sourceComponent);
- for (var i = 0; i < keys.length; ++i) {
- var key = keys[i];
- if (!KNOWN_STATICS[key] && !(blacklist && blacklist[key]) && !(sourceStatics && sourceStatics[key]) && !(targetStatics && targetStatics[key])) {
- var descriptor = getOwnPropertyDescriptor(sourceComponent, key);
- try {
- // Avoid failures from read-only properties
- defineProperty(targetComponent, key, descriptor);
- } catch (e) {}
- }
- }
- }
- return targetComponent;
- }
- module.exports = hoistNonReactStatics;
- /***/ }),
- /***/ "./node_modules/inherits/inherits_browser.js":
- /*!***************************************************!*\
- !*** ./node_modules/inherits/inherits_browser.js ***!
- \***************************************************/
- /*! dynamic exports provided */
- /*! all exports used */
- /***/ (function(module, exports) {
- if (typeof Object.create === 'function') {
- // implementation from standard node.js 'util' module
- module.exports = function inherits(ctor, superCtor) {
- if (superCtor) {
- ctor.super_ = superCtor
- ctor.prototype = Object.create(superCtor.prototype, {
- constructor: {
- value: ctor,
- enumerable: false,
- writable: true,
- configurable: true
- }
- })
- }
- };
- } else {
- // old school shim for old browsers
- module.exports = function inherits(ctor, superCtor) {
- if (superCtor) {
- ctor.super_ = superCtor
- var TempCtor = function () {}
- TempCtor.prototype = superCtor.prototype
- ctor.prototype = new TempCtor()
- ctor.prototype.constructor = ctor
- }
- }
- }
- /***/ }),
- /***/ "./node_modules/invariant/browser.js":
- /*!*******************************************!*\
- !*** ./node_modules/invariant/browser.js ***!
- \*******************************************/
- /*! dynamic exports provided */
- /*! exports used: default */
- /***/ (function(module, exports, __webpack_require__) {
- "use strict";
- /**
- * Copyright (c) 2013-present, Facebook, Inc.
- *
- * This source code is licensed under the MIT license found in the
- * LICENSE file in the root directory of this source tree.
- */
- /**
- * Use invariant() to assert state which your program assumes to be true.
- *
- * Provide sprintf-style format (only %s is supported) and arguments
- * to provide information about what broke and what you were
- * expecting.
- *
- * The invariant message will be stripped in production, but the invariant
- * will remain to ensure logic does not differ in production.
- */
- var invariant = function(condition, format, a, b, c, d, e, f) {
- if (true) {
- if (format === undefined) {
- throw new Error('invariant requires an error message argument');
- }
- }
- if (!condition) {
- var error;
- if (format === undefined) {
- error = new Error(
- 'Minified exception occurred; use the non-minified dev environment ' +
- 'for the full error message and additional helpful warnings.'
- );
- } else {
- var args = [a, b, c, d, e, f];
- var argIndex = 0;
- error = new Error(
- format.replace(/%s/g, function() { return args[argIndex++]; })
- );
- error.name = 'Invariant Violation';
- }
- error.framesToPop = 1; // we don't care about invariant's own frame
- throw error;
- }
- };
- module.exports = invariant;
- /***/ }),
- /***/ "./node_modules/isarray/index.js":
- /*!***************************************!*\
- !*** ./node_modules/isarray/index.js ***!
- \***************************************/
- /*! dynamic exports provided */
- /*! all exports used */
- /***/ (function(module, exports) {
- module.exports = Array.isArray || function (arr) {
- return Object.prototype.toString.call(arr) == '[object Array]';
- };
- /***/ }),
- /***/ "./node_modules/json3/lib/json3.js":
- /*!*****************************************!*\
- !*** ./node_modules/json3/lib/json3.js ***!
- \*****************************************/
- /*! dynamic exports provided */
- /*! all exports used */
- /***/ (function(module, exports, __webpack_require__) {
- /* WEBPACK VAR INJECTION */(function(module, global) {var __WEBPACK_AMD_DEFINE_RESULT__;/*! JSON v3.3.2 | https://bestiejs.github.io/json3 | Copyright 2012-2015, Kit Cambridge, Benjamin Tan | http://kit.mit-license.org */
- ;(function () {
- // Detect the `define` function exposed by asynchronous module loaders. The
- // strict `define` check is necessary for compatibility with `r.js`.
- var isLoader = "function" === "function" && __webpack_require__(/*! !webpack amd options */ "./node_modules/webpack/buildin/amd-options.js");
- // A set of types used to distinguish objects from primitives.
- var objectTypes = {
- "function": true,
- "object": true
- };
- // Detect the `exports` object exposed by CommonJS implementations.
- var freeExports = objectTypes[typeof exports] && exports && !exports.nodeType && exports;
- // Use the `global` object exposed by Node (including Browserify via
- // `insert-module-globals`), Narwhal, and Ringo as the default context,
- // and the `window` object in browsers. Rhino exports a `global` function
- // instead.
- var root = objectTypes[typeof window] && window || this,
- freeGlobal = freeExports && objectTypes[typeof module] && module && !module.nodeType && typeof global == "object" && global;
- if (freeGlobal && (freeGlobal.global === freeGlobal || freeGlobal.window === freeGlobal || freeGlobal.self === freeGlobal)) {
- root = freeGlobal;
- }
- // Public: Initializes JSON 3 using the given `context` object, attaching the
- // `stringify` and `parse` functions to the specified `exports` object.
- function runInContext(context, exports) {
- context || (context = root.Object());
- exports || (exports = root.Object());
- // Native constructor aliases.
- var Number = context.Number || root.Number,
- String = context.String || root.String,
- Object = context.Object || root.Object,
- Date = context.Date || root.Date,
- SyntaxError = context.SyntaxError || root.SyntaxError,
- TypeError = context.TypeError || root.TypeError,
- Math = context.Math || root.Math,
- nativeJSON = context.JSON || root.JSON;
- // Delegate to the native `stringify` and `parse` implementations.
- if (typeof nativeJSON == "object" && nativeJSON) {
- exports.stringify = nativeJSON.stringify;
- exports.parse = nativeJSON.parse;
- }
- // Convenience aliases.
- var objectProto = Object.prototype,
- getClass = objectProto.toString,
- isProperty = objectProto.hasOwnProperty,
- undefined;
- // Internal: Contains `try...catch` logic used by other functions.
- // This prevents other functions from being deoptimized.
- function attempt(func, errorFunc) {
- try {
- func();
- } catch (exception) {
- if (errorFunc) {
- errorFunc();
- }
- }
- }
- // Test the `Date#getUTC*` methods. Based on work by @Yaffle.
- var isExtended = new Date(-3509827334573292);
- attempt(function () {
- // The `getUTCFullYear`, `Month`, and `Date` methods return nonsensical
- // results for certain dates in Opera >= 10.53.
- isExtended = isExtended.getUTCFullYear() == -109252 && isExtended.getUTCMonth() === 0 && isExtended.getUTCDate() === 1 &&
- isExtended.getUTCHours() == 10 && isExtended.getUTCMinutes() == 37 && isExtended.getUTCSeconds() == 6 && isExtended.getUTCMilliseconds() == 708;
- });
- // Internal: Determines whether the native `JSON.stringify` and `parse`
- // implementations are spec-compliant. Based on work by Ken Snyder.
- function has(name) {
- if (has[name] != null) {
- // Return cached feature test result.
- return has[name];
- }
- var isSupported;
- if (name == "bug-string-char-index") {
- // IE <= 7 doesn't support accessing string characters using square
- // bracket notation. IE 8 only supports this for primitives.
- isSupported = "a"[0] != "a";
- } else if (name == "json") {
- // Indicates whether both `JSON.stringify` and `JSON.parse` are
- // supported.
- isSupported = has("json-stringify") && has("date-serialization") && has("json-parse");
- } else if (name == "date-serialization") {
- // Indicates whether `Date`s can be serialized accurately by `JSON.stringify`.
- isSupported = has("json-stringify") && isExtended;
- if (isSupported) {
- var stringify = exports.stringify;
- attempt(function () {
- isSupported =
- // JSON 2, Prototype <= 1.7, and older WebKit builds incorrectly
- // serialize extended years.
- stringify(new Date(-8.64e15)) == '"-271821-04-20T00:00:00.000Z"' &&
- // The milliseconds are optional in ES 5, but required in 5.1.
- stringify(new Date(8.64e15)) == '"+275760-09-13T00:00:00.000Z"' &&
- // Firefox <= 11.0 incorrectly serializes years prior to 0 as negative
- // four-digit years instead of six-digit years. Credits: @Yaffle.
- stringify(new Date(-621987552e5)) == '"-000001-01-01T00:00:00.000Z"' &&
- // Safari <= 5.1.5 and Opera >= 10.53 incorrectly serialize millisecond
- // values less than 1000. Credits: @Yaffle.
- stringify(new Date(-1)) == '"1969-12-31T23:59:59.999Z"';
- });
- }
- } else {
- var value, serialized = '{"a":[1,true,false,null,"\\u0000\\b\\n\\f\\r\\t"]}';
- // Test `JSON.stringify`.
- if (name == "json-stringify") {
- var stringify = exports.stringify, stringifySupported = typeof stringify == "function";
- if (stringifySupported) {
- // A test function object with a custom `toJSON` method.
- (value = function () {
- return 1;
- }).toJSON = value;
- attempt(function () {
- stringifySupported =
- // Firefox 3.1b1 and b2 serialize string, number, and boolean
- // primitives as object literals.
- stringify(0) === "0" &&
- // FF 3.1b1, b2, and JSON 2 serialize wrapped primitives as object
- // literals.
- stringify(new Number()) === "0" &&
- stringify(new String()) == '""' &&
- // FF 3.1b1, 2 throw an error if the value is `null`, `undefined`, or
- // does not define a canonical JSON representation (this applies to
- // objects with `toJSON` properties as well, *unless* they are nested
- // within an object or array).
- stringify(getClass) === undefined &&
- // IE 8 serializes `undefined` as `"undefined"`. Safari <= 5.1.7 and
- // FF 3.1b3 pass this test.
- stringify(undefined) === undefined &&
- // Safari <= 5.1.7 and FF 3.1b3 throw `Error`s and `TypeError`s,
- // respectively, if the value is omitted entirely.
- stringify() === undefined &&
- // FF 3.1b1, 2 throw an error if the given value is not a number,
- // string, array, object, Boolean, or `null` literal. This applies to
- // objects with custom `toJSON` methods as well, unless they are nested
- // inside object or array literals. YUI 3.0.0b1 ignores custom `toJSON`
- // methods entirely.
- stringify(value) === "1" &&
- stringify([value]) == "[1]" &&
- // Prototype <= 1.6.1 serializes `[undefined]` as `"[]"` instead of
- // `"[null]"`.
- stringify([undefined]) == "[null]" &&
- // YUI 3.0.0b1 fails to serialize `null` literals.
- stringify(null) == "null" &&
- // FF 3.1b1, 2 halts serialization if an array contains a function:
- // `[1, true, getClass, 1]` serializes as "[1,true,],". FF 3.1b3
- // elides non-JSON values from objects and arrays, unless they
- // define custom `toJSON` methods.
- stringify([undefined, getClass, null]) == "[null,null,null]" &&
- // Simple serialization test. FF 3.1b1 uses Unicode escape sequences
- // where character escape codes are expected (e.g., `\b` => `\u0008`).
- stringify({ "a": [value, true, false, null, "\x00\b\n\f\r\t"] }) == serialized &&
- // FF 3.1b1 and b2 ignore the `filter` and `width` arguments.
- stringify(null, value) === "1" &&
- stringify([1, 2], null, 1) == "[\n 1,\n 2\n]";
- }, function () {
- stringifySupported = false;
- });
- }
- isSupported = stringifySupported;
- }
- // Test `JSON.parse`.
- if (name == "json-parse") {
- var parse = exports.parse, parseSupported;
- if (typeof parse == "function") {
- attempt(function () {
- // FF 3.1b1, b2 will throw an exception if a bare literal is provided.
- // Conforming implementations should also coerce the initial argument to
- // a string prior to parsing.
- if (parse("0") === 0 && !parse(false)) {
- // Simple parsing test.
- value = parse(serialized);
- parseSupported = value["a"].length == 5 && value["a"][0] === 1;
- if (parseSupported) {
- attempt(function () {
- // Safari <= 5.1.2 and FF 3.1b1 allow unescaped tabs in strings.
- parseSupported = !parse('"\t"');
- });
- if (parseSupported) {
- attempt(function () {
- // FF 4.0 and 4.0.1 allow leading `+` signs and leading
- // decimal points. FF 4.0, 4.0.1, and IE 9-10 also allow
- // certain octal literals.
- parseSupported = parse("01") !== 1;
- });
- }
- if (parseSupported) {
- attempt(function () {
- // FF 4.0, 4.0.1, and Rhino 1.7R3-R4 allow trailing decimal
- // points. These environments, along with FF 3.1b1 and 2,
- // also allow trailing commas in JSON objects and arrays.
- parseSupported = parse("1.") !== 1;
- });
- }
- }
- }
- }, function () {
- parseSupported = false;
- });
- }
- isSupported = parseSupported;
- }
- }
- return has[name] = !!isSupported;
- }
- has["bug-string-char-index"] = has["date-serialization"] = has["json"] = has["json-stringify"] = has["json-parse"] = null;
- if (!has("json")) {
- // Common `[[Class]]` name aliases.
- var functionClass = "[object Function]",
- dateClass = "[object Date]",
- numberClass = "[object Number]",
- stringClass = "[object String]",
- arrayClass = "[object Array]",
- booleanClass = "[object Boolean]";
- // Detect incomplete support for accessing string characters by index.
- var charIndexBuggy = has("bug-string-char-index");
- // Internal: Normalizes the `for...in` iteration algorithm across
- // environments. Each enumerated key is yielded to a `callback` function.
- var forOwn = function (object, callback) {
- var size = 0, Properties, dontEnums, property;
- // Tests for bugs in the current environment's `for...in` algorithm. The
- // `valueOf` property inherits the non-enumerable flag from
- // `Object.prototype` in older versions of IE, Netscape, and Mozilla.
- (Properties = function () {
- this.valueOf = 0;
- }).prototype.valueOf = 0;
- // Iterate over a new instance of the `Properties` class.
- dontEnums = new Properties();
- for (property in dontEnums) {
- // Ignore all properties inherited from `Object.prototype`.
- if (isProperty.call(dontEnums, property)) {
- size++;
- }
- }
- Properties = dontEnums = null;
- // Normalize the iteration algorithm.
- if (!size) {
- // A list of non-enumerable properties inherited from `Object.prototype`.
- dontEnums = ["valueOf", "toString", "toLocaleString", "propertyIsEnumerable", "isPrototypeOf", "hasOwnProperty", "constructor"];
- // IE <= 8, Mozilla 1.0, and Netscape 6.2 ignore shadowed non-enumerable
- // properties.
- forOwn = function (object, callback) {
- var isFunction = getClass.call(object) == functionClass, property, length;
- var hasProperty = !isFunction && typeof object.constructor != "function" && objectTypes[typeof object.hasOwnProperty] && object.hasOwnProperty || isProperty;
- for (property in object) {
- // Gecko <= 1.0 enumerates the `prototype` property of functions under
- // certain conditions; IE does not.
- if (!(isFunction && property == "prototype") && hasProperty.call(object, property)) {
- callback(property);
- }
- }
- // Manually invoke the callback for each non-enumerable property.
- for (length = dontEnums.length; property = dontEnums[--length];) {
- if (hasProperty.call(object, property)) {
- callback(property);
- }
- }
- };
- } else {
- // No bugs detected; use the standard `for...in` algorithm.
- forOwn = function (object, callback) {
- var isFunction = getClass.call(object) == functionClass, property, isConstructor;
- for (property in object) {
- if (!(isFunction && property == "prototype") && isProperty.call(object, property) && !(isConstructor = property === "constructor")) {
- callback(property);
- }
- }
- // Manually invoke the callback for the `constructor` property due to
- // cross-environment inconsistencies.
- if (isConstructor || isProperty.call(object, (property = "constructor"))) {
- callback(property);
- }
- };
- }
- return forOwn(object, callback);
- };
- // Public: Serializes a JavaScript `value` as a JSON string. The optional
- // `filter` argument may specify either a function that alters how object and
- // array members are serialized, or an array of strings and numbers that
- // indicates which properties should be serialized. The optional `width`
- // argument may be either a string or number that specifies the indentation
- // level of the output.
- if (!has("json-stringify") && !has("date-serialization")) {
- // Internal: A map of control characters and their escaped equivalents.
- var Escapes = {
- 92: "\\\\",
- 34: '\\"',
- 8: "\\b",
- 12: "\\f",
- 10: "\\n",
- 13: "\\r",
- 9: "\\t"
- };
- // Internal: Converts `value` into a zero-padded string such that its
- // length is at least equal to `width`. The `width` must be <= 6.
- var leadingZeroes = "000000";
- var toPaddedString = function (width, value) {
- // The `|| 0` expression is necessary to work around a bug in
- // Opera <= 7.54u2 where `0 == -0`, but `String(-0) !== "0"`.
- return (leadingZeroes + (value || 0)).slice(-width);
- };
- // Internal: Serializes a date object.
- var serializeDate = function (value) {
- var getData, year, month, date, time, hours, minutes, seconds, milliseconds;
- // Define additional utility methods if the `Date` methods are buggy.
- if (!isExtended) {
- var floor = Math.floor;
- // A mapping between the months of the year and the number of days between
- // January 1st and the first of the respective month.
- var Months = [0, 31, 59, 90, 120, 151, 181, 212, 243, 273, 304, 334];
- // Internal: Calculates the number of days between the Unix epoch and the
- // first day of the given month.
- var getDay = function (year, month) {
- return Months[month] + 365 * (year - 1970) + floor((year - 1969 + (month = +(month > 1))) / 4) - floor((year - 1901 + month) / 100) + floor((year - 1601 + month) / 400);
- };
- getData = function (value) {
- // Manually compute the year, month, date, hours, minutes,
- // seconds, and milliseconds if the `getUTC*` methods are
- // buggy. Adapted from @Yaffle's `date-shim` project.
- date = floor(value / 864e5);
- for (year = floor(date / 365.2425) + 1970 - 1; getDay(year + 1, 0) <= date; year++);
- for (month = floor((date - getDay(year, 0)) / 30.42); getDay(year, month + 1) <= date; month++);
- date = 1 + date - getDay(year, month);
- // The `time` value specifies the time within the day (see ES
- // 5.1 section 15.9.1.2). The formula `(A % B + B) % B` is used
- // to compute `A modulo B`, as the `%` operator does not
- // correspond to the `modulo` operation for negative numbers.
- time = (value % 864e5 + 864e5) % 864e5;
- // The hours, minutes, seconds, and milliseconds are obtained by
- // decomposing the time within the day. See section 15.9.1.10.
- hours = floor(time / 36e5) % 24;
- minutes = floor(time / 6e4) % 60;
- seconds = floor(time / 1e3) % 60;
- milliseconds = time % 1e3;
- };
- } else {
- getData = function (value) {
- year = value.getUTCFullYear();
- month = value.getUTCMonth();
- date = value.getUTCDate();
- hours = value.getUTCHours();
- minutes = value.getUTCMinutes();
- seconds = value.getUTCSeconds();
- milliseconds = value.getUTCMilliseconds();
- };
- }
- serializeDate = function (value) {
- if (value > -1 / 0 && value < 1 / 0) {
- // Dates are serialized according to the `Date#toJSON` method
- // specified in ES 5.1 section 15.9.5.44. See section 15.9.1.15
- // for the ISO 8601 date time string format.
- getData(value);
- // Serialize extended years correctly.
- value = (year <= 0 || year >= 1e4 ? (year < 0 ? "-" : "+") + toPaddedString(6, year < 0 ? -year : year) : toPaddedString(4, year)) +
- "-" + toPaddedString(2, month + 1) + "-" + toPaddedString(2, date) +
- // Months, dates, hours, minutes, and seconds should have two
- // digits; milliseconds should have three.
- "T" + toPaddedString(2, hours) + ":" + toPaddedString(2, minutes) + ":" + toPaddedString(2, seconds) +
- // Milliseconds are optional in ES 5.0, but required in 5.1.
- "." + toPaddedString(3, milliseconds) + "Z";
- year = month = date = hours = minutes = seconds = milliseconds = null;
- } else {
- value = null;
- }
- return value;
- };
- return serializeDate(value);
- };
- // For environments with `JSON.stringify` but buggy date serialization,
- // we override the native `Date#toJSON` implementation with a
- // spec-compliant one.
- if (has("json-stringify") && !has("date-serialization")) {
- // Internal: the `Date#toJSON` implementation used to override the native one.
- function dateToJSON (key) {
- return serializeDate(this);
- }
- // Public: `JSON.stringify`. See ES 5.1 section 15.12.3.
- var nativeStringify = exports.stringify;
- exports.stringify = function (source, filter, width) {
- var nativeToJSON = Date.prototype.toJSON;
- Date.prototype.toJSON = dateToJSON;
- var result = nativeStringify(source, filter, width);
- Date.prototype.toJSON = nativeToJSON;
- return result;
- }
- } else {
- // Internal: Double-quotes a string `value`, replacing all ASCII control
- // characters (characters with code unit values between 0 and 31) with
- // their escaped equivalents. This is an implementation of the
- // `Quote(value)` operation defined in ES 5.1 section 15.12.3.
- var unicodePrefix = "\\u00";
- var escapeChar = function (character) {
- var charCode = character.charCodeAt(0), escaped = Escapes[charCode];
- if (escaped) {
- return escaped;
- }
- return unicodePrefix + toPaddedString(2, charCode.toString(16));
- };
- var reEscape = /[\x00-\x1f\x22\x5c]/g;
- var quote = function (value) {
- reEscape.lastIndex = 0;
- return '"' +
- (
- reEscape.test(value)
- ? value.replace(reEscape, escapeChar)
- : value
- ) +
- '"';
- };
- // Internal: Recursively serializes an object. Implements the
- // `Str(key, holder)`, `JO(value)`, and `JA(value)` operations.
- var serialize = function (property, object, callback, properties, whitespace, indentation, stack) {
- var value, type, className, results, element, index, length, prefix, result;
- attempt(function () {
- // Necessary for host object support.
- value = object[property];
- });
- if (typeof value == "object" && value) {
- if (value.getUTCFullYear && getClass.call(value) == dateClass && value.toJSON === Date.prototype.toJSON) {
- value = serializeDate(value);
- } else if (typeof value.toJSON == "function") {
- value = value.toJSON(property);
- }
- }
- if (callback) {
- // If a replacement function was provided, call it to obtain the value
- // for serialization.
- value = callback.call(object, property, value);
- }
- // Exit early if value is `undefined` or `null`.
- if (value == undefined) {
- return value === undefined ? value : "null";
- }
- type = typeof value;
- // Only call `getClass` if the value is an object.
- if (type == "object") {
- className = getClass.call(value);
- }
- switch (className || type) {
- case "boolean":
- case booleanClass:
- // Booleans are represented literally.
- return "" + value;
- case "number":
- case numberClass:
- // JSON numbers must be finite. `Infinity` and `NaN` are serialized as
- // `"null"`.
- return value > -1 / 0 && value < 1 / 0 ? "" + value : "null";
- case "string":
- case stringClass:
- // Strings are double-quoted and escaped.
- return quote("" + value);
- }
- // Recursively serialize objects and arrays.
- if (typeof value == "object") {
- // Check for cyclic structures. This is a linear search; performance
- // is inversely proportional to the number of unique nested objects.
- for (length = stack.length; length--;) {
- if (stack[length] === value) {
- // Cyclic structures cannot be serialized by `JSON.stringify`.
- throw TypeError();
- }
- }
- // Add the object to the stack of traversed objects.
- stack.push(value);
- results = [];
- // Save the current indentation level and indent one additional level.
- prefix = indentation;
- indentation += whitespace;
- if (className == arrayClass) {
- // Recursively serialize array elements.
- for (index = 0, length = value.length; index < length; index++) {
- element = serialize(index, value, callback, properties, whitespace, indentation, stack);
- results.push(element === undefined ? "null" : element);
- }
- result = results.length ? (whitespace ? "[\n" + indentation + results.join(",\n" + indentation) + "\n" + prefix + "]" : ("[" + results.join(",") + "]")) : "[]";
- } else {
- // Recursively serialize object members. Members are selected from
- // either a user-specified list of property names, or the object
- // itself.
- forOwn(properties || value, function (property) {
- var element = serialize(property, value, callback, properties, whitespace, indentation, stack);
- if (element !== undefined) {
- // According to ES 5.1 section 15.12.3: "If `gap` {whitespace}
- // is not the empty string, let `member` {quote(property) + ":"}
- // be the concatenation of `member` and the `space` character."
- // The "`space` character" refers to the literal space
- // character, not the `space` {width} argument provided to
- // `JSON.stringify`.
- results.push(quote(property) + ":" + (whitespace ? " " : "") + element);
- }
- });
- result = results.length ? (whitespace ? "{\n" + indentation + results.join(",\n" + indentation) + "\n" + prefix + "}" : ("{" + results.join(",") + "}")) : "{}";
- }
- // Remove the object from the traversed object stack.
- stack.pop();
- return result;
- }
- };
- // Public: `JSON.stringify`. See ES 5.1 section 15.12.3.
- exports.stringify = function (source, filter, width) {
- var whitespace, callback, properties, className;
- if (objectTypes[typeof filter] && filter) {
- className = getClass.call(filter);
- if (className == functionClass) {
- callback = filter;
- } else if (className == arrayClass) {
- // Convert the property names array into a makeshift set.
- properties = {};
- for (var index = 0, length = filter.length, value; index < length;) {
- value = filter[index++];
- className = getClass.call(value);
- if (className == "[object String]" || className == "[object Number]") {
- properties[value] = 1;
- }
- }
- }
- }
- if (width) {
- className = getClass.call(width);
- if (className == numberClass) {
- // Convert the `width` to an integer and create a string containing
- // `width` number of space characters.
- if ((width -= width % 1) > 0) {
- if (width > 10) {
- width = 10;
- }
- for (whitespace = ""; whitespace.length < width;) {
- whitespace += " ";
- }
- }
- } else if (className == stringClass) {
- whitespace = width.length <= 10 ? width : width.slice(0, 10);
- }
- }
- // Opera <= 7.54u2 discards the values associated with empty string keys
- // (`""`) only if they are used directly within an object member list
- // (e.g., `!("" in { "": 1})`).
- return serialize("", (value = {}, value[""] = source, value), callback, properties, whitespace, "", []);
- };
- }
- }
- // Public: Parses a JSON source string.
- if (!has("json-parse")) {
- var fromCharCode = String.fromCharCode;
- // Internal: A map of escaped control characters and their unescaped
- // equivalents.
- var Unescapes = {
- 92: "\\",
- 34: '"',
- 47: "/",
- 98: "\b",
- 116: "\t",
- 110: "\n",
- 102: "\f",
- 114: "\r"
- };
- // Internal: Stores the parser state.
- var Index, Source;
- // Internal: Resets the parser state and throws a `SyntaxError`.
- var abort = function () {
- Index = Source = null;
- throw SyntaxError();
- };
- // Internal: Returns the next token, or `"$"` if the parser has reached
- // the end of the source string. A token may be a string, number, `null`
- // literal, or Boolean literal.
- var lex = function () {
- var source = Source, length = source.length, value, begin, position, isSigned, charCode;
- while (Index < length) {
- charCode = source.charCodeAt(Index);
- switch (charCode) {
- case 9: case 10: case 13: case 32:
- // Skip whitespace tokens, including tabs, carriage returns, line
- // feeds, and space characters.
- Index++;
- break;
- case 123: case 125: case 91: case 93: case 58: case 44:
- // Parse a punctuator token (`{`, `}`, `[`, `]`, `:`, or `,`) at
- // the current position.
- value = charIndexBuggy ? source.charAt(Index) : source[Index];
- Index++;
- return value;
- case 34:
- // `"` delimits a JSON string; advance to the next character and
- // begin parsing the string. String tokens are prefixed with the
- // sentinel `@` character to distinguish them from punctuators and
- // end-of-string tokens.
- for (value = "@", Index++; Index < length;) {
- charCode = source.charCodeAt(Index);
- if (charCode < 32) {
- // Unescaped ASCII control characters (those with a code unit
- // less than the space character) are not permitted.
- abort();
- } else if (charCode == 92) {
- // A reverse solidus (`\`) marks the beginning of an escaped
- // control character (including `"`, `\`, and `/`) or Unicode
- // escape sequence.
- charCode = source.charCodeAt(++Index);
- switch (charCode) {
- case 92: case 34: case 47: case 98: case 116: case 110: case 102: case 114:
- // Revive escaped control characters.
- value += Unescapes[charCode];
- Index++;
- break;
- case 117:
- // `\u` marks the beginning of a Unicode escape sequence.
- // Advance to the first character and validate the
- // four-digit code point.
- begin = ++Index;
- for (position = Index + 4; Index < position; Index++) {
- charCode = source.charCodeAt(Index);
- // A valid sequence comprises four hexdigits (case-
- // insensitive) that form a single hexadecimal value.
- if (!(charCode >= 48 && charCode <= 57 || charCode >= 97 && charCode <= 102 || charCode >= 65 && charCode <= 70)) {
- // Invalid Unicode escape sequence.
- abort();
- }
- }
- // Revive the escaped character.
- value += fromCharCode("0x" + source.slice(begin, Index));
- break;
- default:
- // Invalid escape sequence.
- abort();
- }
- } else {
- if (charCode == 34) {
- // An unescaped double-quote character marks the end of the
- // string.
- break;
- }
- charCode = source.charCodeAt(Index);
- begin = Index;
- // Optimize for the common case where a string is valid.
- while (charCode >= 32 && charCode != 92 && charCode != 34) {
- charCode = source.charCodeAt(++Index);
- }
- // Append the string as-is.
- value += source.slice(begin, Index);
- }
- }
- if (source.charCodeAt(Index) == 34) {
- // Advance to the next character and return the revived string.
- Index++;
- return value;
- }
- // Unterminated string.
- abort();
- default:
- // Parse numbers and literals.
- begin = Index;
- // Advance past the negative sign, if one is specified.
- if (charCode == 45) {
- isSigned = true;
- charCode = source.charCodeAt(++Index);
- }
- // Parse an integer or floating-point value.
- if (charCode >= 48 && charCode <= 57) {
- // Leading zeroes are interpreted as octal literals.
- if (charCode == 48 && ((charCode = source.charCodeAt(Index + 1)), charCode >= 48 && charCode <= 57)) {
- // Illegal octal literal.
- abort();
- }
- isSigned = false;
- // Parse the integer component.
- for (; Index < length && ((charCode = source.charCodeAt(Index)), charCode >= 48 && charCode <= 57); Index++);
- // Floats cannot contain a leading decimal point; however, this
- // case is already accounted for by the parser.
- if (source.charCodeAt(Index) == 46) {
- position = ++Index;
- // Parse the decimal component.
- for (; position < length; position++) {
- charCode = source.charCodeAt(position);
- if (charCode < 48 || charCode > 57) {
- break;
- }
- }
- if (position == Index) {
- // Illegal trailing decimal.
- abort();
- }
- Index = position;
- }
- // Parse exponents. The `e` denoting the exponent is
- // case-insensitive.
- charCode = source.charCodeAt(Index);
- if (charCode == 101 || charCode == 69) {
- charCode = source.charCodeAt(++Index);
- // Skip past the sign following the exponent, if one is
- // specified.
- if (charCode == 43 || charCode == 45) {
- Index++;
- }
- // Parse the exponential component.
- for (position = Index; position < length; position++) {
- charCode = source.charCodeAt(position);
- if (charCode < 48 || charCode > 57) {
- break;
- }
- }
- if (position == Index) {
- // Illegal empty exponent.
- abort();
- }
- Index = position;
- }
- // Coerce the parsed value to a JavaScript number.
- return +source.slice(begin, Index);
- }
- // A negative sign may only precede numbers.
- if (isSigned) {
- abort();
- }
- // `true`, `false`, and `null` literals.
- var temp = source.slice(Index, Index + 4);
- if (temp == "true") {
- Index += 4;
- return true;
- } else if (temp == "fals" && source.charCodeAt(Index + 4 ) == 101) {
- Index += 5;
- return false;
- } else if (temp == "null") {
- Index += 4;
- return null;
- }
- // Unrecognized token.
- abort();
- }
- }
- // Return the sentinel `$` character if the parser has reached the end
- // of the source string.
- return "$";
- };
- // Internal: Parses a JSON `value` token.
- var get = function (value) {
- var results, hasMembers;
- if (value == "$") {
- // Unexpected end of input.
- abort();
- }
- if (typeof value == "string") {
- if ((charIndexBuggy ? value.charAt(0) : value[0]) == "@") {
- // Remove the sentinel `@` character.
- return value.slice(1);
- }
- // Parse object and array literals.
- if (value == "[") {
- // Parses a JSON array, returning a new JavaScript array.
- results = [];
- for (;;) {
- value = lex();
- // A closing square bracket marks the end of the array literal.
- if (value == "]") {
- break;
- }
- // If the array literal contains elements, the current token
- // should be a comma separating the previous element from the
- // next.
- if (hasMembers) {
- if (value == ",") {
- value = lex();
- if (value == "]") {
- // Unexpected trailing `,` in array literal.
- abort();
- }
- } else {
- // A `,` must separate each array element.
- abort();
- }
- } else {
- hasMembers = true;
- }
- // Elisions and leading commas are not permitted.
- if (value == ",") {
- abort();
- }
- results.push(get(value));
- }
- return results;
- } else if (value == "{") {
- // Parses a JSON object, returning a new JavaScript object.
- results = {};
- for (;;) {
- value = lex();
- // A closing curly brace marks the end of the object literal.
- if (value == "}") {
- break;
- }
- // If the object literal contains members, the current token
- // should be a comma separator.
- if (hasMembers) {
- if (value == ",") {
- value = lex();
- if (value == "}") {
- // Unexpected trailing `,` in object literal.
- abort();
- }
- } else {
- // A `,` must separate each object member.
- abort();
- }
- } else {
- hasMembers = true;
- }
- // Leading commas are not permitted, object property names must be
- // double-quoted strings, and a `:` must separate each property
- // name and value.
- if (value == "," || typeof value != "string" || (charIndexBuggy ? value.charAt(0) : value[0]) != "@" || lex() != ":") {
- abort();
- }
- results[value.slice(1)] = get(lex());
- }
- return results;
- }
- // Unexpected token encountered.
- abort();
- }
- return value;
- };
- // Internal: Updates a traversed object member.
- var update = function (source, property, callback) {
- var element = walk(source, property, callback);
- if (element === undefined) {
- delete source[property];
- } else {
- source[property] = element;
- }
- };
- // Internal: Recursively traverses a parsed JSON object, invoking the
- // `callback` function for each value. This is an implementation of the
- // `Walk(holder, name)` operation defined in ES 5.1 section 15.12.2.
- var walk = function (source, property, callback) {
- var value = source[property], length;
- if (typeof value == "object" && value) {
- // `forOwn` can't be used to traverse an array in Opera <= 8.54
- // because its `Object#hasOwnProperty` implementation returns `false`
- // for array indices (e.g., `![1, 2, 3].hasOwnProperty("0")`).
- if (getClass.call(value) == arrayClass) {
- for (length = value.length; length--;) {
- update(getClass, forOwn, value, length, callback);
- }
- } else {
- forOwn(value, function (property) {
- update(value, property, callback);
- });
- }
- }
- return callback.call(source, property, value);
- };
- // Public: `JSON.parse`. See ES 5.1 section 15.12.2.
- exports.parse = function (source, callback) {
- var result, value;
- Index = 0;
- Source = "" + source;
- result = get(lex());
- // If a JSON string contains multiple tokens, it is invalid.
- if (lex() != "$") {
- abort();
- }
- // Reset the parser state.
- Index = Source = null;
- return callback && getClass.call(callback) == functionClass ? walk((value = {}, value[""] = result, value), "", callback) : result;
- };
- }
- }
- exports.runInContext = runInContext;
- return exports;
- }
- if (freeExports && !isLoader) {
- // Export for CommonJS environments.
- runInContext(root, freeExports);
- } else {
- // Export for web browsers and JavaScript engines.
- var nativeJSON = root.JSON,
- previousJSON = root.JSON3,
- isRestored = false;
- var JSON3 = runInContext(root, (root.JSON3 = {
- // Public: Restores the original value of the global `JSON` object and
- // returns a reference to the `JSON3` object.
- "noConflict": function () {
- if (!isRestored) {
- isRestored = true;
- root.JSON = nativeJSON;
- root.JSON3 = previousJSON;
- nativeJSON = previousJSON = null;
- }
- return JSON3;
- }
- }));
- root.JSON = {
- "parse": JSON3.parse,
- "stringify": JSON3.stringify
- };
- }
- // Export for asynchronous module loaders.
- if (isLoader) {
- !(__WEBPACK_AMD_DEFINE_RESULT__ = function () {
- return JSON3;
- }.call(exports, __webpack_require__, exports, module),
- __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));
- }
- }).call(this);
- /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(/*! ./../../webpack/buildin/module.js */ "./node_modules/webpack/buildin/module.js")(module), __webpack_require__(/*! ./../../webpack/buildin/global.js */ "./node_modules/webpack/buildin/global.js")))
- /***/ }),
- /***/ "./node_modules/lodash-es/_Symbol.js":
- /*!*******************************************!*\
- !*** ./node_modules/lodash-es/_Symbol.js ***!
- \*******************************************/
- /*! exports provided: default */
- /*! exports used: default */
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
- "use strict";
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__root_js__ = __webpack_require__(/*! ./_root.js */ "./node_modules/lodash-es/_root.js");
- /** Built-in value references. */
- var Symbol = __WEBPACK_IMPORTED_MODULE_0__root_js__["a" /* default */].Symbol;
- /* harmony default export */ __webpack_exports__["a"] = (Symbol);
- /***/ }),
- /***/ "./node_modules/lodash-es/_baseGetTag.js":
- /*!***********************************************!*\
- !*** ./node_modules/lodash-es/_baseGetTag.js ***!
- \***********************************************/
- /*! exports provided: default */
- /*! exports used: default */
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
- "use strict";
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__Symbol_js__ = __webpack_require__(/*! ./_Symbol.js */ "./node_modules/lodash-es/_Symbol.js");
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__getRawTag_js__ = __webpack_require__(/*! ./_getRawTag.js */ "./node_modules/lodash-es/_getRawTag.js");
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__objectToString_js__ = __webpack_require__(/*! ./_objectToString.js */ "./node_modules/lodash-es/_objectToString.js");
- /** `Object#toString` result references. */
- var nullTag = '[object Null]',
- undefinedTag = '[object Undefined]';
- /** Built-in value references. */
- var symToStringTag = __WEBPACK_IMPORTED_MODULE_0__Symbol_js__["a" /* default */] ? __WEBPACK_IMPORTED_MODULE_0__Symbol_js__["a" /* default */].toStringTag : undefined;
- /**
- * The base implementation of `getTag` without fallbacks for buggy environments.
- *
- * @private
- * @param {*} value The value to query.
- * @returns {string} Returns the `toStringTag`.
- */
- function baseGetTag(value) {
- if (value == null) {
- return value === undefined ? undefinedTag : nullTag;
- }
- return (symToStringTag && symToStringTag in Object(value))
- ? Object(__WEBPACK_IMPORTED_MODULE_1__getRawTag_js__["a" /* default */])(value)
- : Object(__WEBPACK_IMPORTED_MODULE_2__objectToString_js__["a" /* default */])(value);
- }
- /* harmony default export */ __webpack_exports__["a"] = (baseGetTag);
- /***/ }),
- /***/ "./node_modules/lodash-es/_freeGlobal.js":
- /*!***********************************************!*\
- !*** ./node_modules/lodash-es/_freeGlobal.js ***!
- \***********************************************/
- /*! exports provided: default */
- /*! exports used: default */
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
- "use strict";
- /* WEBPACK VAR INJECTION */(function(global) {/** Detect free variable `global` from Node.js. */
- var freeGlobal = typeof global == 'object' && global && global.Object === Object && global;
- /* harmony default export */ __webpack_exports__["a"] = (freeGlobal);
- /* WEBPACK VAR INJECTION */}.call(__webpack_exports__, __webpack_require__(/*! ./../webpack/buildin/global.js */ "./node_modules/webpack/buildin/global.js")))
- /***/ }),
- /***/ "./node_modules/lodash-es/_getPrototype.js":
- /*!*************************************************!*\
- !*** ./node_modules/lodash-es/_getPrototype.js ***!
- \*************************************************/
- /*! exports provided: default */
- /*! exports used: default */
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
- "use strict";
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__overArg_js__ = __webpack_require__(/*! ./_overArg.js */ "./node_modules/lodash-es/_overArg.js");
- /** Built-in value references. */
- var getPrototype = Object(__WEBPACK_IMPORTED_MODULE_0__overArg_js__["a" /* default */])(Object.getPrototypeOf, Object);
- /* harmony default export */ __webpack_exports__["a"] = (getPrototype);
- /***/ }),
- /***/ "./node_modules/lodash-es/_getRawTag.js":
- /*!**********************************************!*\
- !*** ./node_modules/lodash-es/_getRawTag.js ***!
- \**********************************************/
- /*! exports provided: default */
- /*! exports used: default */
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
- "use strict";
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__Symbol_js__ = __webpack_require__(/*! ./_Symbol.js */ "./node_modules/lodash-es/_Symbol.js");
- /** Used for built-in method references. */
- var objectProto = Object.prototype;
- /** Used to check objects for own properties. */
- var hasOwnProperty = objectProto.hasOwnProperty;
- /**
- * Used to resolve the
- * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)
- * of values.
- */
- var nativeObjectToString = objectProto.toString;
- /** Built-in value references. */
- var symToStringTag = __WEBPACK_IMPORTED_MODULE_0__Symbol_js__["a" /* default */] ? __WEBPACK_IMPORTED_MODULE_0__Symbol_js__["a" /* default */].toStringTag : undefined;
- /**
- * A specialized version of `baseGetTag` which ignores `Symbol.toStringTag` values.
- *
- * @private
- * @param {*} value The value to query.
- * @returns {string} Returns the raw `toStringTag`.
- */
- function getRawTag(value) {
- var isOwn = hasOwnProperty.call(value, symToStringTag),
- tag = value[symToStringTag];
- try {
- value[symToStringTag] = undefined;
- var unmasked = true;
- } catch (e) {}
- var result = nativeObjectToString.call(value);
- if (unmasked) {
- if (isOwn) {
- value[symToStringTag] = tag;
- } else {
- delete value[symToStringTag];
- }
- }
- return result;
- }
- /* harmony default export */ __webpack_exports__["a"] = (getRawTag);
- /***/ }),
- /***/ "./node_modules/lodash-es/_objectToString.js":
- /*!***************************************************!*\
- !*** ./node_modules/lodash-es/_objectToString.js ***!
- \***************************************************/
- /*! exports provided: default */
- /*! exports used: default */
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
- "use strict";
- /** Used for built-in method references. */
- var objectProto = Object.prototype;
- /**
- * Used to resolve the
- * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)
- * of values.
- */
- var nativeObjectToString = objectProto.toString;
- /**
- * Converts `value` to a string using `Object.prototype.toString`.
- *
- * @private
- * @param {*} value The value to convert.
- * @returns {string} Returns the converted string.
- */
- function objectToString(value) {
- return nativeObjectToString.call(value);
- }
- /* harmony default export */ __webpack_exports__["a"] = (objectToString);
- /***/ }),
- /***/ "./node_modules/lodash-es/_overArg.js":
- /*!********************************************!*\
- !*** ./node_modules/lodash-es/_overArg.js ***!
- \********************************************/
- /*! exports provided: default */
- /*! exports used: default */
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
- "use strict";
- /**
- * Creates a unary function that invokes `func` with its argument transformed.
- *
- * @private
- * @param {Function} func The function to wrap.
- * @param {Function} transform The argument transform.
- * @returns {Function} Returns the new function.
- */
- function overArg(func, transform) {
- return function(arg) {
- return func(transform(arg));
- };
- }
- /* harmony default export */ __webpack_exports__["a"] = (overArg);
- /***/ }),
- /***/ "./node_modules/lodash-es/_root.js":
- /*!*****************************************!*\
- !*** ./node_modules/lodash-es/_root.js ***!
- \*****************************************/
- /*! exports provided: default */
- /*! exports used: default */
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
- "use strict";
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__freeGlobal_js__ = __webpack_require__(/*! ./_freeGlobal.js */ "./node_modules/lodash-es/_freeGlobal.js");
- /** Detect free variable `self`. */
- var freeSelf = typeof self == 'object' && self && self.Object === Object && self;
- /** Used as a reference to the global object. */
- var root = __WEBPACK_IMPORTED_MODULE_0__freeGlobal_js__["a" /* default */] || freeSelf || Function('return this')();
- /* harmony default export */ __webpack_exports__["a"] = (root);
- /***/ }),
- /***/ "./node_modules/lodash-es/isObjectLike.js":
- /*!************************************************!*\
- !*** ./node_modules/lodash-es/isObjectLike.js ***!
- \************************************************/
- /*! exports provided: default */
- /*! exports used: default */
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
- "use strict";
- /**
- * Checks if `value` is object-like. A value is object-like if it's not `null`
- * and has a `typeof` result of "object".
- *
- * @static
- * @memberOf _
- * @since 4.0.0
- * @category Lang
- * @param {*} value The value to check.
- * @returns {boolean} Returns `true` if `value` is object-like, else `false`.
- * @example
- *
- * _.isObjectLike({});
- * // => true
- *
- * _.isObjectLike([1, 2, 3]);
- * // => true
- *
- * _.isObjectLike(_.noop);
- * // => false
- *
- * _.isObjectLike(null);
- * // => false
- */
- function isObjectLike(value) {
- return value != null && typeof value == 'object';
- }
- /* harmony default export */ __webpack_exports__["a"] = (isObjectLike);
- /***/ }),
- /***/ "./node_modules/lodash-es/isPlainObject.js":
- /*!*************************************************!*\
- !*** ./node_modules/lodash-es/isPlainObject.js ***!
- \*************************************************/
- /*! exports provided: default */
- /*! exports used: default */
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
- "use strict";
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__baseGetTag_js__ = __webpack_require__(/*! ./_baseGetTag.js */ "./node_modules/lodash-es/_baseGetTag.js");
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__getPrototype_js__ = __webpack_require__(/*! ./_getPrototype.js */ "./node_modules/lodash-es/_getPrototype.js");
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__isObjectLike_js__ = __webpack_require__(/*! ./isObjectLike.js */ "./node_modules/lodash-es/isObjectLike.js");
- /** `Object#toString` result references. */
- var objectTag = '[object Object]';
- /** Used for built-in method references. */
- var funcProto = Function.prototype,
- objectProto = Object.prototype;
- /** Used to resolve the decompiled source of functions. */
- var funcToString = funcProto.toString;
- /** Used to check objects for own properties. */
- var hasOwnProperty = objectProto.hasOwnProperty;
- /** Used to infer the `Object` constructor. */
- var objectCtorString = funcToString.call(Object);
- /**
- * Checks if `value` is a plain object, that is, an object created by the
- * `Object` constructor or one with a `[[Prototype]]` of `null`.
- *
- * @static
- * @memberOf _
- * @since 0.8.0
- * @category Lang
- * @param {*} value The value to check.
- * @returns {boolean} Returns `true` if `value` is a plain object, else `false`.
- * @example
- *
- * function Foo() {
- * this.a = 1;
- * }
- *
- * _.isPlainObject(new Foo);
- * // => false
- *
- * _.isPlainObject([1, 2, 3]);
- * // => false
- *
- * _.isPlainObject({ 'x': 0, 'y': 0 });
- * // => true
- *
- * _.isPlainObject(Object.create(null));
- * // => true
- */
- function isPlainObject(value) {
- if (!Object(__WEBPACK_IMPORTED_MODULE_2__isObjectLike_js__["a" /* default */])(value) || Object(__WEBPACK_IMPORTED_MODULE_0__baseGetTag_js__["a" /* default */])(value) != objectTag) {
- return false;
- }
- var proto = Object(__WEBPACK_IMPORTED_MODULE_1__getPrototype_js__["a" /* default */])(value);
- if (proto === null) {
- return true;
- }
- var Ctor = hasOwnProperty.call(proto, 'constructor') && proto.constructor;
- return typeof Ctor == 'function' && Ctor instanceof Ctor &&
- funcToString.call(Ctor) == objectCtorString;
- }
- /* harmony default export */ __webpack_exports__["a"] = (isPlainObject);
- /***/ }),
- /***/ "./node_modules/ms/index.js":
- /*!**********************************!*\
- !*** ./node_modules/ms/index.js ***!
- \**********************************/
- /*! dynamic exports provided */
- /*! all exports used */
- /***/ (function(module, exports) {
- /**
- * Helpers.
- */
- var s = 1000;
- var m = s * 60;
- var h = m * 60;
- var d = h * 24;
- var y = d * 365.25;
- /**
- * Parse or format the given `val`.
- *
- * Options:
- *
- * - `long` verbose formatting [false]
- *
- * @param {String|Number} val
- * @param {Object} [options]
- * @throws {Error} throw an error if val is not a non-empty string or a number
- * @return {String|Number}
- * @api public
- */
- module.exports = function(val, options) {
- options = options || {};
- var type = typeof val;
- if (type === 'string' && val.length > 0) {
- return parse(val);
- } else if (type === 'number' && isNaN(val) === false) {
- return options.long ? fmtLong(val) : fmtShort(val);
- }
- throw new Error(
- 'val is not a non-empty string or a valid number. val=' +
- JSON.stringify(val)
- );
- };
- /**
- * Parse the given `str` and return milliseconds.
- *
- * @param {String} str
- * @return {Number}
- * @api private
- */
- function parse(str) {
- str = String(str);
- if (str.length > 100) {
- return;
- }
- var match = /^((?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|years?|yrs?|y)?$/i.exec(
- str
- );
- if (!match) {
- return;
- }
- var n = parseFloat(match[1]);
- var type = (match[2] || 'ms').toLowerCase();
- switch (type) {
- case 'years':
- case 'year':
- case 'yrs':
- case 'yr':
- case 'y':
- return n * y;
- case 'days':
- case 'day':
- case 'd':
- return n * d;
- case 'hours':
- case 'hour':
- case 'hrs':
- case 'hr':
- case 'h':
- return n * h;
- case 'minutes':
- case 'minute':
- case 'mins':
- case 'min':
- case 'm':
- return n * m;
- case 'seconds':
- case 'second':
- case 'secs':
- case 'sec':
- case 's':
- return n * s;
- case 'milliseconds':
- case 'millisecond':
- case 'msecs':
- case 'msec':
- case 'ms':
- return n;
- default:
- return undefined;
- }
- }
- /**
- * Short format for `ms`.
- *
- * @param {Number} ms
- * @return {String}
- * @api private
- */
- function fmtShort(ms) {
- if (ms >= d) {
- return Math.round(ms / d) + 'd';
- }
- if (ms >= h) {
- return Math.round(ms / h) + 'h';
- }
- if (ms >= m) {
- return Math.round(ms / m) + 'm';
- }
- if (ms >= s) {
- return Math.round(ms / s) + 's';
- }
- return ms + 'ms';
- }
- /**
- * Long format for `ms`.
- *
- * @param {Number} ms
- * @return {String}
- * @api private
- */
- function fmtLong(ms) {
- return plural(ms, d, 'day') ||
- plural(ms, h, 'hour') ||
- plural(ms, m, 'minute') ||
- plural(ms, s, 'second') ||
- ms + ' ms';
- }
- /**
- * Pluralization helper.
- */
- function plural(ms, n, name) {
- if (ms < n) {
- return;
- }
- if (ms < n * 1.5) {
- return Math.floor(ms / n) + ' ' + name;
- }
- return Math.ceil(ms / n) + ' ' + name + 's';
- }
- /***/ }),
- /***/ "./node_modules/node-libs-browser/node_modules/punycode/punycode.js":
- /*!**************************************************************************!*\
- !*** ./node_modules/node-libs-browser/node_modules/punycode/punycode.js ***!
- \**************************************************************************/
- /*! dynamic exports provided */
- /*! all exports used */
- /***/ (function(module, exports, __webpack_require__) {
- /* WEBPACK VAR INJECTION */(function(module, global) {var __WEBPACK_AMD_DEFINE_RESULT__;/*! https://mths.be/punycode v1.4.1 by @mathias */
- ;(function(root) {
- /** Detect free variables */
- var freeExports = typeof exports == 'object' && exports &&
- !exports.nodeType && exports;
- var freeModule = typeof module == 'object' && module &&
- !module.nodeType && module;
- var freeGlobal = typeof global == 'object' && global;
- if (
- freeGlobal.global === freeGlobal ||
- freeGlobal.window === freeGlobal ||
- freeGlobal.self === freeGlobal
- ) {
- root = freeGlobal;
- }
- /**
- * The `punycode` object.
- * @name punycode
- * @type Object
- */
- var punycode,
- /** Highest positive signed 32-bit float value */
- maxInt = 2147483647, // aka. 0x7FFFFFFF or 2^31-1
- /** Bootstring parameters */
- base = 36,
- tMin = 1,
- tMax = 26,
- skew = 38,
- damp = 700,
- initialBias = 72,
- initialN = 128, // 0x80
- delimiter = '-', // '\x2D'
- /** Regular expressions */
- regexPunycode = /^xn--/,
- regexNonASCII = /[^\x20-\x7E]/, // unprintable ASCII chars + non-ASCII chars
- regexSeparators = /[\x2E\u3002\uFF0E\uFF61]/g, // RFC 3490 separators
- /** Error messages */
- errors = {
- 'overflow': 'Overflow: input needs wider integers to process',
- 'not-basic': 'Illegal input >= 0x80 (not a basic code point)',
- 'invalid-input': 'Invalid input'
- },
- /** Convenience shortcuts */
- baseMinusTMin = base - tMin,
- floor = Math.floor,
- stringFromCharCode = String.fromCharCode,
- /** Temporary variable */
- key;
- /*--------------------------------------------------------------------------*/
- /**
- * A generic error utility function.
- * @private
- * @param {String} type The error type.
- * @returns {Error} Throws a `RangeError` with the applicable error message.
- */
- function error(type) {
- throw new RangeError(errors[type]);
- }
- /**
- * A generic `Array#map` utility function.
- * @private
- * @param {Array} array The array to iterate over.
- * @param {Function} callback The function that gets called for every array
- * item.
- * @returns {Array} A new array of values returned by the callback function.
- */
- function map(array, fn) {
- var length = array.length;
- var result = [];
- while (length--) {
- result[length] = fn(array[length]);
- }
- return result;
- }
- /**
- * A simple `Array#map`-like wrapper to work with domain name strings or email
- * addresses.
- * @private
- * @param {String} domain The domain name or email address.
- * @param {Function} callback The function that gets called for every
- * character.
- * @returns {Array} A new string of characters returned by the callback
- * function.
- */
- function mapDomain(string, fn) {
- var parts = string.split('@');
- var result = '';
- if (parts.length > 1) {
- // In email addresses, only the domain name should be punycoded. Leave
- // the local part (i.e. everything up to `@`) intact.
- result = parts[0] + '@';
- string = parts[1];
- }
- // Avoid `split(regex)` for IE8 compatibility. See #17.
- string = string.replace(regexSeparators, '\x2E');
- var labels = string.split('.');
- var encoded = map(labels, fn).join('.');
- return result + encoded;
- }
- /**
- * Creates an array containing the numeric code points of each Unicode
- * character in the string. While JavaScript uses UCS-2 internally,
- * this function will convert a pair of surrogate halves (each of which
- * UCS-2 exposes as separate characters) into a single code point,
- * matching UTF-16.
- * @see `punycode.ucs2.encode`
- * @see <https://mathiasbynens.be/notes/javascript-encoding>
- * @memberOf punycode.ucs2
- * @name decode
- * @param {String} string The Unicode input string (UCS-2).
- * @returns {Array} The new array of code points.
- */
- function ucs2decode(string) {
- var output = [],
- counter = 0,
- length = string.length,
- value,
- extra;
- while (counter < length) {
- value = string.charCodeAt(counter++);
- if (value >= 0xD800 && value <= 0xDBFF && counter < length) {
- // high surrogate, and there is a next character
- extra = string.charCodeAt(counter++);
- if ((extra & 0xFC00) == 0xDC00) { // low surrogate
- output.push(((value & 0x3FF) << 10) + (extra & 0x3FF) + 0x10000);
- } else {
- // unmatched surrogate; only append this code unit, in case the next
- // code unit is the high surrogate of a surrogate pair
- output.push(value);
- counter--;
- }
- } else {
- output.push(value);
- }
- }
- return output;
- }
- /**
- * Creates a string based on an array of numeric code points.
- * @see `punycode.ucs2.decode`
- * @memberOf punycode.ucs2
- * @name encode
- * @param {Array} codePoints The array of numeric code points.
- * @returns {String} The new Unicode string (UCS-2).
- */
- function ucs2encode(array) {
- return map(array, function(value) {
- var output = '';
- if (value > 0xFFFF) {
- value -= 0x10000;
- output += stringFromCharCode(value >>> 10 & 0x3FF | 0xD800);
- value = 0xDC00 | value & 0x3FF;
- }
- output += stringFromCharCode(value);
- return output;
- }).join('');
- }
- /**
- * Converts a basic code point into a digit/integer.
- * @see `digitToBasic()`
- * @private
- * @param {Number} codePoint The basic numeric code point value.
- * @returns {Number} The numeric value of a basic code point (for use in
- * representing integers) in the range `0` to `base - 1`, or `base` if
- * the code point does not represent a value.
- */
- function basicToDigit(codePoint) {
- if (codePoint - 48 < 10) {
- return codePoint - 22;
- }
- if (codePoint - 65 < 26) {
- return codePoint - 65;
- }
- if (codePoint - 97 < 26) {
- return codePoint - 97;
- }
- return base;
- }
- /**
- * Converts a digit/integer into a basic code point.
- * @see `basicToDigit()`
- * @private
- * @param {Number} digit The numeric value of a basic code point.
- * @returns {Number} The basic code point whose value (when used for
- * representing integers) is `digit`, which needs to be in the range
- * `0` to `base - 1`. If `flag` is non-zero, the uppercase form is
- * used; else, the lowercase form is used. The behavior is undefined
- * if `flag` is non-zero and `digit` has no uppercase form.
- */
- function digitToBasic(digit, flag) {
- // 0..25 map to ASCII a..z or A..Z
- // 26..35 map to ASCII 0..9
- return digit + 22 + 75 * (digit < 26) - ((flag != 0) << 5);
- }
- /**
- * Bias adaptation function as per section 3.4 of RFC 3492.
- * https://tools.ietf.org/html/rfc3492#section-3.4
- * @private
- */
- function adapt(delta, numPoints, firstTime) {
- var k = 0;
- delta = firstTime ? floor(delta / damp) : delta >> 1;
- delta += floor(delta / numPoints);
- for (/* no initialization */; delta > baseMinusTMin * tMax >> 1; k += base) {
- delta = floor(delta / baseMinusTMin);
- }
- return floor(k + (baseMinusTMin + 1) * delta / (delta + skew));
- }
- /**
- * Converts a Punycode string of ASCII-only symbols to a string of Unicode
- * symbols.
- * @memberOf punycode
- * @param {String} input The Punycode string of ASCII-only symbols.
- * @returns {String} The resulting string of Unicode symbols.
- */
- function decode(input) {
- // Don't use UCS-2
- var output = [],
- inputLength = input.length,
- out,
- i = 0,
- n = initialN,
- bias = initialBias,
- basic,
- j,
- index,
- oldi,
- w,
- k,
- digit,
- t,
- /** Cached calculation results */
- baseMinusT;
- // Handle the basic code points: let `basic` be the number of input code
- // points before the last delimiter, or `0` if there is none, then copy
- // the first basic code points to the output.
- basic = input.lastIndexOf(delimiter);
- if (basic < 0) {
- basic = 0;
- }
- for (j = 0; j < basic; ++j) {
- // if it's not a basic code point
- if (input.charCodeAt(j) >= 0x80) {
- error('not-basic');
- }
- output.push(input.charCodeAt(j));
- }
- // Main decoding loop: start just after the last delimiter if any basic code
- // points were copied; start at the beginning otherwise.
- for (index = basic > 0 ? basic + 1 : 0; index < inputLength; /* no final expression */) {
- // `index` is the index of the next character to be consumed.
- // Decode a generalized variable-length integer into `delta`,
- // which gets added to `i`. The overflow checking is easier
- // if we increase `i` as we go, then subtract off its starting
- // value at the end to obtain `delta`.
- for (oldi = i, w = 1, k = base; /* no condition */; k += base) {
- if (index >= inputLength) {
- error('invalid-input');
- }
- digit = basicToDigit(input.charCodeAt(index++));
- if (digit >= base || digit > floor((maxInt - i) / w)) {
- error('overflow');
- }
- i += digit * w;
- t = k <= bias ? tMin : (k >= bias + tMax ? tMax : k - bias);
- if (digit < t) {
- break;
- }
- baseMinusT = base - t;
- if (w > floor(maxInt / baseMinusT)) {
- error('overflow');
- }
- w *= baseMinusT;
- }
- out = output.length + 1;
- bias = adapt(i - oldi, out, oldi == 0);
- // `i` was supposed to wrap around from `out` to `0`,
- // incrementing `n` each time, so we'll fix that now:
- if (floor(i / out) > maxInt - n) {
- error('overflow');
- }
- n += floor(i / out);
- i %= out;
- // Insert `n` at position `i` of the output
- output.splice(i++, 0, n);
- }
- return ucs2encode(output);
- }
- /**
- * Converts a string of Unicode symbols (e.g. a domain name label) to a
- * Punycode string of ASCII-only symbols.
- * @memberOf punycode
- * @param {String} input The string of Unicode symbols.
- * @returns {String} The resulting Punycode string of ASCII-only symbols.
- */
- function encode(input) {
- var n,
- delta,
- handledCPCount,
- basicLength,
- bias,
- j,
- m,
- q,
- k,
- t,
- currentValue,
- output = [],
- /** `inputLength` will hold the number of code points in `input`. */
- inputLength,
- /** Cached calculation results */
- handledCPCountPlusOne,
- baseMinusT,
- qMinusT;
- // Convert the input in UCS-2 to Unicode
- input = ucs2decode(input);
- // Cache the length
- inputLength = input.length;
- // Initialize the state
- n = initialN;
- delta = 0;
- bias = initialBias;
- // Handle the basic code points
- for (j = 0; j < inputLength; ++j) {
- currentValue = input[j];
- if (currentValue < 0x80) {
- output.push(stringFromCharCode(currentValue));
- }
- }
- handledCPCount = basicLength = output.length;
- // `handledCPCount` is the number of code points that have been handled;
- // `basicLength` is the number of basic code points.
- // Finish the basic string - if it is not empty - with a delimiter
- if (basicLength) {
- output.push(delimiter);
- }
- // Main encoding loop:
- while (handledCPCount < inputLength) {
- // All non-basic code points < n have been handled already. Find the next
- // larger one:
- for (m = maxInt, j = 0; j < inputLength; ++j) {
- currentValue = input[j];
- if (currentValue >= n && currentValue < m) {
- m = currentValue;
- }
- }
- // Increase `delta` enough to advance the decoder's <n,i> state to <m,0>,
- // but guard against overflow
- handledCPCountPlusOne = handledCPCount + 1;
- if (m - n > floor((maxInt - delta) / handledCPCountPlusOne)) {
- error('overflow');
- }
- delta += (m - n) * handledCPCountPlusOne;
- n = m;
- for (j = 0; j < inputLength; ++j) {
- currentValue = input[j];
- if (currentValue < n && ++delta > maxInt) {
- error('overflow');
- }
- if (currentValue == n) {
- // Represent delta as a generalized variable-length integer
- for (q = delta, k = base; /* no condition */; k += base) {
- t = k <= bias ? tMin : (k >= bias + tMax ? tMax : k - bias);
- if (q < t) {
- break;
- }
- qMinusT = q - t;
- baseMinusT = base - t;
- output.push(
- stringFromCharCode(digitToBasic(t + qMinusT % baseMinusT, 0))
- );
- q = floor(qMinusT / baseMinusT);
- }
- output.push(stringFromCharCode(digitToBasic(q, 0)));
- bias = adapt(delta, handledCPCountPlusOne, handledCPCount == basicLength);
- delta = 0;
- ++handledCPCount;
- }
- }
- ++delta;
- ++n;
- }
- return output.join('');
- }
- /**
- * Converts a Punycode string representing a domain name or an email address
- * to Unicode. Only the Punycoded parts of the input will be converted, i.e.
- * it doesn't matter if you call it on a string that has already been
- * converted to Unicode.
- * @memberOf punycode
- * @param {String} input The Punycoded domain name or email address to
- * convert to Unicode.
- * @returns {String} The Unicode representation of the given Punycode
- * string.
- */
- function toUnicode(input) {
- return mapDomain(input, function(string) {
- return regexPunycode.test(string)
- ? decode(string.slice(4).toLowerCase())
- : string;
- });
- }
- /**
- * Converts a Unicode string representing a domain name or an email address to
- * Punycode. Only the non-ASCII parts of the domain name will be converted,
- * i.e. it doesn't matter if you call it with a domain that's already in
- * ASCII.
- * @memberOf punycode
- * @param {String} input The domain name or email address to convert, as a
- * Unicode string.
- * @returns {String} The Punycode representation of the given domain name or
- * email address.
- */
- function toASCII(input) {
- return mapDomain(input, function(string) {
- return regexNonASCII.test(string)
- ? 'xn--' + encode(string)
- : string;
- });
- }
- /*--------------------------------------------------------------------------*/
- /** Define the public API */
- punycode = {
- /**
- * A string representing the current Punycode.js version number.
- * @memberOf punycode
- * @type String
- */
- 'version': '1.4.1',
- /**
- * An object of methods to convert from JavaScript's internal character
- * representation (UCS-2) to Unicode code points, and back.
- * @see <https://mathiasbynens.be/notes/javascript-encoding>
- * @memberOf punycode
- * @type Object
- */
- 'ucs2': {
- 'decode': ucs2decode,
- 'encode': ucs2encode
- },
- 'decode': decode,
- 'encode': encode,
- 'toASCII': toASCII,
- 'toUnicode': toUnicode
- };
- /** Expose `punycode` */
- // Some AMD build optimizers, like r.js, check for specific condition patterns
- // like the following:
- if (
- true
- ) {
- !(__WEBPACK_AMD_DEFINE_RESULT__ = function() {
- return punycode;
- }.call(exports, __webpack_require__, exports, module),
- __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));
- } else if (freeExports && freeModule) {
- if (module.exports == freeExports) {
- // in Node.js, io.js, or RingoJS v0.8.0+
- freeModule.exports = punycode;
- } else {
- // in Narwhal or RingoJS v0.7.0-
- for (key in punycode) {
- punycode.hasOwnProperty(key) && (freeExports[key] = punycode[key]);
- }
- }
- } else {
- // in Rhino or a web browser
- root.punycode = punycode;
- }
- }(this));
- /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(/*! ./../../../webpack/buildin/module.js */ "./node_modules/webpack/buildin/module.js")(module), __webpack_require__(/*! ./../../../webpack/buildin/global.js */ "./node_modules/webpack/buildin/global.js")))
- /***/ }),
- /***/ "./node_modules/object-assign/index.js":
- /*!*********************************************!*\
- !*** ./node_modules/object-assign/index.js ***!
- \*********************************************/
- /*! dynamic exports provided */
- /*! all exports used */
- /***/ (function(module, exports, __webpack_require__) {
- "use strict";
- /*
- object-assign
- (c) Sindre Sorhus
- @license MIT
- */
- /* eslint-disable no-unused-vars */
- var getOwnPropertySymbols = Object.getOwnPropertySymbols;
- var hasOwnProperty = Object.prototype.hasOwnProperty;
- var propIsEnumerable = Object.prototype.propertyIsEnumerable;
- function toObject(val) {
- if (val === null || val === undefined) {
- throw new TypeError('Object.assign cannot be called with null or undefined');
- }
- return Object(val);
- }
- function shouldUseNative() {
- try {
- if (!Object.assign) {
- return false;
- }
- // Detect buggy property enumeration order in older V8 versions.
- // https://bugs.chromium.org/p/v8/issues/detail?id=4118
- var test1 = new String('abc'); // eslint-disable-line no-new-wrappers
- test1[5] = 'de';
- if (Object.getOwnPropertyNames(test1)[0] === '5') {
- return false;
- }
- // https://bugs.chromium.org/p/v8/issues/detail?id=3056
- var test2 = {};
- for (var i = 0; i < 10; i++) {
- test2['_' + String.fromCharCode(i)] = i;
- }
- var order2 = Object.getOwnPropertyNames(test2).map(function (n) {
- return test2[n];
- });
- if (order2.join('') !== '0123456789') {
- return false;
- }
- // https://bugs.chromium.org/p/v8/issues/detail?id=3056
- var test3 = {};
- 'abcdefghijklmnopqrst'.split('').forEach(function (letter) {
- test3[letter] = letter;
- });
- if (Object.keys(Object.assign({}, test3)).join('') !==
- 'abcdefghijklmnopqrst') {
- return false;
- }
- return true;
- } catch (err) {
- // We don't expect any of the above to throw, but better to be safe.
- return false;
- }
- }
- module.exports = shouldUseNative() ? Object.assign : function (target, source) {
- var from;
- var to = toObject(target);
- var symbols;
- for (var s = 1; s < arguments.length; s++) {
- from = Object(arguments[s]);
- for (var key in from) {
- if (hasOwnProperty.call(from, key)) {
- to[key] = from[key];
- }
- }
- if (getOwnPropertySymbols) {
- symbols = getOwnPropertySymbols(from);
- for (var i = 0; i < symbols.length; i++) {
- if (propIsEnumerable.call(from, symbols[i])) {
- to[symbols[i]] = from[symbols[i]];
- }
- }
- }
- }
- return to;
- };
- /***/ }),
- /***/ "./node_modules/path-to-regexp/index.js":
- /*!**********************************************!*\
- !*** ./node_modules/path-to-regexp/index.js ***!
- \**********************************************/
- /*! dynamic exports provided */
- /*! exports used: default */
- /***/ (function(module, exports, __webpack_require__) {
- var isarray = __webpack_require__(/*! isarray */ "./node_modules/isarray/index.js")
- /**
- * Expose `pathToRegexp`.
- */
- module.exports = pathToRegexp
- module.exports.parse = parse
- module.exports.compile = compile
- module.exports.tokensToFunction = tokensToFunction
- module.exports.tokensToRegExp = tokensToRegExp
- /**
- * The main path matching regexp utility.
- *
- * @type {RegExp}
- */
- var PATH_REGEXP = new RegExp([
- // Match escaped characters that would otherwise appear in future matches.
- // This allows the user to escape special characters that won't transform.
- '(\\\\.)',
- // Match Express-style parameters and un-named parameters with a prefix
- // and optional suffixes. Matches appear as:
- //
- // "/:test(\\d+)?" => ["/", "test", "\d+", undefined, "?", undefined]
- // "/route(\\d+)" => [undefined, undefined, undefined, "\d+", undefined, undefined]
- // "/*" => ["/", undefined, undefined, undefined, undefined, "*"]
- '([\\/.])?(?:(?:\\:(\\w+)(?:\\(((?:\\\\.|[^\\\\()])+)\\))?|\\(((?:\\\\.|[^\\\\()])+)\\))([+*?])?|(\\*))'
- ].join('|'), 'g')
- /**
- * Parse a string for the raw tokens.
- *
- * @param {string} str
- * @param {Object=} options
- * @return {!Array}
- */
- function parse (str, options) {
- var tokens = []
- var key = 0
- var index = 0
- var path = ''
- var defaultDelimiter = options && options.delimiter || '/'
- var res
- while ((res = PATH_REGEXP.exec(str)) != null) {
- var m = res[0]
- var escaped = res[1]
- var offset = res.index
- path += str.slice(index, offset)
- index = offset + m.length
- // Ignore already escaped sequences.
- if (escaped) {
- path += escaped[1]
- continue
- }
- var next = str[index]
- var prefix = res[2]
- var name = res[3]
- var capture = res[4]
- var group = res[5]
- var modifier = res[6]
- var asterisk = res[7]
- // Push the current path onto the tokens.
- if (path) {
- tokens.push(path)
- path = ''
- }
- var partial = prefix != null && next != null && next !== prefix
- var repeat = modifier === '+' || modifier === '*'
- var optional = modifier === '?' || modifier === '*'
- var delimiter = res[2] || defaultDelimiter
- var pattern = capture || group
- tokens.push({
- name: name || key++,
- prefix: prefix || '',
- delimiter: delimiter,
- optional: optional,
- repeat: repeat,
- partial: partial,
- asterisk: !!asterisk,
- pattern: pattern ? escapeGroup(pattern) : (asterisk ? '.*' : '[^' + escapeString(delimiter) + ']+?')
- })
- }
- // Match any characters still remaining.
- if (index < str.length) {
- path += str.substr(index)
- }
- // If the path exists, push it onto the end.
- if (path) {
- tokens.push(path)
- }
- return tokens
- }
- /**
- * Compile a string to a template function for the path.
- *
- * @param {string} str
- * @param {Object=} options
- * @return {!function(Object=, Object=)}
- */
- function compile (str, options) {
- return tokensToFunction(parse(str, options), options)
- }
- /**
- * Prettier encoding of URI path segments.
- *
- * @param {string}
- * @return {string}
- */
- function encodeURIComponentPretty (str) {
- return encodeURI(str).replace(/[\/?#]/g, function (c) {
- return '%' + c.charCodeAt(0).toString(16).toUpperCase()
- })
- }
- /**
- * Encode the asterisk parameter. Similar to `pretty`, but allows slashes.
- *
- * @param {string}
- * @return {string}
- */
- function encodeAsterisk (str) {
- return encodeURI(str).replace(/[?#]/g, function (c) {
- return '%' + c.charCodeAt(0).toString(16).toUpperCase()
- })
- }
- /**
- * Expose a method for transforming tokens into the path function.
- */
- function tokensToFunction (tokens, options) {
- // Compile all the tokens into regexps.
- var matches = new Array(tokens.length)
- // Compile all the patterns before compilation.
- for (var i = 0; i < tokens.length; i++) {
- if (typeof tokens[i] === 'object') {
- matches[i] = new RegExp('^(?:' + tokens[i].pattern + ')$', flags(options))
- }
- }
- return function (obj, opts) {
- var path = ''
- var data = obj || {}
- var options = opts || {}
- var encode = options.pretty ? encodeURIComponentPretty : encodeURIComponent
- for (var i = 0; i < tokens.length; i++) {
- var token = tokens[i]
- if (typeof token === 'string') {
- path += token
- continue
- }
- var value = data[token.name]
- var segment
- if (value == null) {
- if (token.optional) {
- // Prepend partial segment prefixes.
- if (token.partial) {
- path += token.prefix
- }
- continue
- } else {
- throw new TypeError('Expected "' + token.name + '" to be defined')
- }
- }
- if (isarray(value)) {
- if (!token.repeat) {
- throw new TypeError('Expected "' + token.name + '" to not repeat, but received `' + JSON.stringify(value) + '`')
- }
- if (value.length === 0) {
- if (token.optional) {
- continue
- } else {
- throw new TypeError('Expected "' + token.name + '" to not be empty')
- }
- }
- for (var j = 0; j < value.length; j++) {
- segment = encode(value[j])
- if (!matches[i].test(segment)) {
- throw new TypeError('Expected all "' + token.name + '" to match "' + token.pattern + '", but received `' + JSON.stringify(segment) + '`')
- }
- path += (j === 0 ? token.prefix : token.delimiter) + segment
- }
- continue
- }
- segment = token.asterisk ? encodeAsterisk(value) : encode(value)
- if (!matches[i].test(segment)) {
- throw new TypeError('Expected "' + token.name + '" to match "' + token.pattern + '", but received "' + segment + '"')
- }
- path += token.prefix + segment
- }
- return path
- }
- }
- /**
- * Escape a regular expression string.
- *
- * @param {string} str
- * @return {string}
- */
- function escapeString (str) {
- return str.replace(/([.+*?=^!:${}()[\]|\/\\])/g, '\\$1')
- }
- /**
- * Escape the capturing group by escaping special characters and meaning.
- *
- * @param {string} group
- * @return {string}
- */
- function escapeGroup (group) {
- return group.replace(/([=!:$\/()])/g, '\\$1')
- }
- /**
- * Attach the keys as a property of the regexp.
- *
- * @param {!RegExp} re
- * @param {Array} keys
- * @return {!RegExp}
- */
- function attachKeys (re, keys) {
- re.keys = keys
- return re
- }
- /**
- * Get the flags for a regexp from the options.
- *
- * @param {Object} options
- * @return {string}
- */
- function flags (options) {
- return options && options.sensitive ? '' : 'i'
- }
- /**
- * Pull out keys from a regexp.
- *
- * @param {!RegExp} path
- * @param {!Array} keys
- * @return {!RegExp}
- */
- function regexpToRegexp (path, keys) {
- // Use a negative lookahead to match only capturing groups.
- var groups = path.source.match(/\((?!\?)/g)
- if (groups) {
- for (var i = 0; i < groups.length; i++) {
- keys.push({
- name: i,
- prefix: null,
- delimiter: null,
- optional: false,
- repeat: false,
- partial: false,
- asterisk: false,
- pattern: null
- })
- }
- }
- return attachKeys(path, keys)
- }
- /**
- * Transform an array into a regexp.
- *
- * @param {!Array} path
- * @param {Array} keys
- * @param {!Object} options
- * @return {!RegExp}
- */
- function arrayToRegexp (path, keys, options) {
- var parts = []
- for (var i = 0; i < path.length; i++) {
- parts.push(pathToRegexp(path[i], keys, options).source)
- }
- var regexp = new RegExp('(?:' + parts.join('|') + ')', flags(options))
- return attachKeys(regexp, keys)
- }
- /**
- * Create a path regexp from string input.
- *
- * @param {string} path
- * @param {!Array} keys
- * @param {!Object} options
- * @return {!RegExp}
- */
- function stringToRegexp (path, keys, options) {
- return tokensToRegExp(parse(path, options), keys, options)
- }
- /**
- * Expose a function for taking tokens and returning a RegExp.
- *
- * @param {!Array} tokens
- * @param {(Array|Object)=} keys
- * @param {Object=} options
- * @return {!RegExp}
- */
- function tokensToRegExp (tokens, keys, options) {
- if (!isarray(keys)) {
- options = /** @type {!Object} */ (keys || options)
- keys = []
- }
- options = options || {}
- var strict = options.strict
- var end = options.end !== false
- var route = ''
- // Iterate over the tokens and create our regexp string.
- for (var i = 0; i < tokens.length; i++) {
- var token = tokens[i]
- if (typeof token === 'string') {
- route += escapeString(token)
- } else {
- var prefix = escapeString(token.prefix)
- var capture = '(?:' + token.pattern + ')'
- keys.push(token)
- if (token.repeat) {
- capture += '(?:' + prefix + capture + ')*'
- }
- if (token.optional) {
- if (!token.partial) {
- capture = '(?:' + prefix + '(' + capture + '))?'
- } else {
- capture = prefix + '(' + capture + ')?'
- }
- } else {
- capture = prefix + '(' + capture + ')'
- }
- route += capture
- }
- }
- var delimiter = escapeString(options.delimiter || '/')
- var endsWithDelimiter = route.slice(-delimiter.length) === delimiter
- // In non-strict mode we allow a slash at the end of match. If the path to
- // match already ends with a slash, we remove it for consistency. The slash
- // is valid at the end of a path match, not in the middle. This is important
- // in non-ending mode, where "/test/" shouldn't match "/test//route".
- if (!strict) {
- route = (endsWithDelimiter ? route.slice(0, -delimiter.length) : route) + '(?:' + delimiter + '(?=$))?'
- }
- if (end) {
- route += '$'
- } else {
- // In non-ending mode, we need the capturing groups to match as much as
- // possible by using a positive lookahead to the end or next path segment.
- route += strict && endsWithDelimiter ? '' : '(?=' + delimiter + '|$)'
- }
- return attachKeys(new RegExp('^' + route, flags(options)), keys)
- }
- /**
- * Normalize the given path string, returning a regular expression.
- *
- * An empty array can be passed in for the keys, which will hold the
- * placeholder key descriptions. For example, using `/user/:id`, `keys` will
- * contain `[{ name: 'id', delimiter: '/', optional: false, repeat: false }]`.
- *
- * @param {(string|RegExp|Array)} path
- * @param {(Array|Object)=} keys
- * @param {Object=} options
- * @return {!RegExp}
- */
- function pathToRegexp (path, keys, options) {
- if (!isarray(keys)) {
- options = /** @type {!Object} */ (keys || options)
- keys = []
- }
- options = options || {}
- if (path instanceof RegExp) {
- return regexpToRegexp(path, /** @type {!Array} */ (keys))
- }
- if (isarray(path)) {
- return arrayToRegexp(/** @type {!Array} */ (path), /** @type {!Array} */ (keys), options)
- }
- return stringToRegexp(/** @type {string} */ (path), /** @type {!Array} */ (keys), options)
- }
- /***/ }),
- /***/ "./node_modules/process/browser.js":
- /*!*****************************************!*\
- !*** ./node_modules/process/browser.js ***!
- \*****************************************/
- /*! dynamic exports provided */
- /*! all exports used */
- /***/ (function(module, exports) {
- // shim for using process in browser
- var process = module.exports = {};
- // cached from whatever global is present so that test runners that stub it
- // don't break things. But we need to wrap it in a try catch in case it is
- // wrapped in strict mode code which doesn't define any globals. It's inside a
- // function because try/catches deoptimize in certain engines.
- var cachedSetTimeout;
- var cachedClearTimeout;
- function defaultSetTimout() {
- throw new Error('setTimeout has not been defined');
- }
- function defaultClearTimeout () {
- throw new Error('clearTimeout has not been defined');
- }
- (function () {
- try {
- if (typeof setTimeout === 'function') {
- cachedSetTimeout = setTimeout;
- } else {
- cachedSetTimeout = defaultSetTimout;
- }
- } catch (e) {
- cachedSetTimeout = defaultSetTimout;
- }
- try {
- if (typeof clearTimeout === 'function') {
- cachedClearTimeout = clearTimeout;
- } else {
- cachedClearTimeout = defaultClearTimeout;
- }
- } catch (e) {
- cachedClearTimeout = defaultClearTimeout;
- }
- } ())
- function runTimeout(fun) {
- if (cachedSetTimeout === setTimeout) {
- //normal enviroments in sane situations
- return setTimeout(fun, 0);
- }
- // if setTimeout wasn't available but was latter defined
- if ((cachedSetTimeout === defaultSetTimout || !cachedSetTimeout) && setTimeout) {
- cachedSetTimeout = setTimeout;
- return setTimeout(fun, 0);
- }
- try {
- // when when somebody has screwed with setTimeout but no I.E. maddness
- return cachedSetTimeout(fun, 0);
- } catch(e){
- try {
- // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally
- return cachedSetTimeout.call(null, fun, 0);
- } catch(e){
- // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error
- return cachedSetTimeout.call(this, fun, 0);
- }
- }
- }
- function runClearTimeout(marker) {
- if (cachedClearTimeout === clearTimeout) {
- //normal enviroments in sane situations
- return clearTimeout(marker);
- }
- // if clearTimeout wasn't available but was latter defined
- if ((cachedClearTimeout === defaultClearTimeout || !cachedClearTimeout) && clearTimeout) {
- cachedClearTimeout = clearTimeout;
- return clearTimeout(marker);
- }
- try {
- // when when somebody has screwed with setTimeout but no I.E. maddness
- return cachedClearTimeout(marker);
- } catch (e){
- try {
- // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally
- return cachedClearTimeout.call(null, marker);
- } catch (e){
- // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error.
- // Some versions of I.E. have different rules for clearTimeout vs setTimeout
- return cachedClearTimeout.call(this, marker);
- }
- }
- }
- var queue = [];
- var draining = false;
- var currentQueue;
- var queueIndex = -1;
- function cleanUpNextTick() {
- if (!draining || !currentQueue) {
- return;
- }
- draining = false;
- if (currentQueue.length) {
- queue = currentQueue.concat(queue);
- } else {
- queueIndex = -1;
- }
- if (queue.length) {
- drainQueue();
- }
- }
- function drainQueue() {
- if (draining) {
- return;
- }
- var timeout = runTimeout(cleanUpNextTick);
- draining = true;
- var len = queue.length;
- while(len) {
- currentQueue = queue;
- queue = [];
- while (++queueIndex < len) {
- if (currentQueue) {
- currentQueue[queueIndex].run();
- }
- }
- queueIndex = -1;
- len = queue.length;
- }
- currentQueue = null;
- draining = false;
- runClearTimeout(timeout);
- }
- process.nextTick = function (fun) {
- var args = new Array(arguments.length - 1);
- if (arguments.length > 1) {
- for (var i = 1; i < arguments.length; i++) {
- args[i - 1] = arguments[i];
- }
- }
- queue.push(new Item(fun, args));
- if (queue.length === 1 && !draining) {
- runTimeout(drainQueue);
- }
- };
- // v8 likes predictible objects
- function Item(fun, array) {
- this.fun = fun;
- this.array = array;
- }
- Item.prototype.run = function () {
- this.fun.apply(null, this.array);
- };
- process.title = 'browser';
- process.browser = true;
- process.env = {};
- process.argv = [];
- process.version = ''; // empty string to avoid regexp issues
- process.versions = {};
- function noop() {}
- process.on = noop;
- process.addListener = noop;
- process.once = noop;
- process.off = noop;
- process.removeListener = noop;
- process.removeAllListeners = noop;
- process.emit = noop;
- process.prependListener = noop;
- process.prependOnceListener = noop;
- process.listeners = function (name) { return [] }
- process.binding = function (name) {
- throw new Error('process.binding is not supported');
- };
- process.cwd = function () { return '/' };
- process.chdir = function (dir) {
- throw new Error('process.chdir is not supported');
- };
- process.umask = function() { return 0; };
- /***/ }),
- /***/ "./node_modules/promise/lib/core.js":
- /*!******************************************!*\
- !*** ./node_modules/promise/lib/core.js ***!
- \******************************************/
- /*! dynamic exports provided */
- /*! all exports used */
- /***/ (function(module, exports, __webpack_require__) {
- "use strict";
- var asap = __webpack_require__(/*! asap/raw */ "./node_modules/asap/browser-raw.js");
- function noop() {}
- // States:
- //
- // 0 - pending
- // 1 - fulfilled with _value
- // 2 - rejected with _value
- // 3 - adopted the state of another promise, _value
- //
- // once the state is no longer pending (0) it is immutable
- // All `_` prefixed properties will be reduced to `_{random number}`
- // at build time to obfuscate them and discourage their use.
- // We don't use symbols or Object.defineProperty to fully hide them
- // because the performance isn't good enough.
- // to avoid using try/catch inside critical functions, we
- // extract them to here.
- var LAST_ERROR = null;
- var IS_ERROR = {};
- function getThen(obj) {
- try {
- return obj.then;
- } catch (ex) {
- LAST_ERROR = ex;
- return IS_ERROR;
- }
- }
- function tryCallOne(fn, a) {
- try {
- return fn(a);
- } catch (ex) {
- LAST_ERROR = ex;
- return IS_ERROR;
- }
- }
- function tryCallTwo(fn, a, b) {
- try {
- fn(a, b);
- } catch (ex) {
- LAST_ERROR = ex;
- return IS_ERROR;
- }
- }
- module.exports = Promise;
- function Promise(fn) {
- if (typeof this !== 'object') {
- throw new TypeError('Promises must be constructed via new');
- }
- if (typeof fn !== 'function') {
- throw new TypeError('Promise constructor\'s argument is not a function');
- }
- this._75 = 0;
- this._83 = 0;
- this._18 = null;
- this._38 = null;
- if (fn === noop) return;
- doResolve(fn, this);
- }
- Promise._47 = null;
- Promise._71 = null;
- Promise._44 = noop;
- Promise.prototype.then = function(onFulfilled, onRejected) {
- if (this.constructor !== Promise) {
- return safeThen(this, onFulfilled, onRejected);
- }
- var res = new Promise(noop);
- handle(this, new Handler(onFulfilled, onRejected, res));
- return res;
- };
- function safeThen(self, onFulfilled, onRejected) {
- return new self.constructor(function (resolve, reject) {
- var res = new Promise(noop);
- res.then(resolve, reject);
- handle(self, new Handler(onFulfilled, onRejected, res));
- });
- }
- function handle(self, deferred) {
- while (self._83 === 3) {
- self = self._18;
- }
- if (Promise._47) {
- Promise._47(self);
- }
- if (self._83 === 0) {
- if (self._75 === 0) {
- self._75 = 1;
- self._38 = deferred;
- return;
- }
- if (self._75 === 1) {
- self._75 = 2;
- self._38 = [self._38, deferred];
- return;
- }
- self._38.push(deferred);
- return;
- }
- handleResolved(self, deferred);
- }
- function handleResolved(self, deferred) {
- asap(function() {
- var cb = self._83 === 1 ? deferred.onFulfilled : deferred.onRejected;
- if (cb === null) {
- if (self._83 === 1) {
- resolve(deferred.promise, self._18);
- } else {
- reject(deferred.promise, self._18);
- }
- return;
- }
- var ret = tryCallOne(cb, self._18);
- if (ret === IS_ERROR) {
- reject(deferred.promise, LAST_ERROR);
- } else {
- resolve(deferred.promise, ret);
- }
- });
- }
- function resolve(self, newValue) {
- // Promise Resolution Procedure: https://github.com/promises-aplus/promises-spec#the-promise-resolution-procedure
- if (newValue === self) {
- return reject(
- self,
- new TypeError('A promise cannot be resolved with itself.')
- );
- }
- if (
- newValue &&
- (typeof newValue === 'object' || typeof newValue === 'function')
- ) {
- var then = getThen(newValue);
- if (then === IS_ERROR) {
- return reject(self, LAST_ERROR);
- }
- if (
- then === self.then &&
- newValue instanceof Promise
- ) {
- self._83 = 3;
- self._18 = newValue;
- finale(self);
- return;
- } else if (typeof then === 'function') {
- doResolve(then.bind(newValue), self);
- return;
- }
- }
- self._83 = 1;
- self._18 = newValue;
- finale(self);
- }
- function reject(self, newValue) {
- self._83 = 2;
- self._18 = newValue;
- if (Promise._71) {
- Promise._71(self, newValue);
- }
- finale(self);
- }
- function finale(self) {
- if (self._75 === 1) {
- handle(self, self._38);
- self._38 = null;
- }
- if (self._75 === 2) {
- for (var i = 0; i < self._38.length; i++) {
- handle(self, self._38[i]);
- }
- self._38 = null;
- }
- }
- function Handler(onFulfilled, onRejected, promise){
- this.onFulfilled = typeof onFulfilled === 'function' ? onFulfilled : null;
- this.onRejected = typeof onRejected === 'function' ? onRejected : null;
- this.promise = promise;
- }
- /**
- * Take a potentially misbehaving resolver function and make sure
- * onFulfilled and onRejected are only called once.
- *
- * Makes no guarantees about asynchrony.
- */
- function doResolve(fn, promise) {
- var done = false;
- var res = tryCallTwo(fn, function (value) {
- if (done) return;
- done = true;
- resolve(promise, value);
- }, function (reason) {
- if (done) return;
- done = true;
- reject(promise, reason);
- });
- if (!done && res === IS_ERROR) {
- done = true;
- reject(promise, LAST_ERROR);
- }
- }
- /***/ }),
- /***/ "./node_modules/promise/lib/es6-extensions.js":
- /*!****************************************************!*\
- !*** ./node_modules/promise/lib/es6-extensions.js ***!
- \****************************************************/
- /*! dynamic exports provided */
- /*! all exports used */
- /***/ (function(module, exports, __webpack_require__) {
- "use strict";
- //This file contains the ES6 extensions to the core Promises/A+ API
- var Promise = __webpack_require__(/*! ./core.js */ "./node_modules/promise/lib/core.js");
- module.exports = Promise;
- /* Static Functions */
- var TRUE = valuePromise(true);
- var FALSE = valuePromise(false);
- var NULL = valuePromise(null);
- var UNDEFINED = valuePromise(undefined);
- var ZERO = valuePromise(0);
- var EMPTYSTRING = valuePromise('');
- function valuePromise(value) {
- var p = new Promise(Promise._44);
- p._83 = 1;
- p._18 = value;
- return p;
- }
- Promise.resolve = function (value) {
- if (value instanceof Promise) return value;
- if (value === null) return NULL;
- if (value === undefined) return UNDEFINED;
- if (value === true) return TRUE;
- if (value === false) return FALSE;
- if (value === 0) return ZERO;
- if (value === '') return EMPTYSTRING;
- if (typeof value === 'object' || typeof value === 'function') {
- try {
- var then = value.then;
- if (typeof then === 'function') {
- return new Promise(then.bind(value));
- }
- } catch (ex) {
- return new Promise(function (resolve, reject) {
- reject(ex);
- });
- }
- }
- return valuePromise(value);
- };
- Promise.all = function (arr) {
- var args = Array.prototype.slice.call(arr);
- return new Promise(function (resolve, reject) {
- if (args.length === 0) return resolve([]);
- var remaining = args.length;
- function res(i, val) {
- if (val && (typeof val === 'object' || typeof val === 'function')) {
- if (val instanceof Promise && val.then === Promise.prototype.then) {
- while (val._83 === 3) {
- val = val._18;
- }
- if (val._83 === 1) return res(i, val._18);
- if (val._83 === 2) reject(val._18);
- val.then(function (val) {
- res(i, val);
- }, reject);
- return;
- } else {
- var then = val.then;
- if (typeof then === 'function') {
- var p = new Promise(then.bind(val));
- p.then(function (val) {
- res(i, val);
- }, reject);
- return;
- }
- }
- }
- args[i] = val;
- if (--remaining === 0) {
- resolve(args);
- }
- }
- for (var i = 0; i < args.length; i++) {
- res(i, args[i]);
- }
- });
- };
- Promise.reject = function (value) {
- return new Promise(function (resolve, reject) {
- reject(value);
- });
- };
- Promise.race = function (values) {
- return new Promise(function (resolve, reject) {
- values.forEach(function(value){
- Promise.resolve(value).then(resolve, reject);
- });
- });
- };
- /* Prototype Methods */
- Promise.prototype['catch'] = function (onRejected) {
- return this.then(null, onRejected);
- };
- /***/ }),
- /***/ "./node_modules/promise/lib/rejection-tracking.js":
- /*!********************************************************!*\
- !*** ./node_modules/promise/lib/rejection-tracking.js ***!
- \********************************************************/
- /*! dynamic exports provided */
- /*! all exports used */
- /***/ (function(module, exports, __webpack_require__) {
- "use strict";
- var Promise = __webpack_require__(/*! ./core */ "./node_modules/promise/lib/core.js");
- var DEFAULT_WHITELIST = [
- ReferenceError,
- TypeError,
- RangeError
- ];
- var enabled = false;
- exports.disable = disable;
- function disable() {
- enabled = false;
- Promise._47 = null;
- Promise._71 = null;
- }
- exports.enable = enable;
- function enable(options) {
- options = options || {};
- if (enabled) disable();
- enabled = true;
- var id = 0;
- var displayId = 0;
- var rejections = {};
- Promise._47 = function (promise) {
- if (
- promise._83 === 2 && // IS REJECTED
- rejections[promise._56]
- ) {
- if (rejections[promise._56].logged) {
- onHandled(promise._56);
- } else {
- clearTimeout(rejections[promise._56].timeout);
- }
- delete rejections[promise._56];
- }
- };
- Promise._71 = function (promise, err) {
- if (promise._75 === 0) { // not yet handled
- promise._56 = id++;
- rejections[promise._56] = {
- displayId: null,
- error: err,
- timeout: setTimeout(
- onUnhandled.bind(null, promise._56),
- // For reference errors and type errors, this almost always
- // means the programmer made a mistake, so log them after just
- // 100ms
- // otherwise, wait 2 seconds to see if they get handled
- matchWhitelist(err, DEFAULT_WHITELIST)
- ? 100
- : 2000
- ),
- logged: false
- };
- }
- };
- function onUnhandled(id) {
- if (
- options.allRejections ||
- matchWhitelist(
- rejections[id].error,
- options.whitelist || DEFAULT_WHITELIST
- )
- ) {
- rejections[id].displayId = displayId++;
- if (options.onUnhandled) {
- rejections[id].logged = true;
- options.onUnhandled(
- rejections[id].displayId,
- rejections[id].error
- );
- } else {
- rejections[id].logged = true;
- logError(
- rejections[id].displayId,
- rejections[id].error
- );
- }
- }
- }
- function onHandled(id) {
- if (rejections[id].logged) {
- if (options.onHandled) {
- options.onHandled(rejections[id].displayId, rejections[id].error);
- } else if (!rejections[id].onUnhandled) {
- console.warn(
- 'Promise Rejection Handled (id: ' + rejections[id].displayId + '):'
- );
- console.warn(
- ' This means you can ignore any previous messages of the form "Possible Unhandled Promise Rejection" with id ' +
- rejections[id].displayId + '.'
- );
- }
- }
- }
- }
- function logError(id, error) {
- console.warn('Possible Unhandled Promise Rejection (id: ' + id + '):');
- var errStr = (error && (error.stack || error)) + '';
- errStr.split('\n').forEach(function (line) {
- console.warn(' ' + line);
- });
- }
- function matchWhitelist(error, list) {
- return list.some(function (cls) {
- return error instanceof cls;
- });
- }
- /***/ }),
- /***/ "./node_modules/prop-types/checkPropTypes.js":
- /*!***************************************************!*\
- !*** ./node_modules/prop-types/checkPropTypes.js ***!
- \***************************************************/
- /*! dynamic exports provided */
- /*! all exports used */
- /***/ (function(module, exports, __webpack_require__) {
- "use strict";
- /**
- * Copyright (c) 2013-present, Facebook, Inc.
- *
- * This source code is licensed under the MIT license found in the
- * LICENSE file in the root directory of this source tree.
- */
- var printWarning = function() {};
- if (true) {
- var ReactPropTypesSecret = __webpack_require__(/*! ./lib/ReactPropTypesSecret */ "./node_modules/prop-types/lib/ReactPropTypesSecret.js");
- var loggedTypeFailures = {};
- var has = __webpack_require__(/*! ./lib/has */ "./node_modules/prop-types/lib/has.js");
- printWarning = function(text) {
- var message = 'Warning: ' + text;
- if (typeof console !== 'undefined') {
- console.error(message);
- }
- try {
- // --- Welcome to debugging React ---
- // This error was thrown as a convenience so that you can use this stack
- // to find the callsite that caused this warning to fire.
- throw new Error(message);
- } catch (x) { /**/ }
- };
- }
- /**
- * Assert that the values match with the type specs.
- * Error messages are memorized and will only be shown once.
- *
- * @param {object} typeSpecs Map of name to a ReactPropType
- * @param {object} values Runtime values that need to be type-checked
- * @param {string} location e.g. "prop", "context", "child context"
- * @param {string} componentName Name of the component for error messages.
- * @param {?Function} getStack Returns the component stack.
- * @private
- */
- function checkPropTypes(typeSpecs, values, location, componentName, getStack) {
- if (true) {
- for (var typeSpecName in typeSpecs) {
- if (has(typeSpecs, typeSpecName)) {
- var error;
- // Prop type validation may throw. In case they do, we don't want to
- // fail the render phase where it didn't fail before. So we log it.
- // After these have been cleaned up, we'll let them throw.
- try {
- // This is intentionally an invariant that gets caught. It's the same
- // behavior as without this statement except with a better message.
- if (typeof typeSpecs[typeSpecName] !== 'function') {
- var err = Error(
- (componentName || 'React class') + ': ' + location + ' type `' + typeSpecName + '` is invalid; ' +
- 'it must be a function, usually from the `prop-types` package, but received `' + typeof typeSpecs[typeSpecName] + '`.' +
- 'This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.'
- );
- err.name = 'Invariant Violation';
- throw err;
- }
- error = typeSpecs[typeSpecName](values, typeSpecName, componentName, location, null, ReactPropTypesSecret);
- } catch (ex) {
- error = ex;
- }
- if (error && !(error instanceof Error)) {
- printWarning(
- (componentName || 'React class') + ': type specification of ' +
- location + ' `' + typeSpecName + '` is invalid; the type checker ' +
- 'function must return `null` or an `Error` but returned a ' + typeof error + '. ' +
- 'You may have forgotten to pass an argument to the type checker ' +
- 'creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and ' +
- 'shape all require an argument).'
- );
- }
- if (error instanceof Error && !(error.message in loggedTypeFailures)) {
- // Only monitor this failure once because there tends to be a lot of the
- // same error.
- loggedTypeFailures[error.message] = true;
- var stack = getStack ? getStack() : '';
- printWarning(
- 'Failed ' + location + ' type: ' + error.message + (stack != null ? stack : '')
- );
- }
- }
- }
- }
- }
- /**
- * Resets warning cache when testing.
- *
- * @private
- */
- checkPropTypes.resetWarningCache = function() {
- if (true) {
- loggedTypeFailures = {};
- }
- }
- module.exports = checkPropTypes;
- /***/ }),
- /***/ "./node_modules/prop-types/factoryWithTypeCheckers.js":
- /*!************************************************************!*\
- !*** ./node_modules/prop-types/factoryWithTypeCheckers.js ***!
- \************************************************************/
- /*! dynamic exports provided */
- /*! all exports used */
- /***/ (function(module, exports, __webpack_require__) {
- "use strict";
- /**
- * Copyright (c) 2013-present, Facebook, Inc.
- *
- * This source code is licensed under the MIT license found in the
- * LICENSE file in the root directory of this source tree.
- */
- var ReactIs = __webpack_require__(/*! react-is */ "./node_modules/react-is/index.js");
- var assign = __webpack_require__(/*! object-assign */ "./node_modules/object-assign/index.js");
- var ReactPropTypesSecret = __webpack_require__(/*! ./lib/ReactPropTypesSecret */ "./node_modules/prop-types/lib/ReactPropTypesSecret.js");
- var has = __webpack_require__(/*! ./lib/has */ "./node_modules/prop-types/lib/has.js");
- var checkPropTypes = __webpack_require__(/*! ./checkPropTypes */ "./node_modules/prop-types/checkPropTypes.js");
- var printWarning = function() {};
- if (true) {
- printWarning = function(text) {
- var message = 'Warning: ' + text;
- if (typeof console !== 'undefined') {
- console.error(message);
- }
- try {
- // --- Welcome to debugging React ---
- // This error was thrown as a convenience so that you can use this stack
- // to find the callsite that caused this warning to fire.
- throw new Error(message);
- } catch (x) {}
- };
- }
- function emptyFunctionThatReturnsNull() {
- return null;
- }
- module.exports = function(isValidElement, throwOnDirectAccess) {
- /* global Symbol */
- var ITERATOR_SYMBOL = typeof Symbol === 'function' && Symbol.iterator;
- var FAUX_ITERATOR_SYMBOL = '@@iterator'; // Before Symbol spec.
- /**
- * Returns the iterator method function contained on the iterable object.
- *
- * Be sure to invoke the function with the iterable as context:
- *
- * var iteratorFn = getIteratorFn(myIterable);
- * if (iteratorFn) {
- * var iterator = iteratorFn.call(myIterable);
- * ...
- * }
- *
- * @param {?object} maybeIterable
- * @return {?function}
- */
- function getIteratorFn(maybeIterable) {
- var iteratorFn = maybeIterable && (ITERATOR_SYMBOL && maybeIterable[ITERATOR_SYMBOL] || maybeIterable[FAUX_ITERATOR_SYMBOL]);
- if (typeof iteratorFn === 'function') {
- return iteratorFn;
- }
- }
- /**
- * Collection of methods that allow declaration and validation of props that are
- * supplied to React components. Example usage:
- *
- * var Props = require('ReactPropTypes');
- * var MyArticle = React.createClass({
- * propTypes: {
- * // An optional string prop named "description".
- * description: Props.string,
- *
- * // A required enum prop named "category".
- * category: Props.oneOf(['News','Photos']).isRequired,
- *
- * // A prop named "dialog" that requires an instance of Dialog.
- * dialog: Props.instanceOf(Dialog).isRequired
- * },
- * render: function() { ... }
- * });
- *
- * A more formal specification of how these methods are used:
- *
- * type := array|bool|func|object|number|string|oneOf([...])|instanceOf(...)
- * decl := ReactPropTypes.{type}(.isRequired)?
- *
- * Each and every declaration produces a function with the same signature. This
- * allows the creation of custom validation functions. For example:
- *
- * var MyLink = React.createClass({
- * propTypes: {
- * // An optional string or URI prop named "href".
- * href: function(props, propName, componentName) {
- * var propValue = props[propName];
- * if (propValue != null && typeof propValue !== 'string' &&
- * !(propValue instanceof URI)) {
- * return new Error(
- * 'Expected a string or an URI for ' + propName + ' in ' +
- * componentName
- * );
- * }
- * }
- * },
- * render: function() {...}
- * });
- *
- * @internal
- */
- var ANONYMOUS = '<<anonymous>>';
- // Important!
- // Keep this list in sync with production version in `./factoryWithThrowingShims.js`.
- var ReactPropTypes = {
- array: createPrimitiveTypeChecker('array'),
- bigint: createPrimitiveTypeChecker('bigint'),
- bool: createPrimitiveTypeChecker('boolean'),
- func: createPrimitiveTypeChecker('function'),
- number: createPrimitiveTypeChecker('number'),
- object: createPrimitiveTypeChecker('object'),
- string: createPrimitiveTypeChecker('string'),
- symbol: createPrimitiveTypeChecker('symbol'),
- any: createAnyTypeChecker(),
- arrayOf: createArrayOfTypeChecker,
- element: createElementTypeChecker(),
- elementType: createElementTypeTypeChecker(),
- instanceOf: createInstanceTypeChecker,
- node: createNodeChecker(),
- objectOf: createObjectOfTypeChecker,
- oneOf: createEnumTypeChecker,
- oneOfType: createUnionTypeChecker,
- shape: createShapeTypeChecker,
- exact: createStrictShapeTypeChecker,
- };
- /**
- * inlined Object.is polyfill to avoid requiring consumers ship their own
- * https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/is
- */
- /*eslint-disable no-self-compare*/
- function is(x, y) {
- // SameValue algorithm
- if (x === y) {
- // Steps 1-5, 7-10
- // Steps 6.b-6.e: +0 != -0
- return x !== 0 || 1 / x === 1 / y;
- } else {
- // Step 6.a: NaN == NaN
- return x !== x && y !== y;
- }
- }
- /*eslint-enable no-self-compare*/
- /**
- * We use an Error-like object for backward compatibility as people may call
- * PropTypes directly and inspect their output. However, we don't use real
- * Errors anymore. We don't inspect their stack anyway, and creating them
- * is prohibitively expensive if they are created too often, such as what
- * happens in oneOfType() for any type before the one that matched.
- */
- function PropTypeError(message, data) {
- this.message = message;
- this.data = data && typeof data === 'object' ? data: {};
- this.stack = '';
- }
- // Make `instanceof Error` still work for returned errors.
- PropTypeError.prototype = Error.prototype;
- function createChainableTypeChecker(validate) {
- if (true) {
- var manualPropTypeCallCache = {};
- var manualPropTypeWarningCount = 0;
- }
- function checkType(isRequired, props, propName, componentName, location, propFullName, secret) {
- componentName = componentName || ANONYMOUS;
- propFullName = propFullName || propName;
- if (secret !== ReactPropTypesSecret) {
- if (throwOnDirectAccess) {
- // New behavior only for users of `prop-types` package
- var err = new Error(
- 'Calling PropTypes validators directly is not supported by the `prop-types` package. ' +
- 'Use `PropTypes.checkPropTypes()` to call them. ' +
- 'Read more at http://fb.me/use-check-prop-types'
- );
- err.name = 'Invariant Violation';
- throw err;
- } else if ("development" !== 'production' && typeof console !== 'undefined') {
- // Old behavior for people using React.PropTypes
- var cacheKey = componentName + ':' + propName;
- if (
- !manualPropTypeCallCache[cacheKey] &&
- // Avoid spamming the console because they are often not actionable except for lib authors
- manualPropTypeWarningCount < 3
- ) {
- printWarning(
- 'You are manually calling a React.PropTypes validation ' +
- 'function for the `' + propFullName + '` prop on `' + componentName + '`. This is deprecated ' +
- 'and will throw in the standalone `prop-types` package. ' +
- 'You may be seeing this warning due to a third-party PropTypes ' +
- 'library. See https://fb.me/react-warning-dont-call-proptypes ' + 'for details.'
- );
- manualPropTypeCallCache[cacheKey] = true;
- manualPropTypeWarningCount++;
- }
- }
- }
- if (props[propName] == null) {
- if (isRequired) {
- if (props[propName] === null) {
- return new PropTypeError('The ' + location + ' `' + propFullName + '` is marked as required ' + ('in `' + componentName + '`, but its value is `null`.'));
- }
- return new PropTypeError('The ' + location + ' `' + propFullName + '` is marked as required in ' + ('`' + componentName + '`, but its value is `undefined`.'));
- }
- return null;
- } else {
- return validate(props, propName, componentName, location, propFullName);
- }
- }
- var chainedCheckType = checkType.bind(null, false);
- chainedCheckType.isRequired = checkType.bind(null, true);
- return chainedCheckType;
- }
- function createPrimitiveTypeChecker(expectedType) {
- function validate(props, propName, componentName, location, propFullName, secret) {
- var propValue = props[propName];
- var propType = getPropType(propValue);
- if (propType !== expectedType) {
- // `propValue` being instance of, say, date/regexp, pass the 'object'
- // check, but we can offer a more precise error message here rather than
- // 'of type `object`'.
- var preciseType = getPreciseType(propValue);
- return new PropTypeError(
- 'Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + preciseType + '` supplied to `' + componentName + '`, expected ') + ('`' + expectedType + '`.'),
- {expectedType: expectedType}
- );
- }
- return null;
- }
- return createChainableTypeChecker(validate);
- }
- function createAnyTypeChecker() {
- return createChainableTypeChecker(emptyFunctionThatReturnsNull);
- }
- function createArrayOfTypeChecker(typeChecker) {
- function validate(props, propName, componentName, location, propFullName) {
- if (typeof typeChecker !== 'function') {
- return new PropTypeError('Property `' + propFullName + '` of component `' + componentName + '` has invalid PropType notation inside arrayOf.');
- }
- var propValue = props[propName];
- if (!Array.isArray(propValue)) {
- var propType = getPropType(propValue);
- return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected an array.'));
- }
- for (var i = 0; i < propValue.length; i++) {
- var error = typeChecker(propValue, i, componentName, location, propFullName + '[' + i + ']', ReactPropTypesSecret);
- if (error instanceof Error) {
- return error;
- }
- }
- return null;
- }
- return createChainableTypeChecker(validate);
- }
- function createElementTypeChecker() {
- function validate(props, propName, componentName, location, propFullName) {
- var propValue = props[propName];
- if (!isValidElement(propValue)) {
- var propType = getPropType(propValue);
- return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected a single ReactElement.'));
- }
- return null;
- }
- return createChainableTypeChecker(validate);
- }
- function createElementTypeTypeChecker() {
- function validate(props, propName, componentName, location, propFullName) {
- var propValue = props[propName];
- if (!ReactIs.isValidElementType(propValue)) {
- var propType = getPropType(propValue);
- return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected a single ReactElement type.'));
- }
- return null;
- }
- return createChainableTypeChecker(validate);
- }
- function createInstanceTypeChecker(expectedClass) {
- function validate(props, propName, componentName, location, propFullName) {
- if (!(props[propName] instanceof expectedClass)) {
- var expectedClassName = expectedClass.name || ANONYMOUS;
- var actualClassName = getClassName(props[propName]);
- return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + actualClassName + '` supplied to `' + componentName + '`, expected ') + ('instance of `' + expectedClassName + '`.'));
- }
- return null;
- }
- return createChainableTypeChecker(validate);
- }
- function createEnumTypeChecker(expectedValues) {
- if (!Array.isArray(expectedValues)) {
- if (true) {
- if (arguments.length > 1) {
- printWarning(
- 'Invalid arguments supplied to oneOf, expected an array, got ' + arguments.length + ' arguments. ' +
- 'A common mistake is to write oneOf(x, y, z) instead of oneOf([x, y, z]).'
- );
- } else {
- printWarning('Invalid argument supplied to oneOf, expected an array.');
- }
- }
- return emptyFunctionThatReturnsNull;
- }
- function validate(props, propName, componentName, location, propFullName) {
- var propValue = props[propName];
- for (var i = 0; i < expectedValues.length; i++) {
- if (is(propValue, expectedValues[i])) {
- return null;
- }
- }
- var valuesString = JSON.stringify(expectedValues, function replacer(key, value) {
- var type = getPreciseType(value);
- if (type === 'symbol') {
- return String(value);
- }
- return value;
- });
- return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of value `' + String(propValue) + '` ' + ('supplied to `' + componentName + '`, expected one of ' + valuesString + '.'));
- }
- return createChainableTypeChecker(validate);
- }
- function createObjectOfTypeChecker(typeChecker) {
- function validate(props, propName, componentName, location, propFullName) {
- if (typeof typeChecker !== 'function') {
- return new PropTypeError('Property `' + propFullName + '` of component `' + componentName + '` has invalid PropType notation inside objectOf.');
- }
- var propValue = props[propName];
- var propType = getPropType(propValue);
- if (propType !== 'object') {
- return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected an object.'));
- }
- for (var key in propValue) {
- if (has(propValue, key)) {
- var error = typeChecker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret);
- if (error instanceof Error) {
- return error;
- }
- }
- }
- return null;
- }
- return createChainableTypeChecker(validate);
- }
- function createUnionTypeChecker(arrayOfTypeCheckers) {
- if (!Array.isArray(arrayOfTypeCheckers)) {
- true ? printWarning('Invalid argument supplied to oneOfType, expected an instance of array.') : void 0;
- return emptyFunctionThatReturnsNull;
- }
- for (var i = 0; i < arrayOfTypeCheckers.length; i++) {
- var checker = arrayOfTypeCheckers[i];
- if (typeof checker !== 'function') {
- printWarning(
- 'Invalid argument supplied to oneOfType. Expected an array of check functions, but ' +
- 'received ' + getPostfixForTypeWarning(checker) + ' at index ' + i + '.'
- );
- return emptyFunctionThatReturnsNull;
- }
- }
- function validate(props, propName, componentName, location, propFullName) {
- var expectedTypes = [];
- for (var i = 0; i < arrayOfTypeCheckers.length; i++) {
- var checker = arrayOfTypeCheckers[i];
- var checkerResult = checker(props, propName, componentName, location, propFullName, ReactPropTypesSecret);
- if (checkerResult == null) {
- return null;
- }
- if (checkerResult.data && has(checkerResult.data, 'expectedType')) {
- expectedTypes.push(checkerResult.data.expectedType);
- }
- }
- var expectedTypesMessage = (expectedTypes.length > 0) ? ', expected one of type [' + expectedTypes.join(', ') + ']': '';
- return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` supplied to ' + ('`' + componentName + '`' + expectedTypesMessage + '.'));
- }
- return createChainableTypeChecker(validate);
- }
- function createNodeChecker() {
- function validate(props, propName, componentName, location, propFullName) {
- if (!isNode(props[propName])) {
- return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` supplied to ' + ('`' + componentName + '`, expected a ReactNode.'));
- }
- return null;
- }
- return createChainableTypeChecker(validate);
- }
- function invalidValidatorError(componentName, location, propFullName, key, type) {
- return new PropTypeError(
- (componentName || 'React class') + ': ' + location + ' type `' + propFullName + '.' + key + '` is invalid; ' +
- 'it must be a function, usually from the `prop-types` package, but received `' + type + '`.'
- );
- }
- function createShapeTypeChecker(shapeTypes) {
- function validate(props, propName, componentName, location, propFullName) {
- var propValue = props[propName];
- var propType = getPropType(propValue);
- if (propType !== 'object') {
- return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type `' + propType + '` ' + ('supplied to `' + componentName + '`, expected `object`.'));
- }
- for (var key in shapeTypes) {
- var checker = shapeTypes[key];
- if (typeof checker !== 'function') {
- return invalidValidatorError(componentName, location, propFullName, key, getPreciseType(checker));
- }
- var error = checker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret);
- if (error) {
- return error;
- }
- }
- return null;
- }
- return createChainableTypeChecker(validate);
- }
- function createStrictShapeTypeChecker(shapeTypes) {
- function validate(props, propName, componentName, location, propFullName) {
- var propValue = props[propName];
- var propType = getPropType(propValue);
- if (propType !== 'object') {
- return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type `' + propType + '` ' + ('supplied to `' + componentName + '`, expected `object`.'));
- }
- // We need to check all keys in case some are required but missing from props.
- var allKeys = assign({}, props[propName], shapeTypes);
- for (var key in allKeys) {
- var checker = shapeTypes[key];
- if (has(shapeTypes, key) && typeof checker !== 'function') {
- return invalidValidatorError(componentName, location, propFullName, key, getPreciseType(checker));
- }
- if (!checker) {
- return new PropTypeError(
- 'Invalid ' + location + ' `' + propFullName + '` key `' + key + '` supplied to `' + componentName + '`.' +
- '\nBad object: ' + JSON.stringify(props[propName], null, ' ') +
- '\nValid keys: ' + JSON.stringify(Object.keys(shapeTypes), null, ' ')
- );
- }
- var error = checker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret);
- if (error) {
- return error;
- }
- }
- return null;
- }
- return createChainableTypeChecker(validate);
- }
- function isNode(propValue) {
- switch (typeof propValue) {
- case 'number':
- case 'string':
- case 'undefined':
- return true;
- case 'boolean':
- return !propValue;
- case 'object':
- if (Array.isArray(propValue)) {
- return propValue.every(isNode);
- }
- if (propValue === null || isValidElement(propValue)) {
- return true;
- }
- var iteratorFn = getIteratorFn(propValue);
- if (iteratorFn) {
- var iterator = iteratorFn.call(propValue);
- var step;
- if (iteratorFn !== propValue.entries) {
- while (!(step = iterator.next()).done) {
- if (!isNode(step.value)) {
- return false;
- }
- }
- } else {
- // Iterator will provide entry [k,v] tuples rather than values.
- while (!(step = iterator.next()).done) {
- var entry = step.value;
- if (entry) {
- if (!isNode(entry[1])) {
- return false;
- }
- }
- }
- }
- } else {
- return false;
- }
- return true;
- default:
- return false;
- }
- }
- function isSymbol(propType, propValue) {
- // Native Symbol.
- if (propType === 'symbol') {
- return true;
- }
- // falsy value can't be a Symbol
- if (!propValue) {
- return false;
- }
- // 19.4.3.5 Symbol.prototype[@@toStringTag] === 'Symbol'
- if (propValue['@@toStringTag'] === 'Symbol') {
- return true;
- }
- // Fallback for non-spec compliant Symbols which are polyfilled.
- if (typeof Symbol === 'function' && propValue instanceof Symbol) {
- return true;
- }
- return false;
- }
- // Equivalent of `typeof` but with special handling for array and regexp.
- function getPropType(propValue) {
- var propType = typeof propValue;
- if (Array.isArray(propValue)) {
- return 'array';
- }
- if (propValue instanceof RegExp) {
- // Old webkits (at least until Android 4.0) return 'function' rather than
- // 'object' for typeof a RegExp. We'll normalize this here so that /bla/
- // passes PropTypes.object.
- return 'object';
- }
- if (isSymbol(propType, propValue)) {
- return 'symbol';
- }
- return propType;
- }
- // This handles more types than `getPropType`. Only used for error messages.
- // See `createPrimitiveTypeChecker`.
- function getPreciseType(propValue) {
- if (typeof propValue === 'undefined' || propValue === null) {
- return '' + propValue;
- }
- var propType = getPropType(propValue);
- if (propType === 'object') {
- if (propValue instanceof Date) {
- return 'date';
- } else if (propValue instanceof RegExp) {
- return 'regexp';
- }
- }
- return propType;
- }
- // Returns a string that is postfixed to a warning about an invalid type.
- // For example, "undefined" or "of type array"
- function getPostfixForTypeWarning(value) {
- var type = getPreciseType(value);
- switch (type) {
- case 'array':
- case 'object':
- return 'an ' + type;
- case 'boolean':
- case 'date':
- case 'regexp':
- return 'a ' + type;
- default:
- return type;
- }
- }
- // Returns class name of the object, if any.
- function getClassName(propValue) {
- if (!propValue.constructor || !propValue.constructor.name) {
- return ANONYMOUS;
- }
- return propValue.constructor.name;
- }
- ReactPropTypes.checkPropTypes = checkPropTypes;
- ReactPropTypes.resetWarningCache = checkPropTypes.resetWarningCache;
- ReactPropTypes.PropTypes = ReactPropTypes;
- return ReactPropTypes;
- };
- /***/ }),
- /***/ "./node_modules/prop-types/index.js":
- /*!******************************************!*\
- !*** ./node_modules/prop-types/index.js ***!
- \******************************************/
- /*! dynamic exports provided */
- /*! exports used: default */
- /***/ (function(module, exports, __webpack_require__) {
- /**
- * Copyright (c) 2013-present, Facebook, Inc.
- *
- * This source code is licensed under the MIT license found in the
- * LICENSE file in the root directory of this source tree.
- */
- if (true) {
- var ReactIs = __webpack_require__(/*! react-is */ "./node_modules/react-is/index.js");
- // By explicitly using `prop-types` you are opting into new development behavior.
- // http://fb.me/prop-types-in-prod
- var throwOnDirectAccess = true;
- module.exports = __webpack_require__(/*! ./factoryWithTypeCheckers */ "./node_modules/prop-types/factoryWithTypeCheckers.js")(ReactIs.isElement, throwOnDirectAccess);
- } else {
- // By explicitly using `prop-types` you are opting into new production behavior.
- // http://fb.me/prop-types-in-prod
- module.exports = require('./factoryWithThrowingShims')();
- }
- /***/ }),
- /***/ "./node_modules/prop-types/lib/ReactPropTypesSecret.js":
- /*!*************************************************************!*\
- !*** ./node_modules/prop-types/lib/ReactPropTypesSecret.js ***!
- \*************************************************************/
- /*! dynamic exports provided */
- /*! all exports used */
- /***/ (function(module, exports, __webpack_require__) {
- "use strict";
- /**
- * Copyright (c) 2013-present, Facebook, Inc.
- *
- * This source code is licensed under the MIT license found in the
- * LICENSE file in the root directory of this source tree.
- */
- var ReactPropTypesSecret = 'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED';
- module.exports = ReactPropTypesSecret;
- /***/ }),
- /***/ "./node_modules/prop-types/lib/has.js":
- /*!********************************************!*\
- !*** ./node_modules/prop-types/lib/has.js ***!
- \********************************************/
- /*! dynamic exports provided */
- /*! all exports used */
- /***/ (function(module, exports) {
- module.exports = Function.call.bind(Object.prototype.hasOwnProperty);
- /***/ }),
- /***/ "./node_modules/querystring-es3/decode.js":
- /*!************************************************!*\
- !*** ./node_modules/querystring-es3/decode.js ***!
- \************************************************/
- /*! dynamic exports provided */
- /*! all exports used */
- /***/ (function(module, exports, __webpack_require__) {
- "use strict";
- // Copyright Joyent, Inc. and other Node contributors.
- //
- // Permission is hereby granted, free of charge, to any person obtaining a
- // copy of this software and associated documentation files (the
- // "Software"), to deal in the Software without restriction, including
- // without limitation the rights to use, copy, modify, merge, publish,
- // distribute, sublicense, and/or sell copies of the Software, and to permit
- // persons to whom the Software is furnished to do so, subject to the
- // following conditions:
- //
- // The above copyright notice and this permission notice shall be included
- // in all copies or substantial portions of the Software.
- //
- // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
- // OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
- // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
- // NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
- // DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
- // OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
- // USE OR OTHER DEALINGS IN THE SOFTWARE.
- // If obj.hasOwnProperty has been overridden, then calling
- // obj.hasOwnProperty(prop) will break.
- // See: https://github.com/joyent/node/issues/1707
- function hasOwnProperty(obj, prop) {
- return Object.prototype.hasOwnProperty.call(obj, prop);
- }
- module.exports = function(qs, sep, eq, options) {
- sep = sep || '&';
- eq = eq || '=';
- var obj = {};
- if (typeof qs !== 'string' || qs.length === 0) {
- return obj;
- }
- var regexp = /\+/g;
- qs = qs.split(sep);
- var maxKeys = 1000;
- if (options && typeof options.maxKeys === 'number') {
- maxKeys = options.maxKeys;
- }
- var len = qs.length;
- // maxKeys <= 0 means that we should not limit keys count
- if (maxKeys > 0 && len > maxKeys) {
- len = maxKeys;
- }
- for (var i = 0; i < len; ++i) {
- var x = qs[i].replace(regexp, '%20'),
- idx = x.indexOf(eq),
- kstr, vstr, k, v;
- if (idx >= 0) {
- kstr = x.substr(0, idx);
- vstr = x.substr(idx + 1);
- } else {
- kstr = x;
- vstr = '';
- }
- k = decodeURIComponent(kstr);
- v = decodeURIComponent(vstr);
- if (!hasOwnProperty(obj, k)) {
- obj[k] = v;
- } else if (isArray(obj[k])) {
- obj[k].push(v);
- } else {
- obj[k] = [obj[k], v];
- }
- }
- return obj;
- };
- var isArray = Array.isArray || function (xs) {
- return Object.prototype.toString.call(xs) === '[object Array]';
- };
- /***/ }),
- /***/ "./node_modules/querystring-es3/encode.js":
- /*!************************************************!*\
- !*** ./node_modules/querystring-es3/encode.js ***!
- \************************************************/
- /*! dynamic exports provided */
- /*! all exports used */
- /***/ (function(module, exports, __webpack_require__) {
- "use strict";
- // Copyright Joyent, Inc. and other Node contributors.
- //
- // Permission is hereby granted, free of charge, to any person obtaining a
- // copy of this software and associated documentation files (the
- // "Software"), to deal in the Software without restriction, including
- // without limitation the rights to use, copy, modify, merge, publish,
- // distribute, sublicense, and/or sell copies of the Software, and to permit
- // persons to whom the Software is furnished to do so, subject to the
- // following conditions:
- //
- // The above copyright notice and this permission notice shall be included
- // in all copies or substantial portions of the Software.
- //
- // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
- // OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
- // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
- // NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
- // DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
- // OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
- // USE OR OTHER DEALINGS IN THE SOFTWARE.
- var stringifyPrimitive = function(v) {
- switch (typeof v) {
- case 'string':
- return v;
- case 'boolean':
- return v ? 'true' : 'false';
- case 'number':
- return isFinite(v) ? v : '';
- default:
- return '';
- }
- };
- module.exports = function(obj, sep, eq, name) {
- sep = sep || '&';
- eq = eq || '=';
- if (obj === null) {
- obj = undefined;
- }
- if (typeof obj === 'object') {
- return map(objectKeys(obj), function(k) {
- var ks = encodeURIComponent(stringifyPrimitive(k)) + eq;
- if (isArray(obj[k])) {
- return map(obj[k], function(v) {
- return ks + encodeURIComponent(stringifyPrimitive(v));
- }).join(sep);
- } else {
- return ks + encodeURIComponent(stringifyPrimitive(obj[k]));
- }
- }).join(sep);
- }
- if (!name) return '';
- return encodeURIComponent(stringifyPrimitive(name)) + eq +
- encodeURIComponent(stringifyPrimitive(obj));
- };
- var isArray = Array.isArray || function (xs) {
- return Object.prototype.toString.call(xs) === '[object Array]';
- };
- function map (xs, f) {
- if (xs.map) return xs.map(f);
- var res = [];
- for (var i = 0; i < xs.length; i++) {
- res.push(f(xs[i], i));
- }
- return res;
- }
- var objectKeys = Object.keys || function (obj) {
- var res = [];
- for (var key in obj) {
- if (Object.prototype.hasOwnProperty.call(obj, key)) res.push(key);
- }
- return res;
- };
- /***/ }),
- /***/ "./node_modules/querystring-es3/index.js":
- /*!***********************************************!*\
- !*** ./node_modules/querystring-es3/index.js ***!
- \***********************************************/
- /*! dynamic exports provided */
- /*! all exports used */
- /***/ (function(module, exports, __webpack_require__) {
- "use strict";
- exports.decode = exports.parse = __webpack_require__(/*! ./decode */ "./node_modules/querystring-es3/decode.js");
- exports.encode = exports.stringify = __webpack_require__(/*! ./encode */ "./node_modules/querystring-es3/encode.js");
- /***/ }),
- /***/ "./node_modules/querystringify/index.js":
- /*!**********************************************!*\
- !*** ./node_modules/querystringify/index.js ***!
- \**********************************************/
- /*! dynamic exports provided */
- /*! all exports used */
- /***/ (function(module, exports, __webpack_require__) {
- "use strict";
- var has = Object.prototype.hasOwnProperty
- , undef;
- /**
- * Decode a URI encoded string.
- *
- * @param {String} input The URI encoded string.
- * @returns {String|Null} The decoded string.
- * @api private
- */
- function decode(input) {
- try {
- return decodeURIComponent(input.replace(/\+/g, ' '));
- } catch (e) {
- return null;
- }
- }
- /**
- * Attempts to encode a given input.
- *
- * @param {String} input The string that needs to be encoded.
- * @returns {String|Null} The encoded string.
- * @api private
- */
- function encode(input) {
- try {
- return encodeURIComponent(input);
- } catch (e) {
- return null;
- }
- }
- /**
- * Simple query string parser.
- *
- * @param {String} query The query string that needs to be parsed.
- * @returns {Object}
- * @api public
- */
- function querystring(query) {
- var parser = /([^=?#&]+)=?([^&]*)/g
- , result = {}
- , part;
- while (part = parser.exec(query)) {
- var key = decode(part[1])
- , value = decode(part[2]);
- //
- // Prevent overriding of existing properties. This ensures that build-in
- // methods like `toString` or __proto__ are not overriden by malicious
- // querystrings.
- //
- // In the case if failed decoding, we want to omit the key/value pairs
- // from the result.
- //
- if (key === null || value === null || key in result) continue;
- result[key] = value;
- }
- return result;
- }
- /**
- * Transform a query string to an object.
- *
- * @param {Object} obj Object that should be transformed.
- * @param {String} prefix Optional prefix.
- * @returns {String}
- * @api public
- */
- function querystringify(obj, prefix) {
- prefix = prefix || '';
- var pairs = []
- , value
- , key;
- //
- // Optionally prefix with a '?' if needed
- //
- if ('string' !== typeof prefix) prefix = '?';
- for (key in obj) {
- if (has.call(obj, key)) {
- value = obj[key];
- //
- // Edge cases where we actually want to encode the value to an empty
- // string instead of the stringified value.
- //
- if (!value && (value === null || value === undef || isNaN(value))) {
- value = '';
- }
- key = encode(key);
- value = encode(value);
- //
- // If we failed to encode the strings, we should bail out as we don't
- // want to add invalid strings to the query.
- //
- if (key === null || value === null) continue;
- pairs.push(key +'='+ value);
- }
- }
- return pairs.length ? prefix + pairs.join('&') : '';
- }
- //
- // Expose the module.
- //
- exports.stringify = querystringify;
- exports.parse = querystring;
- /***/ }),
- /***/ "./node_modules/react-dev-utils/formatWebpackMessages.js":
- /*!***************************************************************!*\
- !*** ./node_modules/react-dev-utils/formatWebpackMessages.js ***!
- \***************************************************************/
- /*! dynamic exports provided */
- /*! all exports used */
- /***/ (function(module, exports, __webpack_require__) {
- "use strict";
- /**
- * Copyright (c) 2015-present, Facebook, Inc.
- *
- * This source code is licensed under the MIT license found in the
- * LICENSE file in the root directory of this source tree.
- */
- // WARNING: this code is untranspiled and is used in browser too.
- // Please make sure any changes are in ES5 or contribute a Babel compile step.
- // Some custom utilities to prettify Webpack output.
- // This is quite hacky and hopefully won't be needed when Webpack fixes this.
- // https://github.com/webpack/webpack/issues/2878
- var chalk = __webpack_require__(/*! chalk */ "./node_modules/chalk/index.js");
- var friendlySyntaxErrorLabel = 'Syntax error:';
- function isLikelyASyntaxError(message) {
- return message.indexOf(friendlySyntaxErrorLabel) !== -1;
- }
- // Cleans up webpack error messages.
- // eslint-disable-next-line no-unused-vars
- function formatMessage(message, isError) {
- var lines = message.split('\n');
- if (lines.length > 2 && lines[1] === '') {
- // Remove extra newline.
- lines.splice(1, 1);
- }
- // Remove webpack-specific loader notation from filename.
- // Before:
- // ./~/css-loader!./~/postcss-loader!./src/App.css
- // After:
- // ./src/App.css
- if (lines[0].lastIndexOf('!') !== -1) {
- lines[0] = lines[0].substr(lines[0].lastIndexOf('!') + 1);
- }
- lines = lines.filter(function(line) {
- // Webpack adds a list of entry points to warning messages:
- // @ ./src/index.js
- // @ multi react-scripts/~/react-dev-utils/webpackHotDevClient.js ...
- // It is misleading (and unrelated to the warnings) so we clean it up.
- // It is only useful for syntax errors but we have beautiful frames for them.
- return line.indexOf(' @ ') !== 0;
- });
- // line #0 is filename
- // line #1 is the main error message
- if (!lines[0] || !lines[1]) {
- return lines.join('\n');
- }
- // Cleans up verbose "module not found" messages for files and packages.
- if (lines[1].indexOf('Module not found: ') === 0) {
- lines = [
- lines[0],
- // Clean up message because "Module not found: " is descriptive enough.
- lines[1]
- .replace("Cannot resolve 'file' or 'directory' ", '')
- .replace('Cannot resolve module ', '')
- .replace('Error: ', '')
- .replace('[CaseSensitivePathsPlugin] ', ''),
- ];
- }
- // Cleans up syntax error messages.
- if (lines[1].indexOf('Module build failed: ') === 0) {
- lines[1] = lines[1].replace(
- 'Module build failed: SyntaxError:',
- friendlySyntaxErrorLabel
- );
- }
- // Clean up export errors.
- // TODO: we should really send a PR to Webpack for this.
- var exportError = /\s*(.+?)\s*(")?export '(.+?)' was not found in '(.+?)'/;
- if (lines[1].match(exportError)) {
- lines[1] = lines[1].replace(
- exportError,
- "$1 '$4' does not contain an export named '$3'."
- );
- }
- lines[0] = chalk.inverse(lines[0]);
- // Reassemble the message.
- message = lines.join('\n');
- // Internal stacks are generally useless so we strip them... with the
- // exception of stacks containing `webpack:` because they're normally
- // from user code generated by WebPack. For more information see
- // https://github.com/facebookincubator/create-react-app/pull/1050
- message = message.replace(
- /^\s*at\s((?!webpack:).)*:\d+:\d+[\s)]*(\n|$)/gm,
- ''
- ); // at ... ...:x:y
- return message.trim();
- }
- function formatWebpackMessages(json) {
- var formattedErrors = json.errors.map(function(message) {
- return formatMessage(message, true);
- });
- var formattedWarnings = json.warnings.map(function(message) {
- return formatMessage(message, false);
- });
- var result = {
- errors: formattedErrors,
- warnings: formattedWarnings,
- };
- if (result.errors.some(isLikelyASyntaxError)) {
- // If there are any syntax errors, show just them.
- // This prevents a confusing ESLint parsing error
- // preceding a much more useful Babel syntax error.
- result.errors = result.errors.filter(isLikelyASyntaxError);
- }
- return result;
- }
- module.exports = formatWebpackMessages;
- /***/ }),
- /***/ "./node_modules/react-dev-utils/launchEditorEndpoint.js":
- /*!**************************************************************!*\
- !*** ./node_modules/react-dev-utils/launchEditorEndpoint.js ***!
- \**************************************************************/
- /*! dynamic exports provided */
- /*! all exports used */
- /***/ (function(module, exports, __webpack_require__) {
- "use strict";
- /**
- * Copyright (c) 2015-present, Facebook, Inc.
- *
- * This source code is licensed under the MIT license found in the
- * LICENSE file in the root directory of this source tree.
- */
- // TODO: we might want to make this injectable to support DEV-time non-root URLs.
- module.exports = '/__open-stack-frame-in-editor';
- /***/ }),
- /***/ "./node_modules/react-dev-utils/webpackHotDevClient.js":
- /*!*************************************************************!*\
- !*** ./node_modules/react-dev-utils/webpackHotDevClient.js ***!
- \*************************************************************/
- /*! dynamic exports provided */
- /*! all exports used */
- /***/ (function(module, exports, __webpack_require__) {
- "use strict";
- /**
- * Copyright (c) 2015-present, Facebook, Inc.
- *
- * This source code is licensed under the MIT license found in the
- * LICENSE file in the root directory of this source tree.
- */
- // This alternative WebpackDevServer combines the functionality of:
- // https://github.com/webpack/webpack-dev-server/blob/webpack-1/client/index.js
- // https://github.com/webpack/webpack/blob/webpack-1/hot/dev-server.js
- // It only supports their simplest configuration (hot updates on same server).
- // It makes some opinionated choices on top, like adding a syntax error overlay
- // that looks similar to our console output. The error overlay is inspired by:
- // https://github.com/glenjamin/webpack-hot-middleware
- var SockJS = __webpack_require__(/*! sockjs-client */ "./node_modules/sockjs-client/lib/entry.js");
- var stripAnsi = __webpack_require__(/*! strip-ansi */ "./node_modules/strip-ansi/index.js");
- var url = __webpack_require__(/*! url */ "./node_modules/url/url.js");
- var launchEditorEndpoint = __webpack_require__(/*! ./launchEditorEndpoint */ "./node_modules/react-dev-utils/launchEditorEndpoint.js");
- var formatWebpackMessages = __webpack_require__(/*! ./formatWebpackMessages */ "./node_modules/react-dev-utils/formatWebpackMessages.js");
- var ErrorOverlay = __webpack_require__(/*! react-error-overlay */ "./node_modules/react-error-overlay/lib/index.js");
- ErrorOverlay.setEditorHandler(function editorHandler(errorLocation) {
- // Keep this sync with errorOverlayMiddleware.js
- fetch(
- launchEditorEndpoint +
- '?fileName=' +
- window.encodeURIComponent(errorLocation.fileName) +
- '&lineNumber=' +
- window.encodeURIComponent(errorLocation.lineNumber || 1)
- );
- });
- // We need to keep track of if there has been a runtime error.
- // Essentially, we cannot guarantee application state was not corrupted by the
- // runtime error. To prevent confusing behavior, we forcibly reload the entire
- // application. This is handled below when we are notified of a compile (code
- // change).
- // See https://github.com/facebookincubator/create-react-app/issues/3096
- var hadRuntimeError = false;
- ErrorOverlay.startReportingRuntimeErrors({
- onError: function() {
- hadRuntimeError = true;
- },
- filename: '/static/js/bundle.js',
- });
- if (module.hot && typeof module.hot.dispose === 'function') {
- module.hot.dispose(function() {
- // TODO: why do we need this?
- ErrorOverlay.stopReportingRuntimeErrors();
- });
- }
- // Connect to WebpackDevServer via a socket.
- var connection = new SockJS(
- url.format({
- protocol: window.location.protocol,
- hostname: window.location.hostname,
- port: window.location.port,
- // Hardcoded in WebpackDevServer
- pathname: '/sockjs-node',
- })
- );
- // Unlike WebpackDevServer client, we won't try to reconnect
- // to avoid spamming the console. Disconnect usually happens
- // when developer stops the server.
- connection.onclose = function() {
- if (typeof console !== 'undefined' && typeof console.info === 'function') {
- console.info(
- 'The development server has disconnected.\nRefresh the page if necessary.'
- );
- }
- };
- // Remember some state related to hot module replacement.
- var isFirstCompilation = true;
- var mostRecentCompilationHash = null;
- var hasCompileErrors = false;
- function clearOutdatedErrors() {
- // Clean up outdated compile errors, if any.
- if (typeof console !== 'undefined' && typeof console.clear === 'function') {
- if (hasCompileErrors) {
- console.clear();
- }
- }
- }
- // Successful compilation.
- function handleSuccess() {
- clearOutdatedErrors();
- var isHotUpdate = !isFirstCompilation;
- isFirstCompilation = false;
- hasCompileErrors = false;
- // Attempt to apply hot updates or reload.
- if (isHotUpdate) {
- tryApplyUpdates(function onHotUpdateSuccess() {
- // Only dismiss it when we're sure it's a hot update.
- // Otherwise it would flicker right before the reload.
- ErrorOverlay.dismissBuildError();
- });
- }
- }
- // Compilation with warnings (e.g. ESLint).
- function handleWarnings(warnings) {
- clearOutdatedErrors();
- var isHotUpdate = !isFirstCompilation;
- isFirstCompilation = false;
- hasCompileErrors = false;
- function printWarnings() {
- // Print warnings to the console.
- var formatted = formatWebpackMessages({
- warnings: warnings,
- errors: [],
- });
- if (typeof console !== 'undefined' && typeof console.warn === 'function') {
- for (var i = 0; i < formatted.warnings.length; i++) {
- if (i === 5) {
- console.warn(
- 'There were more warnings in other files.\n' +
- 'You can find a complete log in the terminal.'
- );
- break;
- }
- console.warn(stripAnsi(formatted.warnings[i]));
- }
- }
- }
- // Attempt to apply hot updates or reload.
- if (isHotUpdate) {
- tryApplyUpdates(function onSuccessfulHotUpdate() {
- // Only print warnings if we aren't refreshing the page.
- // Otherwise they'll disappear right away anyway.
- printWarnings();
- // Only dismiss it when we're sure it's a hot update.
- // Otherwise it would flicker right before the reload.
- ErrorOverlay.dismissBuildError();
- });
- } else {
- // Print initial warnings immediately.
- printWarnings();
- }
- }
- // Compilation with errors (e.g. syntax error or missing modules).
- function handleErrors(errors) {
- clearOutdatedErrors();
- isFirstCompilation = false;
- hasCompileErrors = true;
- // "Massage" webpack messages.
- var formatted = formatWebpackMessages({
- errors: errors,
- warnings: [],
- });
- // Only show the first error.
- ErrorOverlay.reportBuildError(formatted.errors[0]);
- // Also log them to the console.
- if (typeof console !== 'undefined' && typeof console.error === 'function') {
- for (var i = 0; i < formatted.errors.length; i++) {
- console.error(stripAnsi(formatted.errors[i]));
- }
- }
- // Do not attempt to reload now.
- // We will reload on next success instead.
- }
- // There is a newer version of the code available.
- function handleAvailableHash(hash) {
- // Update last known compilation hash.
- mostRecentCompilationHash = hash;
- }
- // Handle messages from the server.
- connection.onmessage = function(e) {
- var message = JSON.parse(e.data);
- switch (message.type) {
- case 'hash':
- handleAvailableHash(message.data);
- break;
- case 'still-ok':
- case 'ok':
- handleSuccess();
- break;
- case 'content-changed':
- // Triggered when a file from `contentBase` changed.
- window.location.reload();
- break;
- case 'warnings':
- handleWarnings(message.data);
- break;
- case 'errors':
- handleErrors(message.data);
- break;
- default:
- // Do nothing.
- }
- };
- // Is there a newer version of this code available?
- function isUpdateAvailable() {
- /* globals __webpack_hash__ */
- // __webpack_hash__ is the hash of the current compilation.
- // It's a global variable injected by Webpack.
- return mostRecentCompilationHash !== __webpack_require__.h();
- }
- // Webpack disallows updates in other states.
- function canApplyUpdates() {
- return module.hot.status() === 'idle';
- }
- // Attempt to update code on the fly, fall back to a hard reload.
- function tryApplyUpdates(onHotUpdateSuccess) {
- if (false) {
- // HotModuleReplacementPlugin is not in Webpack configuration.
- window.location.reload();
- return;
- }
- if (!isUpdateAvailable() || !canApplyUpdates()) {
- return;
- }
- function handleApplyUpdates(err, updatedModules) {
- if (err || !updatedModules || hadRuntimeError) {
- window.location.reload();
- return;
- }
- if (typeof onHotUpdateSuccess === 'function') {
- // Maybe we want to do something.
- onHotUpdateSuccess();
- }
- if (isUpdateAvailable()) {
- // While we were updating, there was a new update! Do it again.
- tryApplyUpdates();
- }
- }
- // https://webpack.github.io/docs/hot-module-replacement.html#check
- var result = module.hot.check(/* autoApply */ true, handleApplyUpdates);
- // // Webpack 2 returns a Promise instead of invoking a callback
- if (result && result.then) {
- result.then(
- function(updatedModules) {
- handleApplyUpdates(null, updatedModules);
- },
- function(err) {
- handleApplyUpdates(err, null);
- }
- );
- }
- }
- /***/ }),
- /***/ "./node_modules/react-dom/cjs/react-dom.development.js":
- /*!*************************************************************!*\
- !*** ./node_modules/react-dom/cjs/react-dom.development.js ***!
- \*************************************************************/
- /*! dynamic exports provided */
- /*! all exports used */
- /***/ (function(module, exports, __webpack_require__) {
- "use strict";
- /** @license React v16.14.0
- * react-dom.development.js
- *
- * Copyright (c) Facebook, Inc. and its affiliates.
- *
- * This source code is licensed under the MIT license found in the
- * LICENSE file in the root directory of this source tree.
- */
- if (true) {
- (function() {
- 'use strict';
- var React = __webpack_require__(/*! react */ "./node_modules/react/index.js");
- var _assign = __webpack_require__(/*! object-assign */ "./node_modules/object-assign/index.js");
- var Scheduler = __webpack_require__(/*! scheduler */ "./node_modules/scheduler/index.js");
- var checkPropTypes = __webpack_require__(/*! prop-types/checkPropTypes */ "./node_modules/prop-types/checkPropTypes.js");
- var tracing = __webpack_require__(/*! scheduler/tracing */ "./node_modules/scheduler/tracing.js");
- var ReactSharedInternals = React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED; // Prevent newer renderers from RTE when used with older react package versions.
- // Current owner and dispatcher used to share the same ref,
- // but PR #14548 split them out to better support the react-debug-tools package.
- if (!ReactSharedInternals.hasOwnProperty('ReactCurrentDispatcher')) {
- ReactSharedInternals.ReactCurrentDispatcher = {
- current: null
- };
- }
- if (!ReactSharedInternals.hasOwnProperty('ReactCurrentBatchConfig')) {
- ReactSharedInternals.ReactCurrentBatchConfig = {
- suspense: null
- };
- }
- // by calls to these methods by a Babel plugin.
- //
- // In PROD (or in packages without access to React internals),
- // they are left as they are instead.
- function warn(format) {
- {
- for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
- args[_key - 1] = arguments[_key];
- }
- printWarning('warn', format, args);
- }
- }
- function error(format) {
- {
- for (var _len2 = arguments.length, args = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) {
- args[_key2 - 1] = arguments[_key2];
- }
- printWarning('error', format, args);
- }
- }
- function printWarning(level, format, args) {
- // When changing this logic, you might want to also
- // update consoleWithStackDev.www.js as well.
- {
- var hasExistingStack = args.length > 0 && typeof args[args.length - 1] === 'string' && args[args.length - 1].indexOf('\n in') === 0;
- if (!hasExistingStack) {
- var ReactDebugCurrentFrame = ReactSharedInternals.ReactDebugCurrentFrame;
- var stack = ReactDebugCurrentFrame.getStackAddendum();
- if (stack !== '') {
- format += '%s';
- args = args.concat([stack]);
- }
- }
- var argsWithFormat = args.map(function (item) {
- return '' + item;
- }); // Careful: RN currently depends on this prefix
- argsWithFormat.unshift('Warning: ' + format); // We intentionally don't use spread (or .apply) directly because it
- // breaks IE9: https://github.com/facebook/react/issues/13610
- // eslint-disable-next-line react-internal/no-production-logging
- Function.prototype.apply.call(console[level], console, argsWithFormat);
- try {
- // --- Welcome to debugging React ---
- // This error was thrown as a convenience so that you can use this stack
- // to find the callsite that caused this warning to fire.
- var argIndex = 0;
- var message = 'Warning: ' + format.replace(/%s/g, function () {
- return args[argIndex++];
- });
- throw new Error(message);
- } catch (x) {}
- }
- }
- if (!React) {
- {
- throw Error( "ReactDOM was loaded before React. Make sure you load the React package before loading ReactDOM." );
- }
- }
- var invokeGuardedCallbackImpl = function (name, func, context, a, b, c, d, e, f) {
- var funcArgs = Array.prototype.slice.call(arguments, 3);
- try {
- func.apply(context, funcArgs);
- } catch (error) {
- this.onError(error);
- }
- };
- {
- // In DEV mode, we swap out invokeGuardedCallback for a special version
- // that plays more nicely with the browser's DevTools. The idea is to preserve
- // "Pause on exceptions" behavior. Because React wraps all user-provided
- // functions in invokeGuardedCallback, and the production version of
- // invokeGuardedCallback uses a try-catch, all user exceptions are treated
- // like caught exceptions, and the DevTools won't pause unless the developer
- // takes the extra step of enabling pause on caught exceptions. This is
- // unintuitive, though, because even though React has caught the error, from
- // the developer's perspective, the error is uncaught.
- //
- // To preserve the expected "Pause on exceptions" behavior, we don't use a
- // try-catch in DEV. Instead, we synchronously dispatch a fake event to a fake
- // DOM node, and call the user-provided callback from inside an event handler
- // for that fake event. If the callback throws, the error is "captured" using
- // a global event handler. But because the error happens in a different
- // event loop context, it does not interrupt the normal program flow.
- // Effectively, this gives us try-catch behavior without actually using
- // try-catch. Neat!
- // Check that the browser supports the APIs we need to implement our special
- // DEV version of invokeGuardedCallback
- if (typeof window !== 'undefined' && typeof window.dispatchEvent === 'function' && typeof document !== 'undefined' && typeof document.createEvent === 'function') {
- var fakeNode = document.createElement('react');
- var invokeGuardedCallbackDev = function (name, func, context, a, b, c, d, e, f) {
- // If document doesn't exist we know for sure we will crash in this method
- // when we call document.createEvent(). However this can cause confusing
- // errors: https://github.com/facebookincubator/create-react-app/issues/3482
- // So we preemptively throw with a better message instead.
- if (!(typeof document !== 'undefined')) {
- {
- throw Error( "The `document` global was defined when React was initialized, but is not defined anymore. This can happen in a test environment if a component schedules an update from an asynchronous callback, but the test has already finished running. To solve this, you can either unmount the component at the end of your test (and ensure that any asynchronous operations get canceled in `componentWillUnmount`), or you can change the test itself to be asynchronous." );
- }
- }
- var evt = document.createEvent('Event'); // Keeps track of whether the user-provided callback threw an error. We
- // set this to true at the beginning, then set it to false right after
- // calling the function. If the function errors, `didError` will never be
- // set to false. This strategy works even if the browser is flaky and
- // fails to call our global error handler, because it doesn't rely on
- // the error event at all.
- var didError = true; // Keeps track of the value of window.event so that we can reset it
- // during the callback to let user code access window.event in the
- // browsers that support it.
- var windowEvent = window.event; // Keeps track of the descriptor of window.event to restore it after event
- // dispatching: https://github.com/facebook/react/issues/13688
- var windowEventDescriptor = Object.getOwnPropertyDescriptor(window, 'event'); // Create an event handler for our fake event. We will synchronously
- // dispatch our fake event using `dispatchEvent`. Inside the handler, we
- // call the user-provided callback.
- var funcArgs = Array.prototype.slice.call(arguments, 3);
- function callCallback() {
- // We immediately remove the callback from event listeners so that
- // nested `invokeGuardedCallback` calls do not clash. Otherwise, a
- // nested call would trigger the fake event handlers of any call higher
- // in the stack.
- fakeNode.removeEventListener(evtType, callCallback, false); // We check for window.hasOwnProperty('event') to prevent the
- // window.event assignment in both IE <= 10 as they throw an error
- // "Member not found" in strict mode, and in Firefox which does not
- // support window.event.
- if (typeof window.event !== 'undefined' && window.hasOwnProperty('event')) {
- window.event = windowEvent;
- }
- func.apply(context, funcArgs);
- didError = false;
- } // Create a global error event handler. We use this to capture the value
- // that was thrown. It's possible that this error handler will fire more
- // than once; for example, if non-React code also calls `dispatchEvent`
- // and a handler for that event throws. We should be resilient to most of
- // those cases. Even if our error event handler fires more than once, the
- // last error event is always used. If the callback actually does error,
- // we know that the last error event is the correct one, because it's not
- // possible for anything else to have happened in between our callback
- // erroring and the code that follows the `dispatchEvent` call below. If
- // the callback doesn't error, but the error event was fired, we know to
- // ignore it because `didError` will be false, as described above.
- var error; // Use this to track whether the error event is ever called.
- var didSetError = false;
- var isCrossOriginError = false;
- function handleWindowError(event) {
- error = event.error;
- didSetError = true;
- if (error === null && event.colno === 0 && event.lineno === 0) {
- isCrossOriginError = true;
- }
- if (event.defaultPrevented) {
- // Some other error handler has prevented default.
- // Browsers silence the error report if this happens.
- // We'll remember this to later decide whether to log it or not.
- if (error != null && typeof error === 'object') {
- try {
- error._suppressLogging = true;
- } catch (inner) {// Ignore.
- }
- }
- }
- } // Create a fake event type.
- var evtType = "react-" + (name ? name : 'invokeguardedcallback'); // Attach our event handlers
- window.addEventListener('error', handleWindowError);
- fakeNode.addEventListener(evtType, callCallback, false); // Synchronously dispatch our fake event. If the user-provided function
- // errors, it will trigger our global error handler.
- evt.initEvent(evtType, false, false);
- fakeNode.dispatchEvent(evt);
- if (windowEventDescriptor) {
- Object.defineProperty(window, 'event', windowEventDescriptor);
- }
- if (didError) {
- if (!didSetError) {
- // The callback errored, but the error event never fired.
- error = new Error('An error was thrown inside one of your components, but React ' + "doesn't know what it was. This is likely due to browser " + 'flakiness. React does its best to preserve the "Pause on ' + 'exceptions" behavior of the DevTools, which requires some ' + "DEV-mode only tricks. It's possible that these don't work in " + 'your browser. Try triggering the error in production mode, ' + 'or switching to a modern browser. If you suspect that this is ' + 'actually an issue with React, please file an issue.');
- } else if (isCrossOriginError) {
- error = new Error("A cross-origin error was thrown. React doesn't have access to " + 'the actual error object in development. ' + 'See https://fb.me/react-crossorigin-error for more information.');
- }
- this.onError(error);
- } // Remove our event listeners
- window.removeEventListener('error', handleWindowError);
- };
- invokeGuardedCallbackImpl = invokeGuardedCallbackDev;
- }
- }
- var invokeGuardedCallbackImpl$1 = invokeGuardedCallbackImpl;
- var hasError = false;
- var caughtError = null; // Used by event system to capture/rethrow the first error.
- var hasRethrowError = false;
- var rethrowError = null;
- var reporter = {
- onError: function (error) {
- hasError = true;
- caughtError = error;
- }
- };
- /**
- * Call a function while guarding against errors that happens within it.
- * Returns an error if it throws, otherwise null.
- *
- * In production, this is implemented using a try-catch. The reason we don't
- * use a try-catch directly is so that we can swap out a different
- * implementation in DEV mode.
- *
- * @param {String} name of the guard to use for logging or debugging
- * @param {Function} func The function to invoke
- * @param {*} context The context to use when calling the function
- * @param {...*} args Arguments for function
- */
- function invokeGuardedCallback(name, func, context, a, b, c, d, e, f) {
- hasError = false;
- caughtError = null;
- invokeGuardedCallbackImpl$1.apply(reporter, arguments);
- }
- /**
- * Same as invokeGuardedCallback, but instead of returning an error, it stores
- * it in a global so it can be rethrown by `rethrowCaughtError` later.
- * TODO: See if caughtError and rethrowError can be unified.
- *
- * @param {String} name of the guard to use for logging or debugging
- * @param {Function} func The function to invoke
- * @param {*} context The context to use when calling the function
- * @param {...*} args Arguments for function
- */
- function invokeGuardedCallbackAndCatchFirstError(name, func, context, a, b, c, d, e, f) {
- invokeGuardedCallback.apply(this, arguments);
- if (hasError) {
- var error = clearCaughtError();
- if (!hasRethrowError) {
- hasRethrowError = true;
- rethrowError = error;
- }
- }
- }
- /**
- * During execution of guarded functions we will capture the first error which
- * we will rethrow to be handled by the top level error handler.
- */
- function rethrowCaughtError() {
- if (hasRethrowError) {
- var error = rethrowError;
- hasRethrowError = false;
- rethrowError = null;
- throw error;
- }
- }
- function hasCaughtError() {
- return hasError;
- }
- function clearCaughtError() {
- if (hasError) {
- var error = caughtError;
- hasError = false;
- caughtError = null;
- return error;
- } else {
- {
- {
- throw Error( "clearCaughtError was called but no error was captured. This error is likely caused by a bug in React. Please file an issue." );
- }
- }
- }
- }
- var getFiberCurrentPropsFromNode = null;
- var getInstanceFromNode = null;
- var getNodeFromInstance = null;
- function setComponentTree(getFiberCurrentPropsFromNodeImpl, getInstanceFromNodeImpl, getNodeFromInstanceImpl) {
- getFiberCurrentPropsFromNode = getFiberCurrentPropsFromNodeImpl;
- getInstanceFromNode = getInstanceFromNodeImpl;
- getNodeFromInstance = getNodeFromInstanceImpl;
- {
- if (!getNodeFromInstance || !getInstanceFromNode) {
- error('EventPluginUtils.setComponentTree(...): Injected ' + 'module is missing getNodeFromInstance or getInstanceFromNode.');
- }
- }
- }
- var validateEventDispatches;
- {
- validateEventDispatches = function (event) {
- var dispatchListeners = event._dispatchListeners;
- var dispatchInstances = event._dispatchInstances;
- var listenersIsArr = Array.isArray(dispatchListeners);
- var listenersLen = listenersIsArr ? dispatchListeners.length : dispatchListeners ? 1 : 0;
- var instancesIsArr = Array.isArray(dispatchInstances);
- var instancesLen = instancesIsArr ? dispatchInstances.length : dispatchInstances ? 1 : 0;
- if (instancesIsArr !== listenersIsArr || instancesLen !== listenersLen) {
- error('EventPluginUtils: Invalid `event`.');
- }
- };
- }
- /**
- * Dispatch the event to the listener.
- * @param {SyntheticEvent} event SyntheticEvent to handle
- * @param {function} listener Application-level callback
- * @param {*} inst Internal component instance
- */
- function executeDispatch(event, listener, inst) {
- var type = event.type || 'unknown-event';
- event.currentTarget = getNodeFromInstance(inst);
- invokeGuardedCallbackAndCatchFirstError(type, listener, undefined, event);
- event.currentTarget = null;
- }
- /**
- * Standard/simple iteration through an event's collected dispatches.
- */
- function executeDispatchesInOrder(event) {
- var dispatchListeners = event._dispatchListeners;
- var dispatchInstances = event._dispatchInstances;
- {
- validateEventDispatches(event);
- }
- if (Array.isArray(dispatchListeners)) {
- for (var i = 0; i < dispatchListeners.length; i++) {
- if (event.isPropagationStopped()) {
- break;
- } // Listeners and Instances are two parallel arrays that are always in sync.
- executeDispatch(event, dispatchListeners[i], dispatchInstances[i]);
- }
- } else if (dispatchListeners) {
- executeDispatch(event, dispatchListeners, dispatchInstances);
- }
- event._dispatchListeners = null;
- event._dispatchInstances = null;
- }
- var FunctionComponent = 0;
- var ClassComponent = 1;
- var IndeterminateComponent = 2; // Before we know whether it is function or class
- var HostRoot = 3; // Root of a host tree. Could be nested inside another node.
- var HostPortal = 4; // A subtree. Could be an entry point to a different renderer.
- var HostComponent = 5;
- var HostText = 6;
- var Fragment = 7;
- var Mode = 8;
- var ContextConsumer = 9;
- var ContextProvider = 10;
- var ForwardRef = 11;
- var Profiler = 12;
- var SuspenseComponent = 13;
- var MemoComponent = 14;
- var SimpleMemoComponent = 15;
- var LazyComponent = 16;
- var IncompleteClassComponent = 17;
- var DehydratedFragment = 18;
- var SuspenseListComponent = 19;
- var FundamentalComponent = 20;
- var ScopeComponent = 21;
- var Block = 22;
- /**
- * Injectable ordering of event plugins.
- */
- var eventPluginOrder = null;
- /**
- * Injectable mapping from names to event plugin modules.
- */
- var namesToPlugins = {};
- /**
- * Recomputes the plugin list using the injected plugins and plugin ordering.
- *
- * @private
- */
- function recomputePluginOrdering() {
- if (!eventPluginOrder) {
- // Wait until an `eventPluginOrder` is injected.
- return;
- }
- for (var pluginName in namesToPlugins) {
- var pluginModule = namesToPlugins[pluginName];
- var pluginIndex = eventPluginOrder.indexOf(pluginName);
- if (!(pluginIndex > -1)) {
- {
- throw Error( "EventPluginRegistry: Cannot inject event plugins that do not exist in the plugin ordering, `" + pluginName + "`." );
- }
- }
- if (plugins[pluginIndex]) {
- continue;
- }
- if (!pluginModule.extractEvents) {
- {
- throw Error( "EventPluginRegistry: Event plugins must implement an `extractEvents` method, but `" + pluginName + "` does not." );
- }
- }
- plugins[pluginIndex] = pluginModule;
- var publishedEvents = pluginModule.eventTypes;
- for (var eventName in publishedEvents) {
- if (!publishEventForPlugin(publishedEvents[eventName], pluginModule, eventName)) {
- {
- throw Error( "EventPluginRegistry: Failed to publish event `" + eventName + "` for plugin `" + pluginName + "`." );
- }
- }
- }
- }
- }
- /**
- * Publishes an event so that it can be dispatched by the supplied plugin.
- *
- * @param {object} dispatchConfig Dispatch configuration for the event.
- * @param {object} PluginModule Plugin publishing the event.
- * @return {boolean} True if the event was successfully published.
- * @private
- */
- function publishEventForPlugin(dispatchConfig, pluginModule, eventName) {
- if (!!eventNameDispatchConfigs.hasOwnProperty(eventName)) {
- {
- throw Error( "EventPluginRegistry: More than one plugin attempted to publish the same event name, `" + eventName + "`." );
- }
- }
- eventNameDispatchConfigs[eventName] = dispatchConfig;
- var phasedRegistrationNames = dispatchConfig.phasedRegistrationNames;
- if (phasedRegistrationNames) {
- for (var phaseName in phasedRegistrationNames) {
- if (phasedRegistrationNames.hasOwnProperty(phaseName)) {
- var phasedRegistrationName = phasedRegistrationNames[phaseName];
- publishRegistrationName(phasedRegistrationName, pluginModule, eventName);
- }
- }
- return true;
- } else if (dispatchConfig.registrationName) {
- publishRegistrationName(dispatchConfig.registrationName, pluginModule, eventName);
- return true;
- }
- return false;
- }
- /**
- * Publishes a registration name that is used to identify dispatched events.
- *
- * @param {string} registrationName Registration name to add.
- * @param {object} PluginModule Plugin publishing the event.
- * @private
- */
- function publishRegistrationName(registrationName, pluginModule, eventName) {
- if (!!registrationNameModules[registrationName]) {
- {
- throw Error( "EventPluginRegistry: More than one plugin attempted to publish the same registration name, `" + registrationName + "`." );
- }
- }
- registrationNameModules[registrationName] = pluginModule;
- registrationNameDependencies[registrationName] = pluginModule.eventTypes[eventName].dependencies;
- {
- var lowerCasedName = registrationName.toLowerCase();
- possibleRegistrationNames[lowerCasedName] = registrationName;
- if (registrationName === 'onDoubleClick') {
- possibleRegistrationNames.ondblclick = registrationName;
- }
- }
- }
- /**
- * Registers plugins so that they can extract and dispatch events.
- */
- /**
- * Ordered list of injected plugins.
- */
- var plugins = [];
- /**
- * Mapping from event name to dispatch config
- */
- var eventNameDispatchConfigs = {};
- /**
- * Mapping from registration name to plugin module
- */
- var registrationNameModules = {};
- /**
- * Mapping from registration name to event name
- */
- var registrationNameDependencies = {};
- /**
- * Mapping from lowercase registration names to the properly cased version,
- * used to warn in the case of missing event handlers. Available
- * only in true.
- * @type {Object}
- */
- var possibleRegistrationNames = {} ; // Trust the developer to only use possibleRegistrationNames in true
- /**
- * Injects an ordering of plugins (by plugin name). This allows the ordering
- * to be decoupled from injection of the actual plugins so that ordering is
- * always deterministic regardless of packaging, on-the-fly injection, etc.
- *
- * @param {array} InjectedEventPluginOrder
- * @internal
- */
- function injectEventPluginOrder(injectedEventPluginOrder) {
- if (!!eventPluginOrder) {
- {
- throw Error( "EventPluginRegistry: Cannot inject event plugin ordering more than once. You are likely trying to load more than one copy of React." );
- }
- } // Clone the ordering so it cannot be dynamically mutated.
- eventPluginOrder = Array.prototype.slice.call(injectedEventPluginOrder);
- recomputePluginOrdering();
- }
- /**
- * Injects plugins to be used by plugin event system. The plugin names must be
- * in the ordering injected by `injectEventPluginOrder`.
- *
- * Plugins can be injected as part of page initialization or on-the-fly.
- *
- * @param {object} injectedNamesToPlugins Map from names to plugin modules.
- * @internal
- */
- function injectEventPluginsByName(injectedNamesToPlugins) {
- var isOrderingDirty = false;
- for (var pluginName in injectedNamesToPlugins) {
- if (!injectedNamesToPlugins.hasOwnProperty(pluginName)) {
- continue;
- }
- var pluginModule = injectedNamesToPlugins[pluginName];
- if (!namesToPlugins.hasOwnProperty(pluginName) || namesToPlugins[pluginName] !== pluginModule) {
- if (!!namesToPlugins[pluginName]) {
- {
- throw Error( "EventPluginRegistry: Cannot inject two different event plugins using the same name, `" + pluginName + "`." );
- }
- }
- namesToPlugins[pluginName] = pluginModule;
- isOrderingDirty = true;
- }
- }
- if (isOrderingDirty) {
- recomputePluginOrdering();
- }
- }
- var canUseDOM = !!(typeof window !== 'undefined' && typeof window.document !== 'undefined' && typeof window.document.createElement !== 'undefined');
- var PLUGIN_EVENT_SYSTEM = 1;
- var IS_REPLAYED = 1 << 5;
- var IS_FIRST_ANCESTOR = 1 << 6;
- var restoreImpl = null;
- var restoreTarget = null;
- var restoreQueue = null;
- function restoreStateOfTarget(target) {
- // We perform this translation at the end of the event loop so that we
- // always receive the correct fiber here
- var internalInstance = getInstanceFromNode(target);
- if (!internalInstance) {
- // Unmounted
- return;
- }
- if (!(typeof restoreImpl === 'function')) {
- {
- throw Error( "setRestoreImplementation() needs to be called to handle a target for controlled events. This error is likely caused by a bug in React. Please file an issue." );
- }
- }
- var stateNode = internalInstance.stateNode; // Guard against Fiber being unmounted.
- if (stateNode) {
- var _props = getFiberCurrentPropsFromNode(stateNode);
- restoreImpl(internalInstance.stateNode, internalInstance.type, _props);
- }
- }
- function setRestoreImplementation(impl) {
- restoreImpl = impl;
- }
- function enqueueStateRestore(target) {
- if (restoreTarget) {
- if (restoreQueue) {
- restoreQueue.push(target);
- } else {
- restoreQueue = [target];
- }
- } else {
- restoreTarget = target;
- }
- }
- function needsStateRestore() {
- return restoreTarget !== null || restoreQueue !== null;
- }
- function restoreStateIfNeeded() {
- if (!restoreTarget) {
- return;
- }
- var target = restoreTarget;
- var queuedTargets = restoreQueue;
- restoreTarget = null;
- restoreQueue = null;
- restoreStateOfTarget(target);
- if (queuedTargets) {
- for (var i = 0; i < queuedTargets.length; i++) {
- restoreStateOfTarget(queuedTargets[i]);
- }
- }
- }
- var enableProfilerTimer = true; // Trace which interactions trigger each commit.
- var enableDeprecatedFlareAPI = false; // Experimental Host Component support.
- var enableFundamentalAPI = false; // Experimental Scope support.
- var warnAboutStringRefs = false;
- // the renderer. Such as when we're dispatching events or if third party
- // libraries need to call batchedUpdates. Eventually, this API will go away when
- // everything is batched by default. We'll then have a similar API to opt-out of
- // scheduled work and instead do synchronous work.
- // Defaults
- var batchedUpdatesImpl = function (fn, bookkeeping) {
- return fn(bookkeeping);
- };
- var discreteUpdatesImpl = function (fn, a, b, c, d) {
- return fn(a, b, c, d);
- };
- var flushDiscreteUpdatesImpl = function () {};
- var batchedEventUpdatesImpl = batchedUpdatesImpl;
- var isInsideEventHandler = false;
- var isBatchingEventUpdates = false;
- function finishEventHandler() {
- // Here we wait until all updates have propagated, which is important
- // when using controlled components within layers:
- // https://github.com/facebook/react/issues/1698
- // Then we restore state of any controlled component.
- var controlledComponentsHavePendingUpdates = needsStateRestore();
- if (controlledComponentsHavePendingUpdates) {
- // If a controlled event was fired, we may need to restore the state of
- // the DOM node back to the controlled value. This is necessary when React
- // bails out of the update without touching the DOM.
- flushDiscreteUpdatesImpl();
- restoreStateIfNeeded();
- }
- }
- function batchedUpdates(fn, bookkeeping) {
- if (isInsideEventHandler) {
- // If we are currently inside another batch, we need to wait until it
- // fully completes before restoring state.
- return fn(bookkeeping);
- }
- isInsideEventHandler = true;
- try {
- return batchedUpdatesImpl(fn, bookkeeping);
- } finally {
- isInsideEventHandler = false;
- finishEventHandler();
- }
- }
- function batchedEventUpdates(fn, a, b) {
- if (isBatchingEventUpdates) {
- // If we are currently inside another batch, we need to wait until it
- // fully completes before restoring state.
- return fn(a, b);
- }
- isBatchingEventUpdates = true;
- try {
- return batchedEventUpdatesImpl(fn, a, b);
- } finally {
- isBatchingEventUpdates = false;
- finishEventHandler();
- }
- } // This is for the React Flare event system
- function discreteUpdates(fn, a, b, c, d) {
- var prevIsInsideEventHandler = isInsideEventHandler;
- isInsideEventHandler = true;
- try {
- return discreteUpdatesImpl(fn, a, b, c, d);
- } finally {
- isInsideEventHandler = prevIsInsideEventHandler;
- if (!isInsideEventHandler) {
- finishEventHandler();
- }
- }
- }
- function flushDiscreteUpdatesIfNeeded(timeStamp) {
- // event.timeStamp isn't overly reliable due to inconsistencies in
- // how different browsers have historically provided the time stamp.
- // Some browsers provide high-resolution time stamps for all events,
- // some provide low-resolution time stamps for all events. FF < 52
- // even mixes both time stamps together. Some browsers even report
- // negative time stamps or time stamps that are 0 (iOS9) in some cases.
- // Given we are only comparing two time stamps with equality (!==),
- // we are safe from the resolution differences. If the time stamp is 0
- // we bail-out of preventing the flush, which can affect semantics,
- // such as if an earlier flush removes or adds event listeners that
- // are fired in the subsequent flush. However, this is the same
- // behaviour as we had before this change, so the risks are low.
- if (!isInsideEventHandler && (!enableDeprecatedFlareAPI )) {
- flushDiscreteUpdatesImpl();
- }
- }
- function setBatchingImplementation(_batchedUpdatesImpl, _discreteUpdatesImpl, _flushDiscreteUpdatesImpl, _batchedEventUpdatesImpl) {
- batchedUpdatesImpl = _batchedUpdatesImpl;
- discreteUpdatesImpl = _discreteUpdatesImpl;
- flushDiscreteUpdatesImpl = _flushDiscreteUpdatesImpl;
- batchedEventUpdatesImpl = _batchedEventUpdatesImpl;
- }
- var DiscreteEvent = 0;
- var UserBlockingEvent = 1;
- var ContinuousEvent = 2;
- // A reserved attribute.
- // It is handled by React separately and shouldn't be written to the DOM.
- var RESERVED = 0; // A simple string attribute.
- // Attributes that aren't in the whitelist are presumed to have this type.
- var STRING = 1; // A string attribute that accepts booleans in React. In HTML, these are called
- // "enumerated" attributes with "true" and "false" as possible values.
- // When true, it should be set to a "true" string.
- // When false, it should be set to a "false" string.
- var BOOLEANISH_STRING = 2; // A real boolean attribute.
- // When true, it should be present (set either to an empty string or its name).
- // When false, it should be omitted.
- var BOOLEAN = 3; // An attribute that can be used as a flag as well as with a value.
- // When true, it should be present (set either to an empty string or its name).
- // When false, it should be omitted.
- // For any other value, should be present with that value.
- var OVERLOADED_BOOLEAN = 4; // An attribute that must be numeric or parse as a numeric.
- // When falsy, it should be removed.
- var NUMERIC = 5; // An attribute that must be positive numeric or parse as a positive numeric.
- // When falsy, it should be removed.
- var POSITIVE_NUMERIC = 6;
- /* eslint-disable max-len */
- var ATTRIBUTE_NAME_START_CHAR = ":A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD";
- /* eslint-enable max-len */
- var ATTRIBUTE_NAME_CHAR = ATTRIBUTE_NAME_START_CHAR + "\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040";
- var ROOT_ATTRIBUTE_NAME = 'data-reactroot';
- var VALID_ATTRIBUTE_NAME_REGEX = new RegExp('^[' + ATTRIBUTE_NAME_START_CHAR + '][' + ATTRIBUTE_NAME_CHAR + ']*$');
- var hasOwnProperty = Object.prototype.hasOwnProperty;
- var illegalAttributeNameCache = {};
- var validatedAttributeNameCache = {};
- function isAttributeNameSafe(attributeName) {
- if (hasOwnProperty.call(validatedAttributeNameCache, attributeName)) {
- return true;
- }
- if (hasOwnProperty.call(illegalAttributeNameCache, attributeName)) {
- return false;
- }
- if (VALID_ATTRIBUTE_NAME_REGEX.test(attributeName)) {
- validatedAttributeNameCache[attributeName] = true;
- return true;
- }
- illegalAttributeNameCache[attributeName] = true;
- {
- error('Invalid attribute name: `%s`', attributeName);
- }
- return false;
- }
- function shouldIgnoreAttribute(name, propertyInfo, isCustomComponentTag) {
- if (propertyInfo !== null) {
- return propertyInfo.type === RESERVED;
- }
- if (isCustomComponentTag) {
- return false;
- }
- if (name.length > 2 && (name[0] === 'o' || name[0] === 'O') && (name[1] === 'n' || name[1] === 'N')) {
- return true;
- }
- return false;
- }
- function shouldRemoveAttributeWithWarning(name, value, propertyInfo, isCustomComponentTag) {
- if (propertyInfo !== null && propertyInfo.type === RESERVED) {
- return false;
- }
- switch (typeof value) {
- case 'function': // $FlowIssue symbol is perfectly valid here
- case 'symbol':
- // eslint-disable-line
- return true;
- case 'boolean':
- {
- if (isCustomComponentTag) {
- return false;
- }
- if (propertyInfo !== null) {
- return !propertyInfo.acceptsBooleans;
- } else {
- var prefix = name.toLowerCase().slice(0, 5);
- return prefix !== 'data-' && prefix !== 'aria-';
- }
- }
- default:
- return false;
- }
- }
- function shouldRemoveAttribute(name, value, propertyInfo, isCustomComponentTag) {
- if (value === null || typeof value === 'undefined') {
- return true;
- }
- if (shouldRemoveAttributeWithWarning(name, value, propertyInfo, isCustomComponentTag)) {
- return true;
- }
- if (isCustomComponentTag) {
- return false;
- }
- if (propertyInfo !== null) {
- switch (propertyInfo.type) {
- case BOOLEAN:
- return !value;
- case OVERLOADED_BOOLEAN:
- return value === false;
- case NUMERIC:
- return isNaN(value);
- case POSITIVE_NUMERIC:
- return isNaN(value) || value < 1;
- }
- }
- return false;
- }
- function getPropertyInfo(name) {
- return properties.hasOwnProperty(name) ? properties[name] : null;
- }
- function PropertyInfoRecord(name, type, mustUseProperty, attributeName, attributeNamespace, sanitizeURL) {
- this.acceptsBooleans = type === BOOLEANISH_STRING || type === BOOLEAN || type === OVERLOADED_BOOLEAN;
- this.attributeName = attributeName;
- this.attributeNamespace = attributeNamespace;
- this.mustUseProperty = mustUseProperty;
- this.propertyName = name;
- this.type = type;
- this.sanitizeURL = sanitizeURL;
- } // When adding attributes to this list, be sure to also add them to
- // the `possibleStandardNames` module to ensure casing and incorrect
- // name warnings.
- var properties = {}; // These props are reserved by React. They shouldn't be written to the DOM.
- var reservedProps = ['children', 'dangerouslySetInnerHTML', // TODO: This prevents the assignment of defaultValue to regular
- // elements (not just inputs). Now that ReactDOMInput assigns to the
- // defaultValue property -- do we need this?
- 'defaultValue', 'defaultChecked', 'innerHTML', 'suppressContentEditableWarning', 'suppressHydrationWarning', 'style'];
- reservedProps.forEach(function (name) {
- properties[name] = new PropertyInfoRecord(name, RESERVED, false, // mustUseProperty
- name, // attributeName
- null, // attributeNamespace
- false);
- }); // A few React string attributes have a different name.
- // This is a mapping from React prop names to the attribute names.
- [['acceptCharset', 'accept-charset'], ['className', 'class'], ['htmlFor', 'for'], ['httpEquiv', 'http-equiv']].forEach(function (_ref) {
- var name = _ref[0],
- attributeName = _ref[1];
- properties[name] = new PropertyInfoRecord(name, STRING, false, // mustUseProperty
- attributeName, // attributeName
- null, // attributeNamespace
- false);
- }); // These are "enumerated" HTML attributes that accept "true" and "false".
- // In React, we let users pass `true` and `false` even though technically
- // these aren't boolean attributes (they are coerced to strings).
- ['contentEditable', 'draggable', 'spellCheck', 'value'].forEach(function (name) {
- properties[name] = new PropertyInfoRecord(name, BOOLEANISH_STRING, false, // mustUseProperty
- name.toLowerCase(), // attributeName
- null, // attributeNamespace
- false);
- }); // These are "enumerated" SVG attributes that accept "true" and "false".
- // In React, we let users pass `true` and `false` even though technically
- // these aren't boolean attributes (they are coerced to strings).
- // Since these are SVG attributes, their attribute names are case-sensitive.
- ['autoReverse', 'externalResourcesRequired', 'focusable', 'preserveAlpha'].forEach(function (name) {
- properties[name] = new PropertyInfoRecord(name, BOOLEANISH_STRING, false, // mustUseProperty
- name, // attributeName
- null, // attributeNamespace
- false);
- }); // These are HTML boolean attributes.
- ['allowFullScreen', 'async', // Note: there is a special case that prevents it from being written to the DOM
- // on the client side because the browsers are inconsistent. Instead we call focus().
- 'autoFocus', 'autoPlay', 'controls', 'default', 'defer', 'disabled', 'disablePictureInPicture', 'formNoValidate', 'hidden', 'loop', 'noModule', 'noValidate', 'open', 'playsInline', 'readOnly', 'required', 'reversed', 'scoped', 'seamless', // Microdata
- 'itemScope'].forEach(function (name) {
- properties[name] = new PropertyInfoRecord(name, BOOLEAN, false, // mustUseProperty
- name.toLowerCase(), // attributeName
- null, // attributeNamespace
- false);
- }); // These are the few React props that we set as DOM properties
- // rather than attributes. These are all booleans.
- ['checked', // Note: `option.selected` is not updated if `select.multiple` is
- // disabled with `removeAttribute`. We have special logic for handling this.
- 'multiple', 'muted', 'selected' // NOTE: if you add a camelCased prop to this list,
- // you'll need to set attributeName to name.toLowerCase()
- // instead in the assignment below.
- ].forEach(function (name) {
- properties[name] = new PropertyInfoRecord(name, BOOLEAN, true, // mustUseProperty
- name, // attributeName
- null, // attributeNamespace
- false);
- }); // These are HTML attributes that are "overloaded booleans": they behave like
- // booleans, but can also accept a string value.
- ['capture', 'download' // NOTE: if you add a camelCased prop to this list,
- // you'll need to set attributeName to name.toLowerCase()
- // instead in the assignment below.
- ].forEach(function (name) {
- properties[name] = new PropertyInfoRecord(name, OVERLOADED_BOOLEAN, false, // mustUseProperty
- name, // attributeName
- null, // attributeNamespace
- false);
- }); // These are HTML attributes that must be positive numbers.
- ['cols', 'rows', 'size', 'span' // NOTE: if you add a camelCased prop to this list,
- // you'll need to set attributeName to name.toLowerCase()
- // instead in the assignment below.
- ].forEach(function (name) {
- properties[name] = new PropertyInfoRecord(name, POSITIVE_NUMERIC, false, // mustUseProperty
- name, // attributeName
- null, // attributeNamespace
- false);
- }); // These are HTML attributes that must be numbers.
- ['rowSpan', 'start'].forEach(function (name) {
- properties[name] = new PropertyInfoRecord(name, NUMERIC, false, // mustUseProperty
- name.toLowerCase(), // attributeName
- null, // attributeNamespace
- false);
- });
- var CAMELIZE = /[\-\:]([a-z])/g;
- var capitalize = function (token) {
- return token[1].toUpperCase();
- }; // This is a list of all SVG attributes that need special casing, namespacing,
- // or boolean value assignment. Regular attributes that just accept strings
- // and have the same names are omitted, just like in the HTML whitelist.
- // Some of these attributes can be hard to find. This list was created by
- // scraping the MDN documentation.
- ['accent-height', 'alignment-baseline', 'arabic-form', 'baseline-shift', 'cap-height', 'clip-path', 'clip-rule', 'color-interpolation', 'color-interpolation-filters', 'color-profile', 'color-rendering', 'dominant-baseline', 'enable-background', 'fill-opacity', 'fill-rule', 'flood-color', 'flood-opacity', 'font-family', 'font-size', 'font-size-adjust', 'font-stretch', 'font-style', 'font-variant', 'font-weight', 'glyph-name', 'glyph-orientation-horizontal', 'glyph-orientation-vertical', 'horiz-adv-x', 'horiz-origin-x', 'image-rendering', 'letter-spacing', 'lighting-color', 'marker-end', 'marker-mid', 'marker-start', 'overline-position', 'overline-thickness', 'paint-order', 'panose-1', 'pointer-events', 'rendering-intent', 'shape-rendering', 'stop-color', 'stop-opacity', 'strikethrough-position', 'strikethrough-thickness', 'stroke-dasharray', 'stroke-dashoffset', 'stroke-linecap', 'stroke-linejoin', 'stroke-miterlimit', 'stroke-opacity', 'stroke-width', 'text-anchor', 'text-decoration', 'text-rendering', 'underline-position', 'underline-thickness', 'unicode-bidi', 'unicode-range', 'units-per-em', 'v-alphabetic', 'v-hanging', 'v-ideographic', 'v-mathematical', 'vector-effect', 'vert-adv-y', 'vert-origin-x', 'vert-origin-y', 'word-spacing', 'writing-mode', 'xmlns:xlink', 'x-height' // NOTE: if you add a camelCased prop to this list,
- // you'll need to set attributeName to name.toLowerCase()
- // instead in the assignment below.
- ].forEach(function (attributeName) {
- var name = attributeName.replace(CAMELIZE, capitalize);
- properties[name] = new PropertyInfoRecord(name, STRING, false, // mustUseProperty
- attributeName, null, // attributeNamespace
- false);
- }); // String SVG attributes with the xlink namespace.
- ['xlink:actuate', 'xlink:arcrole', 'xlink:role', 'xlink:show', 'xlink:title', 'xlink:type' // NOTE: if you add a camelCased prop to this list,
- // you'll need to set attributeName to name.toLowerCase()
- // instead in the assignment below.
- ].forEach(function (attributeName) {
- var name = attributeName.replace(CAMELIZE, capitalize);
- properties[name] = new PropertyInfoRecord(name, STRING, false, // mustUseProperty
- attributeName, 'http://www.w3.org/1999/xlink', false);
- }); // String SVG attributes with the xml namespace.
- ['xml:base', 'xml:lang', 'xml:space' // NOTE: if you add a camelCased prop to this list,
- // you'll need to set attributeName to name.toLowerCase()
- // instead in the assignment below.
- ].forEach(function (attributeName) {
- var name = attributeName.replace(CAMELIZE, capitalize);
- properties[name] = new PropertyInfoRecord(name, STRING, false, // mustUseProperty
- attributeName, 'http://www.w3.org/XML/1998/namespace', false);
- }); // These attribute exists both in HTML and SVG.
- // The attribute name is case-sensitive in SVG so we can't just use
- // the React name like we do for attributes that exist only in HTML.
- ['tabIndex', 'crossOrigin'].forEach(function (attributeName) {
- properties[attributeName] = new PropertyInfoRecord(attributeName, STRING, false, // mustUseProperty
- attributeName.toLowerCase(), // attributeName
- null, // attributeNamespace
- false);
- }); // These attributes accept URLs. These must not allow javascript: URLS.
- // These will also need to accept Trusted Types object in the future.
- var xlinkHref = 'xlinkHref';
- properties[xlinkHref] = new PropertyInfoRecord('xlinkHref', STRING, false, // mustUseProperty
- 'xlink:href', 'http://www.w3.org/1999/xlink', true);
- ['src', 'href', 'action', 'formAction'].forEach(function (attributeName) {
- properties[attributeName] = new PropertyInfoRecord(attributeName, STRING, false, // mustUseProperty
- attributeName.toLowerCase(), // attributeName
- null, // attributeNamespace
- true);
- });
- var ReactDebugCurrentFrame = null;
- {
- ReactDebugCurrentFrame = ReactSharedInternals.ReactDebugCurrentFrame;
- } // A javascript: URL can contain leading C0 control or \u0020 SPACE,
- // and any newline or tab are filtered out as if they're not part of the URL.
- // https://url.spec.whatwg.org/#url-parsing
- // Tab or newline are defined as \r\n\t:
- // https://infra.spec.whatwg.org/#ascii-tab-or-newline
- // A C0 control is a code point in the range \u0000 NULL to \u001F
- // INFORMATION SEPARATOR ONE, inclusive:
- // https://infra.spec.whatwg.org/#c0-control-or-space
- /* eslint-disable max-len */
- var isJavaScriptProtocol = /^[\u0000-\u001F ]*j[\r\n\t]*a[\r\n\t]*v[\r\n\t]*a[\r\n\t]*s[\r\n\t]*c[\r\n\t]*r[\r\n\t]*i[\r\n\t]*p[\r\n\t]*t[\r\n\t]*\:/i;
- var didWarn = false;
- function sanitizeURL(url) {
- {
- if (!didWarn && isJavaScriptProtocol.test(url)) {
- didWarn = true;
- error('A future version of React will block javascript: URLs as a security precaution. ' + 'Use event handlers instead if you can. If you need to generate unsafe HTML try ' + 'using dangerouslySetInnerHTML instead. React was passed %s.', JSON.stringify(url));
- }
- }
- }
- /**
- * Get the value for a property on a node. Only used in DEV for SSR validation.
- * The "expected" argument is used as a hint of what the expected value is.
- * Some properties have multiple equivalent values.
- */
- function getValueForProperty(node, name, expected, propertyInfo) {
- {
- if (propertyInfo.mustUseProperty) {
- var propertyName = propertyInfo.propertyName;
- return node[propertyName];
- } else {
- if ( propertyInfo.sanitizeURL) {
- // If we haven't fully disabled javascript: URLs, and if
- // the hydration is successful of a javascript: URL, we
- // still want to warn on the client.
- sanitizeURL('' + expected);
- }
- var attributeName = propertyInfo.attributeName;
- var stringValue = null;
- if (propertyInfo.type === OVERLOADED_BOOLEAN) {
- if (node.hasAttribute(attributeName)) {
- var value = node.getAttribute(attributeName);
- if (value === '') {
- return true;
- }
- if (shouldRemoveAttribute(name, expected, propertyInfo, false)) {
- return value;
- }
- if (value === '' + expected) {
- return expected;
- }
- return value;
- }
- } else if (node.hasAttribute(attributeName)) {
- if (shouldRemoveAttribute(name, expected, propertyInfo, false)) {
- // We had an attribute but shouldn't have had one, so read it
- // for the error message.
- return node.getAttribute(attributeName);
- }
- if (propertyInfo.type === BOOLEAN) {
- // If this was a boolean, it doesn't matter what the value is
- // the fact that we have it is the same as the expected.
- return expected;
- } // Even if this property uses a namespace we use getAttribute
- // because we assume its namespaced name is the same as our config.
- // To use getAttributeNS we need the local name which we don't have
- // in our config atm.
- stringValue = node.getAttribute(attributeName);
- }
- if (shouldRemoveAttribute(name, expected, propertyInfo, false)) {
- return stringValue === null ? expected : stringValue;
- } else if (stringValue === '' + expected) {
- return expected;
- } else {
- return stringValue;
- }
- }
- }
- }
- /**
- * Get the value for a attribute on a node. Only used in DEV for SSR validation.
- * The third argument is used as a hint of what the expected value is. Some
- * attributes have multiple equivalent values.
- */
- function getValueForAttribute(node, name, expected) {
- {
- if (!isAttributeNameSafe(name)) {
- return;
- }
- if (!node.hasAttribute(name)) {
- return expected === undefined ? undefined : null;
- }
- var value = node.getAttribute(name);
- if (value === '' + expected) {
- return expected;
- }
- return value;
- }
- }
- /**
- * Sets the value for a property on a node.
- *
- * @param {DOMElement} node
- * @param {string} name
- * @param {*} value
- */
- function setValueForProperty(node, name, value, isCustomComponentTag) {
- var propertyInfo = getPropertyInfo(name);
- if (shouldIgnoreAttribute(name, propertyInfo, isCustomComponentTag)) {
- return;
- }
- if (shouldRemoveAttribute(name, value, propertyInfo, isCustomComponentTag)) {
- value = null;
- } // If the prop isn't in the special list, treat it as a simple attribute.
- if (isCustomComponentTag || propertyInfo === null) {
- if (isAttributeNameSafe(name)) {
- var _attributeName = name;
- if (value === null) {
- node.removeAttribute(_attributeName);
- } else {
- node.setAttribute(_attributeName, '' + value);
- }
- }
- return;
- }
- var mustUseProperty = propertyInfo.mustUseProperty;
- if (mustUseProperty) {
- var propertyName = propertyInfo.propertyName;
- if (value === null) {
- var type = propertyInfo.type;
- node[propertyName] = type === BOOLEAN ? false : '';
- } else {
- // Contrary to `setAttribute`, object properties are properly
- // `toString`ed by IE8/9.
- node[propertyName] = value;
- }
- return;
- } // The rest are treated as attributes with special cases.
- var attributeName = propertyInfo.attributeName,
- attributeNamespace = propertyInfo.attributeNamespace;
- if (value === null) {
- node.removeAttribute(attributeName);
- } else {
- var _type = propertyInfo.type;
- var attributeValue;
- if (_type === BOOLEAN || _type === OVERLOADED_BOOLEAN && value === true) {
- // If attribute type is boolean, we know for sure it won't be an execution sink
- // and we won't require Trusted Type here.
- attributeValue = '';
- } else {
- // `setAttribute` with objects becomes only `[object]` in IE8/9,
- // ('' + value) makes it output the correct toString()-value.
- {
- attributeValue = '' + value;
- }
- if (propertyInfo.sanitizeURL) {
- sanitizeURL(attributeValue.toString());
- }
- }
- if (attributeNamespace) {
- node.setAttributeNS(attributeNamespace, attributeName, attributeValue);
- } else {
- node.setAttribute(attributeName, attributeValue);
- }
- }
- }
- var BEFORE_SLASH_RE = /^(.*)[\\\/]/;
- function describeComponentFrame (name, source, ownerName) {
- var sourceInfo = '';
- if (source) {
- var path = source.fileName;
- var fileName = path.replace(BEFORE_SLASH_RE, '');
- {
- // In DEV, include code for a common special case:
- // prefer "folder/index.js" instead of just "index.js".
- if (/^index\./.test(fileName)) {
- var match = path.match(BEFORE_SLASH_RE);
- if (match) {
- var pathBeforeSlash = match[1];
- if (pathBeforeSlash) {
- var folderName = pathBeforeSlash.replace(BEFORE_SLASH_RE, '');
- fileName = folderName + '/' + fileName;
- }
- }
- }
- }
- sourceInfo = ' (at ' + fileName + ':' + source.lineNumber + ')';
- } else if (ownerName) {
- sourceInfo = ' (created by ' + ownerName + ')';
- }
- return '\n in ' + (name || 'Unknown') + sourceInfo;
- }
- // The Symbol used to tag the ReactElement-like types. If there is no native Symbol
- // nor polyfill, then a plain number is used for performance.
- var hasSymbol = typeof Symbol === 'function' && Symbol.for;
- var REACT_ELEMENT_TYPE = hasSymbol ? Symbol.for('react.element') : 0xeac7;
- var REACT_PORTAL_TYPE = hasSymbol ? Symbol.for('react.portal') : 0xeaca;
- var REACT_FRAGMENT_TYPE = hasSymbol ? Symbol.for('react.fragment') : 0xeacb;
- var REACT_STRICT_MODE_TYPE = hasSymbol ? Symbol.for('react.strict_mode') : 0xeacc;
- var REACT_PROFILER_TYPE = hasSymbol ? Symbol.for('react.profiler') : 0xead2;
- var REACT_PROVIDER_TYPE = hasSymbol ? Symbol.for('react.provider') : 0xeacd;
- var REACT_CONTEXT_TYPE = hasSymbol ? Symbol.for('react.context') : 0xeace; // TODO: We don't use AsyncMode or ConcurrentMode anymore. They were temporary
- var REACT_CONCURRENT_MODE_TYPE = hasSymbol ? Symbol.for('react.concurrent_mode') : 0xeacf;
- var REACT_FORWARD_REF_TYPE = hasSymbol ? Symbol.for('react.forward_ref') : 0xead0;
- var REACT_SUSPENSE_TYPE = hasSymbol ? Symbol.for('react.suspense') : 0xead1;
- var REACT_SUSPENSE_LIST_TYPE = hasSymbol ? Symbol.for('react.suspense_list') : 0xead8;
- var REACT_MEMO_TYPE = hasSymbol ? Symbol.for('react.memo') : 0xead3;
- var REACT_LAZY_TYPE = hasSymbol ? Symbol.for('react.lazy') : 0xead4;
- var REACT_BLOCK_TYPE = hasSymbol ? Symbol.for('react.block') : 0xead9;
- var MAYBE_ITERATOR_SYMBOL = typeof Symbol === 'function' && Symbol.iterator;
- var FAUX_ITERATOR_SYMBOL = '@@iterator';
- function getIteratorFn(maybeIterable) {
- if (maybeIterable === null || typeof maybeIterable !== 'object') {
- return null;
- }
- var maybeIterator = MAYBE_ITERATOR_SYMBOL && maybeIterable[MAYBE_ITERATOR_SYMBOL] || maybeIterable[FAUX_ITERATOR_SYMBOL];
- if (typeof maybeIterator === 'function') {
- return maybeIterator;
- }
- return null;
- }
- var Uninitialized = -1;
- var Pending = 0;
- var Resolved = 1;
- var Rejected = 2;
- function refineResolvedLazyComponent(lazyComponent) {
- return lazyComponent._status === Resolved ? lazyComponent._result : null;
- }
- function initializeLazyComponentType(lazyComponent) {
- if (lazyComponent._status === Uninitialized) {
- lazyComponent._status = Pending;
- var ctor = lazyComponent._ctor;
- var thenable = ctor();
- lazyComponent._result = thenable;
- thenable.then(function (moduleObject) {
- if (lazyComponent._status === Pending) {
- var defaultExport = moduleObject.default;
- {
- if (defaultExport === undefined) {
- error('lazy: Expected the result of a dynamic import() call. ' + 'Instead received: %s\n\nYour code should look like: \n ' + "const MyComponent = lazy(() => import('./MyComponent'))", moduleObject);
- }
- }
- lazyComponent._status = Resolved;
- lazyComponent._result = defaultExport;
- }
- }, function (error) {
- if (lazyComponent._status === Pending) {
- lazyComponent._status = Rejected;
- lazyComponent._result = error;
- }
- });
- }
- }
- function getWrappedName(outerType, innerType, wrapperName) {
- var functionName = innerType.displayName || innerType.name || '';
- return outerType.displayName || (functionName !== '' ? wrapperName + "(" + functionName + ")" : wrapperName);
- }
- function getComponentName(type) {
- if (type == null) {
- // Host root, text node or just invalid type.
- return null;
- }
- {
- if (typeof type.tag === 'number') {
- error('Received an unexpected object in getComponentName(). ' + 'This is likely a bug in React. Please file an issue.');
- }
- }
- if (typeof type === 'function') {
- return type.displayName || type.name || null;
- }
- if (typeof type === 'string') {
- return type;
- }
- switch (type) {
- case REACT_FRAGMENT_TYPE:
- return 'Fragment';
- case REACT_PORTAL_TYPE:
- return 'Portal';
- case REACT_PROFILER_TYPE:
- return "Profiler";
- case REACT_STRICT_MODE_TYPE:
- return 'StrictMode';
- case REACT_SUSPENSE_TYPE:
- return 'Suspense';
- case REACT_SUSPENSE_LIST_TYPE:
- return 'SuspenseList';
- }
- if (typeof type === 'object') {
- switch (type.$$typeof) {
- case REACT_CONTEXT_TYPE:
- return 'Context.Consumer';
- case REACT_PROVIDER_TYPE:
- return 'Context.Provider';
- case REACT_FORWARD_REF_TYPE:
- return getWrappedName(type, type.render, 'ForwardRef');
- case REACT_MEMO_TYPE:
- return getComponentName(type.type);
- case REACT_BLOCK_TYPE:
- return getComponentName(type.render);
- case REACT_LAZY_TYPE:
- {
- var thenable = type;
- var resolvedThenable = refineResolvedLazyComponent(thenable);
- if (resolvedThenable) {
- return getComponentName(resolvedThenable);
- }
- break;
- }
- }
- }
- return null;
- }
- var ReactDebugCurrentFrame$1 = ReactSharedInternals.ReactDebugCurrentFrame;
- function describeFiber(fiber) {
- switch (fiber.tag) {
- case HostRoot:
- case HostPortal:
- case HostText:
- case Fragment:
- case ContextProvider:
- case ContextConsumer:
- return '';
- default:
- var owner = fiber._debugOwner;
- var source = fiber._debugSource;
- var name = getComponentName(fiber.type);
- var ownerName = null;
- if (owner) {
- ownerName = getComponentName(owner.type);
- }
- return describeComponentFrame(name, source, ownerName);
- }
- }
- function getStackByFiberInDevAndProd(workInProgress) {
- var info = '';
- var node = workInProgress;
- do {
- info += describeFiber(node);
- node = node.return;
- } while (node);
- return info;
- }
- var current = null;
- var isRendering = false;
- function getCurrentFiberOwnerNameInDevOrNull() {
- {
- if (current === null) {
- return null;
- }
- var owner = current._debugOwner;
- if (owner !== null && typeof owner !== 'undefined') {
- return getComponentName(owner.type);
- }
- }
- return null;
- }
- function getCurrentFiberStackInDev() {
- {
- if (current === null) {
- return '';
- } // Safe because if current fiber exists, we are reconciling,
- // and it is guaranteed to be the work-in-progress version.
- return getStackByFiberInDevAndProd(current);
- }
- }
- function resetCurrentFiber() {
- {
- ReactDebugCurrentFrame$1.getCurrentStack = null;
- current = null;
- isRendering = false;
- }
- }
- function setCurrentFiber(fiber) {
- {
- ReactDebugCurrentFrame$1.getCurrentStack = getCurrentFiberStackInDev;
- current = fiber;
- isRendering = false;
- }
- }
- function setIsRendering(rendering) {
- {
- isRendering = rendering;
- }
- }
- // Flow does not allow string concatenation of most non-string types. To work
- // around this limitation, we use an opaque type that can only be obtained by
- // passing the value through getToStringValue first.
- function toString(value) {
- return '' + value;
- }
- function getToStringValue(value) {
- switch (typeof value) {
- case 'boolean':
- case 'number':
- case 'object':
- case 'string':
- case 'undefined':
- return value;
- default:
- // function, symbol are assigned as empty strings
- return '';
- }
- }
- var ReactDebugCurrentFrame$2 = null;
- var ReactControlledValuePropTypes = {
- checkPropTypes: null
- };
- {
- ReactDebugCurrentFrame$2 = ReactSharedInternals.ReactDebugCurrentFrame;
- var hasReadOnlyValue = {
- button: true,
- checkbox: true,
- image: true,
- hidden: true,
- radio: true,
- reset: true,
- submit: true
- };
- var propTypes = {
- value: function (props, propName, componentName) {
- if (hasReadOnlyValue[props.type] || props.onChange || props.readOnly || props.disabled || props[propName] == null || enableDeprecatedFlareAPI ) {
- return null;
- }
- return new Error('You provided a `value` prop to a form field without an ' + '`onChange` handler. This will render a read-only field. If ' + 'the field should be mutable use `defaultValue`. Otherwise, ' + 'set either `onChange` or `readOnly`.');
- },
- checked: function (props, propName, componentName) {
- if (props.onChange || props.readOnly || props.disabled || props[propName] == null || enableDeprecatedFlareAPI ) {
- return null;
- }
- return new Error('You provided a `checked` prop to a form field without an ' + '`onChange` handler. This will render a read-only field. If ' + 'the field should be mutable use `defaultChecked`. Otherwise, ' + 'set either `onChange` or `readOnly`.');
- }
- };
- /**
- * Provide a linked `value` attribute for controlled forms. You should not use
- * this outside of the ReactDOM controlled form components.
- */
- ReactControlledValuePropTypes.checkPropTypes = function (tagName, props) {
- checkPropTypes(propTypes, props, 'prop', tagName, ReactDebugCurrentFrame$2.getStackAddendum);
- };
- }
- function isCheckable(elem) {
- var type = elem.type;
- var nodeName = elem.nodeName;
- return nodeName && nodeName.toLowerCase() === 'input' && (type === 'checkbox' || type === 'radio');
- }
- function getTracker(node) {
- return node._valueTracker;
- }
- function detachTracker(node) {
- node._valueTracker = null;
- }
- function getValueFromNode(node) {
- var value = '';
- if (!node) {
- return value;
- }
- if (isCheckable(node)) {
- value = node.checked ? 'true' : 'false';
- } else {
- value = node.value;
- }
- return value;
- }
- function trackValueOnNode(node) {
- var valueField = isCheckable(node) ? 'checked' : 'value';
- var descriptor = Object.getOwnPropertyDescriptor(node.constructor.prototype, valueField);
- var currentValue = '' + node[valueField]; // if someone has already defined a value or Safari, then bail
- // and don't track value will cause over reporting of changes,
- // but it's better then a hard failure
- // (needed for certain tests that spyOn input values and Safari)
- if (node.hasOwnProperty(valueField) || typeof descriptor === 'undefined' || typeof descriptor.get !== 'function' || typeof descriptor.set !== 'function') {
- return;
- }
- var get = descriptor.get,
- set = descriptor.set;
- Object.defineProperty(node, valueField, {
- configurable: true,
- get: function () {
- return get.call(this);
- },
- set: function (value) {
- currentValue = '' + value;
- set.call(this, value);
- }
- }); // We could've passed this the first time
- // but it triggers a bug in IE11 and Edge 14/15.
- // Calling defineProperty() again should be equivalent.
- // https://github.com/facebook/react/issues/11768
- Object.defineProperty(node, valueField, {
- enumerable: descriptor.enumerable
- });
- var tracker = {
- getValue: function () {
- return currentValue;
- },
- setValue: function (value) {
- currentValue = '' + value;
- },
- stopTracking: function () {
- detachTracker(node);
- delete node[valueField];
- }
- };
- return tracker;
- }
- function track(node) {
- if (getTracker(node)) {
- return;
- } // TODO: Once it's just Fiber we can move this to node._wrapperState
- node._valueTracker = trackValueOnNode(node);
- }
- function updateValueIfChanged(node) {
- if (!node) {
- return false;
- }
- var tracker = getTracker(node); // if there is no tracker at this point it's unlikely
- // that trying again will succeed
- if (!tracker) {
- return true;
- }
- var lastValue = tracker.getValue();
- var nextValue = getValueFromNode(node);
- if (nextValue !== lastValue) {
- tracker.setValue(nextValue);
- return true;
- }
- return false;
- }
- var didWarnValueDefaultValue = false;
- var didWarnCheckedDefaultChecked = false;
- var didWarnControlledToUncontrolled = false;
- var didWarnUncontrolledToControlled = false;
- function isControlled(props) {
- var usesChecked = props.type === 'checkbox' || props.type === 'radio';
- return usesChecked ? props.checked != null : props.value != null;
- }
- /**
- * Implements an <input> host component that allows setting these optional
- * props: `checked`, `value`, `defaultChecked`, and `defaultValue`.
- *
- * If `checked` or `value` are not supplied (or null/undefined), user actions
- * that affect the checked state or value will trigger updates to the element.
- *
- * If they are supplied (and not null/undefined), the rendered element will not
- * trigger updates to the element. Instead, the props must change in order for
- * the rendered element to be updated.
- *
- * The rendered element will be initialized as unchecked (or `defaultChecked`)
- * with an empty value (or `defaultValue`).
- *
- * See http://www.w3.org/TR/2012/WD-html5-20121025/the-input-element.html
- */
- function getHostProps(element, props) {
- var node = element;
- var checked = props.checked;
- var hostProps = _assign({}, props, {
- defaultChecked: undefined,
- defaultValue: undefined,
- value: undefined,
- checked: checked != null ? checked : node._wrapperState.initialChecked
- });
- return hostProps;
- }
- function initWrapperState(element, props) {
- {
- ReactControlledValuePropTypes.checkPropTypes('input', props);
- if (props.checked !== undefined && props.defaultChecked !== undefined && !didWarnCheckedDefaultChecked) {
- error('%s contains an input of type %s with both checked and defaultChecked props. ' + 'Input elements must be either controlled or uncontrolled ' + '(specify either the checked prop, or the defaultChecked prop, but not ' + 'both). Decide between using a controlled or uncontrolled input ' + 'element and remove one of these props. More info: ' + 'https://fb.me/react-controlled-components', getCurrentFiberOwnerNameInDevOrNull() || 'A component', props.type);
- didWarnCheckedDefaultChecked = true;
- }
- if (props.value !== undefined && props.defaultValue !== undefined && !didWarnValueDefaultValue) {
- error('%s contains an input of type %s with both value and defaultValue props. ' + 'Input elements must be either controlled or uncontrolled ' + '(specify either the value prop, or the defaultValue prop, but not ' + 'both). Decide between using a controlled or uncontrolled input ' + 'element and remove one of these props. More info: ' + 'https://fb.me/react-controlled-components', getCurrentFiberOwnerNameInDevOrNull() || 'A component', props.type);
- didWarnValueDefaultValue = true;
- }
- }
- var node = element;
- var defaultValue = props.defaultValue == null ? '' : props.defaultValue;
- node._wrapperState = {
- initialChecked: props.checked != null ? props.checked : props.defaultChecked,
- initialValue: getToStringValue(props.value != null ? props.value : defaultValue),
- controlled: isControlled(props)
- };
- }
- function updateChecked(element, props) {
- var node = element;
- var checked = props.checked;
- if (checked != null) {
- setValueForProperty(node, 'checked', checked, false);
- }
- }
- function updateWrapper(element, props) {
- var node = element;
- {
- var controlled = isControlled(props);
- if (!node._wrapperState.controlled && controlled && !didWarnUncontrolledToControlled) {
- error('A component is changing an uncontrolled input of type %s to be controlled. ' + 'Input elements should not switch from uncontrolled to controlled (or vice versa). ' + 'Decide between using a controlled or uncontrolled input ' + 'element for the lifetime of the component. More info: https://fb.me/react-controlled-components', props.type);
- didWarnUncontrolledToControlled = true;
- }
- if (node._wrapperState.controlled && !controlled && !didWarnControlledToUncontrolled) {
- error('A component is changing a controlled input of type %s to be uncontrolled. ' + 'Input elements should not switch from controlled to uncontrolled (or vice versa). ' + 'Decide between using a controlled or uncontrolled input ' + 'element for the lifetime of the component. More info: https://fb.me/react-controlled-components', props.type);
- didWarnControlledToUncontrolled = true;
- }
- }
- updateChecked(element, props);
- var value = getToStringValue(props.value);
- var type = props.type;
- if (value != null) {
- if (type === 'number') {
- if (value === 0 && node.value === '' || // We explicitly want to coerce to number here if possible.
- // eslint-disable-next-line
- node.value != value) {
- node.value = toString(value);
- }
- } else if (node.value !== toString(value)) {
- node.value = toString(value);
- }
- } else if (type === 'submit' || type === 'reset') {
- // Submit/reset inputs need the attribute removed completely to avoid
- // blank-text buttons.
- node.removeAttribute('value');
- return;
- }
- {
- // When syncing the value attribute, the value comes from a cascade of
- // properties:
- // 1. The value React property
- // 2. The defaultValue React property
- // 3. Otherwise there should be no change
- if (props.hasOwnProperty('value')) {
- setDefaultValue(node, props.type, value);
- } else if (props.hasOwnProperty('defaultValue')) {
- setDefaultValue(node, props.type, getToStringValue(props.defaultValue));
- }
- }
- {
- // When syncing the checked attribute, it only changes when it needs
- // to be removed, such as transitioning from a checkbox into a text input
- if (props.checked == null && props.defaultChecked != null) {
- node.defaultChecked = !!props.defaultChecked;
- }
- }
- }
- function postMountWrapper(element, props, isHydrating) {
- var node = element; // Do not assign value if it is already set. This prevents user text input
- // from being lost during SSR hydration.
- if (props.hasOwnProperty('value') || props.hasOwnProperty('defaultValue')) {
- var type = props.type;
- var isButton = type === 'submit' || type === 'reset'; // Avoid setting value attribute on submit/reset inputs as it overrides the
- // default value provided by the browser. See: #12872
- if (isButton && (props.value === undefined || props.value === null)) {
- return;
- }
- var initialValue = toString(node._wrapperState.initialValue); // Do not assign value if it is already set. This prevents user text input
- // from being lost during SSR hydration.
- if (!isHydrating) {
- {
- // When syncing the value attribute, the value property should use
- // the wrapperState._initialValue property. This uses:
- //
- // 1. The value React property when present
- // 2. The defaultValue React property when present
- // 3. An empty string
- if (initialValue !== node.value) {
- node.value = initialValue;
- }
- }
- }
- {
- // Otherwise, the value attribute is synchronized to the property,
- // so we assign defaultValue to the same thing as the value property
- // assignment step above.
- node.defaultValue = initialValue;
- }
- } // Normally, we'd just do `node.checked = node.checked` upon initial mount, less this bug
- // this is needed to work around a chrome bug where setting defaultChecked
- // will sometimes influence the value of checked (even after detachment).
- // Reference: https://bugs.chromium.org/p/chromium/issues/detail?id=608416
- // We need to temporarily unset name to avoid disrupting radio button groups.
- var name = node.name;
- if (name !== '') {
- node.name = '';
- }
- {
- // When syncing the checked attribute, both the checked property and
- // attribute are assigned at the same time using defaultChecked. This uses:
- //
- // 1. The checked React property when present
- // 2. The defaultChecked React property when present
- // 3. Otherwise, false
- node.defaultChecked = !node.defaultChecked;
- node.defaultChecked = !!node._wrapperState.initialChecked;
- }
- if (name !== '') {
- node.name = name;
- }
- }
- function restoreControlledState(element, props) {
- var node = element;
- updateWrapper(node, props);
- updateNamedCousins(node, props);
- }
- function updateNamedCousins(rootNode, props) {
- var name = props.name;
- if (props.type === 'radio' && name != null) {
- var queryRoot = rootNode;
- while (queryRoot.parentNode) {
- queryRoot = queryRoot.parentNode;
- } // If `rootNode.form` was non-null, then we could try `form.elements`,
- // but that sometimes behaves strangely in IE8. We could also try using
- // `form.getElementsByName`, but that will only return direct children
- // and won't include inputs that use the HTML5 `form=` attribute. Since
- // the input might not even be in a form. It might not even be in the
- // document. Let's just use the local `querySelectorAll` to ensure we don't
- // miss anything.
- var group = queryRoot.querySelectorAll('input[name=' + JSON.stringify('' + name) + '][type="radio"]');
- for (var i = 0; i < group.length; i++) {
- var otherNode = group[i];
- if (otherNode === rootNode || otherNode.form !== rootNode.form) {
- continue;
- } // This will throw if radio buttons rendered by different copies of React
- // and the same name are rendered into the same form (same as #1939).
- // That's probably okay; we don't support it just as we don't support
- // mixing React radio buttons with non-React ones.
- var otherProps = getFiberCurrentPropsFromNode$1(otherNode);
- if (!otherProps) {
- {
- throw Error( "ReactDOMInput: Mixing React and non-React radio inputs with the same `name` is not supported." );
- }
- } // We need update the tracked value on the named cousin since the value
- // was changed but the input saw no event or value set
- updateValueIfChanged(otherNode); // If this is a controlled radio button group, forcing the input that
- // was previously checked to update will cause it to be come re-checked
- // as appropriate.
- updateWrapper(otherNode, otherProps);
- }
- }
- } // In Chrome, assigning defaultValue to certain input types triggers input validation.
- // For number inputs, the display value loses trailing decimal points. For email inputs,
- // Chrome raises "The specified value <x> is not a valid email address".
- //
- // Here we check to see if the defaultValue has actually changed, avoiding these problems
- // when the user is inputting text
- //
- // https://github.com/facebook/react/issues/7253
- function setDefaultValue(node, type, value) {
- if ( // Focused number inputs synchronize on blur. See ChangeEventPlugin.js
- type !== 'number' || node.ownerDocument.activeElement !== node) {
- if (value == null) {
- node.defaultValue = toString(node._wrapperState.initialValue);
- } else if (node.defaultValue !== toString(value)) {
- node.defaultValue = toString(value);
- }
- }
- }
- var didWarnSelectedSetOnOption = false;
- var didWarnInvalidChild = false;
- function flattenChildren(children) {
- var content = ''; // Flatten children. We'll warn if they are invalid
- // during validateProps() which runs for hydration too.
- // Note that this would throw on non-element objects.
- // Elements are stringified (which is normally irrelevant
- // but matters for <fbt>).
- React.Children.forEach(children, function (child) {
- if (child == null) {
- return;
- }
- content += child; // Note: we don't warn about invalid children here.
- // Instead, this is done separately below so that
- // it happens during the hydration codepath too.
- });
- return content;
- }
- /**
- * Implements an <option> host component that warns when `selected` is set.
- */
- function validateProps(element, props) {
- {
- // This mirrors the codepath above, but runs for hydration too.
- // Warn about invalid children here so that client and hydration are consistent.
- // TODO: this seems like it could cause a DEV-only throw for hydration
- // if children contains a non-element object. We should try to avoid that.
- if (typeof props.children === 'object' && props.children !== null) {
- React.Children.forEach(props.children, function (child) {
- if (child == null) {
- return;
- }
- if (typeof child === 'string' || typeof child === 'number') {
- return;
- }
- if (typeof child.type !== 'string') {
- return;
- }
- if (!didWarnInvalidChild) {
- didWarnInvalidChild = true;
- error('Only strings and numbers are supported as <option> children.');
- }
- });
- } // TODO: Remove support for `selected` in <option>.
- if (props.selected != null && !didWarnSelectedSetOnOption) {
- error('Use the `defaultValue` or `value` props on <select> instead of ' + 'setting `selected` on <option>.');
- didWarnSelectedSetOnOption = true;
- }
- }
- }
- function postMountWrapper$1(element, props) {
- // value="" should make a value attribute (#6219)
- if (props.value != null) {
- element.setAttribute('value', toString(getToStringValue(props.value)));
- }
- }
- function getHostProps$1(element, props) {
- var hostProps = _assign({
- children: undefined
- }, props);
- var content = flattenChildren(props.children);
- if (content) {
- hostProps.children = content;
- }
- return hostProps;
- }
- var didWarnValueDefaultValue$1;
- {
- didWarnValueDefaultValue$1 = false;
- }
- function getDeclarationErrorAddendum() {
- var ownerName = getCurrentFiberOwnerNameInDevOrNull();
- if (ownerName) {
- return '\n\nCheck the render method of `' + ownerName + '`.';
- }
- return '';
- }
- var valuePropNames = ['value', 'defaultValue'];
- /**
- * Validation function for `value` and `defaultValue`.
- */
- function checkSelectPropTypes(props) {
- {
- ReactControlledValuePropTypes.checkPropTypes('select', props);
- for (var i = 0; i < valuePropNames.length; i++) {
- var propName = valuePropNames[i];
- if (props[propName] == null) {
- continue;
- }
- var isArray = Array.isArray(props[propName]);
- if (props.multiple && !isArray) {
- error('The `%s` prop supplied to <select> must be an array if ' + '`multiple` is true.%s', propName, getDeclarationErrorAddendum());
- } else if (!props.multiple && isArray) {
- error('The `%s` prop supplied to <select> must be a scalar ' + 'value if `multiple` is false.%s', propName, getDeclarationErrorAddendum());
- }
- }
- }
- }
- function updateOptions(node, multiple, propValue, setDefaultSelected) {
- var options = node.options;
- if (multiple) {
- var selectedValues = propValue;
- var selectedValue = {};
- for (var i = 0; i < selectedValues.length; i++) {
- // Prefix to avoid chaos with special keys.
- selectedValue['$' + selectedValues[i]] = true;
- }
- for (var _i = 0; _i < options.length; _i++) {
- var selected = selectedValue.hasOwnProperty('$' + options[_i].value);
- if (options[_i].selected !== selected) {
- options[_i].selected = selected;
- }
- if (selected && setDefaultSelected) {
- options[_i].defaultSelected = true;
- }
- }
- } else {
- // Do not set `select.value` as exact behavior isn't consistent across all
- // browsers for all cases.
- var _selectedValue = toString(getToStringValue(propValue));
- var defaultSelected = null;
- for (var _i2 = 0; _i2 < options.length; _i2++) {
- if (options[_i2].value === _selectedValue) {
- options[_i2].selected = true;
- if (setDefaultSelected) {
- options[_i2].defaultSelected = true;
- }
- return;
- }
- if (defaultSelected === null && !options[_i2].disabled) {
- defaultSelected = options[_i2];
- }
- }
- if (defaultSelected !== null) {
- defaultSelected.selected = true;
- }
- }
- }
- /**
- * Implements a <select> host component that allows optionally setting the
- * props `value` and `defaultValue`. If `multiple` is false, the prop must be a
- * stringable. If `multiple` is true, the prop must be an array of stringables.
- *
- * If `value` is not supplied (or null/undefined), user actions that change the
- * selected option will trigger updates to the rendered options.
- *
- * If it is supplied (and not null/undefined), the rendered options will not
- * update in response to user actions. Instead, the `value` prop must change in
- * order for the rendered options to update.
- *
- * If `defaultValue` is provided, any options with the supplied values will be
- * selected.
- */
- function getHostProps$2(element, props) {
- return _assign({}, props, {
- value: undefined
- });
- }
- function initWrapperState$1(element, props) {
- var node = element;
- {
- checkSelectPropTypes(props);
- }
- node._wrapperState = {
- wasMultiple: !!props.multiple
- };
- {
- if (props.value !== undefined && props.defaultValue !== undefined && !didWarnValueDefaultValue$1) {
- error('Select elements must be either controlled or uncontrolled ' + '(specify either the value prop, or the defaultValue prop, but not ' + 'both). Decide between using a controlled or uncontrolled select ' + 'element and remove one of these props. More info: ' + 'https://fb.me/react-controlled-components');
- didWarnValueDefaultValue$1 = true;
- }
- }
- }
- function postMountWrapper$2(element, props) {
- var node = element;
- node.multiple = !!props.multiple;
- var value = props.value;
- if (value != null) {
- updateOptions(node, !!props.multiple, value, false);
- } else if (props.defaultValue != null) {
- updateOptions(node, !!props.multiple, props.defaultValue, true);
- }
- }
- function postUpdateWrapper(element, props) {
- var node = element;
- var wasMultiple = node._wrapperState.wasMultiple;
- node._wrapperState.wasMultiple = !!props.multiple;
- var value = props.value;
- if (value != null) {
- updateOptions(node, !!props.multiple, value, false);
- } else if (wasMultiple !== !!props.multiple) {
- // For simplicity, reapply `defaultValue` if `multiple` is toggled.
- if (props.defaultValue != null) {
- updateOptions(node, !!props.multiple, props.defaultValue, true);
- } else {
- // Revert the select back to its default unselected state.
- updateOptions(node, !!props.multiple, props.multiple ? [] : '', false);
- }
- }
- }
- function restoreControlledState$1(element, props) {
- var node = element;
- var value = props.value;
- if (value != null) {
- updateOptions(node, !!props.multiple, value, false);
- }
- }
- var didWarnValDefaultVal = false;
- /**
- * Implements a <textarea> host component that allows setting `value`, and
- * `defaultValue`. This differs from the traditional DOM API because value is
- * usually set as PCDATA children.
- *
- * If `value` is not supplied (or null/undefined), user actions that affect the
- * value will trigger updates to the element.
- *
- * If `value` is supplied (and not null/undefined), the rendered element will
- * not trigger updates to the element. Instead, the `value` prop must change in
- * order for the rendered element to be updated.
- *
- * The rendered element will be initialized with an empty value, the prop
- * `defaultValue` if specified, or the children content (deprecated).
- */
- function getHostProps$3(element, props) {
- var node = element;
- if (!(props.dangerouslySetInnerHTML == null)) {
- {
- throw Error( "`dangerouslySetInnerHTML` does not make sense on <textarea>." );
- }
- } // Always set children to the same thing. In IE9, the selection range will
- // get reset if `textContent` is mutated. We could add a check in setTextContent
- // to only set the value if/when the value differs from the node value (which would
- // completely solve this IE9 bug), but Sebastian+Sophie seemed to like this
- // solution. The value can be a boolean or object so that's why it's forced
- // to be a string.
- var hostProps = _assign({}, props, {
- value: undefined,
- defaultValue: undefined,
- children: toString(node._wrapperState.initialValue)
- });
- return hostProps;
- }
- function initWrapperState$2(element, props) {
- var node = element;
- {
- ReactControlledValuePropTypes.checkPropTypes('textarea', props);
- if (props.value !== undefined && props.defaultValue !== undefined && !didWarnValDefaultVal) {
- error('%s contains a textarea with both value and defaultValue props. ' + 'Textarea elements must be either controlled or uncontrolled ' + '(specify either the value prop, or the defaultValue prop, but not ' + 'both). Decide between using a controlled or uncontrolled textarea ' + 'and remove one of these props. More info: ' + 'https://fb.me/react-controlled-components', getCurrentFiberOwnerNameInDevOrNull() || 'A component');
- didWarnValDefaultVal = true;
- }
- }
- var initialValue = props.value; // Only bother fetching default value if we're going to use it
- if (initialValue == null) {
- var children = props.children,
- defaultValue = props.defaultValue;
- if (children != null) {
- {
- error('Use the `defaultValue` or `value` props instead of setting ' + 'children on <textarea>.');
- }
- {
- if (!(defaultValue == null)) {
- {
- throw Error( "If you supply `defaultValue` on a <textarea>, do not pass children." );
- }
- }
- if (Array.isArray(children)) {
- if (!(children.length <= 1)) {
- {
- throw Error( "<textarea> can only have at most one child." );
- }
- }
- children = children[0];
- }
- defaultValue = children;
- }
- }
- if (defaultValue == null) {
- defaultValue = '';
- }
- initialValue = defaultValue;
- }
- node._wrapperState = {
- initialValue: getToStringValue(initialValue)
- };
- }
- function updateWrapper$1(element, props) {
- var node = element;
- var value = getToStringValue(props.value);
- var defaultValue = getToStringValue(props.defaultValue);
- if (value != null) {
- // Cast `value` to a string to ensure the value is set correctly. While
- // browsers typically do this as necessary, jsdom doesn't.
- var newValue = toString(value); // To avoid side effects (such as losing text selection), only set value if changed
- if (newValue !== node.value) {
- node.value = newValue;
- }
- if (props.defaultValue == null && node.defaultValue !== newValue) {
- node.defaultValue = newValue;
- }
- }
- if (defaultValue != null) {
- node.defaultValue = toString(defaultValue);
- }
- }
- function postMountWrapper$3(element, props) {
- var node = element; // This is in postMount because we need access to the DOM node, which is not
- // available until after the component has mounted.
- var textContent = node.textContent; // Only set node.value if textContent is equal to the expected
- // initial value. In IE10/IE11 there is a bug where the placeholder attribute
- // will populate textContent as well.
- // https://developer.microsoft.com/microsoft-edge/platform/issues/101525/
- if (textContent === node._wrapperState.initialValue) {
- if (textContent !== '' && textContent !== null) {
- node.value = textContent;
- }
- }
- }
- function restoreControlledState$2(element, props) {
- // DOM component is still mounted; update
- updateWrapper$1(element, props);
- }
- var HTML_NAMESPACE = 'http://www.w3.org/1999/xhtml';
- var MATH_NAMESPACE = 'http://www.w3.org/1998/Math/MathML';
- var SVG_NAMESPACE = 'http://www.w3.org/2000/svg';
- var Namespaces = {
- html: HTML_NAMESPACE,
- mathml: MATH_NAMESPACE,
- svg: SVG_NAMESPACE
- }; // Assumes there is no parent namespace.
- function getIntrinsicNamespace(type) {
- switch (type) {
- case 'svg':
- return SVG_NAMESPACE;
- case 'math':
- return MATH_NAMESPACE;
- default:
- return HTML_NAMESPACE;
- }
- }
- function getChildNamespace(parentNamespace, type) {
- if (parentNamespace == null || parentNamespace === HTML_NAMESPACE) {
- // No (or default) parent namespace: potential entry point.
- return getIntrinsicNamespace(type);
- }
- if (parentNamespace === SVG_NAMESPACE && type === 'foreignObject') {
- // We're leaving SVG.
- return HTML_NAMESPACE;
- } // By default, pass namespace below.
- return parentNamespace;
- }
- /* globals MSApp */
- /**
- * Create a function which has 'unsafe' privileges (required by windows8 apps)
- */
- var createMicrosoftUnsafeLocalFunction = function (func) {
- if (typeof MSApp !== 'undefined' && MSApp.execUnsafeLocalFunction) {
- return function (arg0, arg1, arg2, arg3) {
- MSApp.execUnsafeLocalFunction(function () {
- return func(arg0, arg1, arg2, arg3);
- });
- };
- } else {
- return func;
- }
- };
- var reusableSVGContainer;
- /**
- * Set the innerHTML property of a node
- *
- * @param {DOMElement} node
- * @param {string} html
- * @internal
- */
- var setInnerHTML = createMicrosoftUnsafeLocalFunction(function (node, html) {
- if (node.namespaceURI === Namespaces.svg) {
- if (!('innerHTML' in node)) {
- // IE does not have innerHTML for SVG nodes, so instead we inject the
- // new markup in a temp node and then move the child nodes across into
- // the target node
- reusableSVGContainer = reusableSVGContainer || document.createElement('div');
- reusableSVGContainer.innerHTML = '<svg>' + html.valueOf().toString() + '</svg>';
- var svgNode = reusableSVGContainer.firstChild;
- while (node.firstChild) {
- node.removeChild(node.firstChild);
- }
- while (svgNode.firstChild) {
- node.appendChild(svgNode.firstChild);
- }
- return;
- }
- }
- node.innerHTML = html;
- });
- /**
- * HTML nodeType values that represent the type of the node
- */
- var ELEMENT_NODE = 1;
- var TEXT_NODE = 3;
- var COMMENT_NODE = 8;
- var DOCUMENT_NODE = 9;
- var DOCUMENT_FRAGMENT_NODE = 11;
- /**
- * Set the textContent property of a node. For text updates, it's faster
- * to set the `nodeValue` of the Text node directly instead of using
- * `.textContent` which will remove the existing node and create a new one.
- *
- * @param {DOMElement} node
- * @param {string} text
- * @internal
- */
- var setTextContent = function (node, text) {
- if (text) {
- var firstChild = node.firstChild;
- if (firstChild && firstChild === node.lastChild && firstChild.nodeType === TEXT_NODE) {
- firstChild.nodeValue = text;
- return;
- }
- }
- node.textContent = text;
- };
- // Do not use the below two methods directly!
- // Instead use constants exported from DOMTopLevelEventTypes in ReactDOM.
- // (It is the only module that is allowed to access these methods.)
- function unsafeCastStringToDOMTopLevelType(topLevelType) {
- return topLevelType;
- }
- function unsafeCastDOMTopLevelTypeToString(topLevelType) {
- return topLevelType;
- }
- /**
- * Generate a mapping of standard vendor prefixes using the defined style property and event name.
- *
- * @param {string} styleProp
- * @param {string} eventName
- * @returns {object}
- */
- function makePrefixMap(styleProp, eventName) {
- var prefixes = {};
- prefixes[styleProp.toLowerCase()] = eventName.toLowerCase();
- prefixes['Webkit' + styleProp] = 'webkit' + eventName;
- prefixes['Moz' + styleProp] = 'moz' + eventName;
- return prefixes;
- }
- /**
- * A list of event names to a configurable list of vendor prefixes.
- */
- var vendorPrefixes = {
- animationend: makePrefixMap('Animation', 'AnimationEnd'),
- animationiteration: makePrefixMap('Animation', 'AnimationIteration'),
- animationstart: makePrefixMap('Animation', 'AnimationStart'),
- transitionend: makePrefixMap('Transition', 'TransitionEnd')
- };
- /**
- * Event names that have already been detected and prefixed (if applicable).
- */
- var prefixedEventNames = {};
- /**
- * Element to check for prefixes on.
- */
- var style = {};
- /**
- * Bootstrap if a DOM exists.
- */
- if (canUseDOM) {
- style = document.createElement('div').style; // On some platforms, in particular some releases of Android 4.x,
- // the un-prefixed "animation" and "transition" properties are defined on the
- // style object but the events that fire will still be prefixed, so we need
- // to check if the un-prefixed events are usable, and if not remove them from the map.
- if (!('AnimationEvent' in window)) {
- delete vendorPrefixes.animationend.animation;
- delete vendorPrefixes.animationiteration.animation;
- delete vendorPrefixes.animationstart.animation;
- } // Same as above
- if (!('TransitionEvent' in window)) {
- delete vendorPrefixes.transitionend.transition;
- }
- }
- /**
- * Attempts to determine the correct vendor prefixed event name.
- *
- * @param {string} eventName
- * @returns {string}
- */
- function getVendorPrefixedEventName(eventName) {
- if (prefixedEventNames[eventName]) {
- return prefixedEventNames[eventName];
- } else if (!vendorPrefixes[eventName]) {
- return eventName;
- }
- var prefixMap = vendorPrefixes[eventName];
- for (var styleProp in prefixMap) {
- if (prefixMap.hasOwnProperty(styleProp) && styleProp in style) {
- return prefixedEventNames[eventName] = prefixMap[styleProp];
- }
- }
- return eventName;
- }
- /**
- * To identify top level events in ReactDOM, we use constants defined by this
- * module. This is the only module that uses the unsafe* methods to express
- * that the constants actually correspond to the browser event names. This lets
- * us save some bundle size by avoiding a top level type -> event name map.
- * The rest of ReactDOM code should import top level types from this file.
- */
- var TOP_ABORT = unsafeCastStringToDOMTopLevelType('abort');
- var TOP_ANIMATION_END = unsafeCastStringToDOMTopLevelType(getVendorPrefixedEventName('animationend'));
- var TOP_ANIMATION_ITERATION = unsafeCastStringToDOMTopLevelType(getVendorPrefixedEventName('animationiteration'));
- var TOP_ANIMATION_START = unsafeCastStringToDOMTopLevelType(getVendorPrefixedEventName('animationstart'));
- var TOP_BLUR = unsafeCastStringToDOMTopLevelType('blur');
- var TOP_CAN_PLAY = unsafeCastStringToDOMTopLevelType('canplay');
- var TOP_CAN_PLAY_THROUGH = unsafeCastStringToDOMTopLevelType('canplaythrough');
- var TOP_CANCEL = unsafeCastStringToDOMTopLevelType('cancel');
- var TOP_CHANGE = unsafeCastStringToDOMTopLevelType('change');
- var TOP_CLICK = unsafeCastStringToDOMTopLevelType('click');
- var TOP_CLOSE = unsafeCastStringToDOMTopLevelType('close');
- var TOP_COMPOSITION_END = unsafeCastStringToDOMTopLevelType('compositionend');
- var TOP_COMPOSITION_START = unsafeCastStringToDOMTopLevelType('compositionstart');
- var TOP_COMPOSITION_UPDATE = unsafeCastStringToDOMTopLevelType('compositionupdate');
- var TOP_CONTEXT_MENU = unsafeCastStringToDOMTopLevelType('contextmenu');
- var TOP_COPY = unsafeCastStringToDOMTopLevelType('copy');
- var TOP_CUT = unsafeCastStringToDOMTopLevelType('cut');
- var TOP_DOUBLE_CLICK = unsafeCastStringToDOMTopLevelType('dblclick');
- var TOP_AUX_CLICK = unsafeCastStringToDOMTopLevelType('auxclick');
- var TOP_DRAG = unsafeCastStringToDOMTopLevelType('drag');
- var TOP_DRAG_END = unsafeCastStringToDOMTopLevelType('dragend');
- var TOP_DRAG_ENTER = unsafeCastStringToDOMTopLevelType('dragenter');
- var TOP_DRAG_EXIT = unsafeCastStringToDOMTopLevelType('dragexit');
- var TOP_DRAG_LEAVE = unsafeCastStringToDOMTopLevelType('dragleave');
- var TOP_DRAG_OVER = unsafeCastStringToDOMTopLevelType('dragover');
- var TOP_DRAG_START = unsafeCastStringToDOMTopLevelType('dragstart');
- var TOP_DROP = unsafeCastStringToDOMTopLevelType('drop');
- var TOP_DURATION_CHANGE = unsafeCastStringToDOMTopLevelType('durationchange');
- var TOP_EMPTIED = unsafeCastStringToDOMTopLevelType('emptied');
- var TOP_ENCRYPTED = unsafeCastStringToDOMTopLevelType('encrypted');
- var TOP_ENDED = unsafeCastStringToDOMTopLevelType('ended');
- var TOP_ERROR = unsafeCastStringToDOMTopLevelType('error');
- var TOP_FOCUS = unsafeCastStringToDOMTopLevelType('focus');
- var TOP_GOT_POINTER_CAPTURE = unsafeCastStringToDOMTopLevelType('gotpointercapture');
- var TOP_INPUT = unsafeCastStringToDOMTopLevelType('input');
- var TOP_INVALID = unsafeCastStringToDOMTopLevelType('invalid');
- var TOP_KEY_DOWN = unsafeCastStringToDOMTopLevelType('keydown');
- var TOP_KEY_PRESS = unsafeCastStringToDOMTopLevelType('keypress');
- var TOP_KEY_UP = unsafeCastStringToDOMTopLevelType('keyup');
- var TOP_LOAD = unsafeCastStringToDOMTopLevelType('load');
- var TOP_LOAD_START = unsafeCastStringToDOMTopLevelType('loadstart');
- var TOP_LOADED_DATA = unsafeCastStringToDOMTopLevelType('loadeddata');
- var TOP_LOADED_METADATA = unsafeCastStringToDOMTopLevelType('loadedmetadata');
- var TOP_LOST_POINTER_CAPTURE = unsafeCastStringToDOMTopLevelType('lostpointercapture');
- var TOP_MOUSE_DOWN = unsafeCastStringToDOMTopLevelType('mousedown');
- var TOP_MOUSE_MOVE = unsafeCastStringToDOMTopLevelType('mousemove');
- var TOP_MOUSE_OUT = unsafeCastStringToDOMTopLevelType('mouseout');
- var TOP_MOUSE_OVER = unsafeCastStringToDOMTopLevelType('mouseover');
- var TOP_MOUSE_UP = unsafeCastStringToDOMTopLevelType('mouseup');
- var TOP_PASTE = unsafeCastStringToDOMTopLevelType('paste');
- var TOP_PAUSE = unsafeCastStringToDOMTopLevelType('pause');
- var TOP_PLAY = unsafeCastStringToDOMTopLevelType('play');
- var TOP_PLAYING = unsafeCastStringToDOMTopLevelType('playing');
- var TOP_POINTER_CANCEL = unsafeCastStringToDOMTopLevelType('pointercancel');
- var TOP_POINTER_DOWN = unsafeCastStringToDOMTopLevelType('pointerdown');
- var TOP_POINTER_MOVE = unsafeCastStringToDOMTopLevelType('pointermove');
- var TOP_POINTER_OUT = unsafeCastStringToDOMTopLevelType('pointerout');
- var TOP_POINTER_OVER = unsafeCastStringToDOMTopLevelType('pointerover');
- var TOP_POINTER_UP = unsafeCastStringToDOMTopLevelType('pointerup');
- var TOP_PROGRESS = unsafeCastStringToDOMTopLevelType('progress');
- var TOP_RATE_CHANGE = unsafeCastStringToDOMTopLevelType('ratechange');
- var TOP_RESET = unsafeCastStringToDOMTopLevelType('reset');
- var TOP_SCROLL = unsafeCastStringToDOMTopLevelType('scroll');
- var TOP_SEEKED = unsafeCastStringToDOMTopLevelType('seeked');
- var TOP_SEEKING = unsafeCastStringToDOMTopLevelType('seeking');
- var TOP_SELECTION_CHANGE = unsafeCastStringToDOMTopLevelType('selectionchange');
- var TOP_STALLED = unsafeCastStringToDOMTopLevelType('stalled');
- var TOP_SUBMIT = unsafeCastStringToDOMTopLevelType('submit');
- var TOP_SUSPEND = unsafeCastStringToDOMTopLevelType('suspend');
- var TOP_TEXT_INPUT = unsafeCastStringToDOMTopLevelType('textInput');
- var TOP_TIME_UPDATE = unsafeCastStringToDOMTopLevelType('timeupdate');
- var TOP_TOGGLE = unsafeCastStringToDOMTopLevelType('toggle');
- var TOP_TOUCH_CANCEL = unsafeCastStringToDOMTopLevelType('touchcancel');
- var TOP_TOUCH_END = unsafeCastStringToDOMTopLevelType('touchend');
- var TOP_TOUCH_MOVE = unsafeCastStringToDOMTopLevelType('touchmove');
- var TOP_TOUCH_START = unsafeCastStringToDOMTopLevelType('touchstart');
- var TOP_TRANSITION_END = unsafeCastStringToDOMTopLevelType(getVendorPrefixedEventName('transitionend'));
- var TOP_VOLUME_CHANGE = unsafeCastStringToDOMTopLevelType('volumechange');
- var TOP_WAITING = unsafeCastStringToDOMTopLevelType('waiting');
- var TOP_WHEEL = unsafeCastStringToDOMTopLevelType('wheel'); // List of events that need to be individually attached to media elements.
- // Note that events in this list will *not* be listened to at the top level
- // unless they're explicitly whitelisted in `ReactBrowserEventEmitter.listenTo`.
- var mediaEventTypes = [TOP_ABORT, TOP_CAN_PLAY, TOP_CAN_PLAY_THROUGH, TOP_DURATION_CHANGE, TOP_EMPTIED, TOP_ENCRYPTED, TOP_ENDED, TOP_ERROR, TOP_LOADED_DATA, TOP_LOADED_METADATA, TOP_LOAD_START, TOP_PAUSE, TOP_PLAY, TOP_PLAYING, TOP_PROGRESS, TOP_RATE_CHANGE, TOP_SEEKED, TOP_SEEKING, TOP_STALLED, TOP_SUSPEND, TOP_TIME_UPDATE, TOP_VOLUME_CHANGE, TOP_WAITING];
- function getRawEventName(topLevelType) {
- return unsafeCastDOMTopLevelTypeToString(topLevelType);
- }
- var PossiblyWeakMap = typeof WeakMap === 'function' ? WeakMap : Map; // prettier-ignore
- var elementListenerMap = new PossiblyWeakMap();
- function getListenerMapForElement(element) {
- var listenerMap = elementListenerMap.get(element);
- if (listenerMap === undefined) {
- listenerMap = new Map();
- elementListenerMap.set(element, listenerMap);
- }
- return listenerMap;
- }
- /**
- * `ReactInstanceMap` maintains a mapping from a public facing stateful
- * instance (key) and the internal representation (value). This allows public
- * methods to accept the user facing instance as an argument and map them back
- * to internal methods.
- *
- * Note that this module is currently shared and assumed to be stateless.
- * If this becomes an actual Map, that will break.
- */
- function get(key) {
- return key._reactInternalFiber;
- }
- function has(key) {
- return key._reactInternalFiber !== undefined;
- }
- function set(key, value) {
- key._reactInternalFiber = value;
- }
- // Don't change these two values. They're used by React Dev Tools.
- var NoEffect =
- /* */
- 0;
- var PerformedWork =
- /* */
- 1; // You can change the rest (and add more).
- var Placement =
- /* */
- 2;
- var Update =
- /* */
- 4;
- var PlacementAndUpdate =
- /* */
- 6;
- var Deletion =
- /* */
- 8;
- var ContentReset =
- /* */
- 16;
- var Callback =
- /* */
- 32;
- var DidCapture =
- /* */
- 64;
- var Ref =
- /* */
- 128;
- var Snapshot =
- /* */
- 256;
- var Passive =
- /* */
- 512;
- var Hydrating =
- /* */
- 1024;
- var HydratingAndUpdate =
- /* */
- 1028; // Passive & Update & Callback & Ref & Snapshot
- var LifecycleEffectMask =
- /* */
- 932; // Union of all host effects
- var HostEffectMask =
- /* */
- 2047;
- var Incomplete =
- /* */
- 2048;
- var ShouldCapture =
- /* */
- 4096;
- var ReactCurrentOwner = ReactSharedInternals.ReactCurrentOwner;
- function getNearestMountedFiber(fiber) {
- var node = fiber;
- var nearestMounted = fiber;
- if (!fiber.alternate) {
- // If there is no alternate, this might be a new tree that isn't inserted
- // yet. If it is, then it will have a pending insertion effect on it.
- var nextNode = node;
- do {
- node = nextNode;
- if ((node.effectTag & (Placement | Hydrating)) !== NoEffect) {
- // This is an insertion or in-progress hydration. The nearest possible
- // mounted fiber is the parent but we need to continue to figure out
- // if that one is still mounted.
- nearestMounted = node.return;
- }
- nextNode = node.return;
- } while (nextNode);
- } else {
- while (node.return) {
- node = node.return;
- }
- }
- if (node.tag === HostRoot) {
- // TODO: Check if this was a nested HostRoot when used with
- // renderContainerIntoSubtree.
- return nearestMounted;
- } // If we didn't hit the root, that means that we're in an disconnected tree
- // that has been unmounted.
- return null;
- }
- function getSuspenseInstanceFromFiber(fiber) {
- if (fiber.tag === SuspenseComponent) {
- var suspenseState = fiber.memoizedState;
- if (suspenseState === null) {
- var current = fiber.alternate;
- if (current !== null) {
- suspenseState = current.memoizedState;
- }
- }
- if (suspenseState !== null) {
- return suspenseState.dehydrated;
- }
- }
- return null;
- }
- function getContainerFromFiber(fiber) {
- return fiber.tag === HostRoot ? fiber.stateNode.containerInfo : null;
- }
- function isFiberMounted(fiber) {
- return getNearestMountedFiber(fiber) === fiber;
- }
- function isMounted(component) {
- {
- var owner = ReactCurrentOwner.current;
- if (owner !== null && owner.tag === ClassComponent) {
- var ownerFiber = owner;
- var instance = ownerFiber.stateNode;
- if (!instance._warnedAboutRefsInRender) {
- error('%s is accessing isMounted inside its render() function. ' + 'render() should be a pure function of props and state. It should ' + 'never access something that requires stale data from the previous ' + 'render, such as refs. Move this logic to componentDidMount and ' + 'componentDidUpdate instead.', getComponentName(ownerFiber.type) || 'A component');
- }
- instance._warnedAboutRefsInRender = true;
- }
- }
- var fiber = get(component);
- if (!fiber) {
- return false;
- }
- return getNearestMountedFiber(fiber) === fiber;
- }
- function assertIsMounted(fiber) {
- if (!(getNearestMountedFiber(fiber) === fiber)) {
- {
- throw Error( "Unable to find node on an unmounted component." );
- }
- }
- }
- function findCurrentFiberUsingSlowPath(fiber) {
- var alternate = fiber.alternate;
- if (!alternate) {
- // If there is no alternate, then we only need to check if it is mounted.
- var nearestMounted = getNearestMountedFiber(fiber);
- if (!(nearestMounted !== null)) {
- {
- throw Error( "Unable to find node on an unmounted component." );
- }
- }
- if (nearestMounted !== fiber) {
- return null;
- }
- return fiber;
- } // If we have two possible branches, we'll walk backwards up to the root
- // to see what path the root points to. On the way we may hit one of the
- // special cases and we'll deal with them.
- var a = fiber;
- var b = alternate;
- while (true) {
- var parentA = a.return;
- if (parentA === null) {
- // We're at the root.
- break;
- }
- var parentB = parentA.alternate;
- if (parentB === null) {
- // There is no alternate. This is an unusual case. Currently, it only
- // happens when a Suspense component is hidden. An extra fragment fiber
- // is inserted in between the Suspense fiber and its children. Skip
- // over this extra fragment fiber and proceed to the next parent.
- var nextParent = parentA.return;
- if (nextParent !== null) {
- a = b = nextParent;
- continue;
- } // If there's no parent, we're at the root.
- break;
- } // If both copies of the parent fiber point to the same child, we can
- // assume that the child is current. This happens when we bailout on low
- // priority: the bailed out fiber's child reuses the current child.
- if (parentA.child === parentB.child) {
- var child = parentA.child;
- while (child) {
- if (child === a) {
- // We've determined that A is the current branch.
- assertIsMounted(parentA);
- return fiber;
- }
- if (child === b) {
- // We've determined that B is the current branch.
- assertIsMounted(parentA);
- return alternate;
- }
- child = child.sibling;
- } // We should never have an alternate for any mounting node. So the only
- // way this could possibly happen is if this was unmounted, if at all.
- {
- {
- throw Error( "Unable to find node on an unmounted component." );
- }
- }
- }
- if (a.return !== b.return) {
- // The return pointer of A and the return pointer of B point to different
- // fibers. We assume that return pointers never criss-cross, so A must
- // belong to the child set of A.return, and B must belong to the child
- // set of B.return.
- a = parentA;
- b = parentB;
- } else {
- // The return pointers point to the same fiber. We'll have to use the
- // default, slow path: scan the child sets of each parent alternate to see
- // which child belongs to which set.
- //
- // Search parent A's child set
- var didFindChild = false;
- var _child = parentA.child;
- while (_child) {
- if (_child === a) {
- didFindChild = true;
- a = parentA;
- b = parentB;
- break;
- }
- if (_child === b) {
- didFindChild = true;
- b = parentA;
- a = parentB;
- break;
- }
- _child = _child.sibling;
- }
- if (!didFindChild) {
- // Search parent B's child set
- _child = parentB.child;
- while (_child) {
- if (_child === a) {
- didFindChild = true;
- a = parentB;
- b = parentA;
- break;
- }
- if (_child === b) {
- didFindChild = true;
- b = parentB;
- a = parentA;
- break;
- }
- _child = _child.sibling;
- }
- if (!didFindChild) {
- {
- throw Error( "Child was not found in either parent set. This indicates a bug in React related to the return pointer. Please file an issue." );
- }
- }
- }
- }
- if (!(a.alternate === b)) {
- {
- throw Error( "Return fibers should always be each others' alternates. This error is likely caused by a bug in React. Please file an issue." );
- }
- }
- } // If the root is not a host container, we're in a disconnected tree. I.e.
- // unmounted.
- if (!(a.tag === HostRoot)) {
- {
- throw Error( "Unable to find node on an unmounted component." );
- }
- }
- if (a.stateNode.current === a) {
- // We've determined that A is the current branch.
- return fiber;
- } // Otherwise B has to be current branch.
- return alternate;
- }
- function findCurrentHostFiber(parent) {
- var currentParent = findCurrentFiberUsingSlowPath(parent);
- if (!currentParent) {
- return null;
- } // Next we'll drill down this component to find the first HostComponent/Text.
- var node = currentParent;
- while (true) {
- if (node.tag === HostComponent || node.tag === HostText) {
- return node;
- } else if (node.child) {
- node.child.return = node;
- node = node.child;
- continue;
- }
- if (node === currentParent) {
- return null;
- }
- while (!node.sibling) {
- if (!node.return || node.return === currentParent) {
- return null;
- }
- node = node.return;
- }
- node.sibling.return = node.return;
- node = node.sibling;
- } // Flow needs the return null here, but ESLint complains about it.
- // eslint-disable-next-line no-unreachable
- return null;
- }
- function findCurrentHostFiberWithNoPortals(parent) {
- var currentParent = findCurrentFiberUsingSlowPath(parent);
- if (!currentParent) {
- return null;
- } // Next we'll drill down this component to find the first HostComponent/Text.
- var node = currentParent;
- while (true) {
- if (node.tag === HostComponent || node.tag === HostText || enableFundamentalAPI ) {
- return node;
- } else if (node.child && node.tag !== HostPortal) {
- node.child.return = node;
- node = node.child;
- continue;
- }
- if (node === currentParent) {
- return null;
- }
- while (!node.sibling) {
- if (!node.return || node.return === currentParent) {
- return null;
- }
- node = node.return;
- }
- node.sibling.return = node.return;
- node = node.sibling;
- } // Flow needs the return null here, but ESLint complains about it.
- // eslint-disable-next-line no-unreachable
- return null;
- }
- /**
- * Accumulates items that must not be null or undefined into the first one. This
- * is used to conserve memory by avoiding array allocations, and thus sacrifices
- * API cleanness. Since `current` can be null before being passed in and not
- * null after this function, make sure to assign it back to `current`:
- *
- * `a = accumulateInto(a, b);`
- *
- * This API should be sparingly used. Try `accumulate` for something cleaner.
- *
- * @return {*|array<*>} An accumulation of items.
- */
- function accumulateInto(current, next) {
- if (!(next != null)) {
- {
- throw Error( "accumulateInto(...): Accumulated items must not be null or undefined." );
- }
- }
- if (current == null) {
- return next;
- } // Both are not empty. Warning: Never call x.concat(y) when you are not
- // certain that x is an Array (x could be a string with concat method).
- if (Array.isArray(current)) {
- if (Array.isArray(next)) {
- current.push.apply(current, next);
- return current;
- }
- current.push(next);
- return current;
- }
- if (Array.isArray(next)) {
- // A bit too dangerous to mutate `next`.
- return [current].concat(next);
- }
- return [current, next];
- }
- /**
- * @param {array} arr an "accumulation" of items which is either an Array or
- * a single item. Useful when paired with the `accumulate` module. This is a
- * simple utility that allows us to reason about a collection of items, but
- * handling the case when there is exactly one item (and we do not need to
- * allocate an array).
- * @param {function} cb Callback invoked with each element or a collection.
- * @param {?} [scope] Scope used as `this` in a callback.
- */
- function forEachAccumulated(arr, cb, scope) {
- if (Array.isArray(arr)) {
- arr.forEach(cb, scope);
- } else if (arr) {
- cb.call(scope, arr);
- }
- }
- /**
- * Internal queue of events that have accumulated their dispatches and are
- * waiting to have their dispatches executed.
- */
- var eventQueue = null;
- /**
- * Dispatches an event and releases it back into the pool, unless persistent.
- *
- * @param {?object} event Synthetic event to be dispatched.
- * @private
- */
- var executeDispatchesAndRelease = function (event) {
- if (event) {
- executeDispatchesInOrder(event);
- if (!event.isPersistent()) {
- event.constructor.release(event);
- }
- }
- };
- var executeDispatchesAndReleaseTopLevel = function (e) {
- return executeDispatchesAndRelease(e);
- };
- function runEventsInBatch(events) {
- if (events !== null) {
- eventQueue = accumulateInto(eventQueue, events);
- } // Set `eventQueue` to null before processing it so that we can tell if more
- // events get enqueued while processing.
- var processingEventQueue = eventQueue;
- eventQueue = null;
- if (!processingEventQueue) {
- return;
- }
- forEachAccumulated(processingEventQueue, executeDispatchesAndReleaseTopLevel);
- if (!!eventQueue) {
- {
- throw Error( "processEventQueue(): Additional events were enqueued while processing an event queue. Support for this has not yet been implemented." );
- }
- } // This would be a good time to rethrow if any of the event handlers threw.
- rethrowCaughtError();
- }
- /**
- * Gets the target node from a native browser event by accounting for
- * inconsistencies in browser DOM APIs.
- *
- * @param {object} nativeEvent Native browser event.
- * @return {DOMEventTarget} Target node.
- */
- function getEventTarget(nativeEvent) {
- // Fallback to nativeEvent.srcElement for IE9
- // https://github.com/facebook/react/issues/12506
- var target = nativeEvent.target || nativeEvent.srcElement || window; // Normalize SVG <use> element events #4963
- if (target.correspondingUseElement) {
- target = target.correspondingUseElement;
- } // Safari may fire events on text nodes (Node.TEXT_NODE is 3).
- // @see http://www.quirksmode.org/js/events_properties.html
- return target.nodeType === TEXT_NODE ? target.parentNode : target;
- }
- /**
- * Checks if an event is supported in the current execution environment.
- *
- * NOTE: This will not work correctly for non-generic events such as `change`,
- * `reset`, `load`, `error`, and `select`.
- *
- * Borrows from Modernizr.
- *
- * @param {string} eventNameSuffix Event name, e.g. "click".
- * @return {boolean} True if the event is supported.
- * @internal
- * @license Modernizr 3.0.0pre (Custom Build) | MIT
- */
- function isEventSupported(eventNameSuffix) {
- if (!canUseDOM) {
- return false;
- }
- var eventName = 'on' + eventNameSuffix;
- var isSupported = eventName in document;
- if (!isSupported) {
- var element = document.createElement('div');
- element.setAttribute(eventName, 'return;');
- isSupported = typeof element[eventName] === 'function';
- }
- return isSupported;
- }
- /**
- * Summary of `DOMEventPluginSystem` event handling:
- *
- * - Top-level delegation is used to trap most native browser events. This
- * may only occur in the main thread and is the responsibility of
- * ReactDOMEventListener, which is injected and can therefore support
- * pluggable event sources. This is the only work that occurs in the main
- * thread.
- *
- * - We normalize and de-duplicate events to account for browser quirks. This
- * may be done in the worker thread.
- *
- * - Forward these native events (with the associated top-level type used to
- * trap it) to `EventPluginRegistry`, which in turn will ask plugins if they want
- * to extract any synthetic events.
- *
- * - The `EventPluginRegistry` will then process each event by annotating them with
- * "dispatches", a sequence of listeners and IDs that care about that event.
- *
- * - The `EventPluginRegistry` then dispatches the events.
- *
- * Overview of React and the event system:
- *
- * +------------+ .
- * | DOM | .
- * +------------+ .
- * | .
- * v .
- * +------------+ .
- * | ReactEvent | .
- * | Listener | .
- * +------------+ . +-----------+
- * | . +--------+|SimpleEvent|
- * | . | |Plugin |
- * +-----|------+ . v +-----------+
- * | | | . +--------------+ +------------+
- * | +-----------.--->|PluginRegistry| | Event |
- * | | . | | +-----------+ | Propagators|
- * | ReactEvent | . | | |TapEvent | |------------|
- * | Emitter | . | |<---+|Plugin | |other plugin|
- * | | . | | +-----------+ | utilities |
- * | +-----------.--->| | +------------+
- * | | | . +--------------+
- * +-----|------+ . ^ +-----------+
- * | . | |Enter/Leave|
- * + . +-------+|Plugin |
- * +-------------+ . +-----------+
- * | application | .
- * |-------------| .
- * | | .
- * | | .
- * +-------------+ .
- * .
- * React Core . General Purpose Event Plugin System
- */
- var CALLBACK_BOOKKEEPING_POOL_SIZE = 10;
- var callbackBookkeepingPool = [];
- function releaseTopLevelCallbackBookKeeping(instance) {
- instance.topLevelType = null;
- instance.nativeEvent = null;
- instance.targetInst = null;
- instance.ancestors.length = 0;
- if (callbackBookkeepingPool.length < CALLBACK_BOOKKEEPING_POOL_SIZE) {
- callbackBookkeepingPool.push(instance);
- }
- } // Used to store ancestor hierarchy in top level callback
- function getTopLevelCallbackBookKeeping(topLevelType, nativeEvent, targetInst, eventSystemFlags) {
- if (callbackBookkeepingPool.length) {
- var instance = callbackBookkeepingPool.pop();
- instance.topLevelType = topLevelType;
- instance.eventSystemFlags = eventSystemFlags;
- instance.nativeEvent = nativeEvent;
- instance.targetInst = targetInst;
- return instance;
- }
- return {
- topLevelType: topLevelType,
- eventSystemFlags: eventSystemFlags,
- nativeEvent: nativeEvent,
- targetInst: targetInst,
- ancestors: []
- };
- }
- /**
- * Find the deepest React component completely containing the root of the
- * passed-in instance (for use when entire React trees are nested within each
- * other). If React trees are not nested, returns null.
- */
- function findRootContainerNode(inst) {
- if (inst.tag === HostRoot) {
- return inst.stateNode.containerInfo;
- } // TODO: It may be a good idea to cache this to prevent unnecessary DOM
- // traversal, but caching is difficult to do correctly without using a
- // mutation observer to listen for all DOM changes.
- while (inst.return) {
- inst = inst.return;
- }
- if (inst.tag !== HostRoot) {
- // This can happen if we're in a detached tree.
- return null;
- }
- return inst.stateNode.containerInfo;
- }
- /**
- * Allows registered plugins an opportunity to extract events from top-level
- * native browser events.
- *
- * @return {*} An accumulation of synthetic events.
- * @internal
- */
- function extractPluginEvents(topLevelType, targetInst, nativeEvent, nativeEventTarget, eventSystemFlags) {
- var events = null;
- for (var i = 0; i < plugins.length; i++) {
- // Not every plugin in the ordering may be loaded at runtime.
- var possiblePlugin = plugins[i];
- if (possiblePlugin) {
- var extractedEvents = possiblePlugin.extractEvents(topLevelType, targetInst, nativeEvent, nativeEventTarget, eventSystemFlags);
- if (extractedEvents) {
- events = accumulateInto(events, extractedEvents);
- }
- }
- }
- return events;
- }
- function runExtractedPluginEventsInBatch(topLevelType, targetInst, nativeEvent, nativeEventTarget, eventSystemFlags) {
- var events = extractPluginEvents(topLevelType, targetInst, nativeEvent, nativeEventTarget, eventSystemFlags);
- runEventsInBatch(events);
- }
- function handleTopLevel(bookKeeping) {
- var targetInst = bookKeeping.targetInst; // Loop through the hierarchy, in case there's any nested components.
- // It's important that we build the array of ancestors before calling any
- // event handlers, because event handlers can modify the DOM, leading to
- // inconsistencies with ReactMount's node cache. See #1105.
- var ancestor = targetInst;
- do {
- if (!ancestor) {
- var ancestors = bookKeeping.ancestors;
- ancestors.push(ancestor);
- break;
- }
- var root = findRootContainerNode(ancestor);
- if (!root) {
- break;
- }
- var tag = ancestor.tag;
- if (tag === HostComponent || tag === HostText) {
- bookKeeping.ancestors.push(ancestor);
- }
- ancestor = getClosestInstanceFromNode(root);
- } while (ancestor);
- for (var i = 0; i < bookKeeping.ancestors.length; i++) {
- targetInst = bookKeeping.ancestors[i];
- var eventTarget = getEventTarget(bookKeeping.nativeEvent);
- var topLevelType = bookKeeping.topLevelType;
- var nativeEvent = bookKeeping.nativeEvent;
- var eventSystemFlags = bookKeeping.eventSystemFlags; // If this is the first ancestor, we mark it on the system flags
- if (i === 0) {
- eventSystemFlags |= IS_FIRST_ANCESTOR;
- }
- runExtractedPluginEventsInBatch(topLevelType, targetInst, nativeEvent, eventTarget, eventSystemFlags);
- }
- }
- function dispatchEventForLegacyPluginEventSystem(topLevelType, eventSystemFlags, nativeEvent, targetInst) {
- var bookKeeping = getTopLevelCallbackBookKeeping(topLevelType, nativeEvent, targetInst, eventSystemFlags);
- try {
- // Event queue being processed in the same cycle allows
- // `preventDefault`.
- batchedEventUpdates(handleTopLevel, bookKeeping);
- } finally {
- releaseTopLevelCallbackBookKeeping(bookKeeping);
- }
- }
- /**
- * We listen for bubbled touch events on the document object.
- *
- * Firefox v8.01 (and possibly others) exhibited strange behavior when
- * mounting `onmousemove` events at some node that was not the document
- * element. The symptoms were that if your mouse is not moving over something
- * contained within that mount point (for example on the background) the
- * top-level listeners for `onmousemove` won't be called. However, if you
- * register the `mousemove` on the document object, then it will of course
- * catch all `mousemove`s. This along with iOS quirks, justifies restricting
- * top-level listeners to the document object only, at least for these
- * movement types of events and possibly all events.
- *
- * @see http://www.quirksmode.org/blog/archives/2010/09/click_event_del.html
- *
- * Also, `keyup`/`keypress`/`keydown` do not bubble to the window on IE, but
- * they bubble to document.
- *
- * @param {string} registrationName Name of listener (e.g. `onClick`).
- * @param {object} mountAt Container where to mount the listener
- */
- function legacyListenToEvent(registrationName, mountAt) {
- var listenerMap = getListenerMapForElement(mountAt);
- var dependencies = registrationNameDependencies[registrationName];
- for (var i = 0; i < dependencies.length; i++) {
- var dependency = dependencies[i];
- legacyListenToTopLevelEvent(dependency, mountAt, listenerMap);
- }
- }
- function legacyListenToTopLevelEvent(topLevelType, mountAt, listenerMap) {
- if (!listenerMap.has(topLevelType)) {
- switch (topLevelType) {
- case TOP_SCROLL:
- trapCapturedEvent(TOP_SCROLL, mountAt);
- break;
- case TOP_FOCUS:
- case TOP_BLUR:
- trapCapturedEvent(TOP_FOCUS, mountAt);
- trapCapturedEvent(TOP_BLUR, mountAt); // We set the flag for a single dependency later in this function,
- // but this ensures we mark both as attached rather than just one.
- listenerMap.set(TOP_BLUR, null);
- listenerMap.set(TOP_FOCUS, null);
- break;
- case TOP_CANCEL:
- case TOP_CLOSE:
- if (isEventSupported(getRawEventName(topLevelType))) {
- trapCapturedEvent(topLevelType, mountAt);
- }
- break;
- case TOP_INVALID:
- case TOP_SUBMIT:
- case TOP_RESET:
- // We listen to them on the target DOM elements.
- // Some of them bubble so we don't want them to fire twice.
- break;
- default:
- // By default, listen on the top level to all non-media events.
- // Media events don't bubble so adding the listener wouldn't do anything.
- var isMediaEvent = mediaEventTypes.indexOf(topLevelType) !== -1;
- if (!isMediaEvent) {
- trapBubbledEvent(topLevelType, mountAt);
- }
- break;
- }
- listenerMap.set(topLevelType, null);
- }
- }
- function isListeningToAllDependencies(registrationName, mountAt) {
- var listenerMap = getListenerMapForElement(mountAt);
- var dependencies = registrationNameDependencies[registrationName];
- for (var i = 0; i < dependencies.length; i++) {
- var dependency = dependencies[i];
- if (!listenerMap.has(dependency)) {
- return false;
- }
- }
- return true;
- }
- var attemptUserBlockingHydration;
- function setAttemptUserBlockingHydration(fn) {
- attemptUserBlockingHydration = fn;
- }
- var attemptContinuousHydration;
- function setAttemptContinuousHydration(fn) {
- attemptContinuousHydration = fn;
- }
- var attemptHydrationAtCurrentPriority;
- function setAttemptHydrationAtCurrentPriority(fn) {
- attemptHydrationAtCurrentPriority = fn;
- } // TODO: Upgrade this definition once we're on a newer version of Flow that
- var hasScheduledReplayAttempt = false; // The queue of discrete events to be replayed.
- var queuedDiscreteEvents = []; // Indicates if any continuous event targets are non-null for early bailout.
- // if the last target was dehydrated.
- var queuedFocus = null;
- var queuedDrag = null;
- var queuedMouse = null; // For pointer events there can be one latest event per pointerId.
- var queuedPointers = new Map();
- var queuedPointerCaptures = new Map(); // We could consider replaying selectionchange and touchmoves too.
- var queuedExplicitHydrationTargets = [];
- function hasQueuedDiscreteEvents() {
- return queuedDiscreteEvents.length > 0;
- }
- var discreteReplayableEvents = [TOP_MOUSE_DOWN, TOP_MOUSE_UP, TOP_TOUCH_CANCEL, TOP_TOUCH_END, TOP_TOUCH_START, TOP_AUX_CLICK, TOP_DOUBLE_CLICK, TOP_POINTER_CANCEL, TOP_POINTER_DOWN, TOP_POINTER_UP, TOP_DRAG_END, TOP_DRAG_START, TOP_DROP, TOP_COMPOSITION_END, TOP_COMPOSITION_START, TOP_KEY_DOWN, TOP_KEY_PRESS, TOP_KEY_UP, TOP_INPUT, TOP_TEXT_INPUT, TOP_CLOSE, TOP_CANCEL, TOP_COPY, TOP_CUT, TOP_PASTE, TOP_CLICK, TOP_CHANGE, TOP_CONTEXT_MENU, TOP_RESET, TOP_SUBMIT];
- var continuousReplayableEvents = [TOP_FOCUS, TOP_BLUR, TOP_DRAG_ENTER, TOP_DRAG_LEAVE, TOP_MOUSE_OVER, TOP_MOUSE_OUT, TOP_POINTER_OVER, TOP_POINTER_OUT, TOP_GOT_POINTER_CAPTURE, TOP_LOST_POINTER_CAPTURE];
- function isReplayableDiscreteEvent(eventType) {
- return discreteReplayableEvents.indexOf(eventType) > -1;
- }
- function trapReplayableEventForDocument(topLevelType, document, listenerMap) {
- legacyListenToTopLevelEvent(topLevelType, document, listenerMap);
- }
- function eagerlyTrapReplayableEvents(container, document) {
- var listenerMapForDoc = getListenerMapForElement(document); // Discrete
- discreteReplayableEvents.forEach(function (topLevelType) {
- trapReplayableEventForDocument(topLevelType, document, listenerMapForDoc);
- }); // Continuous
- continuousReplayableEvents.forEach(function (topLevelType) {
- trapReplayableEventForDocument(topLevelType, document, listenerMapForDoc);
- });
- }
- function createQueuedReplayableEvent(blockedOn, topLevelType, eventSystemFlags, container, nativeEvent) {
- return {
- blockedOn: blockedOn,
- topLevelType: topLevelType,
- eventSystemFlags: eventSystemFlags | IS_REPLAYED,
- nativeEvent: nativeEvent,
- container: container
- };
- }
- function queueDiscreteEvent(blockedOn, topLevelType, eventSystemFlags, container, nativeEvent) {
- var queuedEvent = createQueuedReplayableEvent(blockedOn, topLevelType, eventSystemFlags, container, nativeEvent);
- queuedDiscreteEvents.push(queuedEvent);
- } // Resets the replaying for this type of continuous event to no event.
- function clearIfContinuousEvent(topLevelType, nativeEvent) {
- switch (topLevelType) {
- case TOP_FOCUS:
- case TOP_BLUR:
- queuedFocus = null;
- break;
- case TOP_DRAG_ENTER:
- case TOP_DRAG_LEAVE:
- queuedDrag = null;
- break;
- case TOP_MOUSE_OVER:
- case TOP_MOUSE_OUT:
- queuedMouse = null;
- break;
- case TOP_POINTER_OVER:
- case TOP_POINTER_OUT:
- {
- var pointerId = nativeEvent.pointerId;
- queuedPointers.delete(pointerId);
- break;
- }
- case TOP_GOT_POINTER_CAPTURE:
- case TOP_LOST_POINTER_CAPTURE:
- {
- var _pointerId = nativeEvent.pointerId;
- queuedPointerCaptures.delete(_pointerId);
- break;
- }
- }
- }
- function accumulateOrCreateContinuousQueuedReplayableEvent(existingQueuedEvent, blockedOn, topLevelType, eventSystemFlags, container, nativeEvent) {
- if (existingQueuedEvent === null || existingQueuedEvent.nativeEvent !== nativeEvent) {
- var queuedEvent = createQueuedReplayableEvent(blockedOn, topLevelType, eventSystemFlags, container, nativeEvent);
- if (blockedOn !== null) {
- var _fiber2 = getInstanceFromNode$1(blockedOn);
- if (_fiber2 !== null) {
- // Attempt to increase the priority of this target.
- attemptContinuousHydration(_fiber2);
- }
- }
- return queuedEvent;
- } // If we have already queued this exact event, then it's because
- // the different event systems have different DOM event listeners.
- // We can accumulate the flags and store a single event to be
- // replayed.
- existingQueuedEvent.eventSystemFlags |= eventSystemFlags;
- return existingQueuedEvent;
- }
- function queueIfContinuousEvent(blockedOn, topLevelType, eventSystemFlags, container, nativeEvent) {
- // These set relatedTarget to null because the replayed event will be treated as if we
- // moved from outside the window (no target) onto the target once it hydrates.
- // Instead of mutating we could clone the event.
- switch (topLevelType) {
- case TOP_FOCUS:
- {
- var focusEvent = nativeEvent;
- queuedFocus = accumulateOrCreateContinuousQueuedReplayableEvent(queuedFocus, blockedOn, topLevelType, eventSystemFlags, container, focusEvent);
- return true;
- }
- case TOP_DRAG_ENTER:
- {
- var dragEvent = nativeEvent;
- queuedDrag = accumulateOrCreateContinuousQueuedReplayableEvent(queuedDrag, blockedOn, topLevelType, eventSystemFlags, container, dragEvent);
- return true;
- }
- case TOP_MOUSE_OVER:
- {
- var mouseEvent = nativeEvent;
- queuedMouse = accumulateOrCreateContinuousQueuedReplayableEvent(queuedMouse, blockedOn, topLevelType, eventSystemFlags, container, mouseEvent);
- return true;
- }
- case TOP_POINTER_OVER:
- {
- var pointerEvent = nativeEvent;
- var pointerId = pointerEvent.pointerId;
- queuedPointers.set(pointerId, accumulateOrCreateContinuousQueuedReplayableEvent(queuedPointers.get(pointerId) || null, blockedOn, topLevelType, eventSystemFlags, container, pointerEvent));
- return true;
- }
- case TOP_GOT_POINTER_CAPTURE:
- {
- var _pointerEvent = nativeEvent;
- var _pointerId2 = _pointerEvent.pointerId;
- queuedPointerCaptures.set(_pointerId2, accumulateOrCreateContinuousQueuedReplayableEvent(queuedPointerCaptures.get(_pointerId2) || null, blockedOn, topLevelType, eventSystemFlags, container, _pointerEvent));
- return true;
- }
- }
- return false;
- } // Check if this target is unblocked. Returns true if it's unblocked.
- function attemptExplicitHydrationTarget(queuedTarget) {
- // TODO: This function shares a lot of logic with attemptToDispatchEvent.
- // Try to unify them. It's a bit tricky since it would require two return
- // values.
- var targetInst = getClosestInstanceFromNode(queuedTarget.target);
- if (targetInst !== null) {
- var nearestMounted = getNearestMountedFiber(targetInst);
- if (nearestMounted !== null) {
- var tag = nearestMounted.tag;
- if (tag === SuspenseComponent) {
- var instance = getSuspenseInstanceFromFiber(nearestMounted);
- if (instance !== null) {
- // We're blocked on hydrating this boundary.
- // Increase its priority.
- queuedTarget.blockedOn = instance;
- Scheduler.unstable_runWithPriority(queuedTarget.priority, function () {
- attemptHydrationAtCurrentPriority(nearestMounted);
- });
- return;
- }
- } else if (tag === HostRoot) {
- var root = nearestMounted.stateNode;
- if (root.hydrate) {
- queuedTarget.blockedOn = getContainerFromFiber(nearestMounted); // We don't currently have a way to increase the priority of
- // a root other than sync.
- return;
- }
- }
- }
- }
- queuedTarget.blockedOn = null;
- }
- function attemptReplayContinuousQueuedEvent(queuedEvent) {
- if (queuedEvent.blockedOn !== null) {
- return false;
- }
- var nextBlockedOn = attemptToDispatchEvent(queuedEvent.topLevelType, queuedEvent.eventSystemFlags, queuedEvent.container, queuedEvent.nativeEvent);
- if (nextBlockedOn !== null) {
- // We're still blocked. Try again later.
- var _fiber3 = getInstanceFromNode$1(nextBlockedOn);
- if (_fiber3 !== null) {
- attemptContinuousHydration(_fiber3);
- }
- queuedEvent.blockedOn = nextBlockedOn;
- return false;
- }
- return true;
- }
- function attemptReplayContinuousQueuedEventInMap(queuedEvent, key, map) {
- if (attemptReplayContinuousQueuedEvent(queuedEvent)) {
- map.delete(key);
- }
- }
- function replayUnblockedEvents() {
- hasScheduledReplayAttempt = false; // First replay discrete events.
- while (queuedDiscreteEvents.length > 0) {
- var nextDiscreteEvent = queuedDiscreteEvents[0];
- if (nextDiscreteEvent.blockedOn !== null) {
- // We're still blocked.
- // Increase the priority of this boundary to unblock
- // the next discrete event.
- var _fiber4 = getInstanceFromNode$1(nextDiscreteEvent.blockedOn);
- if (_fiber4 !== null) {
- attemptUserBlockingHydration(_fiber4);
- }
- break;
- }
- var nextBlockedOn = attemptToDispatchEvent(nextDiscreteEvent.topLevelType, nextDiscreteEvent.eventSystemFlags, nextDiscreteEvent.container, nextDiscreteEvent.nativeEvent);
- if (nextBlockedOn !== null) {
- // We're still blocked. Try again later.
- nextDiscreteEvent.blockedOn = nextBlockedOn;
- } else {
- // We've successfully replayed the first event. Let's try the next one.
- queuedDiscreteEvents.shift();
- }
- } // Next replay any continuous events.
- if (queuedFocus !== null && attemptReplayContinuousQueuedEvent(queuedFocus)) {
- queuedFocus = null;
- }
- if (queuedDrag !== null && attemptReplayContinuousQueuedEvent(queuedDrag)) {
- queuedDrag = null;
- }
- if (queuedMouse !== null && attemptReplayContinuousQueuedEvent(queuedMouse)) {
- queuedMouse = null;
- }
- queuedPointers.forEach(attemptReplayContinuousQueuedEventInMap);
- queuedPointerCaptures.forEach(attemptReplayContinuousQueuedEventInMap);
- }
- function scheduleCallbackIfUnblocked(queuedEvent, unblocked) {
- if (queuedEvent.blockedOn === unblocked) {
- queuedEvent.blockedOn = null;
- if (!hasScheduledReplayAttempt) {
- hasScheduledReplayAttempt = true; // Schedule a callback to attempt replaying as many events as are
- // now unblocked. This first might not actually be unblocked yet.
- // We could check it early to avoid scheduling an unnecessary callback.
- Scheduler.unstable_scheduleCallback(Scheduler.unstable_NormalPriority, replayUnblockedEvents);
- }
- }
- }
- function retryIfBlockedOn(unblocked) {
- // Mark anything that was blocked on this as no longer blocked
- // and eligible for a replay.
- if (queuedDiscreteEvents.length > 0) {
- scheduleCallbackIfUnblocked(queuedDiscreteEvents[0], unblocked); // This is a exponential search for each boundary that commits. I think it's
- // worth it because we expect very few discrete events to queue up and once
- // we are actually fully unblocked it will be fast to replay them.
- for (var i = 1; i < queuedDiscreteEvents.length; i++) {
- var queuedEvent = queuedDiscreteEvents[i];
- if (queuedEvent.blockedOn === unblocked) {
- queuedEvent.blockedOn = null;
- }
- }
- }
- if (queuedFocus !== null) {
- scheduleCallbackIfUnblocked(queuedFocus, unblocked);
- }
- if (queuedDrag !== null) {
- scheduleCallbackIfUnblocked(queuedDrag, unblocked);
- }
- if (queuedMouse !== null) {
- scheduleCallbackIfUnblocked(queuedMouse, unblocked);
- }
- var unblock = function (queuedEvent) {
- return scheduleCallbackIfUnblocked(queuedEvent, unblocked);
- };
- queuedPointers.forEach(unblock);
- queuedPointerCaptures.forEach(unblock);
- for (var _i = 0; _i < queuedExplicitHydrationTargets.length; _i++) {
- var queuedTarget = queuedExplicitHydrationTargets[_i];
- if (queuedTarget.blockedOn === unblocked) {
- queuedTarget.blockedOn = null;
- }
- }
- while (queuedExplicitHydrationTargets.length > 0) {
- var nextExplicitTarget = queuedExplicitHydrationTargets[0];
- if (nextExplicitTarget.blockedOn !== null) {
- // We're still blocked.
- break;
- } else {
- attemptExplicitHydrationTarget(nextExplicitTarget);
- if (nextExplicitTarget.blockedOn === null) {
- // We're unblocked.
- queuedExplicitHydrationTargets.shift();
- }
- }
- }
- }
- function addEventBubbleListener(element, eventType, listener) {
- element.addEventListener(eventType, listener, false);
- }
- function addEventCaptureListener(element, eventType, listener) {
- element.addEventListener(eventType, listener, true);
- }
- // do it in two places, which duplicates logic
- // and increases the bundle size, we do it all
- // here once. If we remove or refactor the
- // SimpleEventPlugin, we should also remove or
- // update the below line.
- var simpleEventPluginEventTypes = {};
- var topLevelEventsToDispatchConfig = new Map();
- var eventPriorities = new Map(); // We store most of the events in this module in pairs of two strings so we can re-use
- // the code required to apply the same logic for event prioritization and that of the
- // SimpleEventPlugin. This complicates things slightly, but the aim is to reduce code
- // duplication (for which there would be quite a bit). For the events that are not needed
- // for the SimpleEventPlugin (otherDiscreteEvents) we process them separately as an
- // array of top level events.
- // Lastly, we ignore prettier so we can keep the formatting sane.
- // prettier-ignore
- var discreteEventPairsForSimpleEventPlugin = [TOP_BLUR, 'blur', TOP_CANCEL, 'cancel', TOP_CLICK, 'click', TOP_CLOSE, 'close', TOP_CONTEXT_MENU, 'contextMenu', TOP_COPY, 'copy', TOP_CUT, 'cut', TOP_AUX_CLICK, 'auxClick', TOP_DOUBLE_CLICK, 'doubleClick', TOP_DRAG_END, 'dragEnd', TOP_DRAG_START, 'dragStart', TOP_DROP, 'drop', TOP_FOCUS, 'focus', TOP_INPUT, 'input', TOP_INVALID, 'invalid', TOP_KEY_DOWN, 'keyDown', TOP_KEY_PRESS, 'keyPress', TOP_KEY_UP, 'keyUp', TOP_MOUSE_DOWN, 'mouseDown', TOP_MOUSE_UP, 'mouseUp', TOP_PASTE, 'paste', TOP_PAUSE, 'pause', TOP_PLAY, 'play', TOP_POINTER_CANCEL, 'pointerCancel', TOP_POINTER_DOWN, 'pointerDown', TOP_POINTER_UP, 'pointerUp', TOP_RATE_CHANGE, 'rateChange', TOP_RESET, 'reset', TOP_SEEKED, 'seeked', TOP_SUBMIT, 'submit', TOP_TOUCH_CANCEL, 'touchCancel', TOP_TOUCH_END, 'touchEnd', TOP_TOUCH_START, 'touchStart', TOP_VOLUME_CHANGE, 'volumeChange'];
- var otherDiscreteEvents = [TOP_CHANGE, TOP_SELECTION_CHANGE, TOP_TEXT_INPUT, TOP_COMPOSITION_START, TOP_COMPOSITION_END, TOP_COMPOSITION_UPDATE]; // prettier-ignore
- var userBlockingPairsForSimpleEventPlugin = [TOP_DRAG, 'drag', TOP_DRAG_ENTER, 'dragEnter', TOP_DRAG_EXIT, 'dragExit', TOP_DRAG_LEAVE, 'dragLeave', TOP_DRAG_OVER, 'dragOver', TOP_MOUSE_MOVE, 'mouseMove', TOP_MOUSE_OUT, 'mouseOut', TOP_MOUSE_OVER, 'mouseOver', TOP_POINTER_MOVE, 'pointerMove', TOP_POINTER_OUT, 'pointerOut', TOP_POINTER_OVER, 'pointerOver', TOP_SCROLL, 'scroll', TOP_TOGGLE, 'toggle', TOP_TOUCH_MOVE, 'touchMove', TOP_WHEEL, 'wheel']; // prettier-ignore
- var continuousPairsForSimpleEventPlugin = [TOP_ABORT, 'abort', TOP_ANIMATION_END, 'animationEnd', TOP_ANIMATION_ITERATION, 'animationIteration', TOP_ANIMATION_START, 'animationStart', TOP_CAN_PLAY, 'canPlay', TOP_CAN_PLAY_THROUGH, 'canPlayThrough', TOP_DURATION_CHANGE, 'durationChange', TOP_EMPTIED, 'emptied', TOP_ENCRYPTED, 'encrypted', TOP_ENDED, 'ended', TOP_ERROR, 'error', TOP_GOT_POINTER_CAPTURE, 'gotPointerCapture', TOP_LOAD, 'load', TOP_LOADED_DATA, 'loadedData', TOP_LOADED_METADATA, 'loadedMetadata', TOP_LOAD_START, 'loadStart', TOP_LOST_POINTER_CAPTURE, 'lostPointerCapture', TOP_PLAYING, 'playing', TOP_PROGRESS, 'progress', TOP_SEEKING, 'seeking', TOP_STALLED, 'stalled', TOP_SUSPEND, 'suspend', TOP_TIME_UPDATE, 'timeUpdate', TOP_TRANSITION_END, 'transitionEnd', TOP_WAITING, 'waiting'];
- /**
- * Turns
- * ['abort', ...]
- * into
- * eventTypes = {
- * 'abort': {
- * phasedRegistrationNames: {
- * bubbled: 'onAbort',
- * captured: 'onAbortCapture',
- * },
- * dependencies: [TOP_ABORT],
- * },
- * ...
- * };
- * topLevelEventsToDispatchConfig = new Map([
- * [TOP_ABORT, { sameConfig }],
- * ]);
- */
- function processSimpleEventPluginPairsByPriority(eventTypes, priority) {
- // As the event types are in pairs of two, we need to iterate
- // through in twos. The events are in pairs of two to save code
- // and improve init perf of processing this array, as it will
- // result in far fewer object allocations and property accesses
- // if we only use three arrays to process all the categories of
- // instead of tuples.
- for (var i = 0; i < eventTypes.length; i += 2) {
- var topEvent = eventTypes[i];
- var event = eventTypes[i + 1];
- var capitalizedEvent = event[0].toUpperCase() + event.slice(1);
- var onEvent = 'on' + capitalizedEvent;
- var config = {
- phasedRegistrationNames: {
- bubbled: onEvent,
- captured: onEvent + 'Capture'
- },
- dependencies: [topEvent],
- eventPriority: priority
- };
- eventPriorities.set(topEvent, priority);
- topLevelEventsToDispatchConfig.set(topEvent, config);
- simpleEventPluginEventTypes[event] = config;
- }
- }
- function processTopEventPairsByPriority(eventTypes, priority) {
- for (var i = 0; i < eventTypes.length; i++) {
- eventPriorities.set(eventTypes[i], priority);
- }
- } // SimpleEventPlugin
- processSimpleEventPluginPairsByPriority(discreteEventPairsForSimpleEventPlugin, DiscreteEvent);
- processSimpleEventPluginPairsByPriority(userBlockingPairsForSimpleEventPlugin, UserBlockingEvent);
- processSimpleEventPluginPairsByPriority(continuousPairsForSimpleEventPlugin, ContinuousEvent); // Not used by SimpleEventPlugin
- processTopEventPairsByPriority(otherDiscreteEvents, DiscreteEvent);
- function getEventPriorityForPluginSystem(topLevelType) {
- var priority = eventPriorities.get(topLevelType); // Default to a ContinuousEvent. Note: we might
- // want to warn if we can't detect the priority
- // for the event.
- return priority === undefined ? ContinuousEvent : priority;
- }
- // Intentionally not named imports because Rollup would use dynamic dispatch for
- var UserBlockingPriority = Scheduler.unstable_UserBlockingPriority,
- runWithPriority = Scheduler.unstable_runWithPriority; // TODO: can we stop exporting these?
- var _enabled = true;
- function setEnabled(enabled) {
- _enabled = !!enabled;
- }
- function isEnabled() {
- return _enabled;
- }
- function trapBubbledEvent(topLevelType, element) {
- trapEventForPluginEventSystem(element, topLevelType, false);
- }
- function trapCapturedEvent(topLevelType, element) {
- trapEventForPluginEventSystem(element, topLevelType, true);
- }
- function trapEventForPluginEventSystem(container, topLevelType, capture) {
- var listener;
- switch (getEventPriorityForPluginSystem(topLevelType)) {
- case DiscreteEvent:
- listener = dispatchDiscreteEvent.bind(null, topLevelType, PLUGIN_EVENT_SYSTEM, container);
- break;
- case UserBlockingEvent:
- listener = dispatchUserBlockingUpdate.bind(null, topLevelType, PLUGIN_EVENT_SYSTEM, container);
- break;
- case ContinuousEvent:
- default:
- listener = dispatchEvent.bind(null, topLevelType, PLUGIN_EVENT_SYSTEM, container);
- break;
- }
- var rawEventName = getRawEventName(topLevelType);
- if (capture) {
- addEventCaptureListener(container, rawEventName, listener);
- } else {
- addEventBubbleListener(container, rawEventName, listener);
- }
- }
- function dispatchDiscreteEvent(topLevelType, eventSystemFlags, container, nativeEvent) {
- flushDiscreteUpdatesIfNeeded(nativeEvent.timeStamp);
- discreteUpdates(dispatchEvent, topLevelType, eventSystemFlags, container, nativeEvent);
- }
- function dispatchUserBlockingUpdate(topLevelType, eventSystemFlags, container, nativeEvent) {
- runWithPriority(UserBlockingPriority, dispatchEvent.bind(null, topLevelType, eventSystemFlags, container, nativeEvent));
- }
- function dispatchEvent(topLevelType, eventSystemFlags, container, nativeEvent) {
- if (!_enabled) {
- return;
- }
- if (hasQueuedDiscreteEvents() && isReplayableDiscreteEvent(topLevelType)) {
- // If we already have a queue of discrete events, and this is another discrete
- // event, then we can't dispatch it regardless of its target, since they
- // need to dispatch in order.
- queueDiscreteEvent(null, // Flags that we're not actually blocked on anything as far as we know.
- topLevelType, eventSystemFlags, container, nativeEvent);
- return;
- }
- var blockedOn = attemptToDispatchEvent(topLevelType, eventSystemFlags, container, nativeEvent);
- if (blockedOn === null) {
- // We successfully dispatched this event.
- clearIfContinuousEvent(topLevelType, nativeEvent);
- return;
- }
- if (isReplayableDiscreteEvent(topLevelType)) {
- // This this to be replayed later once the target is available.
- queueDiscreteEvent(blockedOn, topLevelType, eventSystemFlags, container, nativeEvent);
- return;
- }
- if (queueIfContinuousEvent(blockedOn, topLevelType, eventSystemFlags, container, nativeEvent)) {
- return;
- } // We need to clear only if we didn't queue because
- // queueing is accummulative.
- clearIfContinuousEvent(topLevelType, nativeEvent); // This is not replayable so we'll invoke it but without a target,
- // in case the event system needs to trace it.
- {
- dispatchEventForLegacyPluginEventSystem(topLevelType, eventSystemFlags, nativeEvent, null);
- }
- } // Attempt dispatching an event. Returns a SuspenseInstance or Container if it's blocked.
- function attemptToDispatchEvent(topLevelType, eventSystemFlags, container, nativeEvent) {
- // TODO: Warn if _enabled is false.
- var nativeEventTarget = getEventTarget(nativeEvent);
- var targetInst = getClosestInstanceFromNode(nativeEventTarget);
- if (targetInst !== null) {
- var nearestMounted = getNearestMountedFiber(targetInst);
- if (nearestMounted === null) {
- // This tree has been unmounted already. Dispatch without a target.
- targetInst = null;
- } else {
- var tag = nearestMounted.tag;
- if (tag === SuspenseComponent) {
- var instance = getSuspenseInstanceFromFiber(nearestMounted);
- if (instance !== null) {
- // Queue the event to be replayed later. Abort dispatching since we
- // don't want this event dispatched twice through the event system.
- // TODO: If this is the first discrete event in the queue. Schedule an increased
- // priority for this boundary.
- return instance;
- } // This shouldn't happen, something went wrong but to avoid blocking
- // the whole system, dispatch the event without a target.
- // TODO: Warn.
- targetInst = null;
- } else if (tag === HostRoot) {
- var root = nearestMounted.stateNode;
- if (root.hydrate) {
- // If this happens during a replay something went wrong and it might block
- // the whole system.
- return getContainerFromFiber(nearestMounted);
- }
- targetInst = null;
- } else if (nearestMounted !== targetInst) {
- // If we get an event (ex: img onload) before committing that
- // component's mount, ignore it for now (that is, treat it as if it was an
- // event on a non-React tree). We might also consider queueing events and
- // dispatching them after the mount.
- targetInst = null;
- }
- }
- }
- {
- dispatchEventForLegacyPluginEventSystem(topLevelType, eventSystemFlags, nativeEvent, targetInst);
- } // We're not blocked on anything.
- return null;
- }
- // List derived from Gecko source code:
- // https://github.com/mozilla/gecko-dev/blob/4e638efc71/layout/style/test/property_database.js
- var shorthandToLonghand = {
- animation: ['animationDelay', 'animationDirection', 'animationDuration', 'animationFillMode', 'animationIterationCount', 'animationName', 'animationPlayState', 'animationTimingFunction'],
- background: ['backgroundAttachment', 'backgroundClip', 'backgroundColor', 'backgroundImage', 'backgroundOrigin', 'backgroundPositionX', 'backgroundPositionY', 'backgroundRepeat', 'backgroundSize'],
- backgroundPosition: ['backgroundPositionX', 'backgroundPositionY'],
- border: ['borderBottomColor', 'borderBottomStyle', 'borderBottomWidth', 'borderImageOutset', 'borderImageRepeat', 'borderImageSlice', 'borderImageSource', 'borderImageWidth', 'borderLeftColor', 'borderLeftStyle', 'borderLeftWidth', 'borderRightColor', 'borderRightStyle', 'borderRightWidth', 'borderTopColor', 'borderTopStyle', 'borderTopWidth'],
- borderBlockEnd: ['borderBlockEndColor', 'borderBlockEndStyle', 'borderBlockEndWidth'],
- borderBlockStart: ['borderBlockStartColor', 'borderBlockStartStyle', 'borderBlockStartWidth'],
- borderBottom: ['borderBottomColor', 'borderBottomStyle', 'borderBottomWidth'],
- borderColor: ['borderBottomColor', 'borderLeftColor', 'borderRightColor', 'borderTopColor'],
- borderImage: ['borderImageOutset', 'borderImageRepeat', 'borderImageSlice', 'borderImageSource', 'borderImageWidth'],
- borderInlineEnd: ['borderInlineEndColor', 'borderInlineEndStyle', 'borderInlineEndWidth'],
- borderInlineStart: ['borderInlineStartColor', 'borderInlineStartStyle', 'borderInlineStartWidth'],
- borderLeft: ['borderLeftColor', 'borderLeftStyle', 'borderLeftWidth'],
- borderRadius: ['borderBottomLeftRadius', 'borderBottomRightRadius', 'borderTopLeftRadius', 'borderTopRightRadius'],
- borderRight: ['borderRightColor', 'borderRightStyle', 'borderRightWidth'],
- borderStyle: ['borderBottomStyle', 'borderLeftStyle', 'borderRightStyle', 'borderTopStyle'],
- borderTop: ['borderTopColor', 'borderTopStyle', 'borderTopWidth'],
- borderWidth: ['borderBottomWidth', 'borderLeftWidth', 'borderRightWidth', 'borderTopWidth'],
- columnRule: ['columnRuleColor', 'columnRuleStyle', 'columnRuleWidth'],
- columns: ['columnCount', 'columnWidth'],
- flex: ['flexBasis', 'flexGrow', 'flexShrink'],
- flexFlow: ['flexDirection', 'flexWrap'],
- font: ['fontFamily', 'fontFeatureSettings', 'fontKerning', 'fontLanguageOverride', 'fontSize', 'fontSizeAdjust', 'fontStretch', 'fontStyle', 'fontVariant', 'fontVariantAlternates', 'fontVariantCaps', 'fontVariantEastAsian', 'fontVariantLigatures', 'fontVariantNumeric', 'fontVariantPosition', 'fontWeight', 'lineHeight'],
- fontVariant: ['fontVariantAlternates', 'fontVariantCaps', 'fontVariantEastAsian', 'fontVariantLigatures', 'fontVariantNumeric', 'fontVariantPosition'],
- gap: ['columnGap', 'rowGap'],
- grid: ['gridAutoColumns', 'gridAutoFlow', 'gridAutoRows', 'gridTemplateAreas', 'gridTemplateColumns', 'gridTemplateRows'],
- gridArea: ['gridColumnEnd', 'gridColumnStart', 'gridRowEnd', 'gridRowStart'],
- gridColumn: ['gridColumnEnd', 'gridColumnStart'],
- gridColumnGap: ['columnGap'],
- gridGap: ['columnGap', 'rowGap'],
- gridRow: ['gridRowEnd', 'gridRowStart'],
- gridRowGap: ['rowGap'],
- gridTemplate: ['gridTemplateAreas', 'gridTemplateColumns', 'gridTemplateRows'],
- listStyle: ['listStyleImage', 'listStylePosition', 'listStyleType'],
- margin: ['marginBottom', 'marginLeft', 'marginRight', 'marginTop'],
- marker: ['markerEnd', 'markerMid', 'markerStart'],
- mask: ['maskClip', 'maskComposite', 'maskImage', 'maskMode', 'maskOrigin', 'maskPositionX', 'maskPositionY', 'maskRepeat', 'maskSize'],
- maskPosition: ['maskPositionX', 'maskPositionY'],
- outline: ['outlineColor', 'outlineStyle', 'outlineWidth'],
- overflow: ['overflowX', 'overflowY'],
- padding: ['paddingBottom', 'paddingLeft', 'paddingRight', 'paddingTop'],
- placeContent: ['alignContent', 'justifyContent'],
- placeItems: ['alignItems', 'justifyItems'],
- placeSelf: ['alignSelf', 'justifySelf'],
- textDecoration: ['textDecorationColor', 'textDecorationLine', 'textDecorationStyle'],
- textEmphasis: ['textEmphasisColor', 'textEmphasisStyle'],
- transition: ['transitionDelay', 'transitionDuration', 'transitionProperty', 'transitionTimingFunction'],
- wordWrap: ['overflowWrap']
- };
- /**
- * CSS properties which accept numbers but are not in units of "px".
- */
- var isUnitlessNumber = {
- animationIterationCount: true,
- borderImageOutset: true,
- borderImageSlice: true,
- borderImageWidth: true,
- boxFlex: true,
- boxFlexGroup: true,
- boxOrdinalGroup: true,
- columnCount: true,
- columns: true,
- flex: true,
- flexGrow: true,
- flexPositive: true,
- flexShrink: true,
- flexNegative: true,
- flexOrder: true,
- gridArea: true,
- gridRow: true,
- gridRowEnd: true,
- gridRowSpan: true,
- gridRowStart: true,
- gridColumn: true,
- gridColumnEnd: true,
- gridColumnSpan: true,
- gridColumnStart: true,
- fontWeight: true,
- lineClamp: true,
- lineHeight: true,
- opacity: true,
- order: true,
- orphans: true,
- tabSize: true,
- widows: true,
- zIndex: true,
- zoom: true,
- // SVG-related properties
- fillOpacity: true,
- floodOpacity: true,
- stopOpacity: true,
- strokeDasharray: true,
- strokeDashoffset: true,
- strokeMiterlimit: true,
- strokeOpacity: true,
- strokeWidth: true
- };
- /**
- * @param {string} prefix vendor-specific prefix, eg: Webkit
- * @param {string} key style name, eg: transitionDuration
- * @return {string} style name prefixed with `prefix`, properly camelCased, eg:
- * WebkitTransitionDuration
- */
- function prefixKey(prefix, key) {
- return prefix + key.charAt(0).toUpperCase() + key.substring(1);
- }
- /**
- * Support style names that may come passed in prefixed by adding permutations
- * of vendor prefixes.
- */
- var prefixes = ['Webkit', 'ms', 'Moz', 'O']; // Using Object.keys here, or else the vanilla for-in loop makes IE8 go into an
- // infinite loop, because it iterates over the newly added props too.
- Object.keys(isUnitlessNumber).forEach(function (prop) {
- prefixes.forEach(function (prefix) {
- isUnitlessNumber[prefixKey(prefix, prop)] = isUnitlessNumber[prop];
- });
- });
- /**
- * Convert a value into the proper css writable value. The style name `name`
- * should be logical (no hyphens), as specified
- * in `CSSProperty.isUnitlessNumber`.
- *
- * @param {string} name CSS property name such as `topMargin`.
- * @param {*} value CSS property value such as `10px`.
- * @return {string} Normalized style value with dimensions applied.
- */
- function dangerousStyleValue(name, value, isCustomProperty) {
- // Note that we've removed escapeTextForBrowser() calls here since the
- // whole string will be escaped when the attribute is injected into
- // the markup. If you provide unsafe user data here they can inject
- // arbitrary CSS which may be problematic (I couldn't repro this):
- // https://www.owasp.org/index.php/XSS_Filter_Evasion_Cheat_Sheet
- // http://www.thespanner.co.uk/2007/11/26/ultimate-xss-css-injection/
- // This is not an XSS hole but instead a potential CSS injection issue
- // which has lead to a greater discussion about how we're going to
- // trust URLs moving forward. See #2115901
- var isEmpty = value == null || typeof value === 'boolean' || value === '';
- if (isEmpty) {
- return '';
- }
- if (!isCustomProperty && typeof value === 'number' && value !== 0 && !(isUnitlessNumber.hasOwnProperty(name) && isUnitlessNumber[name])) {
- return value + 'px'; // Presumes implicit 'px' suffix for unitless numbers
- }
- return ('' + value).trim();
- }
- var uppercasePattern = /([A-Z])/g;
- var msPattern = /^ms-/;
- /**
- * Hyphenates a camelcased CSS property name, for example:
- *
- * > hyphenateStyleName('backgroundColor')
- * < "background-color"
- * > hyphenateStyleName('MozTransition')
- * < "-moz-transition"
- * > hyphenateStyleName('msTransition')
- * < "-ms-transition"
- *
- * As Modernizr suggests (http://modernizr.com/docs/#prefixed), an `ms` prefix
- * is converted to `-ms-`.
- */
- function hyphenateStyleName(name) {
- return name.replace(uppercasePattern, '-$1').toLowerCase().replace(msPattern, '-ms-');
- }
- var warnValidStyle = function () {};
- {
- // 'msTransform' is correct, but the other prefixes should be capitalized
- var badVendoredStyleNamePattern = /^(?:webkit|moz|o)[A-Z]/;
- var msPattern$1 = /^-ms-/;
- var hyphenPattern = /-(.)/g; // style values shouldn't contain a semicolon
- var badStyleValueWithSemicolonPattern = /;\s*$/;
- var warnedStyleNames = {};
- var warnedStyleValues = {};
- var warnedForNaNValue = false;
- var warnedForInfinityValue = false;
- var camelize = function (string) {
- return string.replace(hyphenPattern, function (_, character) {
- return character.toUpperCase();
- });
- };
- var warnHyphenatedStyleName = function (name) {
- if (warnedStyleNames.hasOwnProperty(name) && warnedStyleNames[name]) {
- return;
- }
- warnedStyleNames[name] = true;
- error('Unsupported style property %s. Did you mean %s?', name, // As Andi Smith suggests
- // (http://www.andismith.com/blog/2012/02/modernizr-prefixed/), an `-ms` prefix
- // is converted to lowercase `ms`.
- camelize(name.replace(msPattern$1, 'ms-')));
- };
- var warnBadVendoredStyleName = function (name) {
- if (warnedStyleNames.hasOwnProperty(name) && warnedStyleNames[name]) {
- return;
- }
- warnedStyleNames[name] = true;
- error('Unsupported vendor-prefixed style property %s. Did you mean %s?', name, name.charAt(0).toUpperCase() + name.slice(1));
- };
- var warnStyleValueWithSemicolon = function (name, value) {
- if (warnedStyleValues.hasOwnProperty(value) && warnedStyleValues[value]) {
- return;
- }
- warnedStyleValues[value] = true;
- error("Style property values shouldn't contain a semicolon. " + 'Try "%s: %s" instead.', name, value.replace(badStyleValueWithSemicolonPattern, ''));
- };
- var warnStyleValueIsNaN = function (name, value) {
- if (warnedForNaNValue) {
- return;
- }
- warnedForNaNValue = true;
- error('`NaN` is an invalid value for the `%s` css style property.', name);
- };
- var warnStyleValueIsInfinity = function (name, value) {
- if (warnedForInfinityValue) {
- return;
- }
- warnedForInfinityValue = true;
- error('`Infinity` is an invalid value for the `%s` css style property.', name);
- };
- warnValidStyle = function (name, value) {
- if (name.indexOf('-') > -1) {
- warnHyphenatedStyleName(name);
- } else if (badVendoredStyleNamePattern.test(name)) {
- warnBadVendoredStyleName(name);
- } else if (badStyleValueWithSemicolonPattern.test(value)) {
- warnStyleValueWithSemicolon(name, value);
- }
- if (typeof value === 'number') {
- if (isNaN(value)) {
- warnStyleValueIsNaN(name, value);
- } else if (!isFinite(value)) {
- warnStyleValueIsInfinity(name, value);
- }
- }
- };
- }
- var warnValidStyle$1 = warnValidStyle;
- /**
- * Operations for dealing with CSS properties.
- */
- /**
- * This creates a string that is expected to be equivalent to the style
- * attribute generated by server-side rendering. It by-passes warnings and
- * security checks so it's not safe to use this value for anything other than
- * comparison. It is only used in DEV for SSR validation.
- */
- function createDangerousStringForStyles(styles) {
- {
- var serialized = '';
- var delimiter = '';
- for (var styleName in styles) {
- if (!styles.hasOwnProperty(styleName)) {
- continue;
- }
- var styleValue = styles[styleName];
- if (styleValue != null) {
- var isCustomProperty = styleName.indexOf('--') === 0;
- serialized += delimiter + (isCustomProperty ? styleName : hyphenateStyleName(styleName)) + ':';
- serialized += dangerousStyleValue(styleName, styleValue, isCustomProperty);
- delimiter = ';';
- }
- }
- return serialized || null;
- }
- }
- /**
- * Sets the value for multiple styles on a node. If a value is specified as
- * '' (empty string), the corresponding style property will be unset.
- *
- * @param {DOMElement} node
- * @param {object} styles
- */
- function setValueForStyles(node, styles) {
- var style = node.style;
- for (var styleName in styles) {
- if (!styles.hasOwnProperty(styleName)) {
- continue;
- }
- var isCustomProperty = styleName.indexOf('--') === 0;
- {
- if (!isCustomProperty) {
- warnValidStyle$1(styleName, styles[styleName]);
- }
- }
- var styleValue = dangerousStyleValue(styleName, styles[styleName], isCustomProperty);
- if (styleName === 'float') {
- styleName = 'cssFloat';
- }
- if (isCustomProperty) {
- style.setProperty(styleName, styleValue);
- } else {
- style[styleName] = styleValue;
- }
- }
- }
- function isValueEmpty(value) {
- return value == null || typeof value === 'boolean' || value === '';
- }
- /**
- * Given {color: 'red', overflow: 'hidden'} returns {
- * color: 'color',
- * overflowX: 'overflow',
- * overflowY: 'overflow',
- * }. This can be read as "the overflowY property was set by the overflow
- * shorthand". That is, the values are the property that each was derived from.
- */
- function expandShorthandMap(styles) {
- var expanded = {};
- for (var key in styles) {
- var longhands = shorthandToLonghand[key] || [key];
- for (var i = 0; i < longhands.length; i++) {
- expanded[longhands[i]] = key;
- }
- }
- return expanded;
- }
- /**
- * When mixing shorthand and longhand property names, we warn during updates if
- * we expect an incorrect result to occur. In particular, we warn for:
- *
- * Updating a shorthand property (longhand gets overwritten):
- * {font: 'foo', fontVariant: 'bar'} -> {font: 'baz', fontVariant: 'bar'}
- * becomes .style.font = 'baz'
- * Removing a shorthand property (longhand gets lost too):
- * {font: 'foo', fontVariant: 'bar'} -> {fontVariant: 'bar'}
- * becomes .style.font = ''
- * Removing a longhand property (should revert to shorthand; doesn't):
- * {font: 'foo', fontVariant: 'bar'} -> {font: 'foo'}
- * becomes .style.fontVariant = ''
- */
- function validateShorthandPropertyCollisionInDev(styleUpdates, nextStyles) {
- {
- if (!nextStyles) {
- return;
- }
- var expandedUpdates = expandShorthandMap(styleUpdates);
- var expandedStyles = expandShorthandMap(nextStyles);
- var warnedAbout = {};
- for (var key in expandedUpdates) {
- var originalKey = expandedUpdates[key];
- var correctOriginalKey = expandedStyles[key];
- if (correctOriginalKey && originalKey !== correctOriginalKey) {
- var warningKey = originalKey + ',' + correctOriginalKey;
- if (warnedAbout[warningKey]) {
- continue;
- }
- warnedAbout[warningKey] = true;
- error('%s a style property during rerender (%s) when a ' + 'conflicting property is set (%s) can lead to styling bugs. To ' + "avoid this, don't mix shorthand and non-shorthand properties " + 'for the same value; instead, replace the shorthand with ' + 'separate values.', isValueEmpty(styleUpdates[originalKey]) ? 'Removing' : 'Updating', originalKey, correctOriginalKey);
- }
- }
- }
- }
- // For HTML, certain tags should omit their close tag. We keep a whitelist for
- // those special-case tags.
- var omittedCloseTags = {
- area: true,
- base: true,
- br: true,
- col: true,
- embed: true,
- hr: true,
- img: true,
- input: true,
- keygen: true,
- link: true,
- meta: true,
- param: true,
- source: true,
- track: true,
- wbr: true // NOTE: menuitem's close tag should be omitted, but that causes problems.
- };
- // `omittedCloseTags` except that `menuitem` should still have its closing tag.
- var voidElementTags = _assign({
- menuitem: true
- }, omittedCloseTags);
- var HTML = '__html';
- var ReactDebugCurrentFrame$3 = null;
- {
- ReactDebugCurrentFrame$3 = ReactSharedInternals.ReactDebugCurrentFrame;
- }
- function assertValidProps(tag, props) {
- if (!props) {
- return;
- } // Note the use of `==` which checks for null or undefined.
- if (voidElementTags[tag]) {
- if (!(props.children == null && props.dangerouslySetInnerHTML == null)) {
- {
- throw Error( tag + " is a void element tag and must neither have `children` nor use `dangerouslySetInnerHTML`." + ( ReactDebugCurrentFrame$3.getStackAddendum() ) );
- }
- }
- }
- if (props.dangerouslySetInnerHTML != null) {
- if (!(props.children == null)) {
- {
- throw Error( "Can only set one of `children` or `props.dangerouslySetInnerHTML`." );
- }
- }
- if (!(typeof props.dangerouslySetInnerHTML === 'object' && HTML in props.dangerouslySetInnerHTML)) {
- {
- throw Error( "`props.dangerouslySetInnerHTML` must be in the form `{__html: ...}`. Please visit https://fb.me/react-invariant-dangerously-set-inner-html for more information." );
- }
- }
- }
- {
- if (!props.suppressContentEditableWarning && props.contentEditable && props.children != null) {
- error('A component is `contentEditable` and contains `children` managed by ' + 'React. It is now your responsibility to guarantee that none of ' + 'those nodes are unexpectedly modified or duplicated. This is ' + 'probably not intentional.');
- }
- }
- if (!(props.style == null || typeof props.style === 'object')) {
- {
- throw Error( "The `style` prop expects a mapping from style properties to values, not a string. For example, style={{marginRight: spacing + 'em'}} when using JSX." + ( ReactDebugCurrentFrame$3.getStackAddendum() ) );
- }
- }
- }
- function isCustomComponent(tagName, props) {
- if (tagName.indexOf('-') === -1) {
- return typeof props.is === 'string';
- }
- switch (tagName) {
- // These are reserved SVG and MathML elements.
- // We don't mind this whitelist too much because we expect it to never grow.
- // The alternative is to track the namespace in a few places which is convoluted.
- // https://w3c.github.io/webcomponents/spec/custom/#custom-elements-core-concepts
- case 'annotation-xml':
- case 'color-profile':
- case 'font-face':
- case 'font-face-src':
- case 'font-face-uri':
- case 'font-face-format':
- case 'font-face-name':
- case 'missing-glyph':
- return false;
- default:
- return true;
- }
- }
- // When adding attributes to the HTML or SVG whitelist, be sure to
- // also add them to this module to ensure casing and incorrect name
- // warnings.
- var possibleStandardNames = {
- // HTML
- accept: 'accept',
- acceptcharset: 'acceptCharset',
- 'accept-charset': 'acceptCharset',
- accesskey: 'accessKey',
- action: 'action',
- allowfullscreen: 'allowFullScreen',
- alt: 'alt',
- as: 'as',
- async: 'async',
- autocapitalize: 'autoCapitalize',
- autocomplete: 'autoComplete',
- autocorrect: 'autoCorrect',
- autofocus: 'autoFocus',
- autoplay: 'autoPlay',
- autosave: 'autoSave',
- capture: 'capture',
- cellpadding: 'cellPadding',
- cellspacing: 'cellSpacing',
- challenge: 'challenge',
- charset: 'charSet',
- checked: 'checked',
- children: 'children',
- cite: 'cite',
- class: 'className',
- classid: 'classID',
- classname: 'className',
- cols: 'cols',
- colspan: 'colSpan',
- content: 'content',
- contenteditable: 'contentEditable',
- contextmenu: 'contextMenu',
- controls: 'controls',
- controlslist: 'controlsList',
- coords: 'coords',
- crossorigin: 'crossOrigin',
- dangerouslysetinnerhtml: 'dangerouslySetInnerHTML',
- data: 'data',
- datetime: 'dateTime',
- default: 'default',
- defaultchecked: 'defaultChecked',
- defaultvalue: 'defaultValue',
- defer: 'defer',
- dir: 'dir',
- disabled: 'disabled',
- disablepictureinpicture: 'disablePictureInPicture',
- download: 'download',
- draggable: 'draggable',
- enctype: 'encType',
- for: 'htmlFor',
- form: 'form',
- formmethod: 'formMethod',
- formaction: 'formAction',
- formenctype: 'formEncType',
- formnovalidate: 'formNoValidate',
- formtarget: 'formTarget',
- frameborder: 'frameBorder',
- headers: 'headers',
- height: 'height',
- hidden: 'hidden',
- high: 'high',
- href: 'href',
- hreflang: 'hrefLang',
- htmlfor: 'htmlFor',
- httpequiv: 'httpEquiv',
- 'http-equiv': 'httpEquiv',
- icon: 'icon',
- id: 'id',
- innerhtml: 'innerHTML',
- inputmode: 'inputMode',
- integrity: 'integrity',
- is: 'is',
- itemid: 'itemID',
- itemprop: 'itemProp',
- itemref: 'itemRef',
- itemscope: 'itemScope',
- itemtype: 'itemType',
- keyparams: 'keyParams',
- keytype: 'keyType',
- kind: 'kind',
- label: 'label',
- lang: 'lang',
- list: 'list',
- loop: 'loop',
- low: 'low',
- manifest: 'manifest',
- marginwidth: 'marginWidth',
- marginheight: 'marginHeight',
- max: 'max',
- maxlength: 'maxLength',
- media: 'media',
- mediagroup: 'mediaGroup',
- method: 'method',
- min: 'min',
- minlength: 'minLength',
- multiple: 'multiple',
- muted: 'muted',
- name: 'name',
- nomodule: 'noModule',
- nonce: 'nonce',
- novalidate: 'noValidate',
- open: 'open',
- optimum: 'optimum',
- pattern: 'pattern',
- placeholder: 'placeholder',
- playsinline: 'playsInline',
- poster: 'poster',
- preload: 'preload',
- profile: 'profile',
- radiogroup: 'radioGroup',
- readonly: 'readOnly',
- referrerpolicy: 'referrerPolicy',
- rel: 'rel',
- required: 'required',
- reversed: 'reversed',
- role: 'role',
- rows: 'rows',
- rowspan: 'rowSpan',
- sandbox: 'sandbox',
- scope: 'scope',
- scoped: 'scoped',
- scrolling: 'scrolling',
- seamless: 'seamless',
- selected: 'selected',
- shape: 'shape',
- size: 'size',
- sizes: 'sizes',
- span: 'span',
- spellcheck: 'spellCheck',
- src: 'src',
- srcdoc: 'srcDoc',
- srclang: 'srcLang',
- srcset: 'srcSet',
- start: 'start',
- step: 'step',
- style: 'style',
- summary: 'summary',
- tabindex: 'tabIndex',
- target: 'target',
- title: 'title',
- type: 'type',
- usemap: 'useMap',
- value: 'value',
- width: 'width',
- wmode: 'wmode',
- wrap: 'wrap',
- // SVG
- about: 'about',
- accentheight: 'accentHeight',
- 'accent-height': 'accentHeight',
- accumulate: 'accumulate',
- additive: 'additive',
- alignmentbaseline: 'alignmentBaseline',
- 'alignment-baseline': 'alignmentBaseline',
- allowreorder: 'allowReorder',
- alphabetic: 'alphabetic',
- amplitude: 'amplitude',
- arabicform: 'arabicForm',
- 'arabic-form': 'arabicForm',
- ascent: 'ascent',
- attributename: 'attributeName',
- attributetype: 'attributeType',
- autoreverse: 'autoReverse',
- azimuth: 'azimuth',
- basefrequency: 'baseFrequency',
- baselineshift: 'baselineShift',
- 'baseline-shift': 'baselineShift',
- baseprofile: 'baseProfile',
- bbox: 'bbox',
- begin: 'begin',
- bias: 'bias',
- by: 'by',
- calcmode: 'calcMode',
- capheight: 'capHeight',
- 'cap-height': 'capHeight',
- clip: 'clip',
- clippath: 'clipPath',
- 'clip-path': 'clipPath',
- clippathunits: 'clipPathUnits',
- cliprule: 'clipRule',
- 'clip-rule': 'clipRule',
- color: 'color',
- colorinterpolation: 'colorInterpolation',
- 'color-interpolation': 'colorInterpolation',
- colorinterpolationfilters: 'colorInterpolationFilters',
- 'color-interpolation-filters': 'colorInterpolationFilters',
- colorprofile: 'colorProfile',
- 'color-profile': 'colorProfile',
- colorrendering: 'colorRendering',
- 'color-rendering': 'colorRendering',
- contentscripttype: 'contentScriptType',
- contentstyletype: 'contentStyleType',
- cursor: 'cursor',
- cx: 'cx',
- cy: 'cy',
- d: 'd',
- datatype: 'datatype',
- decelerate: 'decelerate',
- descent: 'descent',
- diffuseconstant: 'diffuseConstant',
- direction: 'direction',
- display: 'display',
- divisor: 'divisor',
- dominantbaseline: 'dominantBaseline',
- 'dominant-baseline': 'dominantBaseline',
- dur: 'dur',
- dx: 'dx',
- dy: 'dy',
- edgemode: 'edgeMode',
- elevation: 'elevation',
- enablebackground: 'enableBackground',
- 'enable-background': 'enableBackground',
- end: 'end',
- exponent: 'exponent',
- externalresourcesrequired: 'externalResourcesRequired',
- fill: 'fill',
- fillopacity: 'fillOpacity',
- 'fill-opacity': 'fillOpacity',
- fillrule: 'fillRule',
- 'fill-rule': 'fillRule',
- filter: 'filter',
- filterres: 'filterRes',
- filterunits: 'filterUnits',
- floodopacity: 'floodOpacity',
- 'flood-opacity': 'floodOpacity',
- floodcolor: 'floodColor',
- 'flood-color': 'floodColor',
- focusable: 'focusable',
- fontfamily: 'fontFamily',
- 'font-family': 'fontFamily',
- fontsize: 'fontSize',
- 'font-size': 'fontSize',
- fontsizeadjust: 'fontSizeAdjust',
- 'font-size-adjust': 'fontSizeAdjust',
- fontstretch: 'fontStretch',
- 'font-stretch': 'fontStretch',
- fontstyle: 'fontStyle',
- 'font-style': 'fontStyle',
- fontvariant: 'fontVariant',
- 'font-variant': 'fontVariant',
- fontweight: 'fontWeight',
- 'font-weight': 'fontWeight',
- format: 'format',
- from: 'from',
- fx: 'fx',
- fy: 'fy',
- g1: 'g1',
- g2: 'g2',
- glyphname: 'glyphName',
- 'glyph-name': 'glyphName',
- glyphorientationhorizontal: 'glyphOrientationHorizontal',
- 'glyph-orientation-horizontal': 'glyphOrientationHorizontal',
- glyphorientationvertical: 'glyphOrientationVertical',
- 'glyph-orientation-vertical': 'glyphOrientationVertical',
- glyphref: 'glyphRef',
- gradienttransform: 'gradientTransform',
- gradientunits: 'gradientUnits',
- hanging: 'hanging',
- horizadvx: 'horizAdvX',
- 'horiz-adv-x': 'horizAdvX',
- horizoriginx: 'horizOriginX',
- 'horiz-origin-x': 'horizOriginX',
- ideographic: 'ideographic',
- imagerendering: 'imageRendering',
- 'image-rendering': 'imageRendering',
- in2: 'in2',
- in: 'in',
- inlist: 'inlist',
- intercept: 'intercept',
- k1: 'k1',
- k2: 'k2',
- k3: 'k3',
- k4: 'k4',
- k: 'k',
- kernelmatrix: 'kernelMatrix',
- kernelunitlength: 'kernelUnitLength',
- kerning: 'kerning',
- keypoints: 'keyPoints',
- keysplines: 'keySplines',
- keytimes: 'keyTimes',
- lengthadjust: 'lengthAdjust',
- letterspacing: 'letterSpacing',
- 'letter-spacing': 'letterSpacing',
- lightingcolor: 'lightingColor',
- 'lighting-color': 'lightingColor',
- limitingconeangle: 'limitingConeAngle',
- local: 'local',
- markerend: 'markerEnd',
- 'marker-end': 'markerEnd',
- markerheight: 'markerHeight',
- markermid: 'markerMid',
- 'marker-mid': 'markerMid',
- markerstart: 'markerStart',
- 'marker-start': 'markerStart',
- markerunits: 'markerUnits',
- markerwidth: 'markerWidth',
- mask: 'mask',
- maskcontentunits: 'maskContentUnits',
- maskunits: 'maskUnits',
- mathematical: 'mathematical',
- mode: 'mode',
- numoctaves: 'numOctaves',
- offset: 'offset',
- opacity: 'opacity',
- operator: 'operator',
- order: 'order',
- orient: 'orient',
- orientation: 'orientation',
- origin: 'origin',
- overflow: 'overflow',
- overlineposition: 'overlinePosition',
- 'overline-position': 'overlinePosition',
- overlinethickness: 'overlineThickness',
- 'overline-thickness': 'overlineThickness',
- paintorder: 'paintOrder',
- 'paint-order': 'paintOrder',
- panose1: 'panose1',
- 'panose-1': 'panose1',
- pathlength: 'pathLength',
- patterncontentunits: 'patternContentUnits',
- patterntransform: 'patternTransform',
- patternunits: 'patternUnits',
- pointerevents: 'pointerEvents',
- 'pointer-events': 'pointerEvents',
- points: 'points',
- pointsatx: 'pointsAtX',
- pointsaty: 'pointsAtY',
- pointsatz: 'pointsAtZ',
- prefix: 'prefix',
- preservealpha: 'preserveAlpha',
- preserveaspectratio: 'preserveAspectRatio',
- primitiveunits: 'primitiveUnits',
- property: 'property',
- r: 'r',
- radius: 'radius',
- refx: 'refX',
- refy: 'refY',
- renderingintent: 'renderingIntent',
- 'rendering-intent': 'renderingIntent',
- repeatcount: 'repeatCount',
- repeatdur: 'repeatDur',
- requiredextensions: 'requiredExtensions',
- requiredfeatures: 'requiredFeatures',
- resource: 'resource',
- restart: 'restart',
- result: 'result',
- results: 'results',
- rotate: 'rotate',
- rx: 'rx',
- ry: 'ry',
- scale: 'scale',
- security: 'security',
- seed: 'seed',
- shaperendering: 'shapeRendering',
- 'shape-rendering': 'shapeRendering',
- slope: 'slope',
- spacing: 'spacing',
- specularconstant: 'specularConstant',
- specularexponent: 'specularExponent',
- speed: 'speed',
- spreadmethod: 'spreadMethod',
- startoffset: 'startOffset',
- stddeviation: 'stdDeviation',
- stemh: 'stemh',
- stemv: 'stemv',
- stitchtiles: 'stitchTiles',
- stopcolor: 'stopColor',
- 'stop-color': 'stopColor',
- stopopacity: 'stopOpacity',
- 'stop-opacity': 'stopOpacity',
- strikethroughposition: 'strikethroughPosition',
- 'strikethrough-position': 'strikethroughPosition',
- strikethroughthickness: 'strikethroughThickness',
- 'strikethrough-thickness': 'strikethroughThickness',
- string: 'string',
- stroke: 'stroke',
- strokedasharray: 'strokeDasharray',
- 'stroke-dasharray': 'strokeDasharray',
- strokedashoffset: 'strokeDashoffset',
- 'stroke-dashoffset': 'strokeDashoffset',
- strokelinecap: 'strokeLinecap',
- 'stroke-linecap': 'strokeLinecap',
- strokelinejoin: 'strokeLinejoin',
- 'stroke-linejoin': 'strokeLinejoin',
- strokemiterlimit: 'strokeMiterlimit',
- 'stroke-miterlimit': 'strokeMiterlimit',
- strokewidth: 'strokeWidth',
- 'stroke-width': 'strokeWidth',
- strokeopacity: 'strokeOpacity',
- 'stroke-opacity': 'strokeOpacity',
- suppresscontenteditablewarning: 'suppressContentEditableWarning',
- suppresshydrationwarning: 'suppressHydrationWarning',
- surfacescale: 'surfaceScale',
- systemlanguage: 'systemLanguage',
- tablevalues: 'tableValues',
- targetx: 'targetX',
- targety: 'targetY',
- textanchor: 'textAnchor',
- 'text-anchor': 'textAnchor',
- textdecoration: 'textDecoration',
- 'text-decoration': 'textDecoration',
- textlength: 'textLength',
- textrendering: 'textRendering',
- 'text-rendering': 'textRendering',
- to: 'to',
- transform: 'transform',
- typeof: 'typeof',
- u1: 'u1',
- u2: 'u2',
- underlineposition: 'underlinePosition',
- 'underline-position': 'underlinePosition',
- underlinethickness: 'underlineThickness',
- 'underline-thickness': 'underlineThickness',
- unicode: 'unicode',
- unicodebidi: 'unicodeBidi',
- 'unicode-bidi': 'unicodeBidi',
- unicoderange: 'unicodeRange',
- 'unicode-range': 'unicodeRange',
- unitsperem: 'unitsPerEm',
- 'units-per-em': 'unitsPerEm',
- unselectable: 'unselectable',
- valphabetic: 'vAlphabetic',
- 'v-alphabetic': 'vAlphabetic',
- values: 'values',
- vectoreffect: 'vectorEffect',
- 'vector-effect': 'vectorEffect',
- version: 'version',
- vertadvy: 'vertAdvY',
- 'vert-adv-y': 'vertAdvY',
- vertoriginx: 'vertOriginX',
- 'vert-origin-x': 'vertOriginX',
- vertoriginy: 'vertOriginY',
- 'vert-origin-y': 'vertOriginY',
- vhanging: 'vHanging',
- 'v-hanging': 'vHanging',
- videographic: 'vIdeographic',
- 'v-ideographic': 'vIdeographic',
- viewbox: 'viewBox',
- viewtarget: 'viewTarget',
- visibility: 'visibility',
- vmathematical: 'vMathematical',
- 'v-mathematical': 'vMathematical',
- vocab: 'vocab',
- widths: 'widths',
- wordspacing: 'wordSpacing',
- 'word-spacing': 'wordSpacing',
- writingmode: 'writingMode',
- 'writing-mode': 'writingMode',
- x1: 'x1',
- x2: 'x2',
- x: 'x',
- xchannelselector: 'xChannelSelector',
- xheight: 'xHeight',
- 'x-height': 'xHeight',
- xlinkactuate: 'xlinkActuate',
- 'xlink:actuate': 'xlinkActuate',
- xlinkarcrole: 'xlinkArcrole',
- 'xlink:arcrole': 'xlinkArcrole',
- xlinkhref: 'xlinkHref',
- 'xlink:href': 'xlinkHref',
- xlinkrole: 'xlinkRole',
- 'xlink:role': 'xlinkRole',
- xlinkshow: 'xlinkShow',
- 'xlink:show': 'xlinkShow',
- xlinktitle: 'xlinkTitle',
- 'xlink:title': 'xlinkTitle',
- xlinktype: 'xlinkType',
- 'xlink:type': 'xlinkType',
- xmlbase: 'xmlBase',
- 'xml:base': 'xmlBase',
- xmllang: 'xmlLang',
- 'xml:lang': 'xmlLang',
- xmlns: 'xmlns',
- 'xml:space': 'xmlSpace',
- xmlnsxlink: 'xmlnsXlink',
- 'xmlns:xlink': 'xmlnsXlink',
- xmlspace: 'xmlSpace',
- y1: 'y1',
- y2: 'y2',
- y: 'y',
- ychannelselector: 'yChannelSelector',
- z: 'z',
- zoomandpan: 'zoomAndPan'
- };
- var ariaProperties = {
- 'aria-current': 0,
- // state
- 'aria-details': 0,
- 'aria-disabled': 0,
- // state
- 'aria-hidden': 0,
- // state
- 'aria-invalid': 0,
- // state
- 'aria-keyshortcuts': 0,
- 'aria-label': 0,
- 'aria-roledescription': 0,
- // Widget Attributes
- 'aria-autocomplete': 0,
- 'aria-checked': 0,
- 'aria-expanded': 0,
- 'aria-haspopup': 0,
- 'aria-level': 0,
- 'aria-modal': 0,
- 'aria-multiline': 0,
- 'aria-multiselectable': 0,
- 'aria-orientation': 0,
- 'aria-placeholder': 0,
- 'aria-pressed': 0,
- 'aria-readonly': 0,
- 'aria-required': 0,
- 'aria-selected': 0,
- 'aria-sort': 0,
- 'aria-valuemax': 0,
- 'aria-valuemin': 0,
- 'aria-valuenow': 0,
- 'aria-valuetext': 0,
- // Live Region Attributes
- 'aria-atomic': 0,
- 'aria-busy': 0,
- 'aria-live': 0,
- 'aria-relevant': 0,
- // Drag-and-Drop Attributes
- 'aria-dropeffect': 0,
- 'aria-grabbed': 0,
- // Relationship Attributes
- 'aria-activedescendant': 0,
- 'aria-colcount': 0,
- 'aria-colindex': 0,
- 'aria-colspan': 0,
- 'aria-controls': 0,
- 'aria-describedby': 0,
- 'aria-errormessage': 0,
- 'aria-flowto': 0,
- 'aria-labelledby': 0,
- 'aria-owns': 0,
- 'aria-posinset': 0,
- 'aria-rowcount': 0,
- 'aria-rowindex': 0,
- 'aria-rowspan': 0,
- 'aria-setsize': 0
- };
- var warnedProperties = {};
- var rARIA = new RegExp('^(aria)-[' + ATTRIBUTE_NAME_CHAR + ']*$');
- var rARIACamel = new RegExp('^(aria)[A-Z][' + ATTRIBUTE_NAME_CHAR + ']*$');
- var hasOwnProperty$1 = Object.prototype.hasOwnProperty;
- function validateProperty(tagName, name) {
- {
- if (hasOwnProperty$1.call(warnedProperties, name) && warnedProperties[name]) {
- return true;
- }
- if (rARIACamel.test(name)) {
- var ariaName = 'aria-' + name.slice(4).toLowerCase();
- var correctName = ariaProperties.hasOwnProperty(ariaName) ? ariaName : null; // If this is an aria-* attribute, but is not listed in the known DOM
- // DOM properties, then it is an invalid aria-* attribute.
- if (correctName == null) {
- error('Invalid ARIA attribute `%s`. ARIA attributes follow the pattern aria-* and must be lowercase.', name);
- warnedProperties[name] = true;
- return true;
- } // aria-* attributes should be lowercase; suggest the lowercase version.
- if (name !== correctName) {
- error('Invalid ARIA attribute `%s`. Did you mean `%s`?', name, correctName);
- warnedProperties[name] = true;
- return true;
- }
- }
- if (rARIA.test(name)) {
- var lowerCasedName = name.toLowerCase();
- var standardName = ariaProperties.hasOwnProperty(lowerCasedName) ? lowerCasedName : null; // If this is an aria-* attribute, but is not listed in the known DOM
- // DOM properties, then it is an invalid aria-* attribute.
- if (standardName == null) {
- warnedProperties[name] = true;
- return false;
- } // aria-* attributes should be lowercase; suggest the lowercase version.
- if (name !== standardName) {
- error('Unknown ARIA attribute `%s`. Did you mean `%s`?', name, standardName);
- warnedProperties[name] = true;
- return true;
- }
- }
- }
- return true;
- }
- function warnInvalidARIAProps(type, props) {
- {
- var invalidProps = [];
- for (var key in props) {
- var isValid = validateProperty(type, key);
- if (!isValid) {
- invalidProps.push(key);
- }
- }
- var unknownPropString = invalidProps.map(function (prop) {
- return '`' + prop + '`';
- }).join(', ');
- if (invalidProps.length === 1) {
- error('Invalid aria prop %s on <%s> tag. ' + 'For details, see https://fb.me/invalid-aria-prop', unknownPropString, type);
- } else if (invalidProps.length > 1) {
- error('Invalid aria props %s on <%s> tag. ' + 'For details, see https://fb.me/invalid-aria-prop', unknownPropString, type);
- }
- }
- }
- function validateProperties(type, props) {
- if (isCustomComponent(type, props)) {
- return;
- }
- warnInvalidARIAProps(type, props);
- }
- var didWarnValueNull = false;
- function validateProperties$1(type, props) {
- {
- if (type !== 'input' && type !== 'textarea' && type !== 'select') {
- return;
- }
- if (props != null && props.value === null && !didWarnValueNull) {
- didWarnValueNull = true;
- if (type === 'select' && props.multiple) {
- error('`value` prop on `%s` should not be null. ' + 'Consider using an empty array when `multiple` is set to `true` ' + 'to clear the component or `undefined` for uncontrolled components.', type);
- } else {
- error('`value` prop on `%s` should not be null. ' + 'Consider using an empty string to clear the component or `undefined` ' + 'for uncontrolled components.', type);
- }
- }
- }
- }
- var validateProperty$1 = function () {};
- {
- var warnedProperties$1 = {};
- var _hasOwnProperty = Object.prototype.hasOwnProperty;
- var EVENT_NAME_REGEX = /^on./;
- var INVALID_EVENT_NAME_REGEX = /^on[^A-Z]/;
- var rARIA$1 = new RegExp('^(aria)-[' + ATTRIBUTE_NAME_CHAR + ']*$');
- var rARIACamel$1 = new RegExp('^(aria)[A-Z][' + ATTRIBUTE_NAME_CHAR + ']*$');
- validateProperty$1 = function (tagName, name, value, canUseEventSystem) {
- if (_hasOwnProperty.call(warnedProperties$1, name) && warnedProperties$1[name]) {
- return true;
- }
- var lowerCasedName = name.toLowerCase();
- if (lowerCasedName === 'onfocusin' || lowerCasedName === 'onfocusout') {
- error('React uses onFocus and onBlur instead of onFocusIn and onFocusOut. ' + 'All React events are normalized to bubble, so onFocusIn and onFocusOut ' + 'are not needed/supported by React.');
- warnedProperties$1[name] = true;
- return true;
- } // We can't rely on the event system being injected on the server.
- if (canUseEventSystem) {
- if (registrationNameModules.hasOwnProperty(name)) {
- return true;
- }
- var registrationName = possibleRegistrationNames.hasOwnProperty(lowerCasedName) ? possibleRegistrationNames[lowerCasedName] : null;
- if (registrationName != null) {
- error('Invalid event handler property `%s`. Did you mean `%s`?', name, registrationName);
- warnedProperties$1[name] = true;
- return true;
- }
- if (EVENT_NAME_REGEX.test(name)) {
- error('Unknown event handler property `%s`. It will be ignored.', name);
- warnedProperties$1[name] = true;
- return true;
- }
- } else if (EVENT_NAME_REGEX.test(name)) {
- // If no event plugins have been injected, we are in a server environment.
- // So we can't tell if the event name is correct for sure, but we can filter
- // out known bad ones like `onclick`. We can't suggest a specific replacement though.
- if (INVALID_EVENT_NAME_REGEX.test(name)) {
- error('Invalid event handler property `%s`. ' + 'React events use the camelCase naming convention, for example `onClick`.', name);
- }
- warnedProperties$1[name] = true;
- return true;
- } // Let the ARIA attribute hook validate ARIA attributes
- if (rARIA$1.test(name) || rARIACamel$1.test(name)) {
- return true;
- }
- if (lowerCasedName === 'innerhtml') {
- error('Directly setting property `innerHTML` is not permitted. ' + 'For more information, lookup documentation on `dangerouslySetInnerHTML`.');
- warnedProperties$1[name] = true;
- return true;
- }
- if (lowerCasedName === 'aria') {
- error('The `aria` attribute is reserved for future use in React. ' + 'Pass individual `aria-` attributes instead.');
- warnedProperties$1[name] = true;
- return true;
- }
- if (lowerCasedName === 'is' && value !== null && value !== undefined && typeof value !== 'string') {
- error('Received a `%s` for a string attribute `is`. If this is expected, cast ' + 'the value to a string.', typeof value);
- warnedProperties$1[name] = true;
- return true;
- }
- if (typeof value === 'number' && isNaN(value)) {
- error('Received NaN for the `%s` attribute. If this is expected, cast ' + 'the value to a string.', name);
- warnedProperties$1[name] = true;
- return true;
- }
- var propertyInfo = getPropertyInfo(name);
- var isReserved = propertyInfo !== null && propertyInfo.type === RESERVED; // Known attributes should match the casing specified in the property config.
- if (possibleStandardNames.hasOwnProperty(lowerCasedName)) {
- var standardName = possibleStandardNames[lowerCasedName];
- if (standardName !== name) {
- error('Invalid DOM property `%s`. Did you mean `%s`?', name, standardName);
- warnedProperties$1[name] = true;
- return true;
- }
- } else if (!isReserved && name !== lowerCasedName) {
- // Unknown attributes should have lowercase casing since that's how they
- // will be cased anyway with server rendering.
- error('React does not recognize the `%s` prop on a DOM element. If you ' + 'intentionally want it to appear in the DOM as a custom ' + 'attribute, spell it as lowercase `%s` instead. ' + 'If you accidentally passed it from a parent component, remove ' + 'it from the DOM element.', name, lowerCasedName);
- warnedProperties$1[name] = true;
- return true;
- }
- if (typeof value === 'boolean' && shouldRemoveAttributeWithWarning(name, value, propertyInfo, false)) {
- if (value) {
- error('Received `%s` for a non-boolean attribute `%s`.\n\n' + 'If you want to write it to the DOM, pass a string instead: ' + '%s="%s" or %s={value.toString()}.', value, name, name, value, name);
- } else {
- error('Received `%s` for a non-boolean attribute `%s`.\n\n' + 'If you want to write it to the DOM, pass a string instead: ' + '%s="%s" or %s={value.toString()}.\n\n' + 'If you used to conditionally omit it with %s={condition && value}, ' + 'pass %s={condition ? value : undefined} instead.', value, name, name, value, name, name, name);
- }
- warnedProperties$1[name] = true;
- return true;
- } // Now that we've validated casing, do not validate
- // data types for reserved props
- if (isReserved) {
- return true;
- } // Warn when a known attribute is a bad type
- if (shouldRemoveAttributeWithWarning(name, value, propertyInfo, false)) {
- warnedProperties$1[name] = true;
- return false;
- } // Warn when passing the strings 'false' or 'true' into a boolean prop
- if ((value === 'false' || value === 'true') && propertyInfo !== null && propertyInfo.type === BOOLEAN) {
- error('Received the string `%s` for the boolean attribute `%s`. ' + '%s ' + 'Did you mean %s={%s}?', value, name, value === 'false' ? 'The browser will interpret it as a truthy value.' : 'Although this works, it will not work as expected if you pass the string "false".', name, value);
- warnedProperties$1[name] = true;
- return true;
- }
- return true;
- };
- }
- var warnUnknownProperties = function (type, props, canUseEventSystem) {
- {
- var unknownProps = [];
- for (var key in props) {
- var isValid = validateProperty$1(type, key, props[key], canUseEventSystem);
- if (!isValid) {
- unknownProps.push(key);
- }
- }
- var unknownPropString = unknownProps.map(function (prop) {
- return '`' + prop + '`';
- }).join(', ');
- if (unknownProps.length === 1) {
- error('Invalid value for prop %s on <%s> tag. Either remove it from the element, ' + 'or pass a string or number value to keep it in the DOM. ' + 'For details, see https://fb.me/react-attribute-behavior', unknownPropString, type);
- } else if (unknownProps.length > 1) {
- error('Invalid values for props %s on <%s> tag. Either remove them from the element, ' + 'or pass a string or number value to keep them in the DOM. ' + 'For details, see https://fb.me/react-attribute-behavior', unknownPropString, type);
- }
- }
- };
- function validateProperties$2(type, props, canUseEventSystem) {
- if (isCustomComponent(type, props)) {
- return;
- }
- warnUnknownProperties(type, props, canUseEventSystem);
- }
- var didWarnInvalidHydration = false;
- var DANGEROUSLY_SET_INNER_HTML = 'dangerouslySetInnerHTML';
- var SUPPRESS_CONTENT_EDITABLE_WARNING = 'suppressContentEditableWarning';
- var SUPPRESS_HYDRATION_WARNING = 'suppressHydrationWarning';
- var AUTOFOCUS = 'autoFocus';
- var CHILDREN = 'children';
- var STYLE = 'style';
- var HTML$1 = '__html';
- var HTML_NAMESPACE$1 = Namespaces.html;
- var warnedUnknownTags;
- var suppressHydrationWarning;
- var validatePropertiesInDevelopment;
- var warnForTextDifference;
- var warnForPropDifference;
- var warnForExtraAttributes;
- var warnForInvalidEventListener;
- var canDiffStyleForHydrationWarning;
- var normalizeMarkupForTextOrAttribute;
- var normalizeHTML;
- {
- warnedUnknownTags = {
- // Chrome is the only major browser not shipping <time>. But as of July
- // 2017 it intends to ship it due to widespread usage. We intentionally
- // *don't* warn for <time> even if it's unrecognized by Chrome because
- // it soon will be, and many apps have been using it anyway.
- time: true,
- // There are working polyfills for <dialog>. Let people use it.
- dialog: true,
- // Electron ships a custom <webview> tag to display external web content in
- // an isolated frame and process.
- // This tag is not present in non Electron environments such as JSDom which
- // is often used for testing purposes.
- // @see https://electronjs.org/docs/api/webview-tag
- webview: true
- };
- validatePropertiesInDevelopment = function (type, props) {
- validateProperties(type, props);
- validateProperties$1(type, props);
- validateProperties$2(type, props,
- /* canUseEventSystem */
- true);
- }; // IE 11 parses & normalizes the style attribute as opposed to other
- // browsers. It adds spaces and sorts the properties in some
- // non-alphabetical order. Handling that would require sorting CSS
- // properties in the client & server versions or applying
- // `expectedStyle` to a temporary DOM node to read its `style` attribute
- // normalized. Since it only affects IE, we're skipping style warnings
- // in that browser completely in favor of doing all that work.
- // See https://github.com/facebook/react/issues/11807
- canDiffStyleForHydrationWarning = canUseDOM && !document.documentMode; // HTML parsing normalizes CR and CRLF to LF.
- // It also can turn \u0000 into \uFFFD inside attributes.
- // https://www.w3.org/TR/html5/single-page.html#preprocessing-the-input-stream
- // If we have a mismatch, it might be caused by that.
- // We will still patch up in this case but not fire the warning.
- var NORMALIZE_NEWLINES_REGEX = /\r\n?/g;
- var NORMALIZE_NULL_AND_REPLACEMENT_REGEX = /\u0000|\uFFFD/g;
- normalizeMarkupForTextOrAttribute = function (markup) {
- var markupString = typeof markup === 'string' ? markup : '' + markup;
- return markupString.replace(NORMALIZE_NEWLINES_REGEX, '\n').replace(NORMALIZE_NULL_AND_REPLACEMENT_REGEX, '');
- };
- warnForTextDifference = function (serverText, clientText) {
- if (didWarnInvalidHydration) {
- return;
- }
- var normalizedClientText = normalizeMarkupForTextOrAttribute(clientText);
- var normalizedServerText = normalizeMarkupForTextOrAttribute(serverText);
- if (normalizedServerText === normalizedClientText) {
- return;
- }
- didWarnInvalidHydration = true;
- error('Text content did not match. Server: "%s" Client: "%s"', normalizedServerText, normalizedClientText);
- };
- warnForPropDifference = function (propName, serverValue, clientValue) {
- if (didWarnInvalidHydration) {
- return;
- }
- var normalizedClientValue = normalizeMarkupForTextOrAttribute(clientValue);
- var normalizedServerValue = normalizeMarkupForTextOrAttribute(serverValue);
- if (normalizedServerValue === normalizedClientValue) {
- return;
- }
- didWarnInvalidHydration = true;
- error('Prop `%s` did not match. Server: %s Client: %s', propName, JSON.stringify(normalizedServerValue), JSON.stringify(normalizedClientValue));
- };
- warnForExtraAttributes = function (attributeNames) {
- if (didWarnInvalidHydration) {
- return;
- }
- didWarnInvalidHydration = true;
- var names = [];
- attributeNames.forEach(function (name) {
- names.push(name);
- });
- error('Extra attributes from the server: %s', names);
- };
- warnForInvalidEventListener = function (registrationName, listener) {
- if (listener === false) {
- error('Expected `%s` listener to be a function, instead got `false`.\n\n' + 'If you used to conditionally omit it with %s={condition && value}, ' + 'pass %s={condition ? value : undefined} instead.', registrationName, registrationName, registrationName);
- } else {
- error('Expected `%s` listener to be a function, instead got a value of `%s` type.', registrationName, typeof listener);
- }
- }; // Parse the HTML and read it back to normalize the HTML string so that it
- // can be used for comparison.
- normalizeHTML = function (parent, html) {
- // We could have created a separate document here to avoid
- // re-initializing custom elements if they exist. But this breaks
- // how <noscript> is being handled. So we use the same document.
- // See the discussion in https://github.com/facebook/react/pull/11157.
- var testElement = parent.namespaceURI === HTML_NAMESPACE$1 ? parent.ownerDocument.createElement(parent.tagName) : parent.ownerDocument.createElementNS(parent.namespaceURI, parent.tagName);
- testElement.innerHTML = html;
- return testElement.innerHTML;
- };
- }
- function ensureListeningTo(rootContainerElement, registrationName) {
- var isDocumentOrFragment = rootContainerElement.nodeType === DOCUMENT_NODE || rootContainerElement.nodeType === DOCUMENT_FRAGMENT_NODE;
- var doc = isDocumentOrFragment ? rootContainerElement : rootContainerElement.ownerDocument;
- legacyListenToEvent(registrationName, doc);
- }
- function getOwnerDocumentFromRootContainer(rootContainerElement) {
- return rootContainerElement.nodeType === DOCUMENT_NODE ? rootContainerElement : rootContainerElement.ownerDocument;
- }
- function noop() {}
- function trapClickOnNonInteractiveElement(node) {
- // Mobile Safari does not fire properly bubble click events on
- // non-interactive elements, which means delegated click listeners do not
- // fire. The workaround for this bug involves attaching an empty click
- // listener on the target node.
- // http://www.quirksmode.org/blog/archives/2010/09/click_event_del.html
- // Just set it using the onclick property so that we don't have to manage any
- // bookkeeping for it. Not sure if we need to clear it when the listener is
- // removed.
- // TODO: Only do this for the relevant Safaris maybe?
- node.onclick = noop;
- }
- function setInitialDOMProperties(tag, domElement, rootContainerElement, nextProps, isCustomComponentTag) {
- for (var propKey in nextProps) {
- if (!nextProps.hasOwnProperty(propKey)) {
- continue;
- }
- var nextProp = nextProps[propKey];
- if (propKey === STYLE) {
- {
- if (nextProp) {
- // Freeze the next style object so that we can assume it won't be
- // mutated. We have already warned for this in the past.
- Object.freeze(nextProp);
- }
- } // Relies on `updateStylesByID` not mutating `styleUpdates`.
- setValueForStyles(domElement, nextProp);
- } else if (propKey === DANGEROUSLY_SET_INNER_HTML) {
- var nextHtml = nextProp ? nextProp[HTML$1] : undefined;
- if (nextHtml != null) {
- setInnerHTML(domElement, nextHtml);
- }
- } else if (propKey === CHILDREN) {
- if (typeof nextProp === 'string') {
- // Avoid setting initial textContent when the text is empty. In IE11 setting
- // textContent on a <textarea> will cause the placeholder to not
- // show within the <textarea> until it has been focused and blurred again.
- // https://github.com/facebook/react/issues/6731#issuecomment-254874553
- var canSetTextContent = tag !== 'textarea' || nextProp !== '';
- if (canSetTextContent) {
- setTextContent(domElement, nextProp);
- }
- } else if (typeof nextProp === 'number') {
- setTextContent(domElement, '' + nextProp);
- }
- } else if ( propKey === SUPPRESS_CONTENT_EDITABLE_WARNING || propKey === SUPPRESS_HYDRATION_WARNING) ; else if (propKey === AUTOFOCUS) ; else if (registrationNameModules.hasOwnProperty(propKey)) {
- if (nextProp != null) {
- if ( typeof nextProp !== 'function') {
- warnForInvalidEventListener(propKey, nextProp);
- }
- ensureListeningTo(rootContainerElement, propKey);
- }
- } else if (nextProp != null) {
- setValueForProperty(domElement, propKey, nextProp, isCustomComponentTag);
- }
- }
- }
- function updateDOMProperties(domElement, updatePayload, wasCustomComponentTag, isCustomComponentTag) {
- // TODO: Handle wasCustomComponentTag
- for (var i = 0; i < updatePayload.length; i += 2) {
- var propKey = updatePayload[i];
- var propValue = updatePayload[i + 1];
- if (propKey === STYLE) {
- setValueForStyles(domElement, propValue);
- } else if (propKey === DANGEROUSLY_SET_INNER_HTML) {
- setInnerHTML(domElement, propValue);
- } else if (propKey === CHILDREN) {
- setTextContent(domElement, propValue);
- } else {
- setValueForProperty(domElement, propKey, propValue, isCustomComponentTag);
- }
- }
- }
- function createElement(type, props, rootContainerElement, parentNamespace) {
- var isCustomComponentTag; // We create tags in the namespace of their parent container, except HTML
- // tags get no namespace.
- var ownerDocument = getOwnerDocumentFromRootContainer(rootContainerElement);
- var domElement;
- var namespaceURI = parentNamespace;
- if (namespaceURI === HTML_NAMESPACE$1) {
- namespaceURI = getIntrinsicNamespace(type);
- }
- if (namespaceURI === HTML_NAMESPACE$1) {
- {
- isCustomComponentTag = isCustomComponent(type, props); // Should this check be gated by parent namespace? Not sure we want to
- // allow <SVG> or <mATH>.
- if (!isCustomComponentTag && type !== type.toLowerCase()) {
- error('<%s /> is using incorrect casing. ' + 'Use PascalCase for React components, ' + 'or lowercase for HTML elements.', type);
- }
- }
- if (type === 'script') {
- // Create the script via .innerHTML so its "parser-inserted" flag is
- // set to true and it does not execute
- var div = ownerDocument.createElement('div');
- div.innerHTML = '<script><' + '/script>'; // eslint-disable-line
- // This is guaranteed to yield a script element.
- var firstChild = div.firstChild;
- domElement = div.removeChild(firstChild);
- } else if (typeof props.is === 'string') {
- // $FlowIssue `createElement` should be updated for Web Components
- domElement = ownerDocument.createElement(type, {
- is: props.is
- });
- } else {
- // Separate else branch instead of using `props.is || undefined` above because of a Firefox bug.
- // See discussion in https://github.com/facebook/react/pull/6896
- // and discussion in https://bugzilla.mozilla.org/show_bug.cgi?id=1276240
- domElement = ownerDocument.createElement(type); // Normally attributes are assigned in `setInitialDOMProperties`, however the `multiple` and `size`
- // attributes on `select`s needs to be added before `option`s are inserted.
- // This prevents:
- // - a bug where the `select` does not scroll to the correct option because singular
- // `select` elements automatically pick the first item #13222
- // - a bug where the `select` set the first item as selected despite the `size` attribute #14239
- // See https://github.com/facebook/react/issues/13222
- // and https://github.com/facebook/react/issues/14239
- if (type === 'select') {
- var node = domElement;
- if (props.multiple) {
- node.multiple = true;
- } else if (props.size) {
- // Setting a size greater than 1 causes a select to behave like `multiple=true`, where
- // it is possible that no option is selected.
- //
- // This is only necessary when a select in "single selection mode".
- node.size = props.size;
- }
- }
- }
- } else {
- domElement = ownerDocument.createElementNS(namespaceURI, type);
- }
- {
- if (namespaceURI === HTML_NAMESPACE$1) {
- if (!isCustomComponentTag && Object.prototype.toString.call(domElement) === '[object HTMLUnknownElement]' && !Object.prototype.hasOwnProperty.call(warnedUnknownTags, type)) {
- warnedUnknownTags[type] = true;
- error('The tag <%s> is unrecognized in this browser. ' + 'If you meant to render a React component, start its name with ' + 'an uppercase letter.', type);
- }
- }
- }
- return domElement;
- }
- function createTextNode(text, rootContainerElement) {
- return getOwnerDocumentFromRootContainer(rootContainerElement).createTextNode(text);
- }
- function setInitialProperties(domElement, tag, rawProps, rootContainerElement) {
- var isCustomComponentTag = isCustomComponent(tag, rawProps);
- {
- validatePropertiesInDevelopment(tag, rawProps);
- } // TODO: Make sure that we check isMounted before firing any of these events.
- var props;
- switch (tag) {
- case 'iframe':
- case 'object':
- case 'embed':
- trapBubbledEvent(TOP_LOAD, domElement);
- props = rawProps;
- break;
- case 'video':
- case 'audio':
- // Create listener for each media event
- for (var i = 0; i < mediaEventTypes.length; i++) {
- trapBubbledEvent(mediaEventTypes[i], domElement);
- }
- props = rawProps;
- break;
- case 'source':
- trapBubbledEvent(TOP_ERROR, domElement);
- props = rawProps;
- break;
- case 'img':
- case 'image':
- case 'link':
- trapBubbledEvent(TOP_ERROR, domElement);
- trapBubbledEvent(TOP_LOAD, domElement);
- props = rawProps;
- break;
- case 'form':
- trapBubbledEvent(TOP_RESET, domElement);
- trapBubbledEvent(TOP_SUBMIT, domElement);
- props = rawProps;
- break;
- case 'details':
- trapBubbledEvent(TOP_TOGGLE, domElement);
- props = rawProps;
- break;
- case 'input':
- initWrapperState(domElement, rawProps);
- props = getHostProps(domElement, rawProps);
- trapBubbledEvent(TOP_INVALID, domElement); // For controlled components we always need to ensure we're listening
- // to onChange. Even if there is no listener.
- ensureListeningTo(rootContainerElement, 'onChange');
- break;
- case 'option':
- validateProps(domElement, rawProps);
- props = getHostProps$1(domElement, rawProps);
- break;
- case 'select':
- initWrapperState$1(domElement, rawProps);
- props = getHostProps$2(domElement, rawProps);
- trapBubbledEvent(TOP_INVALID, domElement); // For controlled components we always need to ensure we're listening
- // to onChange. Even if there is no listener.
- ensureListeningTo(rootContainerElement, 'onChange');
- break;
- case 'textarea':
- initWrapperState$2(domElement, rawProps);
- props = getHostProps$3(domElement, rawProps);
- trapBubbledEvent(TOP_INVALID, domElement); // For controlled components we always need to ensure we're listening
- // to onChange. Even if there is no listener.
- ensureListeningTo(rootContainerElement, 'onChange');
- break;
- default:
- props = rawProps;
- }
- assertValidProps(tag, props);
- setInitialDOMProperties(tag, domElement, rootContainerElement, props, isCustomComponentTag);
- switch (tag) {
- case 'input':
- // TODO: Make sure we check if this is still unmounted or do any clean
- // up necessary since we never stop tracking anymore.
- track(domElement);
- postMountWrapper(domElement, rawProps, false);
- break;
- case 'textarea':
- // TODO: Make sure we check if this is still unmounted or do any clean
- // up necessary since we never stop tracking anymore.
- track(domElement);
- postMountWrapper$3(domElement);
- break;
- case 'option':
- postMountWrapper$1(domElement, rawProps);
- break;
- case 'select':
- postMountWrapper$2(domElement, rawProps);
- break;
- default:
- if (typeof props.onClick === 'function') {
- // TODO: This cast may not be sound for SVG, MathML or custom elements.
- trapClickOnNonInteractiveElement(domElement);
- }
- break;
- }
- } // Calculate the diff between the two objects.
- function diffProperties(domElement, tag, lastRawProps, nextRawProps, rootContainerElement) {
- {
- validatePropertiesInDevelopment(tag, nextRawProps);
- }
- var updatePayload = null;
- var lastProps;
- var nextProps;
- switch (tag) {
- case 'input':
- lastProps = getHostProps(domElement, lastRawProps);
- nextProps = getHostProps(domElement, nextRawProps);
- updatePayload = [];
- break;
- case 'option':
- lastProps = getHostProps$1(domElement, lastRawProps);
- nextProps = getHostProps$1(domElement, nextRawProps);
- updatePayload = [];
- break;
- case 'select':
- lastProps = getHostProps$2(domElement, lastRawProps);
- nextProps = getHostProps$2(domElement, nextRawProps);
- updatePayload = [];
- break;
- case 'textarea':
- lastProps = getHostProps$3(domElement, lastRawProps);
- nextProps = getHostProps$3(domElement, nextRawProps);
- updatePayload = [];
- break;
- default:
- lastProps = lastRawProps;
- nextProps = nextRawProps;
- if (typeof lastProps.onClick !== 'function' && typeof nextProps.onClick === 'function') {
- // TODO: This cast may not be sound for SVG, MathML or custom elements.
- trapClickOnNonInteractiveElement(domElement);
- }
- break;
- }
- assertValidProps(tag, nextProps);
- var propKey;
- var styleName;
- var styleUpdates = null;
- for (propKey in lastProps) {
- if (nextProps.hasOwnProperty(propKey) || !lastProps.hasOwnProperty(propKey) || lastProps[propKey] == null) {
- continue;
- }
- if (propKey === STYLE) {
- var lastStyle = lastProps[propKey];
- for (styleName in lastStyle) {
- if (lastStyle.hasOwnProperty(styleName)) {
- if (!styleUpdates) {
- styleUpdates = {};
- }
- styleUpdates[styleName] = '';
- }
- }
- } else if (propKey === DANGEROUSLY_SET_INNER_HTML || propKey === CHILDREN) ; else if ( propKey === SUPPRESS_CONTENT_EDITABLE_WARNING || propKey === SUPPRESS_HYDRATION_WARNING) ; else if (propKey === AUTOFOCUS) ; else if (registrationNameModules.hasOwnProperty(propKey)) {
- // This is a special case. If any listener updates we need to ensure
- // that the "current" fiber pointer gets updated so we need a commit
- // to update this element.
- if (!updatePayload) {
- updatePayload = [];
- }
- } else {
- // For all other deleted properties we add it to the queue. We use
- // the whitelist in the commit phase instead.
- (updatePayload = updatePayload || []).push(propKey, null);
- }
- }
- for (propKey in nextProps) {
- var nextProp = nextProps[propKey];
- var lastProp = lastProps != null ? lastProps[propKey] : undefined;
- if (!nextProps.hasOwnProperty(propKey) || nextProp === lastProp || nextProp == null && lastProp == null) {
- continue;
- }
- if (propKey === STYLE) {
- {
- if (nextProp) {
- // Freeze the next style object so that we can assume it won't be
- // mutated. We have already warned for this in the past.
- Object.freeze(nextProp);
- }
- }
- if (lastProp) {
- // Unset styles on `lastProp` but not on `nextProp`.
- for (styleName in lastProp) {
- if (lastProp.hasOwnProperty(styleName) && (!nextProp || !nextProp.hasOwnProperty(styleName))) {
- if (!styleUpdates) {
- styleUpdates = {};
- }
- styleUpdates[styleName] = '';
- }
- } // Update styles that changed since `lastProp`.
- for (styleName in nextProp) {
- if (nextProp.hasOwnProperty(styleName) && lastProp[styleName] !== nextProp[styleName]) {
- if (!styleUpdates) {
- styleUpdates = {};
- }
- styleUpdates[styleName] = nextProp[styleName];
- }
- }
- } else {
- // Relies on `updateStylesByID` not mutating `styleUpdates`.
- if (!styleUpdates) {
- if (!updatePayload) {
- updatePayload = [];
- }
- updatePayload.push(propKey, styleUpdates);
- }
- styleUpdates = nextProp;
- }
- } else if (propKey === DANGEROUSLY_SET_INNER_HTML) {
- var nextHtml = nextProp ? nextProp[HTML$1] : undefined;
- var lastHtml = lastProp ? lastProp[HTML$1] : undefined;
- if (nextHtml != null) {
- if (lastHtml !== nextHtml) {
- (updatePayload = updatePayload || []).push(propKey, nextHtml);
- }
- }
- } else if (propKey === CHILDREN) {
- if (lastProp !== nextProp && (typeof nextProp === 'string' || typeof nextProp === 'number')) {
- (updatePayload = updatePayload || []).push(propKey, '' + nextProp);
- }
- } else if ( propKey === SUPPRESS_CONTENT_EDITABLE_WARNING || propKey === SUPPRESS_HYDRATION_WARNING) ; else if (registrationNameModules.hasOwnProperty(propKey)) {
- if (nextProp != null) {
- // We eagerly listen to this even though we haven't committed yet.
- if ( typeof nextProp !== 'function') {
- warnForInvalidEventListener(propKey, nextProp);
- }
- ensureListeningTo(rootContainerElement, propKey);
- }
- if (!updatePayload && lastProp !== nextProp) {
- // This is a special case. If any listener updates we need to ensure
- // that the "current" props pointer gets updated so we need a commit
- // to update this element.
- updatePayload = [];
- }
- } else {
- // For any other property we always add it to the queue and then we
- // filter it out using the whitelist during the commit.
- (updatePayload = updatePayload || []).push(propKey, nextProp);
- }
- }
- if (styleUpdates) {
- {
- validateShorthandPropertyCollisionInDev(styleUpdates, nextProps[STYLE]);
- }
- (updatePayload = updatePayload || []).push(STYLE, styleUpdates);
- }
- return updatePayload;
- } // Apply the diff.
- function updateProperties(domElement, updatePayload, tag, lastRawProps, nextRawProps) {
- // Update checked *before* name.
- // In the middle of an update, it is possible to have multiple checked.
- // When a checked radio tries to change name, browser makes another radio's checked false.
- if (tag === 'input' && nextRawProps.type === 'radio' && nextRawProps.name != null) {
- updateChecked(domElement, nextRawProps);
- }
- var wasCustomComponentTag = isCustomComponent(tag, lastRawProps);
- var isCustomComponentTag = isCustomComponent(tag, nextRawProps); // Apply the diff.
- updateDOMProperties(domElement, updatePayload, wasCustomComponentTag, isCustomComponentTag); // TODO: Ensure that an update gets scheduled if any of the special props
- // changed.
- switch (tag) {
- case 'input':
- // Update the wrapper around inputs *after* updating props. This has to
- // happen after `updateDOMProperties`. Otherwise HTML5 input validations
- // raise warnings and prevent the new value from being assigned.
- updateWrapper(domElement, nextRawProps);
- break;
- case 'textarea':
- updateWrapper$1(domElement, nextRawProps);
- break;
- case 'select':
- // <select> value update needs to occur after <option> children
- // reconciliation
- postUpdateWrapper(domElement, nextRawProps);
- break;
- }
- }
- function getPossibleStandardName(propName) {
- {
- var lowerCasedName = propName.toLowerCase();
- if (!possibleStandardNames.hasOwnProperty(lowerCasedName)) {
- return null;
- }
- return possibleStandardNames[lowerCasedName] || null;
- }
- }
- function diffHydratedProperties(domElement, tag, rawProps, parentNamespace, rootContainerElement) {
- var isCustomComponentTag;
- var extraAttributeNames;
- {
- suppressHydrationWarning = rawProps[SUPPRESS_HYDRATION_WARNING] === true;
- isCustomComponentTag = isCustomComponent(tag, rawProps);
- validatePropertiesInDevelopment(tag, rawProps);
- } // TODO: Make sure that we check isMounted before firing any of these events.
- switch (tag) {
- case 'iframe':
- case 'object':
- case 'embed':
- trapBubbledEvent(TOP_LOAD, domElement);
- break;
- case 'video':
- case 'audio':
- // Create listener for each media event
- for (var i = 0; i < mediaEventTypes.length; i++) {
- trapBubbledEvent(mediaEventTypes[i], domElement);
- }
- break;
- case 'source':
- trapBubbledEvent(TOP_ERROR, domElement);
- break;
- case 'img':
- case 'image':
- case 'link':
- trapBubbledEvent(TOP_ERROR, domElement);
- trapBubbledEvent(TOP_LOAD, domElement);
- break;
- case 'form':
- trapBubbledEvent(TOP_RESET, domElement);
- trapBubbledEvent(TOP_SUBMIT, domElement);
- break;
- case 'details':
- trapBubbledEvent(TOP_TOGGLE, domElement);
- break;
- case 'input':
- initWrapperState(domElement, rawProps);
- trapBubbledEvent(TOP_INVALID, domElement); // For controlled components we always need to ensure we're listening
- // to onChange. Even if there is no listener.
- ensureListeningTo(rootContainerElement, 'onChange');
- break;
- case 'option':
- validateProps(domElement, rawProps);
- break;
- case 'select':
- initWrapperState$1(domElement, rawProps);
- trapBubbledEvent(TOP_INVALID, domElement); // For controlled components we always need to ensure we're listening
- // to onChange. Even if there is no listener.
- ensureListeningTo(rootContainerElement, 'onChange');
- break;
- case 'textarea':
- initWrapperState$2(domElement, rawProps);
- trapBubbledEvent(TOP_INVALID, domElement); // For controlled components we always need to ensure we're listening
- // to onChange. Even if there is no listener.
- ensureListeningTo(rootContainerElement, 'onChange');
- break;
- }
- assertValidProps(tag, rawProps);
- {
- extraAttributeNames = new Set();
- var attributes = domElement.attributes;
- for (var _i = 0; _i < attributes.length; _i++) {
- var name = attributes[_i].name.toLowerCase();
- switch (name) {
- // Built-in SSR attribute is whitelisted
- case 'data-reactroot':
- break;
- // Controlled attributes are not validated
- // TODO: Only ignore them on controlled tags.
- case 'value':
- break;
- case 'checked':
- break;
- case 'selected':
- break;
- default:
- // Intentionally use the original name.
- // See discussion in https://github.com/facebook/react/pull/10676.
- extraAttributeNames.add(attributes[_i].name);
- }
- }
- }
- var updatePayload = null;
- for (var propKey in rawProps) {
- if (!rawProps.hasOwnProperty(propKey)) {
- continue;
- }
- var nextProp = rawProps[propKey];
- if (propKey === CHILDREN) {
- // For text content children we compare against textContent. This
- // might match additional HTML that is hidden when we read it using
- // textContent. E.g. "foo" will match "f<span>oo</span>" but that still
- // satisfies our requirement. Our requirement is not to produce perfect
- // HTML and attributes. Ideally we should preserve structure but it's
- // ok not to if the visible content is still enough to indicate what
- // even listeners these nodes might be wired up to.
- // TODO: Warn if there is more than a single textNode as a child.
- // TODO: Should we use domElement.firstChild.nodeValue to compare?
- if (typeof nextProp === 'string') {
- if (domElement.textContent !== nextProp) {
- if ( !suppressHydrationWarning) {
- warnForTextDifference(domElement.textContent, nextProp);
- }
- updatePayload = [CHILDREN, nextProp];
- }
- } else if (typeof nextProp === 'number') {
- if (domElement.textContent !== '' + nextProp) {
- if ( !suppressHydrationWarning) {
- warnForTextDifference(domElement.textContent, nextProp);
- }
- updatePayload = [CHILDREN, '' + nextProp];
- }
- }
- } else if (registrationNameModules.hasOwnProperty(propKey)) {
- if (nextProp != null) {
- if ( typeof nextProp !== 'function') {
- warnForInvalidEventListener(propKey, nextProp);
- }
- ensureListeningTo(rootContainerElement, propKey);
- }
- } else if ( // Convince Flow we've calculated it (it's DEV-only in this method.)
- typeof isCustomComponentTag === 'boolean') {
- // Validate that the properties correspond to their expected values.
- var serverValue = void 0;
- var propertyInfo = getPropertyInfo(propKey);
- if (suppressHydrationWarning) ; else if ( propKey === SUPPRESS_CONTENT_EDITABLE_WARNING || propKey === SUPPRESS_HYDRATION_WARNING || // Controlled attributes are not validated
- // TODO: Only ignore them on controlled tags.
- propKey === 'value' || propKey === 'checked' || propKey === 'selected') ; else if (propKey === DANGEROUSLY_SET_INNER_HTML) {
- var serverHTML = domElement.innerHTML;
- var nextHtml = nextProp ? nextProp[HTML$1] : undefined;
- var expectedHTML = normalizeHTML(domElement, nextHtml != null ? nextHtml : '');
- if (expectedHTML !== serverHTML) {
- warnForPropDifference(propKey, serverHTML, expectedHTML);
- }
- } else if (propKey === STYLE) {
- // $FlowFixMe - Should be inferred as not undefined.
- extraAttributeNames.delete(propKey);
- if (canDiffStyleForHydrationWarning) {
- var expectedStyle = createDangerousStringForStyles(nextProp);
- serverValue = domElement.getAttribute('style');
- if (expectedStyle !== serverValue) {
- warnForPropDifference(propKey, serverValue, expectedStyle);
- }
- }
- } else if (isCustomComponentTag) {
- // $FlowFixMe - Should be inferred as not undefined.
- extraAttributeNames.delete(propKey.toLowerCase());
- serverValue = getValueForAttribute(domElement, propKey, nextProp);
- if (nextProp !== serverValue) {
- warnForPropDifference(propKey, serverValue, nextProp);
- }
- } else if (!shouldIgnoreAttribute(propKey, propertyInfo, isCustomComponentTag) && !shouldRemoveAttribute(propKey, nextProp, propertyInfo, isCustomComponentTag)) {
- var isMismatchDueToBadCasing = false;
- if (propertyInfo !== null) {
- // $FlowFixMe - Should be inferred as not undefined.
- extraAttributeNames.delete(propertyInfo.attributeName);
- serverValue = getValueForProperty(domElement, propKey, nextProp, propertyInfo);
- } else {
- var ownNamespace = parentNamespace;
- if (ownNamespace === HTML_NAMESPACE$1) {
- ownNamespace = getIntrinsicNamespace(tag);
- }
- if (ownNamespace === HTML_NAMESPACE$1) {
- // $FlowFixMe - Should be inferred as not undefined.
- extraAttributeNames.delete(propKey.toLowerCase());
- } else {
- var standardName = getPossibleStandardName(propKey);
- if (standardName !== null && standardName !== propKey) {
- // If an SVG prop is supplied with bad casing, it will
- // be successfully parsed from HTML, but will produce a mismatch
- // (and would be incorrectly rendered on the client).
- // However, we already warn about bad casing elsewhere.
- // So we'll skip the misleading extra mismatch warning in this case.
- isMismatchDueToBadCasing = true; // $FlowFixMe - Should be inferred as not undefined.
- extraAttributeNames.delete(standardName);
- } // $FlowFixMe - Should be inferred as not undefined.
- extraAttributeNames.delete(propKey);
- }
- serverValue = getValueForAttribute(domElement, propKey, nextProp);
- }
- if (nextProp !== serverValue && !isMismatchDueToBadCasing) {
- warnForPropDifference(propKey, serverValue, nextProp);
- }
- }
- }
- }
- {
- // $FlowFixMe - Should be inferred as not undefined.
- if (extraAttributeNames.size > 0 && !suppressHydrationWarning) {
- // $FlowFixMe - Should be inferred as not undefined.
- warnForExtraAttributes(extraAttributeNames);
- }
- }
- switch (tag) {
- case 'input':
- // TODO: Make sure we check if this is still unmounted or do any clean
- // up necessary since we never stop tracking anymore.
- track(domElement);
- postMountWrapper(domElement, rawProps, true);
- break;
- case 'textarea':
- // TODO: Make sure we check if this is still unmounted or do any clean
- // up necessary since we never stop tracking anymore.
- track(domElement);
- postMountWrapper$3(domElement);
- break;
- case 'select':
- case 'option':
- // For input and textarea we current always set the value property at
- // post mount to force it to diverge from attributes. However, for
- // option and select we don't quite do the same thing and select
- // is not resilient to the DOM state changing so we don't do that here.
- // TODO: Consider not doing this for input and textarea.
- break;
- default:
- if (typeof rawProps.onClick === 'function') {
- // TODO: This cast may not be sound for SVG, MathML or custom elements.
- trapClickOnNonInteractiveElement(domElement);
- }
- break;
- }
- return updatePayload;
- }
- function diffHydratedText(textNode, text) {
- var isDifferent = textNode.nodeValue !== text;
- return isDifferent;
- }
- function warnForUnmatchedText(textNode, text) {
- {
- warnForTextDifference(textNode.nodeValue, text);
- }
- }
- function warnForDeletedHydratableElement(parentNode, child) {
- {
- if (didWarnInvalidHydration) {
- return;
- }
- didWarnInvalidHydration = true;
- error('Did not expect server HTML to contain a <%s> in <%s>.', child.nodeName.toLowerCase(), parentNode.nodeName.toLowerCase());
- }
- }
- function warnForDeletedHydratableText(parentNode, child) {
- {
- if (didWarnInvalidHydration) {
- return;
- }
- didWarnInvalidHydration = true;
- error('Did not expect server HTML to contain the text node "%s" in <%s>.', child.nodeValue, parentNode.nodeName.toLowerCase());
- }
- }
- function warnForInsertedHydratedElement(parentNode, tag, props) {
- {
- if (didWarnInvalidHydration) {
- return;
- }
- didWarnInvalidHydration = true;
- error('Expected server HTML to contain a matching <%s> in <%s>.', tag, parentNode.nodeName.toLowerCase());
- }
- }
- function warnForInsertedHydratedText(parentNode, text) {
- {
- if (text === '') {
- // We expect to insert empty text nodes since they're not represented in
- // the HTML.
- // TODO: Remove this special case if we can just avoid inserting empty
- // text nodes.
- return;
- }
- if (didWarnInvalidHydration) {
- return;
- }
- didWarnInvalidHydration = true;
- error('Expected server HTML to contain a matching text node for "%s" in <%s>.', text, parentNode.nodeName.toLowerCase());
- }
- }
- function restoreControlledState$3(domElement, tag, props) {
- switch (tag) {
- case 'input':
- restoreControlledState(domElement, props);
- return;
- case 'textarea':
- restoreControlledState$2(domElement, props);
- return;
- case 'select':
- restoreControlledState$1(domElement, props);
- return;
- }
- }
- function getActiveElement(doc) {
- doc = doc || (typeof document !== 'undefined' ? document : undefined);
- if (typeof doc === 'undefined') {
- return null;
- }
- try {
- return doc.activeElement || doc.body;
- } catch (e) {
- return doc.body;
- }
- }
- /**
- * Given any node return the first leaf node without children.
- *
- * @param {DOMElement|DOMTextNode} node
- * @return {DOMElement|DOMTextNode}
- */
- function getLeafNode(node) {
- while (node && node.firstChild) {
- node = node.firstChild;
- }
- return node;
- }
- /**
- * Get the next sibling within a container. This will walk up the
- * DOM if a node's siblings have been exhausted.
- *
- * @param {DOMElement|DOMTextNode} node
- * @return {?DOMElement|DOMTextNode}
- */
- function getSiblingNode(node) {
- while (node) {
- if (node.nextSibling) {
- return node.nextSibling;
- }
- node = node.parentNode;
- }
- }
- /**
- * Get object describing the nodes which contain characters at offset.
- *
- * @param {DOMElement|DOMTextNode} root
- * @param {number} offset
- * @return {?object}
- */
- function getNodeForCharacterOffset(root, offset) {
- var node = getLeafNode(root);
- var nodeStart = 0;
- var nodeEnd = 0;
- while (node) {
- if (node.nodeType === TEXT_NODE) {
- nodeEnd = nodeStart + node.textContent.length;
- if (nodeStart <= offset && nodeEnd >= offset) {
- return {
- node: node,
- offset: offset - nodeStart
- };
- }
- nodeStart = nodeEnd;
- }
- node = getLeafNode(getSiblingNode(node));
- }
- }
- /**
- * @param {DOMElement} outerNode
- * @return {?object}
- */
- function getOffsets(outerNode) {
- var ownerDocument = outerNode.ownerDocument;
- var win = ownerDocument && ownerDocument.defaultView || window;
- var selection = win.getSelection && win.getSelection();
- if (!selection || selection.rangeCount === 0) {
- return null;
- }
- var anchorNode = selection.anchorNode,
- anchorOffset = selection.anchorOffset,
- focusNode = selection.focusNode,
- focusOffset = selection.focusOffset; // In Firefox, anchorNode and focusNode can be "anonymous divs", e.g. the
- // up/down buttons on an <input type="number">. Anonymous divs do not seem to
- // expose properties, triggering a "Permission denied error" if any of its
- // properties are accessed. The only seemingly possible way to avoid erroring
- // is to access a property that typically works for non-anonymous divs and
- // catch any error that may otherwise arise. See
- // https://bugzilla.mozilla.org/show_bug.cgi?id=208427
- try {
- /* eslint-disable no-unused-expressions */
- anchorNode.nodeType;
- focusNode.nodeType;
- /* eslint-enable no-unused-expressions */
- } catch (e) {
- return null;
- }
- return getModernOffsetsFromPoints(outerNode, anchorNode, anchorOffset, focusNode, focusOffset);
- }
- /**
- * Returns {start, end} where `start` is the character/codepoint index of
- * (anchorNode, anchorOffset) within the textContent of `outerNode`, and
- * `end` is the index of (focusNode, focusOffset).
- *
- * Returns null if you pass in garbage input but we should probably just crash.
- *
- * Exported only for testing.
- */
- function getModernOffsetsFromPoints(outerNode, anchorNode, anchorOffset, focusNode, focusOffset) {
- var length = 0;
- var start = -1;
- var end = -1;
- var indexWithinAnchor = 0;
- var indexWithinFocus = 0;
- var node = outerNode;
- var parentNode = null;
- outer: while (true) {
- var next = null;
- while (true) {
- if (node === anchorNode && (anchorOffset === 0 || node.nodeType === TEXT_NODE)) {
- start = length + anchorOffset;
- }
- if (node === focusNode && (focusOffset === 0 || node.nodeType === TEXT_NODE)) {
- end = length + focusOffset;
- }
- if (node.nodeType === TEXT_NODE) {
- length += node.nodeValue.length;
- }
- if ((next = node.firstChild) === null) {
- break;
- } // Moving from `node` to its first child `next`.
- parentNode = node;
- node = next;
- }
- while (true) {
- if (node === outerNode) {
- // If `outerNode` has children, this is always the second time visiting
- // it. If it has no children, this is still the first loop, and the only
- // valid selection is anchorNode and focusNode both equal to this node
- // and both offsets 0, in which case we will have handled above.
- break outer;
- }
- if (parentNode === anchorNode && ++indexWithinAnchor === anchorOffset) {
- start = length;
- }
- if (parentNode === focusNode && ++indexWithinFocus === focusOffset) {
- end = length;
- }
- if ((next = node.nextSibling) !== null) {
- break;
- }
- node = parentNode;
- parentNode = node.parentNode;
- } // Moving from `node` to its next sibling `next`.
- node = next;
- }
- if (start === -1 || end === -1) {
- // This should never happen. (Would happen if the anchor/focus nodes aren't
- // actually inside the passed-in node.)
- return null;
- }
- return {
- start: start,
- end: end
- };
- }
- /**
- * In modern non-IE browsers, we can support both forward and backward
- * selections.
- *
- * Note: IE10+ supports the Selection object, but it does not support
- * the `extend` method, which means that even in modern IE, it's not possible
- * to programmatically create a backward selection. Thus, for all IE
- * versions, we use the old IE API to create our selections.
- *
- * @param {DOMElement|DOMTextNode} node
- * @param {object} offsets
- */
- function setOffsets(node, offsets) {
- var doc = node.ownerDocument || document;
- var win = doc && doc.defaultView || window; // Edge fails with "Object expected" in some scenarios.
- // (For instance: TinyMCE editor used in a list component that supports pasting to add more,
- // fails when pasting 100+ items)
- if (!win.getSelection) {
- return;
- }
- var selection = win.getSelection();
- var length = node.textContent.length;
- var start = Math.min(offsets.start, length);
- var end = offsets.end === undefined ? start : Math.min(offsets.end, length); // IE 11 uses modern selection, but doesn't support the extend method.
- // Flip backward selections, so we can set with a single range.
- if (!selection.extend && start > end) {
- var temp = end;
- end = start;
- start = temp;
- }
- var startMarker = getNodeForCharacterOffset(node, start);
- var endMarker = getNodeForCharacterOffset(node, end);
- if (startMarker && endMarker) {
- if (selection.rangeCount === 1 && selection.anchorNode === startMarker.node && selection.anchorOffset === startMarker.offset && selection.focusNode === endMarker.node && selection.focusOffset === endMarker.offset) {
- return;
- }
- var range = doc.createRange();
- range.setStart(startMarker.node, startMarker.offset);
- selection.removeAllRanges();
- if (start > end) {
- selection.addRange(range);
- selection.extend(endMarker.node, endMarker.offset);
- } else {
- range.setEnd(endMarker.node, endMarker.offset);
- selection.addRange(range);
- }
- }
- }
- function isTextNode(node) {
- return node && node.nodeType === TEXT_NODE;
- }
- function containsNode(outerNode, innerNode) {
- if (!outerNode || !innerNode) {
- return false;
- } else if (outerNode === innerNode) {
- return true;
- } else if (isTextNode(outerNode)) {
- return false;
- } else if (isTextNode(innerNode)) {
- return containsNode(outerNode, innerNode.parentNode);
- } else if ('contains' in outerNode) {
- return outerNode.contains(innerNode);
- } else if (outerNode.compareDocumentPosition) {
- return !!(outerNode.compareDocumentPosition(innerNode) & 16);
- } else {
- return false;
- }
- }
- function isInDocument(node) {
- return node && node.ownerDocument && containsNode(node.ownerDocument.documentElement, node);
- }
- function isSameOriginFrame(iframe) {
- try {
- // Accessing the contentDocument of a HTMLIframeElement can cause the browser
- // to throw, e.g. if it has a cross-origin src attribute.
- // Safari will show an error in the console when the access results in "Blocked a frame with origin". e.g:
- // iframe.contentDocument.defaultView;
- // A safety way is to access one of the cross origin properties: Window or Location
- // Which might result in "SecurityError" DOM Exception and it is compatible to Safari.
- // https://html.spec.whatwg.org/multipage/browsers.html#integration-with-idl
- return typeof iframe.contentWindow.location.href === 'string';
- } catch (err) {
- return false;
- }
- }
- function getActiveElementDeep() {
- var win = window;
- var element = getActiveElement();
- while (element instanceof win.HTMLIFrameElement) {
- if (isSameOriginFrame(element)) {
- win = element.contentWindow;
- } else {
- return element;
- }
- element = getActiveElement(win.document);
- }
- return element;
- }
- /**
- * @ReactInputSelection: React input selection module. Based on Selection.js,
- * but modified to be suitable for react and has a couple of bug fixes (doesn't
- * assume buttons have range selections allowed).
- * Input selection module for React.
- */
- /**
- * @hasSelectionCapabilities: we get the element types that support selection
- * from https://html.spec.whatwg.org/#do-not-apply, looking at `selectionStart`
- * and `selectionEnd` rows.
- */
- function hasSelectionCapabilities(elem) {
- var nodeName = elem && elem.nodeName && elem.nodeName.toLowerCase();
- return nodeName && (nodeName === 'input' && (elem.type === 'text' || elem.type === 'search' || elem.type === 'tel' || elem.type === 'url' || elem.type === 'password') || nodeName === 'textarea' || elem.contentEditable === 'true');
- }
- function getSelectionInformation() {
- var focusedElem = getActiveElementDeep();
- return {
- // Used by Flare
- activeElementDetached: null,
- focusedElem: focusedElem,
- selectionRange: hasSelectionCapabilities(focusedElem) ? getSelection(focusedElem) : null
- };
- }
- /**
- * @restoreSelection: If any selection information was potentially lost,
- * restore it. This is useful when performing operations that could remove dom
- * nodes and place them back in, resulting in focus being lost.
- */
- function restoreSelection(priorSelectionInformation) {
- var curFocusedElem = getActiveElementDeep();
- var priorFocusedElem = priorSelectionInformation.focusedElem;
- var priorSelectionRange = priorSelectionInformation.selectionRange;
- if (curFocusedElem !== priorFocusedElem && isInDocument(priorFocusedElem)) {
- if (priorSelectionRange !== null && hasSelectionCapabilities(priorFocusedElem)) {
- setSelection(priorFocusedElem, priorSelectionRange);
- } // Focusing a node can change the scroll position, which is undesirable
- var ancestors = [];
- var ancestor = priorFocusedElem;
- while (ancestor = ancestor.parentNode) {
- if (ancestor.nodeType === ELEMENT_NODE) {
- ancestors.push({
- element: ancestor,
- left: ancestor.scrollLeft,
- top: ancestor.scrollTop
- });
- }
- }
- if (typeof priorFocusedElem.focus === 'function') {
- priorFocusedElem.focus();
- }
- for (var i = 0; i < ancestors.length; i++) {
- var info = ancestors[i];
- info.element.scrollLeft = info.left;
- info.element.scrollTop = info.top;
- }
- }
- }
- /**
- * @getSelection: Gets the selection bounds of a focused textarea, input or
- * contentEditable node.
- * -@input: Look up selection bounds of this input
- * -@return {start: selectionStart, end: selectionEnd}
- */
- function getSelection(input) {
- var selection;
- if ('selectionStart' in input) {
- // Modern browser with input or textarea.
- selection = {
- start: input.selectionStart,
- end: input.selectionEnd
- };
- } else {
- // Content editable or old IE textarea.
- selection = getOffsets(input);
- }
- return selection || {
- start: 0,
- end: 0
- };
- }
- /**
- * @setSelection: Sets the selection bounds of a textarea or input and focuses
- * the input.
- * -@input Set selection bounds of this input or textarea
- * -@offsets Object of same form that is returned from get*
- */
- function setSelection(input, offsets) {
- var start = offsets.start,
- end = offsets.end;
- if (end === undefined) {
- end = start;
- }
- if ('selectionStart' in input) {
- input.selectionStart = start;
- input.selectionEnd = Math.min(end, input.value.length);
- } else {
- setOffsets(input, offsets);
- }
- }
- var validateDOMNesting = function () {};
- var updatedAncestorInfo = function () {};
- {
- // This validation code was written based on the HTML5 parsing spec:
- // https://html.spec.whatwg.org/multipage/syntax.html#has-an-element-in-scope
- //
- // Note: this does not catch all invalid nesting, nor does it try to (as it's
- // not clear what practical benefit doing so provides); instead, we warn only
- // for cases where the parser will give a parse tree differing from what React
- // intended. For example, <b><div></div></b> is invalid but we don't warn
- // because it still parses correctly; we do warn for other cases like nested
- // <p> tags where the beginning of the second element implicitly closes the
- // first, causing a confusing mess.
- // https://html.spec.whatwg.org/multipage/syntax.html#special
- var specialTags = ['address', 'applet', 'area', 'article', 'aside', 'base', 'basefont', 'bgsound', 'blockquote', 'body', 'br', 'button', 'caption', 'center', 'col', 'colgroup', 'dd', 'details', 'dir', 'div', 'dl', 'dt', 'embed', 'fieldset', 'figcaption', 'figure', 'footer', 'form', 'frame', 'frameset', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'head', 'header', 'hgroup', 'hr', 'html', 'iframe', 'img', 'input', 'isindex', 'li', 'link', 'listing', 'main', 'marquee', 'menu', 'menuitem', 'meta', 'nav', 'noembed', 'noframes', 'noscript', 'object', 'ol', 'p', 'param', 'plaintext', 'pre', 'script', 'section', 'select', 'source', 'style', 'summary', 'table', 'tbody', 'td', 'template', 'textarea', 'tfoot', 'th', 'thead', 'title', 'tr', 'track', 'ul', 'wbr', 'xmp']; // https://html.spec.whatwg.org/multipage/syntax.html#has-an-element-in-scope
- var inScopeTags = ['applet', 'caption', 'html', 'table', 'td', 'th', 'marquee', 'object', 'template', // https://html.spec.whatwg.org/multipage/syntax.html#html-integration-point
- // TODO: Distinguish by namespace here -- for <title>, including it here
- // errs on the side of fewer warnings
- 'foreignObject', 'desc', 'title']; // https://html.spec.whatwg.org/multipage/syntax.html#has-an-element-in-button-scope
- var buttonScopeTags = inScopeTags.concat(['button']); // https://html.spec.whatwg.org/multipage/syntax.html#generate-implied-end-tags
- var impliedEndTags = ['dd', 'dt', 'li', 'option', 'optgroup', 'p', 'rp', 'rt'];
- var emptyAncestorInfo = {
- current: null,
- formTag: null,
- aTagInScope: null,
- buttonTagInScope: null,
- nobrTagInScope: null,
- pTagInButtonScope: null,
- listItemTagAutoclosing: null,
- dlItemTagAutoclosing: null
- };
- updatedAncestorInfo = function (oldInfo, tag) {
- var ancestorInfo = _assign({}, oldInfo || emptyAncestorInfo);
- var info = {
- tag: tag
- };
- if (inScopeTags.indexOf(tag) !== -1) {
- ancestorInfo.aTagInScope = null;
- ancestorInfo.buttonTagInScope = null;
- ancestorInfo.nobrTagInScope = null;
- }
- if (buttonScopeTags.indexOf(tag) !== -1) {
- ancestorInfo.pTagInButtonScope = null;
- } // See rules for 'li', 'dd', 'dt' start tags in
- // https://html.spec.whatwg.org/multipage/syntax.html#parsing-main-inbody
- if (specialTags.indexOf(tag) !== -1 && tag !== 'address' && tag !== 'div' && tag !== 'p') {
- ancestorInfo.listItemTagAutoclosing = null;
- ancestorInfo.dlItemTagAutoclosing = null;
- }
- ancestorInfo.current = info;
- if (tag === 'form') {
- ancestorInfo.formTag = info;
- }
- if (tag === 'a') {
- ancestorInfo.aTagInScope = info;
- }
- if (tag === 'button') {
- ancestorInfo.buttonTagInScope = info;
- }
- if (tag === 'nobr') {
- ancestorInfo.nobrTagInScope = info;
- }
- if (tag === 'p') {
- ancestorInfo.pTagInButtonScope = info;
- }
- if (tag === 'li') {
- ancestorInfo.listItemTagAutoclosing = info;
- }
- if (tag === 'dd' || tag === 'dt') {
- ancestorInfo.dlItemTagAutoclosing = info;
- }
- return ancestorInfo;
- };
- /**
- * Returns whether
- */
- var isTagValidWithParent = function (tag, parentTag) {
- // First, let's check if we're in an unusual parsing mode...
- switch (parentTag) {
- // https://html.spec.whatwg.org/multipage/syntax.html#parsing-main-inselect
- case 'select':
- return tag === 'option' || tag === 'optgroup' || tag === '#text';
- case 'optgroup':
- return tag === 'option' || tag === '#text';
- // Strictly speaking, seeing an <option> doesn't mean we're in a <select>
- // but
- case 'option':
- return tag === '#text';
- // https://html.spec.whatwg.org/multipage/syntax.html#parsing-main-intd
- // https://html.spec.whatwg.org/multipage/syntax.html#parsing-main-incaption
- // No special behavior since these rules fall back to "in body" mode for
- // all except special table nodes which cause bad parsing behavior anyway.
- // https://html.spec.whatwg.org/multipage/syntax.html#parsing-main-intr
- case 'tr':
- return tag === 'th' || tag === 'td' || tag === 'style' || tag === 'script' || tag === 'template';
- // https://html.spec.whatwg.org/multipage/syntax.html#parsing-main-intbody
- case 'tbody':
- case 'thead':
- case 'tfoot':
- return tag === 'tr' || tag === 'style' || tag === 'script' || tag === 'template';
- // https://html.spec.whatwg.org/multipage/syntax.html#parsing-main-incolgroup
- case 'colgroup':
- return tag === 'col' || tag === 'template';
- // https://html.spec.whatwg.org/multipage/syntax.html#parsing-main-intable
- case 'table':
- return tag === 'caption' || tag === 'colgroup' || tag === 'tbody' || tag === 'tfoot' || tag === 'thead' || tag === 'style' || tag === 'script' || tag === 'template';
- // https://html.spec.whatwg.org/multipage/syntax.html#parsing-main-inhead
- case 'head':
- return tag === 'base' || tag === 'basefont' || tag === 'bgsound' || tag === 'link' || tag === 'meta' || tag === 'title' || tag === 'noscript' || tag === 'noframes' || tag === 'style' || tag === 'script' || tag === 'template';
- // https://html.spec.whatwg.org/multipage/semantics.html#the-html-element
- case 'html':
- return tag === 'head' || tag === 'body' || tag === 'frameset';
- case 'frameset':
- return tag === 'frame';
- case '#document':
- return tag === 'html';
- } // Probably in the "in body" parsing mode, so we outlaw only tag combos
- // where the parsing rules cause implicit opens or closes to be added.
- // https://html.spec.whatwg.org/multipage/syntax.html#parsing-main-inbody
- switch (tag) {
- case 'h1':
- case 'h2':
- case 'h3':
- case 'h4':
- case 'h5':
- case 'h6':
- return parentTag !== 'h1' && parentTag !== 'h2' && parentTag !== 'h3' && parentTag !== 'h4' && parentTag !== 'h5' && parentTag !== 'h6';
- case 'rp':
- case 'rt':
- return impliedEndTags.indexOf(parentTag) === -1;
- case 'body':
- case 'caption':
- case 'col':
- case 'colgroup':
- case 'frameset':
- case 'frame':
- case 'head':
- case 'html':
- case 'tbody':
- case 'td':
- case 'tfoot':
- case 'th':
- case 'thead':
- case 'tr':
- // These tags are only valid with a few parents that have special child
- // parsing rules -- if we're down here, then none of those matched and
- // so we allow it only if we don't know what the parent is, as all other
- // cases are invalid.
- return parentTag == null;
- }
- return true;
- };
- /**
- * Returns whether
- */
- var findInvalidAncestorForTag = function (tag, ancestorInfo) {
- switch (tag) {
- case 'address':
- case 'article':
- case 'aside':
- case 'blockquote':
- case 'center':
- case 'details':
- case 'dialog':
- case 'dir':
- case 'div':
- case 'dl':
- case 'fieldset':
- case 'figcaption':
- case 'figure':
- case 'footer':
- case 'header':
- case 'hgroup':
- case 'main':
- case 'menu':
- case 'nav':
- case 'ol':
- case 'p':
- case 'section':
- case 'summary':
- case 'ul':
- case 'pre':
- case 'listing':
- case 'table':
- case 'hr':
- case 'xmp':
- case 'h1':
- case 'h2':
- case 'h3':
- case 'h4':
- case 'h5':
- case 'h6':
- return ancestorInfo.pTagInButtonScope;
- case 'form':
- return ancestorInfo.formTag || ancestorInfo.pTagInButtonScope;
- case 'li':
- return ancestorInfo.listItemTagAutoclosing;
- case 'dd':
- case 'dt':
- return ancestorInfo.dlItemTagAutoclosing;
- case 'button':
- return ancestorInfo.buttonTagInScope;
- case 'a':
- // Spec says something about storing a list of markers, but it sounds
- // equivalent to this check.
- return ancestorInfo.aTagInScope;
- case 'nobr':
- return ancestorInfo.nobrTagInScope;
- }
- return null;
- };
- var didWarn$1 = {};
- validateDOMNesting = function (childTag, childText, ancestorInfo) {
- ancestorInfo = ancestorInfo || emptyAncestorInfo;
- var parentInfo = ancestorInfo.current;
- var parentTag = parentInfo && parentInfo.tag;
- if (childText != null) {
- if (childTag != null) {
- error('validateDOMNesting: when childText is passed, childTag should be null');
- }
- childTag = '#text';
- }
- var invalidParent = isTagValidWithParent(childTag, parentTag) ? null : parentInfo;
- var invalidAncestor = invalidParent ? null : findInvalidAncestorForTag(childTag, ancestorInfo);
- var invalidParentOrAncestor = invalidParent || invalidAncestor;
- if (!invalidParentOrAncestor) {
- return;
- }
- var ancestorTag = invalidParentOrAncestor.tag;
- var addendum = getCurrentFiberStackInDev();
- var warnKey = !!invalidParent + '|' + childTag + '|' + ancestorTag + '|' + addendum;
- if (didWarn$1[warnKey]) {
- return;
- }
- didWarn$1[warnKey] = true;
- var tagDisplayName = childTag;
- var whitespaceInfo = '';
- if (childTag === '#text') {
- if (/\S/.test(childText)) {
- tagDisplayName = 'Text nodes';
- } else {
- tagDisplayName = 'Whitespace text nodes';
- whitespaceInfo = " Make sure you don't have any extra whitespace between tags on " + 'each line of your source code.';
- }
- } else {
- tagDisplayName = '<' + childTag + '>';
- }
- if (invalidParent) {
- var info = '';
- if (ancestorTag === 'table' && childTag === 'tr') {
- info += ' Add a <tbody>, <thead> or <tfoot> to your code to match the DOM tree generated by ' + 'the browser.';
- }
- error('validateDOMNesting(...): %s cannot appear as a child of <%s>.%s%s', tagDisplayName, ancestorTag, whitespaceInfo, info);
- } else {
- error('validateDOMNesting(...): %s cannot appear as a descendant of ' + '<%s>.', tagDisplayName, ancestorTag);
- }
- };
- }
- var SUPPRESS_HYDRATION_WARNING$1;
- {
- SUPPRESS_HYDRATION_WARNING$1 = 'suppressHydrationWarning';
- }
- var SUSPENSE_START_DATA = '$';
- var SUSPENSE_END_DATA = '/$';
- var SUSPENSE_PENDING_START_DATA = '$?';
- var SUSPENSE_FALLBACK_START_DATA = '$!';
- var STYLE$1 = 'style';
- var eventsEnabled = null;
- var selectionInformation = null;
- function shouldAutoFocusHostComponent(type, props) {
- switch (type) {
- case 'button':
- case 'input':
- case 'select':
- case 'textarea':
- return !!props.autoFocus;
- }
- return false;
- }
- function getRootHostContext(rootContainerInstance) {
- var type;
- var namespace;
- var nodeType = rootContainerInstance.nodeType;
- switch (nodeType) {
- case DOCUMENT_NODE:
- case DOCUMENT_FRAGMENT_NODE:
- {
- type = nodeType === DOCUMENT_NODE ? '#document' : '#fragment';
- var root = rootContainerInstance.documentElement;
- namespace = root ? root.namespaceURI : getChildNamespace(null, '');
- break;
- }
- default:
- {
- var container = nodeType === COMMENT_NODE ? rootContainerInstance.parentNode : rootContainerInstance;
- var ownNamespace = container.namespaceURI || null;
- type = container.tagName;
- namespace = getChildNamespace(ownNamespace, type);
- break;
- }
- }
- {
- var validatedTag = type.toLowerCase();
- var ancestorInfo = updatedAncestorInfo(null, validatedTag);
- return {
- namespace: namespace,
- ancestorInfo: ancestorInfo
- };
- }
- }
- function getChildHostContext(parentHostContext, type, rootContainerInstance) {
- {
- var parentHostContextDev = parentHostContext;
- var namespace = getChildNamespace(parentHostContextDev.namespace, type);
- var ancestorInfo = updatedAncestorInfo(parentHostContextDev.ancestorInfo, type);
- return {
- namespace: namespace,
- ancestorInfo: ancestorInfo
- };
- }
- }
- function getPublicInstance(instance) {
- return instance;
- }
- function prepareForCommit(containerInfo) {
- eventsEnabled = isEnabled();
- selectionInformation = getSelectionInformation();
- setEnabled(false);
- }
- function resetAfterCommit(containerInfo) {
- restoreSelection(selectionInformation);
- setEnabled(eventsEnabled);
- eventsEnabled = null;
- selectionInformation = null;
- }
- function createInstance(type, props, rootContainerInstance, hostContext, internalInstanceHandle) {
- var parentNamespace;
- {
- // TODO: take namespace into account when validating.
- var hostContextDev = hostContext;
- validateDOMNesting(type, null, hostContextDev.ancestorInfo);
- if (typeof props.children === 'string' || typeof props.children === 'number') {
- var string = '' + props.children;
- var ownAncestorInfo = updatedAncestorInfo(hostContextDev.ancestorInfo, type);
- validateDOMNesting(null, string, ownAncestorInfo);
- }
- parentNamespace = hostContextDev.namespace;
- }
- var domElement = createElement(type, props, rootContainerInstance, parentNamespace);
- precacheFiberNode(internalInstanceHandle, domElement);
- updateFiberProps(domElement, props);
- return domElement;
- }
- function appendInitialChild(parentInstance, child) {
- parentInstance.appendChild(child);
- }
- function finalizeInitialChildren(domElement, type, props, rootContainerInstance, hostContext) {
- setInitialProperties(domElement, type, props, rootContainerInstance);
- return shouldAutoFocusHostComponent(type, props);
- }
- function prepareUpdate(domElement, type, oldProps, newProps, rootContainerInstance, hostContext) {
- {
- var hostContextDev = hostContext;
- if (typeof newProps.children !== typeof oldProps.children && (typeof newProps.children === 'string' || typeof newProps.children === 'number')) {
- var string = '' + newProps.children;
- var ownAncestorInfo = updatedAncestorInfo(hostContextDev.ancestorInfo, type);
- validateDOMNesting(null, string, ownAncestorInfo);
- }
- }
- return diffProperties(domElement, type, oldProps, newProps, rootContainerInstance);
- }
- function shouldSetTextContent(type, props) {
- return type === 'textarea' || type === 'option' || type === 'noscript' || typeof props.children === 'string' || typeof props.children === 'number' || typeof props.dangerouslySetInnerHTML === 'object' && props.dangerouslySetInnerHTML !== null && props.dangerouslySetInnerHTML.__html != null;
- }
- function shouldDeprioritizeSubtree(type, props) {
- return !!props.hidden;
- }
- function createTextInstance(text, rootContainerInstance, hostContext, internalInstanceHandle) {
- {
- var hostContextDev = hostContext;
- validateDOMNesting(null, text, hostContextDev.ancestorInfo);
- }
- var textNode = createTextNode(text, rootContainerInstance);
- precacheFiberNode(internalInstanceHandle, textNode);
- return textNode;
- }
- // if a component just imports ReactDOM (e.g. for findDOMNode).
- // Some environments might not have setTimeout or clearTimeout.
- var scheduleTimeout = typeof setTimeout === 'function' ? setTimeout : undefined;
- var cancelTimeout = typeof clearTimeout === 'function' ? clearTimeout : undefined;
- var noTimeout = -1; // -------------------
- function commitMount(domElement, type, newProps, internalInstanceHandle) {
- // Despite the naming that might imply otherwise, this method only
- // fires if there is an `Update` effect scheduled during mounting.
- // This happens if `finalizeInitialChildren` returns `true` (which it
- // does to implement the `autoFocus` attribute on the client). But
- // there are also other cases when this might happen (such as patching
- // up text content during hydration mismatch). So we'll check this again.
- if (shouldAutoFocusHostComponent(type, newProps)) {
- domElement.focus();
- }
- }
- function commitUpdate(domElement, updatePayload, type, oldProps, newProps, internalInstanceHandle) {
- // Update the props handle so that we know which props are the ones with
- // with current event handlers.
- updateFiberProps(domElement, newProps); // Apply the diff to the DOM node.
- updateProperties(domElement, updatePayload, type, oldProps, newProps);
- }
- function resetTextContent(domElement) {
- setTextContent(domElement, '');
- }
- function commitTextUpdate(textInstance, oldText, newText) {
- textInstance.nodeValue = newText;
- }
- function appendChild(parentInstance, child) {
- parentInstance.appendChild(child);
- }
- function appendChildToContainer(container, child) {
- var parentNode;
- if (container.nodeType === COMMENT_NODE) {
- parentNode = container.parentNode;
- parentNode.insertBefore(child, container);
- } else {
- parentNode = container;
- parentNode.appendChild(child);
- } // This container might be used for a portal.
- // If something inside a portal is clicked, that click should bubble
- // through the React tree. However, on Mobile Safari the click would
- // never bubble through the *DOM* tree unless an ancestor with onclick
- // event exists. So we wouldn't see it and dispatch it.
- // This is why we ensure that non React root containers have inline onclick
- // defined.
- // https://github.com/facebook/react/issues/11918
- var reactRootContainer = container._reactRootContainer;
- if ((reactRootContainer === null || reactRootContainer === undefined) && parentNode.onclick === null) {
- // TODO: This cast may not be sound for SVG, MathML or custom elements.
- trapClickOnNonInteractiveElement(parentNode);
- }
- }
- function insertBefore(parentInstance, child, beforeChild) {
- parentInstance.insertBefore(child, beforeChild);
- }
- function insertInContainerBefore(container, child, beforeChild) {
- if (container.nodeType === COMMENT_NODE) {
- container.parentNode.insertBefore(child, beforeChild);
- } else {
- container.insertBefore(child, beforeChild);
- }
- }
- function removeChild(parentInstance, child) {
- parentInstance.removeChild(child);
- }
- function removeChildFromContainer(container, child) {
- if (container.nodeType === COMMENT_NODE) {
- container.parentNode.removeChild(child);
- } else {
- container.removeChild(child);
- }
- }
- function hideInstance(instance) {
- // pass host context to this method?
- instance = instance;
- var style = instance.style;
- if (typeof style.setProperty === 'function') {
- style.setProperty('display', 'none', 'important');
- } else {
- style.display = 'none';
- }
- }
- function hideTextInstance(textInstance) {
- textInstance.nodeValue = '';
- }
- function unhideInstance(instance, props) {
- instance = instance;
- var styleProp = props[STYLE$1];
- var display = styleProp !== undefined && styleProp !== null && styleProp.hasOwnProperty('display') ? styleProp.display : null;
- instance.style.display = dangerousStyleValue('display', display);
- }
- function unhideTextInstance(textInstance, text) {
- textInstance.nodeValue = text;
- } // -------------------
- function canHydrateInstance(instance, type, props) {
- if (instance.nodeType !== ELEMENT_NODE || type.toLowerCase() !== instance.nodeName.toLowerCase()) {
- return null;
- } // This has now been refined to an element node.
- return instance;
- }
- function canHydrateTextInstance(instance, text) {
- if (text === '' || instance.nodeType !== TEXT_NODE) {
- // Empty strings are not parsed by HTML so there won't be a correct match here.
- return null;
- } // This has now been refined to a text node.
- return instance;
- }
- function isSuspenseInstancePending(instance) {
- return instance.data === SUSPENSE_PENDING_START_DATA;
- }
- function isSuspenseInstanceFallback(instance) {
- return instance.data === SUSPENSE_FALLBACK_START_DATA;
- }
- function getNextHydratable(node) {
- // Skip non-hydratable nodes.
- for (; node != null; node = node.nextSibling) {
- var nodeType = node.nodeType;
- if (nodeType === ELEMENT_NODE || nodeType === TEXT_NODE) {
- break;
- }
- }
- return node;
- }
- function getNextHydratableSibling(instance) {
- return getNextHydratable(instance.nextSibling);
- }
- function getFirstHydratableChild(parentInstance) {
- return getNextHydratable(parentInstance.firstChild);
- }
- function hydrateInstance(instance, type, props, rootContainerInstance, hostContext, internalInstanceHandle) {
- precacheFiberNode(internalInstanceHandle, instance); // TODO: Possibly defer this until the commit phase where all the events
- // get attached.
- updateFiberProps(instance, props);
- var parentNamespace;
- {
- var hostContextDev = hostContext;
- parentNamespace = hostContextDev.namespace;
- }
- return diffHydratedProperties(instance, type, props, parentNamespace, rootContainerInstance);
- }
- function hydrateTextInstance(textInstance, text, internalInstanceHandle) {
- precacheFiberNode(internalInstanceHandle, textInstance);
- return diffHydratedText(textInstance, text);
- }
- function getNextHydratableInstanceAfterSuspenseInstance(suspenseInstance) {
- var node = suspenseInstance.nextSibling; // Skip past all nodes within this suspense boundary.
- // There might be nested nodes so we need to keep track of how
- // deep we are and only break out when we're back on top.
- var depth = 0;
- while (node) {
- if (node.nodeType === COMMENT_NODE) {
- var data = node.data;
- if (data === SUSPENSE_END_DATA) {
- if (depth === 0) {
- return getNextHydratableSibling(node);
- } else {
- depth--;
- }
- } else if (data === SUSPENSE_START_DATA || data === SUSPENSE_FALLBACK_START_DATA || data === SUSPENSE_PENDING_START_DATA) {
- depth++;
- }
- }
- node = node.nextSibling;
- } // TODO: Warn, we didn't find the end comment boundary.
- return null;
- } // Returns the SuspenseInstance if this node is a direct child of a
- // SuspenseInstance. I.e. if its previous sibling is a Comment with
- // SUSPENSE_x_START_DATA. Otherwise, null.
- function getParentSuspenseInstance(targetInstance) {
- var node = targetInstance.previousSibling; // Skip past all nodes within this suspense boundary.
- // There might be nested nodes so we need to keep track of how
- // deep we are and only break out when we're back on top.
- var depth = 0;
- while (node) {
- if (node.nodeType === COMMENT_NODE) {
- var data = node.data;
- if (data === SUSPENSE_START_DATA || data === SUSPENSE_FALLBACK_START_DATA || data === SUSPENSE_PENDING_START_DATA) {
- if (depth === 0) {
- return node;
- } else {
- depth--;
- }
- } else if (data === SUSPENSE_END_DATA) {
- depth++;
- }
- }
- node = node.previousSibling;
- }
- return null;
- }
- function commitHydratedContainer(container) {
- // Retry if any event replaying was blocked on this.
- retryIfBlockedOn(container);
- }
- function commitHydratedSuspenseInstance(suspenseInstance) {
- // Retry if any event replaying was blocked on this.
- retryIfBlockedOn(suspenseInstance);
- }
- function didNotMatchHydratedContainerTextInstance(parentContainer, textInstance, text) {
- {
- warnForUnmatchedText(textInstance, text);
- }
- }
- function didNotMatchHydratedTextInstance(parentType, parentProps, parentInstance, textInstance, text) {
- if ( parentProps[SUPPRESS_HYDRATION_WARNING$1] !== true) {
- warnForUnmatchedText(textInstance, text);
- }
- }
- function didNotHydrateContainerInstance(parentContainer, instance) {
- {
- if (instance.nodeType === ELEMENT_NODE) {
- warnForDeletedHydratableElement(parentContainer, instance);
- } else if (instance.nodeType === COMMENT_NODE) ; else {
- warnForDeletedHydratableText(parentContainer, instance);
- }
- }
- }
- function didNotHydrateInstance(parentType, parentProps, parentInstance, instance) {
- if ( parentProps[SUPPRESS_HYDRATION_WARNING$1] !== true) {
- if (instance.nodeType === ELEMENT_NODE) {
- warnForDeletedHydratableElement(parentInstance, instance);
- } else if (instance.nodeType === COMMENT_NODE) ; else {
- warnForDeletedHydratableText(parentInstance, instance);
- }
- }
- }
- function didNotFindHydratableContainerInstance(parentContainer, type, props) {
- {
- warnForInsertedHydratedElement(parentContainer, type);
- }
- }
- function didNotFindHydratableContainerTextInstance(parentContainer, text) {
- {
- warnForInsertedHydratedText(parentContainer, text);
- }
- }
- function didNotFindHydratableInstance(parentType, parentProps, parentInstance, type, props) {
- if ( parentProps[SUPPRESS_HYDRATION_WARNING$1] !== true) {
- warnForInsertedHydratedElement(parentInstance, type);
- }
- }
- function didNotFindHydratableTextInstance(parentType, parentProps, parentInstance, text) {
- if ( parentProps[SUPPRESS_HYDRATION_WARNING$1] !== true) {
- warnForInsertedHydratedText(parentInstance, text);
- }
- }
- function didNotFindHydratableSuspenseInstance(parentType, parentProps, parentInstance) {
- if ( parentProps[SUPPRESS_HYDRATION_WARNING$1] !== true) ;
- }
- var randomKey = Math.random().toString(36).slice(2);
- var internalInstanceKey = '__reactInternalInstance$' + randomKey;
- var internalEventHandlersKey = '__reactEventHandlers$' + randomKey;
- var internalContainerInstanceKey = '__reactContainere$' + randomKey;
- function precacheFiberNode(hostInst, node) {
- node[internalInstanceKey] = hostInst;
- }
- function markContainerAsRoot(hostRoot, node) {
- node[internalContainerInstanceKey] = hostRoot;
- }
- function unmarkContainerAsRoot(node) {
- node[internalContainerInstanceKey] = null;
- }
- function isContainerMarkedAsRoot(node) {
- return !!node[internalContainerInstanceKey];
- } // Given a DOM node, return the closest HostComponent or HostText fiber ancestor.
- // If the target node is part of a hydrated or not yet rendered subtree, then
- // this may also return a SuspenseComponent or HostRoot to indicate that.
- // Conceptually the HostRoot fiber is a child of the Container node. So if you
- // pass the Container node as the targetNode, you will not actually get the
- // HostRoot back. To get to the HostRoot, you need to pass a child of it.
- // The same thing applies to Suspense boundaries.
- function getClosestInstanceFromNode(targetNode) {
- var targetInst = targetNode[internalInstanceKey];
- if (targetInst) {
- // Don't return HostRoot or SuspenseComponent here.
- return targetInst;
- } // If the direct event target isn't a React owned DOM node, we need to look
- // to see if one of its parents is a React owned DOM node.
- var parentNode = targetNode.parentNode;
- while (parentNode) {
- // We'll check if this is a container root that could include
- // React nodes in the future. We need to check this first because
- // if we're a child of a dehydrated container, we need to first
- // find that inner container before moving on to finding the parent
- // instance. Note that we don't check this field on the targetNode
- // itself because the fibers are conceptually between the container
- // node and the first child. It isn't surrounding the container node.
- // If it's not a container, we check if it's an instance.
- targetInst = parentNode[internalContainerInstanceKey] || parentNode[internalInstanceKey];
- if (targetInst) {
- // Since this wasn't the direct target of the event, we might have
- // stepped past dehydrated DOM nodes to get here. However they could
- // also have been non-React nodes. We need to answer which one.
- // If we the instance doesn't have any children, then there can't be
- // a nested suspense boundary within it. So we can use this as a fast
- // bailout. Most of the time, when people add non-React children to
- // the tree, it is using a ref to a child-less DOM node.
- // Normally we'd only need to check one of the fibers because if it
- // has ever gone from having children to deleting them or vice versa
- // it would have deleted the dehydrated boundary nested inside already.
- // However, since the HostRoot starts out with an alternate it might
- // have one on the alternate so we need to check in case this was a
- // root.
- var alternate = targetInst.alternate;
- if (targetInst.child !== null || alternate !== null && alternate.child !== null) {
- // Next we need to figure out if the node that skipped past is
- // nested within a dehydrated boundary and if so, which one.
- var suspenseInstance = getParentSuspenseInstance(targetNode);
- while (suspenseInstance !== null) {
- // We found a suspense instance. That means that we haven't
- // hydrated it yet. Even though we leave the comments in the
- // DOM after hydrating, and there are boundaries in the DOM
- // that could already be hydrated, we wouldn't have found them
- // through this pass since if the target is hydrated it would
- // have had an internalInstanceKey on it.
- // Let's get the fiber associated with the SuspenseComponent
- // as the deepest instance.
- var targetSuspenseInst = suspenseInstance[internalInstanceKey];
- if (targetSuspenseInst) {
- return targetSuspenseInst;
- } // If we don't find a Fiber on the comment, it might be because
- // we haven't gotten to hydrate it yet. There might still be a
- // parent boundary that hasn't above this one so we need to find
- // the outer most that is known.
- suspenseInstance = getParentSuspenseInstance(suspenseInstance); // If we don't find one, then that should mean that the parent
- // host component also hasn't hydrated yet. We can return it
- // below since it will bail out on the isMounted check later.
- }
- }
- return targetInst;
- }
- targetNode = parentNode;
- parentNode = targetNode.parentNode;
- }
- return null;
- }
- /**
- * Given a DOM node, return the ReactDOMComponent or ReactDOMTextComponent
- * instance, or null if the node was not rendered by this React.
- */
- function getInstanceFromNode$1(node) {
- var inst = node[internalInstanceKey] || node[internalContainerInstanceKey];
- if (inst) {
- if (inst.tag === HostComponent || inst.tag === HostText || inst.tag === SuspenseComponent || inst.tag === HostRoot) {
- return inst;
- } else {
- return null;
- }
- }
- return null;
- }
- /**
- * Given a ReactDOMComponent or ReactDOMTextComponent, return the corresponding
- * DOM node.
- */
- function getNodeFromInstance$1(inst) {
- if (inst.tag === HostComponent || inst.tag === HostText) {
- // In Fiber this, is just the state node right now. We assume it will be
- // a host component or host text.
- return inst.stateNode;
- } // Without this first invariant, passing a non-DOM-component triggers the next
- // invariant for a missing parent, which is super confusing.
- {
- {
- throw Error( "getNodeFromInstance: Invalid argument." );
- }
- }
- }
- function getFiberCurrentPropsFromNode$1(node) {
- return node[internalEventHandlersKey] || null;
- }
- function updateFiberProps(node, props) {
- node[internalEventHandlersKey] = props;
- }
- function getParent(inst) {
- do {
- inst = inst.return; // TODO: If this is a HostRoot we might want to bail out.
- // That is depending on if we want nested subtrees (layers) to bubble
- // events to their parent. We could also go through parentNode on the
- // host node but that wouldn't work for React Native and doesn't let us
- // do the portal feature.
- } while (inst && inst.tag !== HostComponent);
- if (inst) {
- return inst;
- }
- return null;
- }
- /**
- * Return the lowest common ancestor of A and B, or null if they are in
- * different trees.
- */
- function getLowestCommonAncestor(instA, instB) {
- var depthA = 0;
- for (var tempA = instA; tempA; tempA = getParent(tempA)) {
- depthA++;
- }
- var depthB = 0;
- for (var tempB = instB; tempB; tempB = getParent(tempB)) {
- depthB++;
- } // If A is deeper, crawl up.
- while (depthA - depthB > 0) {
- instA = getParent(instA);
- depthA--;
- } // If B is deeper, crawl up.
- while (depthB - depthA > 0) {
- instB = getParent(instB);
- depthB--;
- } // Walk in lockstep until we find a match.
- var depth = depthA;
- while (depth--) {
- if (instA === instB || instA === instB.alternate) {
- return instA;
- }
- instA = getParent(instA);
- instB = getParent(instB);
- }
- return null;
- }
- /**
- * Simulates the traversal of a two-phase, capture/bubble event dispatch.
- */
- function traverseTwoPhase(inst, fn, arg) {
- var path = [];
- while (inst) {
- path.push(inst);
- inst = getParent(inst);
- }
- var i;
- for (i = path.length; i-- > 0;) {
- fn(path[i], 'captured', arg);
- }
- for (i = 0; i < path.length; i++) {
- fn(path[i], 'bubbled', arg);
- }
- }
- /**
- * Traverses the ID hierarchy and invokes the supplied `cb` on any IDs that
- * should would receive a `mouseEnter` or `mouseLeave` event.
- *
- * Does not invoke the callback on the nearest common ancestor because nothing
- * "entered" or "left" that element.
- */
- function traverseEnterLeave(from, to, fn, argFrom, argTo) {
- var common = from && to ? getLowestCommonAncestor(from, to) : null;
- var pathFrom = [];
- while (true) {
- if (!from) {
- break;
- }
- if (from === common) {
- break;
- }
- var alternate = from.alternate;
- if (alternate !== null && alternate === common) {
- break;
- }
- pathFrom.push(from);
- from = getParent(from);
- }
- var pathTo = [];
- while (true) {
- if (!to) {
- break;
- }
- if (to === common) {
- break;
- }
- var _alternate = to.alternate;
- if (_alternate !== null && _alternate === common) {
- break;
- }
- pathTo.push(to);
- to = getParent(to);
- }
- for (var i = 0; i < pathFrom.length; i++) {
- fn(pathFrom[i], 'bubbled', argFrom);
- }
- for (var _i = pathTo.length; _i-- > 0;) {
- fn(pathTo[_i], 'captured', argTo);
- }
- }
- function isInteractive(tag) {
- return tag === 'button' || tag === 'input' || tag === 'select' || tag === 'textarea';
- }
- function shouldPreventMouseEvent(name, type, props) {
- switch (name) {
- case 'onClick':
- case 'onClickCapture':
- case 'onDoubleClick':
- case 'onDoubleClickCapture':
- case 'onMouseDown':
- case 'onMouseDownCapture':
- case 'onMouseMove':
- case 'onMouseMoveCapture':
- case 'onMouseUp':
- case 'onMouseUpCapture':
- case 'onMouseEnter':
- return !!(props.disabled && isInteractive(type));
- default:
- return false;
- }
- }
- /**
- * @param {object} inst The instance, which is the source of events.
- * @param {string} registrationName Name of listener (e.g. `onClick`).
- * @return {?function} The stored callback.
- */
- function getListener(inst, registrationName) {
- var listener; // TODO: shouldPreventMouseEvent is DOM-specific and definitely should not
- // live here; needs to be moved to a better place soon
- var stateNode = inst.stateNode;
- if (!stateNode) {
- // Work in progress (ex: onload events in incremental mode).
- return null;
- }
- var props = getFiberCurrentPropsFromNode(stateNode);
- if (!props) {
- // Work in progress.
- return null;
- }
- listener = props[registrationName];
- if (shouldPreventMouseEvent(registrationName, inst.type, props)) {
- return null;
- }
- if (!(!listener || typeof listener === 'function')) {
- {
- throw Error( "Expected `" + registrationName + "` listener to be a function, instead got a value of `" + typeof listener + "` type." );
- }
- }
- return listener;
- }
- /**
- * Some event types have a notion of different registration names for different
- * "phases" of propagation. This finds listeners by a given phase.
- */
- function listenerAtPhase(inst, event, propagationPhase) {
- var registrationName = event.dispatchConfig.phasedRegistrationNames[propagationPhase];
- return getListener(inst, registrationName);
- }
- /**
- * A small set of propagation patterns, each of which will accept a small amount
- * of information, and generate a set of "dispatch ready event objects" - which
- * are sets of events that have already been annotated with a set of dispatched
- * listener functions/ids. The API is designed this way to discourage these
- * propagation strategies from actually executing the dispatches, since we
- * always want to collect the entire set of dispatches before executing even a
- * single one.
- */
- /**
- * Tags a `SyntheticEvent` with dispatched listeners. Creating this function
- * here, allows us to not have to bind or create functions for each event.
- * Mutating the event's members allows us to not have to create a wrapping
- * "dispatch" object that pairs the event with the listener.
- */
- function accumulateDirectionalDispatches(inst, phase, event) {
- {
- if (!inst) {
- error('Dispatching inst must not be null');
- }
- }
- var listener = listenerAtPhase(inst, event, phase);
- if (listener) {
- event._dispatchListeners = accumulateInto(event._dispatchListeners, listener);
- event._dispatchInstances = accumulateInto(event._dispatchInstances, inst);
- }
- }
- /**
- * Collect dispatches (must be entirely collected before dispatching - see unit
- * tests). Lazily allocate the array to conserve memory. We must loop through
- * each event and perform the traversal for each one. We cannot perform a
- * single traversal for the entire collection of events because each event may
- * have a different target.
- */
- function accumulateTwoPhaseDispatchesSingle(event) {
- if (event && event.dispatchConfig.phasedRegistrationNames) {
- traverseTwoPhase(event._targetInst, accumulateDirectionalDispatches, event);
- }
- }
- /**
- * Accumulates without regard to direction, does not look for phased
- * registration names. Same as `accumulateDirectDispatchesSingle` but without
- * requiring that the `dispatchMarker` be the same as the dispatched ID.
- */
- function accumulateDispatches(inst, ignoredDirection, event) {
- if (inst && event && event.dispatchConfig.registrationName) {
- var registrationName = event.dispatchConfig.registrationName;
- var listener = getListener(inst, registrationName);
- if (listener) {
- event._dispatchListeners = accumulateInto(event._dispatchListeners, listener);
- event._dispatchInstances = accumulateInto(event._dispatchInstances, inst);
- }
- }
- }
- /**
- * Accumulates dispatches on an `SyntheticEvent`, but only for the
- * `dispatchMarker`.
- * @param {SyntheticEvent} event
- */
- function accumulateDirectDispatchesSingle(event) {
- if (event && event.dispatchConfig.registrationName) {
- accumulateDispatches(event._targetInst, null, event);
- }
- }
- function accumulateTwoPhaseDispatches(events) {
- forEachAccumulated(events, accumulateTwoPhaseDispatchesSingle);
- }
- function accumulateEnterLeaveDispatches(leave, enter, from, to) {
- traverseEnterLeave(from, to, accumulateDispatches, leave, enter);
- }
- function accumulateDirectDispatches(events) {
- forEachAccumulated(events, accumulateDirectDispatchesSingle);
- }
- /**
- * These variables store information about text content of a target node,
- * allowing comparison of content before and after a given event.
- *
- * Identify the node where selection currently begins, then observe
- * both its text content and its current position in the DOM. Since the
- * browser may natively replace the target node during composition, we can
- * use its position to find its replacement.
- *
- *
- */
- var root = null;
- var startText = null;
- var fallbackText = null;
- function initialize(nativeEventTarget) {
- root = nativeEventTarget;
- startText = getText();
- return true;
- }
- function reset() {
- root = null;
- startText = null;
- fallbackText = null;
- }
- function getData() {
- if (fallbackText) {
- return fallbackText;
- }
- var start;
- var startValue = startText;
- var startLength = startValue.length;
- var end;
- var endValue = getText();
- var endLength = endValue.length;
- for (start = 0; start < startLength; start++) {
- if (startValue[start] !== endValue[start]) {
- break;
- }
- }
- var minEnd = startLength - start;
- for (end = 1; end <= minEnd; end++) {
- if (startValue[startLength - end] !== endValue[endLength - end]) {
- break;
- }
- }
- var sliceTail = end > 1 ? 1 - end : undefined;
- fallbackText = endValue.slice(start, sliceTail);
- return fallbackText;
- }
- function getText() {
- if ('value' in root) {
- return root.value;
- }
- return root.textContent;
- }
- var EVENT_POOL_SIZE = 10;
- /**
- * @interface Event
- * @see http://www.w3.org/TR/DOM-Level-3-Events/
- */
- var EventInterface = {
- type: null,
- target: null,
- // currentTarget is set when dispatching; no use in copying it here
- currentTarget: function () {
- return null;
- },
- eventPhase: null,
- bubbles: null,
- cancelable: null,
- timeStamp: function (event) {
- return event.timeStamp || Date.now();
- },
- defaultPrevented: null,
- isTrusted: null
- };
- function functionThatReturnsTrue() {
- return true;
- }
- function functionThatReturnsFalse() {
- return false;
- }
- /**
- * Synthetic events are dispatched by event plugins, typically in response to a
- * top-level event delegation handler.
- *
- * These systems should generally use pooling to reduce the frequency of garbage
- * collection. The system should check `isPersistent` to determine whether the
- * event should be released into the pool after being dispatched. Users that
- * need a persisted event should invoke `persist`.
- *
- * Synthetic events (and subclasses) implement the DOM Level 3 Events API by
- * normalizing browser quirks. Subclasses do not necessarily have to implement a
- * DOM interface; custom application-specific events can also subclass this.
- *
- * @param {object} dispatchConfig Configuration used to dispatch this event.
- * @param {*} targetInst Marker identifying the event target.
- * @param {object} nativeEvent Native browser event.
- * @param {DOMEventTarget} nativeEventTarget Target node.
- */
- function SyntheticEvent(dispatchConfig, targetInst, nativeEvent, nativeEventTarget) {
- {
- // these have a getter/setter for warnings
- delete this.nativeEvent;
- delete this.preventDefault;
- delete this.stopPropagation;
- delete this.isDefaultPrevented;
- delete this.isPropagationStopped;
- }
- this.dispatchConfig = dispatchConfig;
- this._targetInst = targetInst;
- this.nativeEvent = nativeEvent;
- var Interface = this.constructor.Interface;
- for (var propName in Interface) {
- if (!Interface.hasOwnProperty(propName)) {
- continue;
- }
- {
- delete this[propName]; // this has a getter/setter for warnings
- }
- var normalize = Interface[propName];
- if (normalize) {
- this[propName] = normalize(nativeEvent);
- } else {
- if (propName === 'target') {
- this.target = nativeEventTarget;
- } else {
- this[propName] = nativeEvent[propName];
- }
- }
- }
- var defaultPrevented = nativeEvent.defaultPrevented != null ? nativeEvent.defaultPrevented : nativeEvent.returnValue === false;
- if (defaultPrevented) {
- this.isDefaultPrevented = functionThatReturnsTrue;
- } else {
- this.isDefaultPrevented = functionThatReturnsFalse;
- }
- this.isPropagationStopped = functionThatReturnsFalse;
- return this;
- }
- _assign(SyntheticEvent.prototype, {
- preventDefault: function () {
- this.defaultPrevented = true;
- var event = this.nativeEvent;
- if (!event) {
- return;
- }
- if (event.preventDefault) {
- event.preventDefault();
- } else if (typeof event.returnValue !== 'unknown') {
- event.returnValue = false;
- }
- this.isDefaultPrevented = functionThatReturnsTrue;
- },
- stopPropagation: function () {
- var event = this.nativeEvent;
- if (!event) {
- return;
- }
- if (event.stopPropagation) {
- event.stopPropagation();
- } else if (typeof event.cancelBubble !== 'unknown') {
- // The ChangeEventPlugin registers a "propertychange" event for
- // IE. This event does not support bubbling or cancelling, and
- // any references to cancelBubble throw "Member not found". A
- // typeof check of "unknown" circumvents this issue (and is also
- // IE specific).
- event.cancelBubble = true;
- }
- this.isPropagationStopped = functionThatReturnsTrue;
- },
- /**
- * We release all dispatched `SyntheticEvent`s after each event loop, adding
- * them back into the pool. This allows a way to hold onto a reference that
- * won't be added back into the pool.
- */
- persist: function () {
- this.isPersistent = functionThatReturnsTrue;
- },
- /**
- * Checks if this event should be released back into the pool.
- *
- * @return {boolean} True if this should not be released, false otherwise.
- */
- isPersistent: functionThatReturnsFalse,
- /**
- * `PooledClass` looks for `destructor` on each instance it releases.
- */
- destructor: function () {
- var Interface = this.constructor.Interface;
- for (var propName in Interface) {
- {
- Object.defineProperty(this, propName, getPooledWarningPropertyDefinition(propName, Interface[propName]));
- }
- }
- this.dispatchConfig = null;
- this._targetInst = null;
- this.nativeEvent = null;
- this.isDefaultPrevented = functionThatReturnsFalse;
- this.isPropagationStopped = functionThatReturnsFalse;
- this._dispatchListeners = null;
- this._dispatchInstances = null;
- {
- Object.defineProperty(this, 'nativeEvent', getPooledWarningPropertyDefinition('nativeEvent', null));
- Object.defineProperty(this, 'isDefaultPrevented', getPooledWarningPropertyDefinition('isDefaultPrevented', functionThatReturnsFalse));
- Object.defineProperty(this, 'isPropagationStopped', getPooledWarningPropertyDefinition('isPropagationStopped', functionThatReturnsFalse));
- Object.defineProperty(this, 'preventDefault', getPooledWarningPropertyDefinition('preventDefault', function () {}));
- Object.defineProperty(this, 'stopPropagation', getPooledWarningPropertyDefinition('stopPropagation', function () {}));
- }
- }
- });
- SyntheticEvent.Interface = EventInterface;
- /**
- * Helper to reduce boilerplate when creating subclasses.
- */
- SyntheticEvent.extend = function (Interface) {
- var Super = this;
- var E = function () {};
- E.prototype = Super.prototype;
- var prototype = new E();
- function Class() {
- return Super.apply(this, arguments);
- }
- _assign(prototype, Class.prototype);
- Class.prototype = prototype;
- Class.prototype.constructor = Class;
- Class.Interface = _assign({}, Super.Interface, Interface);
- Class.extend = Super.extend;
- addEventPoolingTo(Class);
- return Class;
- };
- addEventPoolingTo(SyntheticEvent);
- /**
- * Helper to nullify syntheticEvent instance properties when destructing
- *
- * @param {String} propName
- * @param {?object} getVal
- * @return {object} defineProperty object
- */
- function getPooledWarningPropertyDefinition(propName, getVal) {
- var isFunction = typeof getVal === 'function';
- return {
- configurable: true,
- set: set,
- get: get
- };
- function set(val) {
- var action = isFunction ? 'setting the method' : 'setting the property';
- warn(action, 'This is effectively a no-op');
- return val;
- }
- function get() {
- var action = isFunction ? 'accessing the method' : 'accessing the property';
- var result = isFunction ? 'This is a no-op function' : 'This is set to null';
- warn(action, result);
- return getVal;
- }
- function warn(action, result) {
- {
- error("This synthetic event is reused for performance reasons. If you're seeing this, " + "you're %s `%s` on a released/nullified synthetic event. %s. " + 'If you must keep the original synthetic event around, use event.persist(). ' + 'See https://fb.me/react-event-pooling for more information.', action, propName, result);
- }
- }
- }
- function getPooledEvent(dispatchConfig, targetInst, nativeEvent, nativeInst) {
- var EventConstructor = this;
- if (EventConstructor.eventPool.length) {
- var instance = EventConstructor.eventPool.pop();
- EventConstructor.call(instance, dispatchConfig, targetInst, nativeEvent, nativeInst);
- return instance;
- }
- return new EventConstructor(dispatchConfig, targetInst, nativeEvent, nativeInst);
- }
- function releasePooledEvent(event) {
- var EventConstructor = this;
- if (!(event instanceof EventConstructor)) {
- {
- throw Error( "Trying to release an event instance into a pool of a different type." );
- }
- }
- event.destructor();
- if (EventConstructor.eventPool.length < EVENT_POOL_SIZE) {
- EventConstructor.eventPool.push(event);
- }
- }
- function addEventPoolingTo(EventConstructor) {
- EventConstructor.eventPool = [];
- EventConstructor.getPooled = getPooledEvent;
- EventConstructor.release = releasePooledEvent;
- }
- /**
- * @interface Event
- * @see http://www.w3.org/TR/DOM-Level-3-Events/#events-compositionevents
- */
- var SyntheticCompositionEvent = SyntheticEvent.extend({
- data: null
- });
- /**
- * @interface Event
- * @see http://www.w3.org/TR/2013/WD-DOM-Level-3-Events-20131105
- * /#events-inputevents
- */
- var SyntheticInputEvent = SyntheticEvent.extend({
- data: null
- });
- var END_KEYCODES = [9, 13, 27, 32]; // Tab, Return, Esc, Space
- var START_KEYCODE = 229;
- var canUseCompositionEvent = canUseDOM && 'CompositionEvent' in window;
- var documentMode = null;
- if (canUseDOM && 'documentMode' in document) {
- documentMode = document.documentMode;
- } // Webkit offers a very useful `textInput` event that can be used to
- // directly represent `beforeInput`. The IE `textinput` event is not as
- // useful, so we don't use it.
- var canUseTextInputEvent = canUseDOM && 'TextEvent' in window && !documentMode; // In IE9+, we have access to composition events, but the data supplied
- // by the native compositionend event may be incorrect. Japanese ideographic
- // spaces, for instance (\u3000) are not recorded correctly.
- var useFallbackCompositionData = canUseDOM && (!canUseCompositionEvent || documentMode && documentMode > 8 && documentMode <= 11);
- var SPACEBAR_CODE = 32;
- var SPACEBAR_CHAR = String.fromCharCode(SPACEBAR_CODE); // Events and their corresponding property names.
- var eventTypes = {
- beforeInput: {
- phasedRegistrationNames: {
- bubbled: 'onBeforeInput',
- captured: 'onBeforeInputCapture'
- },
- dependencies: [TOP_COMPOSITION_END, TOP_KEY_PRESS, TOP_TEXT_INPUT, TOP_PASTE]
- },
- compositionEnd: {
- phasedRegistrationNames: {
- bubbled: 'onCompositionEnd',
- captured: 'onCompositionEndCapture'
- },
- dependencies: [TOP_BLUR, TOP_COMPOSITION_END, TOP_KEY_DOWN, TOP_KEY_PRESS, TOP_KEY_UP, TOP_MOUSE_DOWN]
- },
- compositionStart: {
- phasedRegistrationNames: {
- bubbled: 'onCompositionStart',
- captured: 'onCompositionStartCapture'
- },
- dependencies: [TOP_BLUR, TOP_COMPOSITION_START, TOP_KEY_DOWN, TOP_KEY_PRESS, TOP_KEY_UP, TOP_MOUSE_DOWN]
- },
- compositionUpdate: {
- phasedRegistrationNames: {
- bubbled: 'onCompositionUpdate',
- captured: 'onCompositionUpdateCapture'
- },
- dependencies: [TOP_BLUR, TOP_COMPOSITION_UPDATE, TOP_KEY_DOWN, TOP_KEY_PRESS, TOP_KEY_UP, TOP_MOUSE_DOWN]
- }
- }; // Track whether we've ever handled a keypress on the space key.
- var hasSpaceKeypress = false;
- /**
- * Return whether a native keypress event is assumed to be a command.
- * This is required because Firefox fires `keypress` events for key commands
- * (cut, copy, select-all, etc.) even though no character is inserted.
- */
- function isKeypressCommand(nativeEvent) {
- return (nativeEvent.ctrlKey || nativeEvent.altKey || nativeEvent.metaKey) && // ctrlKey && altKey is equivalent to AltGr, and is not a command.
- !(nativeEvent.ctrlKey && nativeEvent.altKey);
- }
- /**
- * Translate native top level events into event types.
- *
- * @param {string} topLevelType
- * @return {object}
- */
- function getCompositionEventType(topLevelType) {
- switch (topLevelType) {
- case TOP_COMPOSITION_START:
- return eventTypes.compositionStart;
- case TOP_COMPOSITION_END:
- return eventTypes.compositionEnd;
- case TOP_COMPOSITION_UPDATE:
- return eventTypes.compositionUpdate;
- }
- }
- /**
- * Does our fallback best-guess model think this event signifies that
- * composition has begun?
- *
- * @param {string} topLevelType
- * @param {object} nativeEvent
- * @return {boolean}
- */
- function isFallbackCompositionStart(topLevelType, nativeEvent) {
- return topLevelType === TOP_KEY_DOWN && nativeEvent.keyCode === START_KEYCODE;
- }
- /**
- * Does our fallback mode think that this event is the end of composition?
- *
- * @param {string} topLevelType
- * @param {object} nativeEvent
- * @return {boolean}
- */
- function isFallbackCompositionEnd(topLevelType, nativeEvent) {
- switch (topLevelType) {
- case TOP_KEY_UP:
- // Command keys insert or clear IME input.
- return END_KEYCODES.indexOf(nativeEvent.keyCode) !== -1;
- case TOP_KEY_DOWN:
- // Expect IME keyCode on each keydown. If we get any other
- // code we must have exited earlier.
- return nativeEvent.keyCode !== START_KEYCODE;
- case TOP_KEY_PRESS:
- case TOP_MOUSE_DOWN:
- case TOP_BLUR:
- // Events are not possible without cancelling IME.
- return true;
- default:
- return false;
- }
- }
- /**
- * Google Input Tools provides composition data via a CustomEvent,
- * with the `data` property populated in the `detail` object. If this
- * is available on the event object, use it. If not, this is a plain
- * composition event and we have nothing special to extract.
- *
- * @param {object} nativeEvent
- * @return {?string}
- */
- function getDataFromCustomEvent(nativeEvent) {
- var detail = nativeEvent.detail;
- if (typeof detail === 'object' && 'data' in detail) {
- return detail.data;
- }
- return null;
- }
- /**
- * Check if a composition event was triggered by Korean IME.
- * Our fallback mode does not work well with IE's Korean IME,
- * so just use native composition events when Korean IME is used.
- * Although CompositionEvent.locale property is deprecated,
- * it is available in IE, where our fallback mode is enabled.
- *
- * @param {object} nativeEvent
- * @return {boolean}
- */
- function isUsingKoreanIME(nativeEvent) {
- return nativeEvent.locale === 'ko';
- } // Track the current IME composition status, if any.
- var isComposing = false;
- /**
- * @return {?object} A SyntheticCompositionEvent.
- */
- function extractCompositionEvent(topLevelType, targetInst, nativeEvent, nativeEventTarget) {
- var eventType;
- var fallbackData;
- if (canUseCompositionEvent) {
- eventType = getCompositionEventType(topLevelType);
- } else if (!isComposing) {
- if (isFallbackCompositionStart(topLevelType, nativeEvent)) {
- eventType = eventTypes.compositionStart;
- }
- } else if (isFallbackCompositionEnd(topLevelType, nativeEvent)) {
- eventType = eventTypes.compositionEnd;
- }
- if (!eventType) {
- return null;
- }
- if (useFallbackCompositionData && !isUsingKoreanIME(nativeEvent)) {
- // The current composition is stored statically and must not be
- // overwritten while composition continues.
- if (!isComposing && eventType === eventTypes.compositionStart) {
- isComposing = initialize(nativeEventTarget);
- } else if (eventType === eventTypes.compositionEnd) {
- if (isComposing) {
- fallbackData = getData();
- }
- }
- }
- var event = SyntheticCompositionEvent.getPooled(eventType, targetInst, nativeEvent, nativeEventTarget);
- if (fallbackData) {
- // Inject data generated from fallback path into the synthetic event.
- // This matches the property of native CompositionEventInterface.
- event.data = fallbackData;
- } else {
- var customData = getDataFromCustomEvent(nativeEvent);
- if (customData !== null) {
- event.data = customData;
- }
- }
- accumulateTwoPhaseDispatches(event);
- return event;
- }
- /**
- * @param {TopLevelType} topLevelType Number from `TopLevelType`.
- * @param {object} nativeEvent Native browser event.
- * @return {?string} The string corresponding to this `beforeInput` event.
- */
- function getNativeBeforeInputChars(topLevelType, nativeEvent) {
- switch (topLevelType) {
- case TOP_COMPOSITION_END:
- return getDataFromCustomEvent(nativeEvent);
- case TOP_KEY_PRESS:
- /**
- * If native `textInput` events are available, our goal is to make
- * use of them. However, there is a special case: the spacebar key.
- * In Webkit, preventing default on a spacebar `textInput` event
- * cancels character insertion, but it *also* causes the browser
- * to fall back to its default spacebar behavior of scrolling the
- * page.
- *
- * Tracking at:
- * https://code.google.com/p/chromium/issues/detail?id=355103
- *
- * To avoid this issue, use the keypress event as if no `textInput`
- * event is available.
- */
- var which = nativeEvent.which;
- if (which !== SPACEBAR_CODE) {
- return null;
- }
- hasSpaceKeypress = true;
- return SPACEBAR_CHAR;
- case TOP_TEXT_INPUT:
- // Record the characters to be added to the DOM.
- var chars = nativeEvent.data; // If it's a spacebar character, assume that we have already handled
- // it at the keypress level and bail immediately. Android Chrome
- // doesn't give us keycodes, so we need to ignore it.
- if (chars === SPACEBAR_CHAR && hasSpaceKeypress) {
- return null;
- }
- return chars;
- default:
- // For other native event types, do nothing.
- return null;
- }
- }
- /**
- * For browsers that do not provide the `textInput` event, extract the
- * appropriate string to use for SyntheticInputEvent.
- *
- * @param {number} topLevelType Number from `TopLevelEventTypes`.
- * @param {object} nativeEvent Native browser event.
- * @return {?string} The fallback string for this `beforeInput` event.
- */
- function getFallbackBeforeInputChars(topLevelType, nativeEvent) {
- // If we are currently composing (IME) and using a fallback to do so,
- // try to extract the composed characters from the fallback object.
- // If composition event is available, we extract a string only at
- // compositionevent, otherwise extract it at fallback events.
- if (isComposing) {
- if (topLevelType === TOP_COMPOSITION_END || !canUseCompositionEvent && isFallbackCompositionEnd(topLevelType, nativeEvent)) {
- var chars = getData();
- reset();
- isComposing = false;
- return chars;
- }
- return null;
- }
- switch (topLevelType) {
- case TOP_PASTE:
- // If a paste event occurs after a keypress, throw out the input
- // chars. Paste events should not lead to BeforeInput events.
- return null;
- case TOP_KEY_PRESS:
- /**
- * As of v27, Firefox may fire keypress events even when no character
- * will be inserted. A few possibilities:
- *
- * - `which` is `0`. Arrow keys, Esc key, etc.
- *
- * - `which` is the pressed key code, but no char is available.
- * Ex: 'AltGr + d` in Polish. There is no modified character for
- * this key combination and no character is inserted into the
- * document, but FF fires the keypress for char code `100` anyway.
- * No `input` event will occur.
- *
- * - `which` is the pressed key code, but a command combination is
- * being used. Ex: `Cmd+C`. No character is inserted, and no
- * `input` event will occur.
- */
- if (!isKeypressCommand(nativeEvent)) {
- // IE fires the `keypress` event when a user types an emoji via
- // Touch keyboard of Windows. In such a case, the `char` property
- // holds an emoji character like `\uD83D\uDE0A`. Because its length
- // is 2, the property `which` does not represent an emoji correctly.
- // In such a case, we directly return the `char` property instead of
- // using `which`.
- if (nativeEvent.char && nativeEvent.char.length > 1) {
- return nativeEvent.char;
- } else if (nativeEvent.which) {
- return String.fromCharCode(nativeEvent.which);
- }
- }
- return null;
- case TOP_COMPOSITION_END:
- return useFallbackCompositionData && !isUsingKoreanIME(nativeEvent) ? null : nativeEvent.data;
- default:
- return null;
- }
- }
- /**
- * Extract a SyntheticInputEvent for `beforeInput`, based on either native
- * `textInput` or fallback behavior.
- *
- * @return {?object} A SyntheticInputEvent.
- */
- function extractBeforeInputEvent(topLevelType, targetInst, nativeEvent, nativeEventTarget) {
- var chars;
- if (canUseTextInputEvent) {
- chars = getNativeBeforeInputChars(topLevelType, nativeEvent);
- } else {
- chars = getFallbackBeforeInputChars(topLevelType, nativeEvent);
- } // If no characters are being inserted, no BeforeInput event should
- // be fired.
- if (!chars) {
- return null;
- }
- var event = SyntheticInputEvent.getPooled(eventTypes.beforeInput, targetInst, nativeEvent, nativeEventTarget);
- event.data = chars;
- accumulateTwoPhaseDispatches(event);
- return event;
- }
- /**
- * Create an `onBeforeInput` event to match
- * http://www.w3.org/TR/2013/WD-DOM-Level-3-Events-20131105/#events-inputevents.
- *
- * This event plugin is based on the native `textInput` event
- * available in Chrome, Safari, Opera, and IE. This event fires after
- * `onKeyPress` and `onCompositionEnd`, but before `onInput`.
- *
- * `beforeInput` is spec'd but not implemented in any browsers, and
- * the `input` event does not provide any useful information about what has
- * actually been added, contrary to the spec. Thus, `textInput` is the best
- * available event to identify the characters that have actually been inserted
- * into the target node.
- *
- * This plugin is also responsible for emitting `composition` events, thus
- * allowing us to share composition fallback code for both `beforeInput` and
- * `composition` event types.
- */
- var BeforeInputEventPlugin = {
- eventTypes: eventTypes,
- extractEvents: function (topLevelType, targetInst, nativeEvent, nativeEventTarget, eventSystemFlags) {
- var composition = extractCompositionEvent(topLevelType, targetInst, nativeEvent, nativeEventTarget);
- var beforeInput = extractBeforeInputEvent(topLevelType, targetInst, nativeEvent, nativeEventTarget);
- if (composition === null) {
- return beforeInput;
- }
- if (beforeInput === null) {
- return composition;
- }
- return [composition, beforeInput];
- }
- };
- /**
- * @see http://www.whatwg.org/specs/web-apps/current-work/multipage/the-input-element.html#input-type-attr-summary
- */
- var supportedInputTypes = {
- color: true,
- date: true,
- datetime: true,
- 'datetime-local': true,
- email: true,
- month: true,
- number: true,
- password: true,
- range: true,
- search: true,
- tel: true,
- text: true,
- time: true,
- url: true,
- week: true
- };
- function isTextInputElement(elem) {
- var nodeName = elem && elem.nodeName && elem.nodeName.toLowerCase();
- if (nodeName === 'input') {
- return !!supportedInputTypes[elem.type];
- }
- if (nodeName === 'textarea') {
- return true;
- }
- return false;
- }
- var eventTypes$1 = {
- change: {
- phasedRegistrationNames: {
- bubbled: 'onChange',
- captured: 'onChangeCapture'
- },
- dependencies: [TOP_BLUR, TOP_CHANGE, TOP_CLICK, TOP_FOCUS, TOP_INPUT, TOP_KEY_DOWN, TOP_KEY_UP, TOP_SELECTION_CHANGE]
- }
- };
- function createAndAccumulateChangeEvent(inst, nativeEvent, target) {
- var event = SyntheticEvent.getPooled(eventTypes$1.change, inst, nativeEvent, target);
- event.type = 'change'; // Flag this event loop as needing state restore.
- enqueueStateRestore(target);
- accumulateTwoPhaseDispatches(event);
- return event;
- }
- /**
- * For IE shims
- */
- var activeElement = null;
- var activeElementInst = null;
- /**
- * SECTION: handle `change` event
- */
- function shouldUseChangeEvent(elem) {
- var nodeName = elem.nodeName && elem.nodeName.toLowerCase();
- return nodeName === 'select' || nodeName === 'input' && elem.type === 'file';
- }
- function manualDispatchChangeEvent(nativeEvent) {
- var event = createAndAccumulateChangeEvent(activeElementInst, nativeEvent, getEventTarget(nativeEvent)); // If change and propertychange bubbled, we'd just bind to it like all the
- // other events and have it go through ReactBrowserEventEmitter. Since it
- // doesn't, we manually listen for the events and so we have to enqueue and
- // process the abstract event manually.
- //
- // Batching is necessary here in order to ensure that all event handlers run
- // before the next rerender (including event handlers attached to ancestor
- // elements instead of directly on the input). Without this, controlled
- // components don't work properly in conjunction with event bubbling because
- // the component is rerendered and the value reverted before all the event
- // handlers can run. See https://github.com/facebook/react/issues/708.
- batchedUpdates(runEventInBatch, event);
- }
- function runEventInBatch(event) {
- runEventsInBatch(event);
- }
- function getInstIfValueChanged(targetInst) {
- var targetNode = getNodeFromInstance$1(targetInst);
- if (updateValueIfChanged(targetNode)) {
- return targetInst;
- }
- }
- function getTargetInstForChangeEvent(topLevelType, targetInst) {
- if (topLevelType === TOP_CHANGE) {
- return targetInst;
- }
- }
- /**
- * SECTION: handle `input` event
- */
- var isInputEventSupported = false;
- if (canUseDOM) {
- // IE9 claims to support the input event but fails to trigger it when
- // deleting text, so we ignore its input events.
- isInputEventSupported = isEventSupported('input') && (!document.documentMode || document.documentMode > 9);
- }
- /**
- * (For IE <=9) Starts tracking propertychange events on the passed-in element
- * and override the value property so that we can distinguish user events from
- * value changes in JS.
- */
- function startWatchingForValueChange(target, targetInst) {
- activeElement = target;
- activeElementInst = targetInst;
- activeElement.attachEvent('onpropertychange', handlePropertyChange);
- }
- /**
- * (For IE <=9) Removes the event listeners from the currently-tracked element,
- * if any exists.
- */
- function stopWatchingForValueChange() {
- if (!activeElement) {
- return;
- }
- activeElement.detachEvent('onpropertychange', handlePropertyChange);
- activeElement = null;
- activeElementInst = null;
- }
- /**
- * (For IE <=9) Handles a propertychange event, sending a `change` event if
- * the value of the active element has changed.
- */
- function handlePropertyChange(nativeEvent) {
- if (nativeEvent.propertyName !== 'value') {
- return;
- }
- if (getInstIfValueChanged(activeElementInst)) {
- manualDispatchChangeEvent(nativeEvent);
- }
- }
- function handleEventsForInputEventPolyfill(topLevelType, target, targetInst) {
- if (topLevelType === TOP_FOCUS) {
- // In IE9, propertychange fires for most input events but is buggy and
- // doesn't fire when text is deleted, but conveniently, selectionchange
- // appears to fire in all of the remaining cases so we catch those and
- // forward the event if the value has changed
- // In either case, we don't want to call the event handler if the value
- // is changed from JS so we redefine a setter for `.value` that updates
- // our activeElementValue variable, allowing us to ignore those changes
- //
- // stopWatching() should be a noop here but we call it just in case we
- // missed a blur event somehow.
- stopWatchingForValueChange();
- startWatchingForValueChange(target, targetInst);
- } else if (topLevelType === TOP_BLUR) {
- stopWatchingForValueChange();
- }
- } // For IE8 and IE9.
- function getTargetInstForInputEventPolyfill(topLevelType, targetInst) {
- if (topLevelType === TOP_SELECTION_CHANGE || topLevelType === TOP_KEY_UP || topLevelType === TOP_KEY_DOWN) {
- // On the selectionchange event, the target is just document which isn't
- // helpful for us so just check activeElement instead.
- //
- // 99% of the time, keydown and keyup aren't necessary. IE8 fails to fire
- // propertychange on the first input event after setting `value` from a
- // script and fires only keydown, keypress, keyup. Catching keyup usually
- // gets it and catching keydown lets us fire an event for the first
- // keystroke if user does a key repeat (it'll be a little delayed: right
- // before the second keystroke). Other input methods (e.g., paste) seem to
- // fire selectionchange normally.
- return getInstIfValueChanged(activeElementInst);
- }
- }
- /**
- * SECTION: handle `click` event
- */
- function shouldUseClickEvent(elem) {
- // Use the `click` event to detect changes to checkbox and radio inputs.
- // This approach works across all browsers, whereas `change` does not fire
- // until `blur` in IE8.
- var nodeName = elem.nodeName;
- return nodeName && nodeName.toLowerCase() === 'input' && (elem.type === 'checkbox' || elem.type === 'radio');
- }
- function getTargetInstForClickEvent(topLevelType, targetInst) {
- if (topLevelType === TOP_CLICK) {
- return getInstIfValueChanged(targetInst);
- }
- }
- function getTargetInstForInputOrChangeEvent(topLevelType, targetInst) {
- if (topLevelType === TOP_INPUT || topLevelType === TOP_CHANGE) {
- return getInstIfValueChanged(targetInst);
- }
- }
- function handleControlledInputBlur(node) {
- var state = node._wrapperState;
- if (!state || !state.controlled || node.type !== 'number') {
- return;
- }
- {
- // If controlled, assign the value attribute to the current value on blur
- setDefaultValue(node, 'number', node.value);
- }
- }
- /**
- * This plugin creates an `onChange` event that normalizes change events
- * across form elements. This event fires at a time when it's possible to
- * change the element's value without seeing a flicker.
- *
- * Supported elements are:
- * - input (see `isTextInputElement`)
- * - textarea
- * - select
- */
- var ChangeEventPlugin = {
- eventTypes: eventTypes$1,
- _isInputEventSupported: isInputEventSupported,
- extractEvents: function (topLevelType, targetInst, nativeEvent, nativeEventTarget, eventSystemFlags) {
- var targetNode = targetInst ? getNodeFromInstance$1(targetInst) : window;
- var getTargetInstFunc, handleEventFunc;
- if (shouldUseChangeEvent(targetNode)) {
- getTargetInstFunc = getTargetInstForChangeEvent;
- } else if (isTextInputElement(targetNode)) {
- if (isInputEventSupported) {
- getTargetInstFunc = getTargetInstForInputOrChangeEvent;
- } else {
- getTargetInstFunc = getTargetInstForInputEventPolyfill;
- handleEventFunc = handleEventsForInputEventPolyfill;
- }
- } else if (shouldUseClickEvent(targetNode)) {
- getTargetInstFunc = getTargetInstForClickEvent;
- }
- if (getTargetInstFunc) {
- var inst = getTargetInstFunc(topLevelType, targetInst);
- if (inst) {
- var event = createAndAccumulateChangeEvent(inst, nativeEvent, nativeEventTarget);
- return event;
- }
- }
- if (handleEventFunc) {
- handleEventFunc(topLevelType, targetNode, targetInst);
- } // When blurring, set the value attribute for number inputs
- if (topLevelType === TOP_BLUR) {
- handleControlledInputBlur(targetNode);
- }
- }
- };
- var SyntheticUIEvent = SyntheticEvent.extend({
- view: null,
- detail: null
- });
- /**
- * Translation from modifier key to the associated property in the event.
- * @see http://www.w3.org/TR/DOM-Level-3-Events/#keys-Modifiers
- */
- var modifierKeyToProp = {
- Alt: 'altKey',
- Control: 'ctrlKey',
- Meta: 'metaKey',
- Shift: 'shiftKey'
- }; // Older browsers (Safari <= 10, iOS Safari <= 10.2) do not support
- // getModifierState. If getModifierState is not supported, we map it to a set of
- // modifier keys exposed by the event. In this case, Lock-keys are not supported.
- function modifierStateGetter(keyArg) {
- var syntheticEvent = this;
- var nativeEvent = syntheticEvent.nativeEvent;
- if (nativeEvent.getModifierState) {
- return nativeEvent.getModifierState(keyArg);
- }
- var keyProp = modifierKeyToProp[keyArg];
- return keyProp ? !!nativeEvent[keyProp] : false;
- }
- function getEventModifierState(nativeEvent) {
- return modifierStateGetter;
- }
- var previousScreenX = 0;
- var previousScreenY = 0; // Use flags to signal movementX/Y has already been set
- var isMovementXSet = false;
- var isMovementYSet = false;
- /**
- * @interface MouseEvent
- * @see http://www.w3.org/TR/DOM-Level-3-Events/
- */
- var SyntheticMouseEvent = SyntheticUIEvent.extend({
- screenX: null,
- screenY: null,
- clientX: null,
- clientY: null,
- pageX: null,
- pageY: null,
- ctrlKey: null,
- shiftKey: null,
- altKey: null,
- metaKey: null,
- getModifierState: getEventModifierState,
- button: null,
- buttons: null,
- relatedTarget: function (event) {
- return event.relatedTarget || (event.fromElement === event.srcElement ? event.toElement : event.fromElement);
- },
- movementX: function (event) {
- if ('movementX' in event) {
- return event.movementX;
- }
- var screenX = previousScreenX;
- previousScreenX = event.screenX;
- if (!isMovementXSet) {
- isMovementXSet = true;
- return 0;
- }
- return event.type === 'mousemove' ? event.screenX - screenX : 0;
- },
- movementY: function (event) {
- if ('movementY' in event) {
- return event.movementY;
- }
- var screenY = previousScreenY;
- previousScreenY = event.screenY;
- if (!isMovementYSet) {
- isMovementYSet = true;
- return 0;
- }
- return event.type === 'mousemove' ? event.screenY - screenY : 0;
- }
- });
- /**
- * @interface PointerEvent
- * @see http://www.w3.org/TR/pointerevents/
- */
- var SyntheticPointerEvent = SyntheticMouseEvent.extend({
- pointerId: null,
- width: null,
- height: null,
- pressure: null,
- tangentialPressure: null,
- tiltX: null,
- tiltY: null,
- twist: null,
- pointerType: null,
- isPrimary: null
- });
- var eventTypes$2 = {
- mouseEnter: {
- registrationName: 'onMouseEnter',
- dependencies: [TOP_MOUSE_OUT, TOP_MOUSE_OVER]
- },
- mouseLeave: {
- registrationName: 'onMouseLeave',
- dependencies: [TOP_MOUSE_OUT, TOP_MOUSE_OVER]
- },
- pointerEnter: {
- registrationName: 'onPointerEnter',
- dependencies: [TOP_POINTER_OUT, TOP_POINTER_OVER]
- },
- pointerLeave: {
- registrationName: 'onPointerLeave',
- dependencies: [TOP_POINTER_OUT, TOP_POINTER_OVER]
- }
- };
- var EnterLeaveEventPlugin = {
- eventTypes: eventTypes$2,
- /**
- * For almost every interaction we care about, there will be both a top-level
- * `mouseover` and `mouseout` event that occurs. Only use `mouseout` so that
- * we do not extract duplicate events. However, moving the mouse into the
- * browser from outside will not fire a `mouseout` event. In this case, we use
- * the `mouseover` top-level event.
- */
- extractEvents: function (topLevelType, targetInst, nativeEvent, nativeEventTarget, eventSystemFlags) {
- var isOverEvent = topLevelType === TOP_MOUSE_OVER || topLevelType === TOP_POINTER_OVER;
- var isOutEvent = topLevelType === TOP_MOUSE_OUT || topLevelType === TOP_POINTER_OUT;
- if (isOverEvent && (eventSystemFlags & IS_REPLAYED) === 0 && (nativeEvent.relatedTarget || nativeEvent.fromElement)) {
- // If this is an over event with a target, then we've already dispatched
- // the event in the out event of the other target. If this is replayed,
- // then it's because we couldn't dispatch against this target previously
- // so we have to do it now instead.
- return null;
- }
- if (!isOutEvent && !isOverEvent) {
- // Must not be a mouse or pointer in or out - ignoring.
- return null;
- }
- var win;
- if (nativeEventTarget.window === nativeEventTarget) {
- // `nativeEventTarget` is probably a window object.
- win = nativeEventTarget;
- } else {
- // TODO: Figure out why `ownerDocument` is sometimes undefined in IE8.
- var doc = nativeEventTarget.ownerDocument;
- if (doc) {
- win = doc.defaultView || doc.parentWindow;
- } else {
- win = window;
- }
- }
- var from;
- var to;
- if (isOutEvent) {
- from = targetInst;
- var related = nativeEvent.relatedTarget || nativeEvent.toElement;
- to = related ? getClosestInstanceFromNode(related) : null;
- if (to !== null) {
- var nearestMounted = getNearestMountedFiber(to);
- if (to !== nearestMounted || to.tag !== HostComponent && to.tag !== HostText) {
- to = null;
- }
- }
- } else {
- // Moving to a node from outside the window.
- from = null;
- to = targetInst;
- }
- if (from === to) {
- // Nothing pertains to our managed components.
- return null;
- }
- var eventInterface, leaveEventType, enterEventType, eventTypePrefix;
- if (topLevelType === TOP_MOUSE_OUT || topLevelType === TOP_MOUSE_OVER) {
- eventInterface = SyntheticMouseEvent;
- leaveEventType = eventTypes$2.mouseLeave;
- enterEventType = eventTypes$2.mouseEnter;
- eventTypePrefix = 'mouse';
- } else if (topLevelType === TOP_POINTER_OUT || topLevelType === TOP_POINTER_OVER) {
- eventInterface = SyntheticPointerEvent;
- leaveEventType = eventTypes$2.pointerLeave;
- enterEventType = eventTypes$2.pointerEnter;
- eventTypePrefix = 'pointer';
- }
- var fromNode = from == null ? win : getNodeFromInstance$1(from);
- var toNode = to == null ? win : getNodeFromInstance$1(to);
- var leave = eventInterface.getPooled(leaveEventType, from, nativeEvent, nativeEventTarget);
- leave.type = eventTypePrefix + 'leave';
- leave.target = fromNode;
- leave.relatedTarget = toNode;
- var enter = eventInterface.getPooled(enterEventType, to, nativeEvent, nativeEventTarget);
- enter.type = eventTypePrefix + 'enter';
- enter.target = toNode;
- enter.relatedTarget = fromNode;
- accumulateEnterLeaveDispatches(leave, enter, from, to); // If we are not processing the first ancestor, then we
- // should not process the same nativeEvent again, as we
- // will have already processed it in the first ancestor.
- if ((eventSystemFlags & IS_FIRST_ANCESTOR) === 0) {
- return [leave];
- }
- return [leave, enter];
- }
- };
- /**
- * inlined Object.is polyfill to avoid requiring consumers ship their own
- * https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/is
- */
- function is(x, y) {
- return x === y && (x !== 0 || 1 / x === 1 / y) || x !== x && y !== y // eslint-disable-line no-self-compare
- ;
- }
- var objectIs = typeof Object.is === 'function' ? Object.is : is;
- var hasOwnProperty$2 = Object.prototype.hasOwnProperty;
- /**
- * Performs equality by iterating through keys on an object and returning false
- * when any key has values which are not strictly equal between the arguments.
- * Returns true when the values of all keys are strictly equal.
- */
- function shallowEqual(objA, objB) {
- if (objectIs(objA, objB)) {
- return true;
- }
- if (typeof objA !== 'object' || objA === null || typeof objB !== 'object' || objB === null) {
- return false;
- }
- var keysA = Object.keys(objA);
- var keysB = Object.keys(objB);
- if (keysA.length !== keysB.length) {
- return false;
- } // Test for A's keys different from B.
- for (var i = 0; i < keysA.length; i++) {
- if (!hasOwnProperty$2.call(objB, keysA[i]) || !objectIs(objA[keysA[i]], objB[keysA[i]])) {
- return false;
- }
- }
- return true;
- }
- var skipSelectionChangeEvent = canUseDOM && 'documentMode' in document && document.documentMode <= 11;
- var eventTypes$3 = {
- select: {
- phasedRegistrationNames: {
- bubbled: 'onSelect',
- captured: 'onSelectCapture'
- },
- dependencies: [TOP_BLUR, TOP_CONTEXT_MENU, TOP_DRAG_END, TOP_FOCUS, TOP_KEY_DOWN, TOP_KEY_UP, TOP_MOUSE_DOWN, TOP_MOUSE_UP, TOP_SELECTION_CHANGE]
- }
- };
- var activeElement$1 = null;
- var activeElementInst$1 = null;
- var lastSelection = null;
- var mouseDown = false;
- /**
- * Get an object which is a unique representation of the current selection.
- *
- * The return value will not be consistent across nodes or browsers, but
- * two identical selections on the same node will return identical objects.
- *
- * @param {DOMElement} node
- * @return {object}
- */
- function getSelection$1(node) {
- if ('selectionStart' in node && hasSelectionCapabilities(node)) {
- return {
- start: node.selectionStart,
- end: node.selectionEnd
- };
- } else {
- var win = node.ownerDocument && node.ownerDocument.defaultView || window;
- var selection = win.getSelection();
- return {
- anchorNode: selection.anchorNode,
- anchorOffset: selection.anchorOffset,
- focusNode: selection.focusNode,
- focusOffset: selection.focusOffset
- };
- }
- }
- /**
- * Get document associated with the event target.
- *
- * @param {object} nativeEventTarget
- * @return {Document}
- */
- function getEventTargetDocument(eventTarget) {
- return eventTarget.window === eventTarget ? eventTarget.document : eventTarget.nodeType === DOCUMENT_NODE ? eventTarget : eventTarget.ownerDocument;
- }
- /**
- * Poll selection to see whether it's changed.
- *
- * @param {object} nativeEvent
- * @param {object} nativeEventTarget
- * @return {?SyntheticEvent}
- */
- function constructSelectEvent(nativeEvent, nativeEventTarget) {
- // Ensure we have the right element, and that the user is not dragging a
- // selection (this matches native `select` event behavior). In HTML5, select
- // fires only on input and textarea thus if there's no focused element we
- // won't dispatch.
- var doc = getEventTargetDocument(nativeEventTarget);
- if (mouseDown || activeElement$1 == null || activeElement$1 !== getActiveElement(doc)) {
- return null;
- } // Only fire when selection has actually changed.
- var currentSelection = getSelection$1(activeElement$1);
- if (!lastSelection || !shallowEqual(lastSelection, currentSelection)) {
- lastSelection = currentSelection;
- var syntheticEvent = SyntheticEvent.getPooled(eventTypes$3.select, activeElementInst$1, nativeEvent, nativeEventTarget);
- syntheticEvent.type = 'select';
- syntheticEvent.target = activeElement$1;
- accumulateTwoPhaseDispatches(syntheticEvent);
- return syntheticEvent;
- }
- return null;
- }
- /**
- * This plugin creates an `onSelect` event that normalizes select events
- * across form elements.
- *
- * Supported elements are:
- * - input (see `isTextInputElement`)
- * - textarea
- * - contentEditable
- *
- * This differs from native browser implementations in the following ways:
- * - Fires on contentEditable fields as well as inputs.
- * - Fires for collapsed selection.
- * - Fires after user input.
- */
- var SelectEventPlugin = {
- eventTypes: eventTypes$3,
- extractEvents: function (topLevelType, targetInst, nativeEvent, nativeEventTarget, eventSystemFlags, container) {
- var containerOrDoc = container || getEventTargetDocument(nativeEventTarget); // Track whether all listeners exists for this plugin. If none exist, we do
- // not extract events. See #3639.
- if (!containerOrDoc || !isListeningToAllDependencies('onSelect', containerOrDoc)) {
- return null;
- }
- var targetNode = targetInst ? getNodeFromInstance$1(targetInst) : window;
- switch (topLevelType) {
- // Track the input node that has focus.
- case TOP_FOCUS:
- if (isTextInputElement(targetNode) || targetNode.contentEditable === 'true') {
- activeElement$1 = targetNode;
- activeElementInst$1 = targetInst;
- lastSelection = null;
- }
- break;
- case TOP_BLUR:
- activeElement$1 = null;
- activeElementInst$1 = null;
- lastSelection = null;
- break;
- // Don't fire the event while the user is dragging. This matches the
- // semantics of the native select event.
- case TOP_MOUSE_DOWN:
- mouseDown = true;
- break;
- case TOP_CONTEXT_MENU:
- case TOP_MOUSE_UP:
- case TOP_DRAG_END:
- mouseDown = false;
- return constructSelectEvent(nativeEvent, nativeEventTarget);
- // Chrome and IE fire non-standard event when selection is changed (and
- // sometimes when it hasn't). IE's event fires out of order with respect
- // to key and input events on deletion, so we discard it.
- //
- // Firefox doesn't support selectionchange, so check selection status
- // after each key entry. The selection changes after keydown and before
- // keyup, but we check on keydown as well in the case of holding down a
- // key, when multiple keydown events are fired but only one keyup is.
- // This is also our approach for IE handling, for the reason above.
- case TOP_SELECTION_CHANGE:
- if (skipSelectionChangeEvent) {
- break;
- }
- // falls through
- case TOP_KEY_DOWN:
- case TOP_KEY_UP:
- return constructSelectEvent(nativeEvent, nativeEventTarget);
- }
- return null;
- }
- };
- /**
- * @interface Event
- * @see http://www.w3.org/TR/css3-animations/#AnimationEvent-interface
- * @see https://developer.mozilla.org/en-US/docs/Web/API/AnimationEvent
- */
- var SyntheticAnimationEvent = SyntheticEvent.extend({
- animationName: null,
- elapsedTime: null,
- pseudoElement: null
- });
- /**
- * @interface Event
- * @see http://www.w3.org/TR/clipboard-apis/
- */
- var SyntheticClipboardEvent = SyntheticEvent.extend({
- clipboardData: function (event) {
- return 'clipboardData' in event ? event.clipboardData : window.clipboardData;
- }
- });
- /**
- * @interface FocusEvent
- * @see http://www.w3.org/TR/DOM-Level-3-Events/
- */
- var SyntheticFocusEvent = SyntheticUIEvent.extend({
- relatedTarget: null
- });
- /**
- * `charCode` represents the actual "character code" and is safe to use with
- * `String.fromCharCode`. As such, only keys that correspond to printable
- * characters produce a valid `charCode`, the only exception to this is Enter.
- * The Tab-key is considered non-printable and does not have a `charCode`,
- * presumably because it does not produce a tab-character in browsers.
- *
- * @param {object} nativeEvent Native browser event.
- * @return {number} Normalized `charCode` property.
- */
- function getEventCharCode(nativeEvent) {
- var charCode;
- var keyCode = nativeEvent.keyCode;
- if ('charCode' in nativeEvent) {
- charCode = nativeEvent.charCode; // FF does not set `charCode` for the Enter-key, check against `keyCode`.
- if (charCode === 0 && keyCode === 13) {
- charCode = 13;
- }
- } else {
- // IE8 does not implement `charCode`, but `keyCode` has the correct value.
- charCode = keyCode;
- } // IE and Edge (on Windows) and Chrome / Safari (on Windows and Linux)
- // report Enter as charCode 10 when ctrl is pressed.
- if (charCode === 10) {
- charCode = 13;
- } // Some non-printable keys are reported in `charCode`/`keyCode`, discard them.
- // Must not discard the (non-)printable Enter-key.
- if (charCode >= 32 || charCode === 13) {
- return charCode;
- }
- return 0;
- }
- /**
- * Normalization of deprecated HTML5 `key` values
- * @see https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent#Key_names
- */
- var normalizeKey = {
- Esc: 'Escape',
- Spacebar: ' ',
- Left: 'ArrowLeft',
- Up: 'ArrowUp',
- Right: 'ArrowRight',
- Down: 'ArrowDown',
- Del: 'Delete',
- Win: 'OS',
- Menu: 'ContextMenu',
- Apps: 'ContextMenu',
- Scroll: 'ScrollLock',
- MozPrintableKey: 'Unidentified'
- };
- /**
- * Translation from legacy `keyCode` to HTML5 `key`
- * Only special keys supported, all others depend on keyboard layout or browser
- * @see https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent#Key_names
- */
- var translateToKey = {
- '8': 'Backspace',
- '9': 'Tab',
- '12': 'Clear',
- '13': 'Enter',
- '16': 'Shift',
- '17': 'Control',
- '18': 'Alt',
- '19': 'Pause',
- '20': 'CapsLock',
- '27': 'Escape',
- '32': ' ',
- '33': 'PageUp',
- '34': 'PageDown',
- '35': 'End',
- '36': 'Home',
- '37': 'ArrowLeft',
- '38': 'ArrowUp',
- '39': 'ArrowRight',
- '40': 'ArrowDown',
- '45': 'Insert',
- '46': 'Delete',
- '112': 'F1',
- '113': 'F2',
- '114': 'F3',
- '115': 'F4',
- '116': 'F5',
- '117': 'F6',
- '118': 'F7',
- '119': 'F8',
- '120': 'F9',
- '121': 'F10',
- '122': 'F11',
- '123': 'F12',
- '144': 'NumLock',
- '145': 'ScrollLock',
- '224': 'Meta'
- };
- /**
- * @param {object} nativeEvent Native browser event.
- * @return {string} Normalized `key` property.
- */
- function getEventKey(nativeEvent) {
- if (nativeEvent.key) {
- // Normalize inconsistent values reported by browsers due to
- // implementations of a working draft specification.
- // FireFox implements `key` but returns `MozPrintableKey` for all
- // printable characters (normalized to `Unidentified`), ignore it.
- var key = normalizeKey[nativeEvent.key] || nativeEvent.key;
- if (key !== 'Unidentified') {
- return key;
- }
- } // Browser does not implement `key`, polyfill as much of it as we can.
- if (nativeEvent.type === 'keypress') {
- var charCode = getEventCharCode(nativeEvent); // The enter-key is technically both printable and non-printable and can
- // thus be captured by `keypress`, no other non-printable key should.
- return charCode === 13 ? 'Enter' : String.fromCharCode(charCode);
- }
- if (nativeEvent.type === 'keydown' || nativeEvent.type === 'keyup') {
- // While user keyboard layout determines the actual meaning of each
- // `keyCode` value, almost all function keys have a universal value.
- return translateToKey[nativeEvent.keyCode] || 'Unidentified';
- }
- return '';
- }
- /**
- * @interface KeyboardEvent
- * @see http://www.w3.org/TR/DOM-Level-3-Events/
- */
- var SyntheticKeyboardEvent = SyntheticUIEvent.extend({
- key: getEventKey,
- location: null,
- ctrlKey: null,
- shiftKey: null,
- altKey: null,
- metaKey: null,
- repeat: null,
- locale: null,
- getModifierState: getEventModifierState,
- // Legacy Interface
- charCode: function (event) {
- // `charCode` is the result of a KeyPress event and represents the value of
- // the actual printable character.
- // KeyPress is deprecated, but its replacement is not yet final and not
- // implemented in any major browser. Only KeyPress has charCode.
- if (event.type === 'keypress') {
- return getEventCharCode(event);
- }
- return 0;
- },
- keyCode: function (event) {
- // `keyCode` is the result of a KeyDown/Up event and represents the value of
- // physical keyboard key.
- // The actual meaning of the value depends on the users' keyboard layout
- // which cannot be detected. Assuming that it is a US keyboard layout
- // provides a surprisingly accurate mapping for US and European users.
- // Due to this, it is left to the user to implement at this time.
- if (event.type === 'keydown' || event.type === 'keyup') {
- return event.keyCode;
- }
- return 0;
- },
- which: function (event) {
- // `which` is an alias for either `keyCode` or `charCode` depending on the
- // type of the event.
- if (event.type === 'keypress') {
- return getEventCharCode(event);
- }
- if (event.type === 'keydown' || event.type === 'keyup') {
- return event.keyCode;
- }
- return 0;
- }
- });
- /**
- * @interface DragEvent
- * @see http://www.w3.org/TR/DOM-Level-3-Events/
- */
- var SyntheticDragEvent = SyntheticMouseEvent.extend({
- dataTransfer: null
- });
- /**
- * @interface TouchEvent
- * @see http://www.w3.org/TR/touch-events/
- */
- var SyntheticTouchEvent = SyntheticUIEvent.extend({
- touches: null,
- targetTouches: null,
- changedTouches: null,
- altKey: null,
- metaKey: null,
- ctrlKey: null,
- shiftKey: null,
- getModifierState: getEventModifierState
- });
- /**
- * @interface Event
- * @see http://www.w3.org/TR/2009/WD-css3-transitions-20090320/#transition-events-
- * @see https://developer.mozilla.org/en-US/docs/Web/API/TransitionEvent
- */
- var SyntheticTransitionEvent = SyntheticEvent.extend({
- propertyName: null,
- elapsedTime: null,
- pseudoElement: null
- });
- /**
- * @interface WheelEvent
- * @see http://www.w3.org/TR/DOM-Level-3-Events/
- */
- var SyntheticWheelEvent = SyntheticMouseEvent.extend({
- deltaX: function (event) {
- return 'deltaX' in event ? event.deltaX : // Fallback to `wheelDeltaX` for Webkit and normalize (right is positive).
- 'wheelDeltaX' in event ? -event.wheelDeltaX : 0;
- },
- deltaY: function (event) {
- return 'deltaY' in event ? event.deltaY : // Fallback to `wheelDeltaY` for Webkit and normalize (down is positive).
- 'wheelDeltaY' in event ? -event.wheelDeltaY : // Fallback to `wheelDelta` for IE<9 and normalize (down is positive).
- 'wheelDelta' in event ? -event.wheelDelta : 0;
- },
- deltaZ: null,
- // Browsers without "deltaMode" is reporting in raw wheel delta where one
- // notch on the scroll is always +/- 120, roughly equivalent to pixels.
- // A good approximation of DOM_DELTA_LINE (1) is 5% of viewport size or
- // ~40 pixels, for DOM_DELTA_SCREEN (2) it is 87.5% of viewport size.
- deltaMode: null
- });
- var knownHTMLTopLevelTypes = [TOP_ABORT, TOP_CANCEL, TOP_CAN_PLAY, TOP_CAN_PLAY_THROUGH, TOP_CLOSE, TOP_DURATION_CHANGE, TOP_EMPTIED, TOP_ENCRYPTED, TOP_ENDED, TOP_ERROR, TOP_INPUT, TOP_INVALID, TOP_LOAD, TOP_LOADED_DATA, TOP_LOADED_METADATA, TOP_LOAD_START, TOP_PAUSE, TOP_PLAY, TOP_PLAYING, TOP_PROGRESS, TOP_RATE_CHANGE, TOP_RESET, TOP_SEEKED, TOP_SEEKING, TOP_STALLED, TOP_SUBMIT, TOP_SUSPEND, TOP_TIME_UPDATE, TOP_TOGGLE, TOP_VOLUME_CHANGE, TOP_WAITING];
- var SimpleEventPlugin = {
- // simpleEventPluginEventTypes gets populated from
- // the DOMEventProperties module.
- eventTypes: simpleEventPluginEventTypes,
- extractEvents: function (topLevelType, targetInst, nativeEvent, nativeEventTarget, eventSystemFlags) {
- var dispatchConfig = topLevelEventsToDispatchConfig.get(topLevelType);
- if (!dispatchConfig) {
- return null;
- }
- var EventConstructor;
- switch (topLevelType) {
- case TOP_KEY_PRESS:
- // Firefox creates a keypress event for function keys too. This removes
- // the unwanted keypress events. Enter is however both printable and
- // non-printable. One would expect Tab to be as well (but it isn't).
- if (getEventCharCode(nativeEvent) === 0) {
- return null;
- }
- /* falls through */
- case TOP_KEY_DOWN:
- case TOP_KEY_UP:
- EventConstructor = SyntheticKeyboardEvent;
- break;
- case TOP_BLUR:
- case TOP_FOCUS:
- EventConstructor = SyntheticFocusEvent;
- break;
- case TOP_CLICK:
- // Firefox creates a click event on right mouse clicks. This removes the
- // unwanted click events.
- if (nativeEvent.button === 2) {
- return null;
- }
- /* falls through */
- case TOP_AUX_CLICK:
- case TOP_DOUBLE_CLICK:
- case TOP_MOUSE_DOWN:
- case TOP_MOUSE_MOVE:
- case TOP_MOUSE_UP: // TODO: Disabled elements should not respond to mouse events
- /* falls through */
- case TOP_MOUSE_OUT:
- case TOP_MOUSE_OVER:
- case TOP_CONTEXT_MENU:
- EventConstructor = SyntheticMouseEvent;
- break;
- case TOP_DRAG:
- case TOP_DRAG_END:
- case TOP_DRAG_ENTER:
- case TOP_DRAG_EXIT:
- case TOP_DRAG_LEAVE:
- case TOP_DRAG_OVER:
- case TOP_DRAG_START:
- case TOP_DROP:
- EventConstructor = SyntheticDragEvent;
- break;
- case TOP_TOUCH_CANCEL:
- case TOP_TOUCH_END:
- case TOP_TOUCH_MOVE:
- case TOP_TOUCH_START:
- EventConstructor = SyntheticTouchEvent;
- break;
- case TOP_ANIMATION_END:
- case TOP_ANIMATION_ITERATION:
- case TOP_ANIMATION_START:
- EventConstructor = SyntheticAnimationEvent;
- break;
- case TOP_TRANSITION_END:
- EventConstructor = SyntheticTransitionEvent;
- break;
- case TOP_SCROLL:
- EventConstructor = SyntheticUIEvent;
- break;
- case TOP_WHEEL:
- EventConstructor = SyntheticWheelEvent;
- break;
- case TOP_COPY:
- case TOP_CUT:
- case TOP_PASTE:
- EventConstructor = SyntheticClipboardEvent;
- break;
- case TOP_GOT_POINTER_CAPTURE:
- case TOP_LOST_POINTER_CAPTURE:
- case TOP_POINTER_CANCEL:
- case TOP_POINTER_DOWN:
- case TOP_POINTER_MOVE:
- case TOP_POINTER_OUT:
- case TOP_POINTER_OVER:
- case TOP_POINTER_UP:
- EventConstructor = SyntheticPointerEvent;
- break;
- default:
- {
- if (knownHTMLTopLevelTypes.indexOf(topLevelType) === -1) {
- error('SimpleEventPlugin: Unhandled event type, `%s`. This warning ' + 'is likely caused by a bug in React. Please file an issue.', topLevelType);
- }
- } // HTML Events
- // @see http://www.w3.org/TR/html5/index.html#events-0
- EventConstructor = SyntheticEvent;
- break;
- }
- var event = EventConstructor.getPooled(dispatchConfig, targetInst, nativeEvent, nativeEventTarget);
- accumulateTwoPhaseDispatches(event);
- return event;
- }
- };
- /**
- * Specifies a deterministic ordering of `EventPlugin`s. A convenient way to
- * reason about plugins, without having to package every one of them. This
- * is better than having plugins be ordered in the same order that they
- * are injected because that ordering would be influenced by the packaging order.
- * `ResponderEventPlugin` must occur before `SimpleEventPlugin` so that
- * preventing default on events is convenient in `SimpleEventPlugin` handlers.
- */
- var DOMEventPluginOrder = ['ResponderEventPlugin', 'SimpleEventPlugin', 'EnterLeaveEventPlugin', 'ChangeEventPlugin', 'SelectEventPlugin', 'BeforeInputEventPlugin'];
- /**
- * Inject modules for resolving DOM hierarchy and plugin ordering.
- */
- injectEventPluginOrder(DOMEventPluginOrder);
- setComponentTree(getFiberCurrentPropsFromNode$1, getInstanceFromNode$1, getNodeFromInstance$1);
- /**
- * Some important event plugins included by default (without having to require
- * them).
- */
- injectEventPluginsByName({
- SimpleEventPlugin: SimpleEventPlugin,
- EnterLeaveEventPlugin: EnterLeaveEventPlugin,
- ChangeEventPlugin: ChangeEventPlugin,
- SelectEventPlugin: SelectEventPlugin,
- BeforeInputEventPlugin: BeforeInputEventPlugin
- });
- // Prefix measurements so that it's possible to filter them.
- // Longer prefixes are hard to read in DevTools.
- var reactEmoji = "\u269B";
- var warningEmoji = "\u26D4";
- var supportsUserTiming = typeof performance !== 'undefined' && typeof performance.mark === 'function' && typeof performance.clearMarks === 'function' && typeof performance.measure === 'function' && typeof performance.clearMeasures === 'function'; // Keep track of current fiber so that we know the path to unwind on pause.
- // TODO: this looks the same as nextUnitOfWork in scheduler. Can we unify them?
- var currentFiber = null; // If we're in the middle of user code, which fiber and method is it?
- // Reusing `currentFiber` would be confusing for this because user code fiber
- // can change during commit phase too, but we don't need to unwind it (since
- // lifecycles in the commit phase don't resemble a tree).
- var currentPhase = null;
- var currentPhaseFiber = null; // Did lifecycle hook schedule an update? This is often a performance problem,
- // so we will keep track of it, and include it in the report.
- // Track commits caused by cascading updates.
- var isCommitting = false;
- var hasScheduledUpdateInCurrentCommit = false;
- var hasScheduledUpdateInCurrentPhase = false;
- var commitCountInCurrentWorkLoop = 0;
- var effectCountInCurrentCommit = 0;
- // to avoid stretch the commit phase with measurement overhead.
- var labelsInCurrentCommit = new Set();
- var formatMarkName = function (markName) {
- return reactEmoji + " " + markName;
- };
- var formatLabel = function (label, warning) {
- var prefix = warning ? warningEmoji + " " : reactEmoji + " ";
- var suffix = warning ? " Warning: " + warning : '';
- return "" + prefix + label + suffix;
- };
- var beginMark = function (markName) {
- performance.mark(formatMarkName(markName));
- };
- var clearMark = function (markName) {
- performance.clearMarks(formatMarkName(markName));
- };
- var endMark = function (label, markName, warning) {
- var formattedMarkName = formatMarkName(markName);
- var formattedLabel = formatLabel(label, warning);
- try {
- performance.measure(formattedLabel, formattedMarkName);
- } catch (err) {} // If previous mark was missing for some reason, this will throw.
- // This could only happen if React crashed in an unexpected place earlier.
- // Don't pile on with more errors.
- // Clear marks immediately to avoid growing buffer.
- performance.clearMarks(formattedMarkName);
- performance.clearMeasures(formattedLabel);
- };
- var getFiberMarkName = function (label, debugID) {
- return label + " (#" + debugID + ")";
- };
- var getFiberLabel = function (componentName, isMounted, phase) {
- if (phase === null) {
- // These are composite component total time measurements.
- return componentName + " [" + (isMounted ? 'update' : 'mount') + "]";
- } else {
- // Composite component methods.
- return componentName + "." + phase;
- }
- };
- var beginFiberMark = function (fiber, phase) {
- var componentName = getComponentName(fiber.type) || 'Unknown';
- var debugID = fiber._debugID;
- var isMounted = fiber.alternate !== null;
- var label = getFiberLabel(componentName, isMounted, phase);
- if (isCommitting && labelsInCurrentCommit.has(label)) {
- // During the commit phase, we don't show duplicate labels because
- // there is a fixed overhead for every measurement, and we don't
- // want to stretch the commit phase beyond necessary.
- return false;
- }
- labelsInCurrentCommit.add(label);
- var markName = getFiberMarkName(label, debugID);
- beginMark(markName);
- return true;
- };
- var clearFiberMark = function (fiber, phase) {
- var componentName = getComponentName(fiber.type) || 'Unknown';
- var debugID = fiber._debugID;
- var isMounted = fiber.alternate !== null;
- var label = getFiberLabel(componentName, isMounted, phase);
- var markName = getFiberMarkName(label, debugID);
- clearMark(markName);
- };
- var endFiberMark = function (fiber, phase, warning) {
- var componentName = getComponentName(fiber.type) || 'Unknown';
- var debugID = fiber._debugID;
- var isMounted = fiber.alternate !== null;
- var label = getFiberLabel(componentName, isMounted, phase);
- var markName = getFiberMarkName(label, debugID);
- endMark(label, markName, warning);
- };
- var shouldIgnoreFiber = function (fiber) {
- // Host components should be skipped in the timeline.
- // We could check typeof fiber.type, but does this work with RN?
- switch (fiber.tag) {
- case HostRoot:
- case HostComponent:
- case HostText:
- case HostPortal:
- case Fragment:
- case ContextProvider:
- case ContextConsumer:
- case Mode:
- return true;
- default:
- return false;
- }
- };
- var clearPendingPhaseMeasurement = function () {
- if (currentPhase !== null && currentPhaseFiber !== null) {
- clearFiberMark(currentPhaseFiber, currentPhase);
- }
- currentPhaseFiber = null;
- currentPhase = null;
- hasScheduledUpdateInCurrentPhase = false;
- };
- var pauseTimers = function () {
- // Stops all currently active measurements so that they can be resumed
- // if we continue in a later deferred loop from the same unit of work.
- var fiber = currentFiber;
- while (fiber) {
- if (fiber._debugIsCurrentlyTiming) {
- endFiberMark(fiber, null, null);
- }
- fiber = fiber.return;
- }
- };
- var resumeTimersRecursively = function (fiber) {
- if (fiber.return !== null) {
- resumeTimersRecursively(fiber.return);
- }
- if (fiber._debugIsCurrentlyTiming) {
- beginFiberMark(fiber, null);
- }
- };
- var resumeTimers = function () {
- // Resumes all measurements that were active during the last deferred loop.
- if (currentFiber !== null) {
- resumeTimersRecursively(currentFiber);
- }
- };
- function recordEffect() {
- {
- effectCountInCurrentCommit++;
- }
- }
- function recordScheduleUpdate() {
- {
- if (isCommitting) {
- hasScheduledUpdateInCurrentCommit = true;
- }
- if (currentPhase !== null && currentPhase !== 'componentWillMount' && currentPhase !== 'componentWillReceiveProps') {
- hasScheduledUpdateInCurrentPhase = true;
- }
- }
- }
- function startWorkTimer(fiber) {
- {
- if (!supportsUserTiming || shouldIgnoreFiber(fiber)) {
- return;
- } // If we pause, this is the fiber to unwind from.
- currentFiber = fiber;
- if (!beginFiberMark(fiber, null)) {
- return;
- }
- fiber._debugIsCurrentlyTiming = true;
- }
- }
- function cancelWorkTimer(fiber) {
- {
- if (!supportsUserTiming || shouldIgnoreFiber(fiber)) {
- return;
- } // Remember we shouldn't complete measurement for this fiber.
- // Otherwise flamechart will be deep even for small updates.
- fiber._debugIsCurrentlyTiming = false;
- clearFiberMark(fiber, null);
- }
- }
- function stopWorkTimer(fiber) {
- {
- if (!supportsUserTiming || shouldIgnoreFiber(fiber)) {
- return;
- } // If we pause, its parent is the fiber to unwind from.
- currentFiber = fiber.return;
- if (!fiber._debugIsCurrentlyTiming) {
- return;
- }
- fiber._debugIsCurrentlyTiming = false;
- endFiberMark(fiber, null, null);
- }
- }
- function stopFailedWorkTimer(fiber) {
- {
- if (!supportsUserTiming || shouldIgnoreFiber(fiber)) {
- return;
- } // If we pause, its parent is the fiber to unwind from.
- currentFiber = fiber.return;
- if (!fiber._debugIsCurrentlyTiming) {
- return;
- }
- fiber._debugIsCurrentlyTiming = false;
- var warning = fiber.tag === SuspenseComponent ? 'Rendering was suspended' : 'An error was thrown inside this error boundary';
- endFiberMark(fiber, null, warning);
- }
- }
- function startPhaseTimer(fiber, phase) {
- {
- if (!supportsUserTiming) {
- return;
- }
- clearPendingPhaseMeasurement();
- if (!beginFiberMark(fiber, phase)) {
- return;
- }
- currentPhaseFiber = fiber;
- currentPhase = phase;
- }
- }
- function stopPhaseTimer() {
- {
- if (!supportsUserTiming) {
- return;
- }
- if (currentPhase !== null && currentPhaseFiber !== null) {
- var warning = hasScheduledUpdateInCurrentPhase ? 'Scheduled a cascading update' : null;
- endFiberMark(currentPhaseFiber, currentPhase, warning);
- }
- currentPhase = null;
- currentPhaseFiber = null;
- }
- }
- function startWorkLoopTimer(nextUnitOfWork) {
- {
- currentFiber = nextUnitOfWork;
- if (!supportsUserTiming) {
- return;
- }
- commitCountInCurrentWorkLoop = 0; // This is top level call.
- // Any other measurements are performed within.
- beginMark('(React Tree Reconciliation)'); // Resume any measurements that were in progress during the last loop.
- resumeTimers();
- }
- }
- function stopWorkLoopTimer(interruptedBy, didCompleteRoot) {
- {
- if (!supportsUserTiming) {
- return;
- }
- var warning = null;
- if (interruptedBy !== null) {
- if (interruptedBy.tag === HostRoot) {
- warning = 'A top-level update interrupted the previous render';
- } else {
- var componentName = getComponentName(interruptedBy.type) || 'Unknown';
- warning = "An update to " + componentName + " interrupted the previous render";
- }
- } else if (commitCountInCurrentWorkLoop > 1) {
- warning = 'There were cascading updates';
- }
- commitCountInCurrentWorkLoop = 0;
- var label = didCompleteRoot ? '(React Tree Reconciliation: Completed Root)' : '(React Tree Reconciliation: Yielded)'; // Pause any measurements until the next loop.
- pauseTimers();
- endMark(label, '(React Tree Reconciliation)', warning);
- }
- }
- function startCommitTimer() {
- {
- if (!supportsUserTiming) {
- return;
- }
- isCommitting = true;
- hasScheduledUpdateInCurrentCommit = false;
- labelsInCurrentCommit.clear();
- beginMark('(Committing Changes)');
- }
- }
- function stopCommitTimer() {
- {
- if (!supportsUserTiming) {
- return;
- }
- var warning = null;
- if (hasScheduledUpdateInCurrentCommit) {
- warning = 'Lifecycle hook scheduled a cascading update';
- } else if (commitCountInCurrentWorkLoop > 0) {
- warning = 'Caused by a cascading update in earlier commit';
- }
- hasScheduledUpdateInCurrentCommit = false;
- commitCountInCurrentWorkLoop++;
- isCommitting = false;
- labelsInCurrentCommit.clear();
- endMark('(Committing Changes)', '(Committing Changes)', warning);
- }
- }
- function startCommitSnapshotEffectsTimer() {
- {
- if (!supportsUserTiming) {
- return;
- }
- effectCountInCurrentCommit = 0;
- beginMark('(Committing Snapshot Effects)');
- }
- }
- function stopCommitSnapshotEffectsTimer() {
- {
- if (!supportsUserTiming) {
- return;
- }
- var count = effectCountInCurrentCommit;
- effectCountInCurrentCommit = 0;
- endMark("(Committing Snapshot Effects: " + count + " Total)", '(Committing Snapshot Effects)', null);
- }
- }
- function startCommitHostEffectsTimer() {
- {
- if (!supportsUserTiming) {
- return;
- }
- effectCountInCurrentCommit = 0;
- beginMark('(Committing Host Effects)');
- }
- }
- function stopCommitHostEffectsTimer() {
- {
- if (!supportsUserTiming) {
- return;
- }
- var count = effectCountInCurrentCommit;
- effectCountInCurrentCommit = 0;
- endMark("(Committing Host Effects: " + count + " Total)", '(Committing Host Effects)', null);
- }
- }
- function startCommitLifeCyclesTimer() {
- {
- if (!supportsUserTiming) {
- return;
- }
- effectCountInCurrentCommit = 0;
- beginMark('(Calling Lifecycle Methods)');
- }
- }
- function stopCommitLifeCyclesTimer() {
- {
- if (!supportsUserTiming) {
- return;
- }
- var count = effectCountInCurrentCommit;
- effectCountInCurrentCommit = 0;
- endMark("(Calling Lifecycle Methods: " + count + " Total)", '(Calling Lifecycle Methods)', null);
- }
- }
- var valueStack = [];
- var fiberStack;
- {
- fiberStack = [];
- }
- var index = -1;
- function createCursor(defaultValue) {
- return {
- current: defaultValue
- };
- }
- function pop(cursor, fiber) {
- if (index < 0) {
- {
- error('Unexpected pop.');
- }
- return;
- }
- {
- if (fiber !== fiberStack[index]) {
- error('Unexpected Fiber popped.');
- }
- }
- cursor.current = valueStack[index];
- valueStack[index] = null;
- {
- fiberStack[index] = null;
- }
- index--;
- }
- function push(cursor, value, fiber) {
- index++;
- valueStack[index] = cursor.current;
- {
- fiberStack[index] = fiber;
- }
- cursor.current = value;
- }
- var warnedAboutMissingGetChildContext;
- {
- warnedAboutMissingGetChildContext = {};
- }
- var emptyContextObject = {};
- {
- Object.freeze(emptyContextObject);
- } // A cursor to the current merged context object on the stack.
- var contextStackCursor = createCursor(emptyContextObject); // A cursor to a boolean indicating whether the context has changed.
- var didPerformWorkStackCursor = createCursor(false); // Keep track of the previous context object that was on the stack.
- // We use this to get access to the parent context after we have already
- // pushed the next context provider, and now need to merge their contexts.
- var previousContext = emptyContextObject;
- function getUnmaskedContext(workInProgress, Component, didPushOwnContextIfProvider) {
- {
- if (didPushOwnContextIfProvider && isContextProvider(Component)) {
- // If the fiber is a context provider itself, when we read its context
- // we may have already pushed its own child context on the stack. A context
- // provider should not "see" its own child context. Therefore we read the
- // previous (parent) context instead for a context provider.
- return previousContext;
- }
- return contextStackCursor.current;
- }
- }
- function cacheContext(workInProgress, unmaskedContext, maskedContext) {
- {
- var instance = workInProgress.stateNode;
- instance.__reactInternalMemoizedUnmaskedChildContext = unmaskedContext;
- instance.__reactInternalMemoizedMaskedChildContext = maskedContext;
- }
- }
- function getMaskedContext(workInProgress, unmaskedContext) {
- {
- var type = workInProgress.type;
- var contextTypes = type.contextTypes;
- if (!contextTypes) {
- return emptyContextObject;
- } // Avoid recreating masked context unless unmasked context has changed.
- // Failing to do this will result in unnecessary calls to componentWillReceiveProps.
- // This may trigger infinite loops if componentWillReceiveProps calls setState.
- var instance = workInProgress.stateNode;
- if (instance && instance.__reactInternalMemoizedUnmaskedChildContext === unmaskedContext) {
- return instance.__reactInternalMemoizedMaskedChildContext;
- }
- var context = {};
- for (var key in contextTypes) {
- context[key] = unmaskedContext[key];
- }
- {
- var name = getComponentName(type) || 'Unknown';
- checkPropTypes(contextTypes, context, 'context', name, getCurrentFiberStackInDev);
- } // Cache unmasked context so we can avoid recreating masked context unless necessary.
- // Context is created before the class component is instantiated so check for instance.
- if (instance) {
- cacheContext(workInProgress, unmaskedContext, context);
- }
- return context;
- }
- }
- function hasContextChanged() {
- {
- return didPerformWorkStackCursor.current;
- }
- }
- function isContextProvider(type) {
- {
- var childContextTypes = type.childContextTypes;
- return childContextTypes !== null && childContextTypes !== undefined;
- }
- }
- function popContext(fiber) {
- {
- pop(didPerformWorkStackCursor, fiber);
- pop(contextStackCursor, fiber);
- }
- }
- function popTopLevelContextObject(fiber) {
- {
- pop(didPerformWorkStackCursor, fiber);
- pop(contextStackCursor, fiber);
- }
- }
- function pushTopLevelContextObject(fiber, context, didChange) {
- {
- if (!(contextStackCursor.current === emptyContextObject)) {
- {
- throw Error( "Unexpected context found on stack. This error is likely caused by a bug in React. Please file an issue." );
- }
- }
- push(contextStackCursor, context, fiber);
- push(didPerformWorkStackCursor, didChange, fiber);
- }
- }
- function processChildContext(fiber, type, parentContext) {
- {
- var instance = fiber.stateNode;
- var childContextTypes = type.childContextTypes; // TODO (bvaughn) Replace this behavior with an invariant() in the future.
- // It has only been added in Fiber to match the (unintentional) behavior in Stack.
- if (typeof instance.getChildContext !== 'function') {
- {
- var componentName = getComponentName(type) || 'Unknown';
- if (!warnedAboutMissingGetChildContext[componentName]) {
- warnedAboutMissingGetChildContext[componentName] = true;
- error('%s.childContextTypes is specified but there is no getChildContext() method ' + 'on the instance. You can either define getChildContext() on %s or remove ' + 'childContextTypes from it.', componentName, componentName);
- }
- }
- return parentContext;
- }
- var childContext;
- startPhaseTimer(fiber, 'getChildContext');
- childContext = instance.getChildContext();
- stopPhaseTimer();
- for (var contextKey in childContext) {
- if (!(contextKey in childContextTypes)) {
- {
- throw Error( (getComponentName(type) || 'Unknown') + ".getChildContext(): key \"" + contextKey + "\" is not defined in childContextTypes." );
- }
- }
- }
- {
- var name = getComponentName(type) || 'Unknown';
- checkPropTypes(childContextTypes, childContext, 'child context', name, // In practice, there is one case in which we won't get a stack. It's when
- // somebody calls unstable_renderSubtreeIntoContainer() and we process
- // context from the parent component instance. The stack will be missing
- // because it's outside of the reconciliation, and so the pointer has not
- // been set. This is rare and doesn't matter. We'll also remove that API.
- getCurrentFiberStackInDev);
- }
- return _assign({}, parentContext, {}, childContext);
- }
- }
- function pushContextProvider(workInProgress) {
- {
- var instance = workInProgress.stateNode; // We push the context as early as possible to ensure stack integrity.
- // If the instance does not exist yet, we will push null at first,
- // and replace it on the stack later when invalidating the context.
- var memoizedMergedChildContext = instance && instance.__reactInternalMemoizedMergedChildContext || emptyContextObject; // Remember the parent context so we can merge with it later.
- // Inherit the parent's did-perform-work value to avoid inadvertently blocking updates.
- previousContext = contextStackCursor.current;
- push(contextStackCursor, memoizedMergedChildContext, workInProgress);
- push(didPerformWorkStackCursor, didPerformWorkStackCursor.current, workInProgress);
- return true;
- }
- }
- function invalidateContextProvider(workInProgress, type, didChange) {
- {
- var instance = workInProgress.stateNode;
- if (!instance) {
- {
- throw Error( "Expected to have an instance by this point. This error is likely caused by a bug in React. Please file an issue." );
- }
- }
- if (didChange) {
- // Merge parent and own context.
- // Skip this if we're not updating due to sCU.
- // This avoids unnecessarily recomputing memoized values.
- var mergedContext = processChildContext(workInProgress, type, previousContext);
- instance.__reactInternalMemoizedMergedChildContext = mergedContext; // Replace the old (or empty) context with the new one.
- // It is important to unwind the context in the reverse order.
- pop(didPerformWorkStackCursor, workInProgress);
- pop(contextStackCursor, workInProgress); // Now push the new context and mark that it has changed.
- push(contextStackCursor, mergedContext, workInProgress);
- push(didPerformWorkStackCursor, didChange, workInProgress);
- } else {
- pop(didPerformWorkStackCursor, workInProgress);
- push(didPerformWorkStackCursor, didChange, workInProgress);
- }
- }
- }
- function findCurrentUnmaskedContext(fiber) {
- {
- // Currently this is only used with renderSubtreeIntoContainer; not sure if it
- // makes sense elsewhere
- if (!(isFiberMounted(fiber) && fiber.tag === ClassComponent)) {
- {
- throw Error( "Expected subtree parent to be a mounted class component. This error is likely caused by a bug in React. Please file an issue." );
- }
- }
- var node = fiber;
- do {
- switch (node.tag) {
- case HostRoot:
- return node.stateNode.context;
- case ClassComponent:
- {
- var Component = node.type;
- if (isContextProvider(Component)) {
- return node.stateNode.__reactInternalMemoizedMergedChildContext;
- }
- break;
- }
- }
- node = node.return;
- } while (node !== null);
- {
- {
- throw Error( "Found unexpected detached subtree parent. This error is likely caused by a bug in React. Please file an issue." );
- }
- }
- }
- }
- var LegacyRoot = 0;
- var BlockingRoot = 1;
- var ConcurrentRoot = 2;
- var Scheduler_runWithPriority = Scheduler.unstable_runWithPriority,
- Scheduler_scheduleCallback = Scheduler.unstable_scheduleCallback,
- Scheduler_cancelCallback = Scheduler.unstable_cancelCallback,
- Scheduler_shouldYield = Scheduler.unstable_shouldYield,
- Scheduler_requestPaint = Scheduler.unstable_requestPaint,
- Scheduler_now = Scheduler.unstable_now,
- Scheduler_getCurrentPriorityLevel = Scheduler.unstable_getCurrentPriorityLevel,
- Scheduler_ImmediatePriority = Scheduler.unstable_ImmediatePriority,
- Scheduler_UserBlockingPriority = Scheduler.unstable_UserBlockingPriority,
- Scheduler_NormalPriority = Scheduler.unstable_NormalPriority,
- Scheduler_LowPriority = Scheduler.unstable_LowPriority,
- Scheduler_IdlePriority = Scheduler.unstable_IdlePriority;
- {
- // Provide explicit error message when production+profiling bundle of e.g.
- // react-dom is used with production (non-profiling) bundle of
- // scheduler/tracing
- if (!(tracing.__interactionsRef != null && tracing.__interactionsRef.current != null)) {
- {
- throw Error( "It is not supported to run the profiling version of a renderer (for example, `react-dom/profiling`) without also replacing the `scheduler/tracing` module with `scheduler/tracing-profiling`. Your bundler might have a setting for aliasing both modules. Learn more at http://fb.me/react-profiling" );
- }
- }
- }
- var fakeCallbackNode = {}; // Except for NoPriority, these correspond to Scheduler priorities. We use
- // ascending numbers so we can compare them like numbers. They start at 90 to
- // avoid clashing with Scheduler's priorities.
- var ImmediatePriority = 99;
- var UserBlockingPriority$1 = 98;
- var NormalPriority = 97;
- var LowPriority = 96;
- var IdlePriority = 95; // NoPriority is the absence of priority. Also React-only.
- var NoPriority = 90;
- var shouldYield = Scheduler_shouldYield;
- var requestPaint = // Fall back gracefully if we're running an older version of Scheduler.
- Scheduler_requestPaint !== undefined ? Scheduler_requestPaint : function () {};
- var syncQueue = null;
- var immediateQueueCallbackNode = null;
- var isFlushingSyncQueue = false;
- var initialTimeMs = Scheduler_now(); // If the initial timestamp is reasonably small, use Scheduler's `now` directly.
- // This will be the case for modern browsers that support `performance.now`. In
- // older browsers, Scheduler falls back to `Date.now`, which returns a Unix
- // timestamp. In that case, subtract the module initialization time to simulate
- // the behavior of performance.now and keep our times small enough to fit
- // within 32 bits.
- // TODO: Consider lifting this into Scheduler.
- var now = initialTimeMs < 10000 ? Scheduler_now : function () {
- return Scheduler_now() - initialTimeMs;
- };
- function getCurrentPriorityLevel() {
- switch (Scheduler_getCurrentPriorityLevel()) {
- case Scheduler_ImmediatePriority:
- return ImmediatePriority;
- case Scheduler_UserBlockingPriority:
- return UserBlockingPriority$1;
- case Scheduler_NormalPriority:
- return NormalPriority;
- case Scheduler_LowPriority:
- return LowPriority;
- case Scheduler_IdlePriority:
- return IdlePriority;
- default:
- {
- {
- throw Error( "Unknown priority level." );
- }
- }
- }
- }
- function reactPriorityToSchedulerPriority(reactPriorityLevel) {
- switch (reactPriorityLevel) {
- case ImmediatePriority:
- return Scheduler_ImmediatePriority;
- case UserBlockingPriority$1:
- return Scheduler_UserBlockingPriority;
- case NormalPriority:
- return Scheduler_NormalPriority;
- case LowPriority:
- return Scheduler_LowPriority;
- case IdlePriority:
- return Scheduler_IdlePriority;
- default:
- {
- {
- throw Error( "Unknown priority level." );
- }
- }
- }
- }
- function runWithPriority$1(reactPriorityLevel, fn) {
- var priorityLevel = reactPriorityToSchedulerPriority(reactPriorityLevel);
- return Scheduler_runWithPriority(priorityLevel, fn);
- }
- function scheduleCallback(reactPriorityLevel, callback, options) {
- var priorityLevel = reactPriorityToSchedulerPriority(reactPriorityLevel);
- return Scheduler_scheduleCallback(priorityLevel, callback, options);
- }
- function scheduleSyncCallback(callback) {
- // Push this callback into an internal queue. We'll flush these either in
- // the next tick, or earlier if something calls `flushSyncCallbackQueue`.
- if (syncQueue === null) {
- syncQueue = [callback]; // Flush the queue in the next tick, at the earliest.
- immediateQueueCallbackNode = Scheduler_scheduleCallback(Scheduler_ImmediatePriority, flushSyncCallbackQueueImpl);
- } else {
- // Push onto existing queue. Don't need to schedule a callback because
- // we already scheduled one when we created the queue.
- syncQueue.push(callback);
- }
- return fakeCallbackNode;
- }
- function cancelCallback(callbackNode) {
- if (callbackNode !== fakeCallbackNode) {
- Scheduler_cancelCallback(callbackNode);
- }
- }
- function flushSyncCallbackQueue() {
- if (immediateQueueCallbackNode !== null) {
- var node = immediateQueueCallbackNode;
- immediateQueueCallbackNode = null;
- Scheduler_cancelCallback(node);
- }
- flushSyncCallbackQueueImpl();
- }
- function flushSyncCallbackQueueImpl() {
- if (!isFlushingSyncQueue && syncQueue !== null) {
- // Prevent re-entrancy.
- isFlushingSyncQueue = true;
- var i = 0;
- try {
- var _isSync = true;
- var queue = syncQueue;
- runWithPriority$1(ImmediatePriority, function () {
- for (; i < queue.length; i++) {
- var callback = queue[i];
- do {
- callback = callback(_isSync);
- } while (callback !== null);
- }
- });
- syncQueue = null;
- } catch (error) {
- // If something throws, leave the remaining callbacks on the queue.
- if (syncQueue !== null) {
- syncQueue = syncQueue.slice(i + 1);
- } // Resume flushing in the next tick
- Scheduler_scheduleCallback(Scheduler_ImmediatePriority, flushSyncCallbackQueue);
- throw error;
- } finally {
- isFlushingSyncQueue = false;
- }
- }
- }
- var NoMode = 0;
- var StrictMode = 1; // TODO: Remove BlockingMode and ConcurrentMode by reading from the root
- // tag instead
- var BlockingMode = 2;
- var ConcurrentMode = 4;
- var ProfileMode = 8;
- // Max 31 bit integer. The max integer size in V8 for 32-bit systems.
- // Math.pow(2, 30) - 1
- // 0b111111111111111111111111111111
- var MAX_SIGNED_31_BIT_INT = 1073741823;
- var NoWork = 0; // TODO: Think of a better name for Never. The key difference with Idle is that
- // Never work can be committed in an inconsistent state without tearing the UI.
- // The main example is offscreen content, like a hidden subtree. So one possible
- // name is Offscreen. However, it also includes dehydrated Suspense boundaries,
- // which are inconsistent in the sense that they haven't finished yet, but
- // aren't visibly inconsistent because the server rendered HTML matches what the
- // hydrated tree would look like.
- var Never = 1; // Idle is slightly higher priority than Never. It must completely finish in
- // order to be consistent.
- var Idle = 2; // Continuous Hydration is slightly higher than Idle and is used to increase
- // priority of hover targets.
- var ContinuousHydration = 3;
- var Sync = MAX_SIGNED_31_BIT_INT;
- var Batched = Sync - 1;
- var UNIT_SIZE = 10;
- var MAGIC_NUMBER_OFFSET = Batched - 1; // 1 unit of expiration time represents 10ms.
- function msToExpirationTime(ms) {
- // Always subtract from the offset so that we don't clash with the magic number for NoWork.
- return MAGIC_NUMBER_OFFSET - (ms / UNIT_SIZE | 0);
- }
- function expirationTimeToMs(expirationTime) {
- return (MAGIC_NUMBER_OFFSET - expirationTime) * UNIT_SIZE;
- }
- function ceiling(num, precision) {
- return ((num / precision | 0) + 1) * precision;
- }
- function computeExpirationBucket(currentTime, expirationInMs, bucketSizeMs) {
- return MAGIC_NUMBER_OFFSET - ceiling(MAGIC_NUMBER_OFFSET - currentTime + expirationInMs / UNIT_SIZE, bucketSizeMs / UNIT_SIZE);
- } // TODO: This corresponds to Scheduler's NormalPriority, not LowPriority. Update
- // the names to reflect.
- var LOW_PRIORITY_EXPIRATION = 5000;
- var LOW_PRIORITY_BATCH_SIZE = 250;
- function computeAsyncExpiration(currentTime) {
- return computeExpirationBucket(currentTime, LOW_PRIORITY_EXPIRATION, LOW_PRIORITY_BATCH_SIZE);
- }
- function computeSuspenseExpiration(currentTime, timeoutMs) {
- // TODO: Should we warn if timeoutMs is lower than the normal pri expiration time?
- return computeExpirationBucket(currentTime, timeoutMs, LOW_PRIORITY_BATCH_SIZE);
- } // We intentionally set a higher expiration time for interactive updates in
- // dev than in production.
- //
- // If the main thread is being blocked so long that you hit the expiration,
- // it's a problem that could be solved with better scheduling.
- //
- // People will be more likely to notice this and fix it with the long
- // expiration time in development.
- //
- // In production we opt for better UX at the risk of masking scheduling
- // problems, by expiring fast.
- var HIGH_PRIORITY_EXPIRATION = 500 ;
- var HIGH_PRIORITY_BATCH_SIZE = 100;
- function computeInteractiveExpiration(currentTime) {
- return computeExpirationBucket(currentTime, HIGH_PRIORITY_EXPIRATION, HIGH_PRIORITY_BATCH_SIZE);
- }
- function inferPriorityFromExpirationTime(currentTime, expirationTime) {
- if (expirationTime === Sync) {
- return ImmediatePriority;
- }
- if (expirationTime === Never || expirationTime === Idle) {
- return IdlePriority;
- }
- var msUntil = expirationTimeToMs(expirationTime) - expirationTimeToMs(currentTime);
- if (msUntil <= 0) {
- return ImmediatePriority;
- }
- if (msUntil <= HIGH_PRIORITY_EXPIRATION + HIGH_PRIORITY_BATCH_SIZE) {
- return UserBlockingPriority$1;
- }
- if (msUntil <= LOW_PRIORITY_EXPIRATION + LOW_PRIORITY_BATCH_SIZE) {
- return NormalPriority;
- } // TODO: Handle LowPriority
- // Assume anything lower has idle priority
- return IdlePriority;
- }
- var ReactStrictModeWarnings = {
- recordUnsafeLifecycleWarnings: function (fiber, instance) {},
- flushPendingUnsafeLifecycleWarnings: function () {},
- recordLegacyContextWarning: function (fiber, instance) {},
- flushLegacyContextWarning: function () {},
- discardPendingWarnings: function () {}
- };
- {
- var findStrictRoot = function (fiber) {
- var maybeStrictRoot = null;
- var node = fiber;
- while (node !== null) {
- if (node.mode & StrictMode) {
- maybeStrictRoot = node;
- }
- node = node.return;
- }
- return maybeStrictRoot;
- };
- var setToSortedString = function (set) {
- var array = [];
- set.forEach(function (value) {
- array.push(value);
- });
- return array.sort().join(', ');
- };
- var pendingComponentWillMountWarnings = [];
- var pendingUNSAFE_ComponentWillMountWarnings = [];
- var pendingComponentWillReceivePropsWarnings = [];
- var pendingUNSAFE_ComponentWillReceivePropsWarnings = [];
- var pendingComponentWillUpdateWarnings = [];
- var pendingUNSAFE_ComponentWillUpdateWarnings = []; // Tracks components we have already warned about.
- var didWarnAboutUnsafeLifecycles = new Set();
- ReactStrictModeWarnings.recordUnsafeLifecycleWarnings = function (fiber, instance) {
- // Dedup strategy: Warn once per component.
- if (didWarnAboutUnsafeLifecycles.has(fiber.type)) {
- return;
- }
- if (typeof instance.componentWillMount === 'function' && // Don't warn about react-lifecycles-compat polyfilled components.
- instance.componentWillMount.__suppressDeprecationWarning !== true) {
- pendingComponentWillMountWarnings.push(fiber);
- }
- if (fiber.mode & StrictMode && typeof instance.UNSAFE_componentWillMount === 'function') {
- pendingUNSAFE_ComponentWillMountWarnings.push(fiber);
- }
- if (typeof instance.componentWillReceiveProps === 'function' && instance.componentWillReceiveProps.__suppressDeprecationWarning !== true) {
- pendingComponentWillReceivePropsWarnings.push(fiber);
- }
- if (fiber.mode & StrictMode && typeof instance.UNSAFE_componentWillReceiveProps === 'function') {
- pendingUNSAFE_ComponentWillReceivePropsWarnings.push(fiber);
- }
- if (typeof instance.componentWillUpdate === 'function' && instance.componentWillUpdate.__suppressDeprecationWarning !== true) {
- pendingComponentWillUpdateWarnings.push(fiber);
- }
- if (fiber.mode & StrictMode && typeof instance.UNSAFE_componentWillUpdate === 'function') {
- pendingUNSAFE_ComponentWillUpdateWarnings.push(fiber);
- }
- };
- ReactStrictModeWarnings.flushPendingUnsafeLifecycleWarnings = function () {
- // We do an initial pass to gather component names
- var componentWillMountUniqueNames = new Set();
- if (pendingComponentWillMountWarnings.length > 0) {
- pendingComponentWillMountWarnings.forEach(function (fiber) {
- componentWillMountUniqueNames.add(getComponentName(fiber.type) || 'Component');
- didWarnAboutUnsafeLifecycles.add(fiber.type);
- });
- pendingComponentWillMountWarnings = [];
- }
- var UNSAFE_componentWillMountUniqueNames = new Set();
- if (pendingUNSAFE_ComponentWillMountWarnings.length > 0) {
- pendingUNSAFE_ComponentWillMountWarnings.forEach(function (fiber) {
- UNSAFE_componentWillMountUniqueNames.add(getComponentName(fiber.type) || 'Component');
- didWarnAboutUnsafeLifecycles.add(fiber.type);
- });
- pendingUNSAFE_ComponentWillMountWarnings = [];
- }
- var componentWillReceivePropsUniqueNames = new Set();
- if (pendingComponentWillReceivePropsWarnings.length > 0) {
- pendingComponentWillReceivePropsWarnings.forEach(function (fiber) {
- componentWillReceivePropsUniqueNames.add(getComponentName(fiber.type) || 'Component');
- didWarnAboutUnsafeLifecycles.add(fiber.type);
- });
- pendingComponentWillReceivePropsWarnings = [];
- }
- var UNSAFE_componentWillReceivePropsUniqueNames = new Set();
- if (pendingUNSAFE_ComponentWillReceivePropsWarnings.length > 0) {
- pendingUNSAFE_ComponentWillReceivePropsWarnings.forEach(function (fiber) {
- UNSAFE_componentWillReceivePropsUniqueNames.add(getComponentName(fiber.type) || 'Component');
- didWarnAboutUnsafeLifecycles.add(fiber.type);
- });
- pendingUNSAFE_ComponentWillReceivePropsWarnings = [];
- }
- var componentWillUpdateUniqueNames = new Set();
- if (pendingComponentWillUpdateWarnings.length > 0) {
- pendingComponentWillUpdateWarnings.forEach(function (fiber) {
- componentWillUpdateUniqueNames.add(getComponentName(fiber.type) || 'Component');
- didWarnAboutUnsafeLifecycles.add(fiber.type);
- });
- pendingComponentWillUpdateWarnings = [];
- }
- var UNSAFE_componentWillUpdateUniqueNames = new Set();
- if (pendingUNSAFE_ComponentWillUpdateWarnings.length > 0) {
- pendingUNSAFE_ComponentWillUpdateWarnings.forEach(function (fiber) {
- UNSAFE_componentWillUpdateUniqueNames.add(getComponentName(fiber.type) || 'Component');
- didWarnAboutUnsafeLifecycles.add(fiber.type);
- });
- pendingUNSAFE_ComponentWillUpdateWarnings = [];
- } // Finally, we flush all the warnings
- // UNSAFE_ ones before the deprecated ones, since they'll be 'louder'
- if (UNSAFE_componentWillMountUniqueNames.size > 0) {
- var sortedNames = setToSortedString(UNSAFE_componentWillMountUniqueNames);
- error('Using UNSAFE_componentWillMount in strict mode is not recommended and may indicate bugs in your code. ' + 'See https://fb.me/react-unsafe-component-lifecycles for details.\n\n' + '* Move code with side effects to componentDidMount, and set initial state in the constructor.\n' + '\nPlease update the following components: %s', sortedNames);
- }
- if (UNSAFE_componentWillReceivePropsUniqueNames.size > 0) {
- var _sortedNames = setToSortedString(UNSAFE_componentWillReceivePropsUniqueNames);
- error('Using UNSAFE_componentWillReceiveProps in strict mode is not recommended ' + 'and may indicate bugs in your code. ' + 'See https://fb.me/react-unsafe-component-lifecycles for details.\n\n' + '* Move data fetching code or side effects to componentDidUpdate.\n' + "* If you're updating state whenever props change, " + 'refactor your code to use memoization techniques or move it to ' + 'static getDerivedStateFromProps. Learn more at: https://fb.me/react-derived-state\n' + '\nPlease update the following components: %s', _sortedNames);
- }
- if (UNSAFE_componentWillUpdateUniqueNames.size > 0) {
- var _sortedNames2 = setToSortedString(UNSAFE_componentWillUpdateUniqueNames);
- error('Using UNSAFE_componentWillUpdate in strict mode is not recommended ' + 'and may indicate bugs in your code. ' + 'See https://fb.me/react-unsafe-component-lifecycles for details.\n\n' + '* Move data fetching code or side effects to componentDidUpdate.\n' + '\nPlease update the following components: %s', _sortedNames2);
- }
- if (componentWillMountUniqueNames.size > 0) {
- var _sortedNames3 = setToSortedString(componentWillMountUniqueNames);
- warn('componentWillMount has been renamed, and is not recommended for use. ' + 'See https://fb.me/react-unsafe-component-lifecycles for details.\n\n' + '* Move code with side effects to componentDidMount, and set initial state in the constructor.\n' + '* Rename componentWillMount to UNSAFE_componentWillMount to suppress ' + 'this warning in non-strict mode. In React 17.x, only the UNSAFE_ name will work. ' + 'To rename all deprecated lifecycles to their new names, you can run ' + '`npx react-codemod rename-unsafe-lifecycles` in your project source folder.\n' + '\nPlease update the following components: %s', _sortedNames3);
- }
- if (componentWillReceivePropsUniqueNames.size > 0) {
- var _sortedNames4 = setToSortedString(componentWillReceivePropsUniqueNames);
- warn('componentWillReceiveProps has been renamed, and is not recommended for use. ' + 'See https://fb.me/react-unsafe-component-lifecycles for details.\n\n' + '* Move data fetching code or side effects to componentDidUpdate.\n' + "* If you're updating state whenever props change, refactor your " + 'code to use memoization techniques or move it to ' + 'static getDerivedStateFromProps. Learn more at: https://fb.me/react-derived-state\n' + '* Rename componentWillReceiveProps to UNSAFE_componentWillReceiveProps to suppress ' + 'this warning in non-strict mode. In React 17.x, only the UNSAFE_ name will work. ' + 'To rename all deprecated lifecycles to their new names, you can run ' + '`npx react-codemod rename-unsafe-lifecycles` in your project source folder.\n' + '\nPlease update the following components: %s', _sortedNames4);
- }
- if (componentWillUpdateUniqueNames.size > 0) {
- var _sortedNames5 = setToSortedString(componentWillUpdateUniqueNames);
- warn('componentWillUpdate has been renamed, and is not recommended for use. ' + 'See https://fb.me/react-unsafe-component-lifecycles for details.\n\n' + '* Move data fetching code or side effects to componentDidUpdate.\n' + '* Rename componentWillUpdate to UNSAFE_componentWillUpdate to suppress ' + 'this warning in non-strict mode. In React 17.x, only the UNSAFE_ name will work. ' + 'To rename all deprecated lifecycles to their new names, you can run ' + '`npx react-codemod rename-unsafe-lifecycles` in your project source folder.\n' + '\nPlease update the following components: %s', _sortedNames5);
- }
- };
- var pendingLegacyContextWarning = new Map(); // Tracks components we have already warned about.
- var didWarnAboutLegacyContext = new Set();
- ReactStrictModeWarnings.recordLegacyContextWarning = function (fiber, instance) {
- var strictRoot = findStrictRoot(fiber);
- if (strictRoot === null) {
- error('Expected to find a StrictMode component in a strict mode tree. ' + 'This error is likely caused by a bug in React. Please file an issue.');
- return;
- } // Dedup strategy: Warn once per component.
- if (didWarnAboutLegacyContext.has(fiber.type)) {
- return;
- }
- var warningsForRoot = pendingLegacyContextWarning.get(strictRoot);
- if (fiber.type.contextTypes != null || fiber.type.childContextTypes != null || instance !== null && typeof instance.getChildContext === 'function') {
- if (warningsForRoot === undefined) {
- warningsForRoot = [];
- pendingLegacyContextWarning.set(strictRoot, warningsForRoot);
- }
- warningsForRoot.push(fiber);
- }
- };
- ReactStrictModeWarnings.flushLegacyContextWarning = function () {
- pendingLegacyContextWarning.forEach(function (fiberArray, strictRoot) {
- if (fiberArray.length === 0) {
- return;
- }
- var firstFiber = fiberArray[0];
- var uniqueNames = new Set();
- fiberArray.forEach(function (fiber) {
- uniqueNames.add(getComponentName(fiber.type) || 'Component');
- didWarnAboutLegacyContext.add(fiber.type);
- });
- var sortedNames = setToSortedString(uniqueNames);
- var firstComponentStack = getStackByFiberInDevAndProd(firstFiber);
- error('Legacy context API has been detected within a strict-mode tree.' + '\n\nThe old API will be supported in all 16.x releases, but applications ' + 'using it should migrate to the new version.' + '\n\nPlease update the following components: %s' + '\n\nLearn more about this warning here: https://fb.me/react-legacy-context' + '%s', sortedNames, firstComponentStack);
- });
- };
- ReactStrictModeWarnings.discardPendingWarnings = function () {
- pendingComponentWillMountWarnings = [];
- pendingUNSAFE_ComponentWillMountWarnings = [];
- pendingComponentWillReceivePropsWarnings = [];
- pendingUNSAFE_ComponentWillReceivePropsWarnings = [];
- pendingComponentWillUpdateWarnings = [];
- pendingUNSAFE_ComponentWillUpdateWarnings = [];
- pendingLegacyContextWarning = new Map();
- };
- }
- var resolveFamily = null; // $FlowFixMe Flow gets confused by a WeakSet feature check below.
- var failedBoundaries = null;
- var setRefreshHandler = function (handler) {
- {
- resolveFamily = handler;
- }
- };
- function resolveFunctionForHotReloading(type) {
- {
- if (resolveFamily === null) {
- // Hot reloading is disabled.
- return type;
- }
- var family = resolveFamily(type);
- if (family === undefined) {
- return type;
- } // Use the latest known implementation.
- return family.current;
- }
- }
- function resolveClassForHotReloading(type) {
- // No implementation differences.
- return resolveFunctionForHotReloading(type);
- }
- function resolveForwardRefForHotReloading(type) {
- {
- if (resolveFamily === null) {
- // Hot reloading is disabled.
- return type;
- }
- var family = resolveFamily(type);
- if (family === undefined) {
- // Check if we're dealing with a real forwardRef. Don't want to crash early.
- if (type !== null && type !== undefined && typeof type.render === 'function') {
- // ForwardRef is special because its resolved .type is an object,
- // but it's possible that we only have its inner render function in the map.
- // If that inner render function is different, we'll build a new forwardRef type.
- var currentRender = resolveFunctionForHotReloading(type.render);
- if (type.render !== currentRender) {
- var syntheticType = {
- $$typeof: REACT_FORWARD_REF_TYPE,
- render: currentRender
- };
- if (type.displayName !== undefined) {
- syntheticType.displayName = type.displayName;
- }
- return syntheticType;
- }
- }
- return type;
- } // Use the latest known implementation.
- return family.current;
- }
- }
- function isCompatibleFamilyForHotReloading(fiber, element) {
- {
- if (resolveFamily === null) {
- // Hot reloading is disabled.
- return false;
- }
- var prevType = fiber.elementType;
- var nextType = element.type; // If we got here, we know types aren't === equal.
- var needsCompareFamilies = false;
- var $$typeofNextType = typeof nextType === 'object' && nextType !== null ? nextType.$$typeof : null;
- switch (fiber.tag) {
- case ClassComponent:
- {
- if (typeof nextType === 'function') {
- needsCompareFamilies = true;
- }
- break;
- }
- case FunctionComponent:
- {
- if (typeof nextType === 'function') {
- needsCompareFamilies = true;
- } else if ($$typeofNextType === REACT_LAZY_TYPE) {
- // We don't know the inner type yet.
- // We're going to assume that the lazy inner type is stable,
- // and so it is sufficient to avoid reconciling it away.
- // We're not going to unwrap or actually use the new lazy type.
- needsCompareFamilies = true;
- }
- break;
- }
- case ForwardRef:
- {
- if ($$typeofNextType === REACT_FORWARD_REF_TYPE) {
- needsCompareFamilies = true;
- } else if ($$typeofNextType === REACT_LAZY_TYPE) {
- needsCompareFamilies = true;
- }
- break;
- }
- case MemoComponent:
- case SimpleMemoComponent:
- {
- if ($$typeofNextType === REACT_MEMO_TYPE) {
- // TODO: if it was but can no longer be simple,
- // we shouldn't set this.
- needsCompareFamilies = true;
- } else if ($$typeofNextType === REACT_LAZY_TYPE) {
- needsCompareFamilies = true;
- }
- break;
- }
- default:
- return false;
- } // Check if both types have a family and it's the same one.
- if (needsCompareFamilies) {
- // Note: memo() and forwardRef() we'll compare outer rather than inner type.
- // This means both of them need to be registered to preserve state.
- // If we unwrapped and compared the inner types for wrappers instead,
- // then we would risk falsely saying two separate memo(Foo)
- // calls are equivalent because they wrap the same Foo function.
- var prevFamily = resolveFamily(prevType);
- if (prevFamily !== undefined && prevFamily === resolveFamily(nextType)) {
- return true;
- }
- }
- return false;
- }
- }
- function markFailedErrorBoundaryForHotReloading(fiber) {
- {
- if (resolveFamily === null) {
- // Hot reloading is disabled.
- return;
- }
- if (typeof WeakSet !== 'function') {
- return;
- }
- if (failedBoundaries === null) {
- failedBoundaries = new WeakSet();
- }
- failedBoundaries.add(fiber);
- }
- }
- var scheduleRefresh = function (root, update) {
- {
- if (resolveFamily === null) {
- // Hot reloading is disabled.
- return;
- }
- var staleFamilies = update.staleFamilies,
- updatedFamilies = update.updatedFamilies;
- flushPassiveEffects();
- flushSync(function () {
- scheduleFibersWithFamiliesRecursively(root.current, updatedFamilies, staleFamilies);
- });
- }
- };
- var scheduleRoot = function (root, element) {
- {
- if (root.context !== emptyContextObject) {
- // Super edge case: root has a legacy _renderSubtree context
- // but we don't know the parentComponent so we can't pass it.
- // Just ignore. We'll delete this with _renderSubtree code path later.
- return;
- }
- flushPassiveEffects();
- syncUpdates(function () {
- updateContainer(element, root, null, null);
- });
- }
- };
- function scheduleFibersWithFamiliesRecursively(fiber, updatedFamilies, staleFamilies) {
- {
- var alternate = fiber.alternate,
- child = fiber.child,
- sibling = fiber.sibling,
- tag = fiber.tag,
- type = fiber.type;
- var candidateType = null;
- switch (tag) {
- case FunctionComponent:
- case SimpleMemoComponent:
- case ClassComponent:
- candidateType = type;
- break;
- case ForwardRef:
- candidateType = type.render;
- break;
- }
- if (resolveFamily === null) {
- throw new Error('Expected resolveFamily to be set during hot reload.');
- }
- var needsRender = false;
- var needsRemount = false;
- if (candidateType !== null) {
- var family = resolveFamily(candidateType);
- if (family !== undefined) {
- if (staleFamilies.has(family)) {
- needsRemount = true;
- } else if (updatedFamilies.has(family)) {
- if (tag === ClassComponent) {
- needsRemount = true;
- } else {
- needsRender = true;
- }
- }
- }
- }
- if (failedBoundaries !== null) {
- if (failedBoundaries.has(fiber) || alternate !== null && failedBoundaries.has(alternate)) {
- needsRemount = true;
- }
- }
- if (needsRemount) {
- fiber._debugNeedsRemount = true;
- }
- if (needsRemount || needsRender) {
- scheduleWork(fiber, Sync);
- }
- if (child !== null && !needsRemount) {
- scheduleFibersWithFamiliesRecursively(child, updatedFamilies, staleFamilies);
- }
- if (sibling !== null) {
- scheduleFibersWithFamiliesRecursively(sibling, updatedFamilies, staleFamilies);
- }
- }
- }
- var findHostInstancesForRefresh = function (root, families) {
- {
- var hostInstances = new Set();
- var types = new Set(families.map(function (family) {
- return family.current;
- }));
- findHostInstancesForMatchingFibersRecursively(root.current, types, hostInstances);
- return hostInstances;
- }
- };
- function findHostInstancesForMatchingFibersRecursively(fiber, types, hostInstances) {
- {
- var child = fiber.child,
- sibling = fiber.sibling,
- tag = fiber.tag,
- type = fiber.type;
- var candidateType = null;
- switch (tag) {
- case FunctionComponent:
- case SimpleMemoComponent:
- case ClassComponent:
- candidateType = type;
- break;
- case ForwardRef:
- candidateType = type.render;
- break;
- }
- var didMatch = false;
- if (candidateType !== null) {
- if (types.has(candidateType)) {
- didMatch = true;
- }
- }
- if (didMatch) {
- // We have a match. This only drills down to the closest host components.
- // There's no need to search deeper because for the purpose of giving
- // visual feedback, "flashing" outermost parent rectangles is sufficient.
- findHostInstancesForFiberShallowly(fiber, hostInstances);
- } else {
- // If there's no match, maybe there will be one further down in the child tree.
- if (child !== null) {
- findHostInstancesForMatchingFibersRecursively(child, types, hostInstances);
- }
- }
- if (sibling !== null) {
- findHostInstancesForMatchingFibersRecursively(sibling, types, hostInstances);
- }
- }
- }
- function findHostInstancesForFiberShallowly(fiber, hostInstances) {
- {
- var foundHostInstances = findChildHostInstancesForFiberShallowly(fiber, hostInstances);
- if (foundHostInstances) {
- return;
- } // If we didn't find any host children, fallback to closest host parent.
- var node = fiber;
- while (true) {
- switch (node.tag) {
- case HostComponent:
- hostInstances.add(node.stateNode);
- return;
- case HostPortal:
- hostInstances.add(node.stateNode.containerInfo);
- return;
- case HostRoot:
- hostInstances.add(node.stateNode.containerInfo);
- return;
- }
- if (node.return === null) {
- throw new Error('Expected to reach root first.');
- }
- node = node.return;
- }
- }
- }
- function findChildHostInstancesForFiberShallowly(fiber, hostInstances) {
- {
- var node = fiber;
- var foundHostInstances = false;
- while (true) {
- if (node.tag === HostComponent) {
- // We got a match.
- foundHostInstances = true;
- hostInstances.add(node.stateNode); // There may still be more, so keep searching.
- } else if (node.child !== null) {
- node.child.return = node;
- node = node.child;
- continue;
- }
- if (node === fiber) {
- return foundHostInstances;
- }
- while (node.sibling === null) {
- if (node.return === null || node.return === fiber) {
- return foundHostInstances;
- }
- node = node.return;
- }
- node.sibling.return = node.return;
- node = node.sibling;
- }
- }
- return false;
- }
- function resolveDefaultProps(Component, baseProps) {
- if (Component && Component.defaultProps) {
- // Resolve default props. Taken from ReactElement
- var props = _assign({}, baseProps);
- var defaultProps = Component.defaultProps;
- for (var propName in defaultProps) {
- if (props[propName] === undefined) {
- props[propName] = defaultProps[propName];
- }
- }
- return props;
- }
- return baseProps;
- }
- function readLazyComponentType(lazyComponent) {
- initializeLazyComponentType(lazyComponent);
- if (lazyComponent._status !== Resolved) {
- throw lazyComponent._result;
- }
- return lazyComponent._result;
- }
- var valueCursor = createCursor(null);
- var rendererSigil;
- {
- // Use this to detect multiple renderers using the same context
- rendererSigil = {};
- }
- var currentlyRenderingFiber = null;
- var lastContextDependency = null;
- var lastContextWithAllBitsObserved = null;
- var isDisallowedContextReadInDEV = false;
- function resetContextDependencies() {
- // This is called right before React yields execution, to ensure `readContext`
- // cannot be called outside the render phase.
- currentlyRenderingFiber = null;
- lastContextDependency = null;
- lastContextWithAllBitsObserved = null;
- {
- isDisallowedContextReadInDEV = false;
- }
- }
- function enterDisallowedContextReadInDEV() {
- {
- isDisallowedContextReadInDEV = true;
- }
- }
- function exitDisallowedContextReadInDEV() {
- {
- isDisallowedContextReadInDEV = false;
- }
- }
- function pushProvider(providerFiber, nextValue) {
- var context = providerFiber.type._context;
- {
- push(valueCursor, context._currentValue, providerFiber);
- context._currentValue = nextValue;
- {
- if (context._currentRenderer !== undefined && context._currentRenderer !== null && context._currentRenderer !== rendererSigil) {
- error('Detected multiple renderers concurrently rendering the ' + 'same context provider. This is currently unsupported.');
- }
- context._currentRenderer = rendererSigil;
- }
- }
- }
- function popProvider(providerFiber) {
- var currentValue = valueCursor.current;
- pop(valueCursor, providerFiber);
- var context = providerFiber.type._context;
- {
- context._currentValue = currentValue;
- }
- }
- function calculateChangedBits(context, newValue, oldValue) {
- if (objectIs(oldValue, newValue)) {
- // No change
- return 0;
- } else {
- var changedBits = typeof context._calculateChangedBits === 'function' ? context._calculateChangedBits(oldValue, newValue) : MAX_SIGNED_31_BIT_INT;
- {
- if ((changedBits & MAX_SIGNED_31_BIT_INT) !== changedBits) {
- error('calculateChangedBits: Expected the return value to be a ' + '31-bit integer. Instead received: %s', changedBits);
- }
- }
- return changedBits | 0;
- }
- }
- function scheduleWorkOnParentPath(parent, renderExpirationTime) {
- // Update the child expiration time of all the ancestors, including
- // the alternates.
- var node = parent;
- while (node !== null) {
- var alternate = node.alternate;
- if (node.childExpirationTime < renderExpirationTime) {
- node.childExpirationTime = renderExpirationTime;
- if (alternate !== null && alternate.childExpirationTime < renderExpirationTime) {
- alternate.childExpirationTime = renderExpirationTime;
- }
- } else if (alternate !== null && alternate.childExpirationTime < renderExpirationTime) {
- alternate.childExpirationTime = renderExpirationTime;
- } else {
- // Neither alternate was updated, which means the rest of the
- // ancestor path already has sufficient priority.
- break;
- }
- node = node.return;
- }
- }
- function propagateContextChange(workInProgress, context, changedBits, renderExpirationTime) {
- var fiber = workInProgress.child;
- if (fiber !== null) {
- // Set the return pointer of the child to the work-in-progress fiber.
- fiber.return = workInProgress;
- }
- while (fiber !== null) {
- var nextFiber = void 0; // Visit this fiber.
- var list = fiber.dependencies;
- if (list !== null) {
- nextFiber = fiber.child;
- var dependency = list.firstContext;
- while (dependency !== null) {
- // Check if the context matches.
- if (dependency.context === context && (dependency.observedBits & changedBits) !== 0) {
- // Match! Schedule an update on this fiber.
- if (fiber.tag === ClassComponent) {
- // Schedule a force update on the work-in-progress.
- var update = createUpdate(renderExpirationTime, null);
- update.tag = ForceUpdate; // TODO: Because we don't have a work-in-progress, this will add the
- // update to the current fiber, too, which means it will persist even if
- // this render is thrown away. Since it's a race condition, not sure it's
- // worth fixing.
- enqueueUpdate(fiber, update);
- }
- if (fiber.expirationTime < renderExpirationTime) {
- fiber.expirationTime = renderExpirationTime;
- }
- var alternate = fiber.alternate;
- if (alternate !== null && alternate.expirationTime < renderExpirationTime) {
- alternate.expirationTime = renderExpirationTime;
- }
- scheduleWorkOnParentPath(fiber.return, renderExpirationTime); // Mark the expiration time on the list, too.
- if (list.expirationTime < renderExpirationTime) {
- list.expirationTime = renderExpirationTime;
- } // Since we already found a match, we can stop traversing the
- // dependency list.
- break;
- }
- dependency = dependency.next;
- }
- } else if (fiber.tag === ContextProvider) {
- // Don't scan deeper if this is a matching provider
- nextFiber = fiber.type === workInProgress.type ? null : fiber.child;
- } else {
- // Traverse down.
- nextFiber = fiber.child;
- }
- if (nextFiber !== null) {
- // Set the return pointer of the child to the work-in-progress fiber.
- nextFiber.return = fiber;
- } else {
- // No child. Traverse to next sibling.
- nextFiber = fiber;
- while (nextFiber !== null) {
- if (nextFiber === workInProgress) {
- // We're back to the root of this subtree. Exit.
- nextFiber = null;
- break;
- }
- var sibling = nextFiber.sibling;
- if (sibling !== null) {
- // Set the return pointer of the sibling to the work-in-progress fiber.
- sibling.return = nextFiber.return;
- nextFiber = sibling;
- break;
- } // No more siblings. Traverse up.
- nextFiber = nextFiber.return;
- }
- }
- fiber = nextFiber;
- }
- }
- function prepareToReadContext(workInProgress, renderExpirationTime) {
- currentlyRenderingFiber = workInProgress;
- lastContextDependency = null;
- lastContextWithAllBitsObserved = null;
- var dependencies = workInProgress.dependencies;
- if (dependencies !== null) {
- var firstContext = dependencies.firstContext;
- if (firstContext !== null) {
- if (dependencies.expirationTime >= renderExpirationTime) {
- // Context list has a pending update. Mark that this fiber performed work.
- markWorkInProgressReceivedUpdate();
- } // Reset the work-in-progress list
- dependencies.firstContext = null;
- }
- }
- }
- function readContext(context, observedBits) {
- {
- // This warning would fire if you read context inside a Hook like useMemo.
- // Unlike the class check below, it's not enforced in production for perf.
- if (isDisallowedContextReadInDEV) {
- error('Context can only be read while React is rendering. ' + 'In classes, you can read it in the render method or getDerivedStateFromProps. ' + 'In function components, you can read it directly in the function body, but not ' + 'inside Hooks like useReducer() or useMemo().');
- }
- }
- if (lastContextWithAllBitsObserved === context) ; else if (observedBits === false || observedBits === 0) ; else {
- var resolvedObservedBits; // Avoid deopting on observable arguments or heterogeneous types.
- if (typeof observedBits !== 'number' || observedBits === MAX_SIGNED_31_BIT_INT) {
- // Observe all updates.
- lastContextWithAllBitsObserved = context;
- resolvedObservedBits = MAX_SIGNED_31_BIT_INT;
- } else {
- resolvedObservedBits = observedBits;
- }
- var contextItem = {
- context: context,
- observedBits: resolvedObservedBits,
- next: null
- };
- if (lastContextDependency === null) {
- if (!(currentlyRenderingFiber !== null)) {
- {
- throw Error( "Context can only be read while React is rendering. In classes, you can read it in the render method or getDerivedStateFromProps. In function components, you can read it directly in the function body, but not inside Hooks like useReducer() or useMemo()." );
- }
- } // This is the first dependency for this component. Create a new list.
- lastContextDependency = contextItem;
- currentlyRenderingFiber.dependencies = {
- expirationTime: NoWork,
- firstContext: contextItem,
- responders: null
- };
- } else {
- // Append a new context item.
- lastContextDependency = lastContextDependency.next = contextItem;
- }
- }
- return context._currentValue ;
- }
- var UpdateState = 0;
- var ReplaceState = 1;
- var ForceUpdate = 2;
- var CaptureUpdate = 3; // Global state that is reset at the beginning of calling `processUpdateQueue`.
- // It should only be read right after calling `processUpdateQueue`, via
- // `checkHasForceUpdateAfterProcessing`.
- var hasForceUpdate = false;
- var didWarnUpdateInsideUpdate;
- var currentlyProcessingQueue;
- {
- didWarnUpdateInsideUpdate = false;
- currentlyProcessingQueue = null;
- }
- function initializeUpdateQueue(fiber) {
- var queue = {
- baseState: fiber.memoizedState,
- baseQueue: null,
- shared: {
- pending: null
- },
- effects: null
- };
- fiber.updateQueue = queue;
- }
- function cloneUpdateQueue(current, workInProgress) {
- // Clone the update queue from current. Unless it's already a clone.
- var queue = workInProgress.updateQueue;
- var currentQueue = current.updateQueue;
- if (queue === currentQueue) {
- var clone = {
- baseState: currentQueue.baseState,
- baseQueue: currentQueue.baseQueue,
- shared: currentQueue.shared,
- effects: currentQueue.effects
- };
- workInProgress.updateQueue = clone;
- }
- }
- function createUpdate(expirationTime, suspenseConfig) {
- var update = {
- expirationTime: expirationTime,
- suspenseConfig: suspenseConfig,
- tag: UpdateState,
- payload: null,
- callback: null,
- next: null
- };
- update.next = update;
- {
- update.priority = getCurrentPriorityLevel();
- }
- return update;
- }
- function enqueueUpdate(fiber, update) {
- var updateQueue = fiber.updateQueue;
- if (updateQueue === null) {
- // Only occurs if the fiber has been unmounted.
- return;
- }
- var sharedQueue = updateQueue.shared;
- var pending = sharedQueue.pending;
- if (pending === null) {
- // This is the first update. Create a circular list.
- update.next = update;
- } else {
- update.next = pending.next;
- pending.next = update;
- }
- sharedQueue.pending = update;
- {
- if (currentlyProcessingQueue === sharedQueue && !didWarnUpdateInsideUpdate) {
- error('An update (setState, replaceState, or forceUpdate) was scheduled ' + 'from inside an update function. Update functions should be pure, ' + 'with zero side-effects. Consider using componentDidUpdate or a ' + 'callback.');
- didWarnUpdateInsideUpdate = true;
- }
- }
- }
- function enqueueCapturedUpdate(workInProgress, update) {
- var current = workInProgress.alternate;
- if (current !== null) {
- // Ensure the work-in-progress queue is a clone
- cloneUpdateQueue(current, workInProgress);
- } // Captured updates go only on the work-in-progress queue.
- var queue = workInProgress.updateQueue; // Append the update to the end of the list.
- var last = queue.baseQueue;
- if (last === null) {
- queue.baseQueue = update.next = update;
- update.next = update;
- } else {
- update.next = last.next;
- last.next = update;
- }
- }
- function getStateFromUpdate(workInProgress, queue, update, prevState, nextProps, instance) {
- switch (update.tag) {
- case ReplaceState:
- {
- var payload = update.payload;
- if (typeof payload === 'function') {
- // Updater function
- {
- enterDisallowedContextReadInDEV();
- if ( workInProgress.mode & StrictMode) {
- payload.call(instance, prevState, nextProps);
- }
- }
- var nextState = payload.call(instance, prevState, nextProps);
- {
- exitDisallowedContextReadInDEV();
- }
- return nextState;
- } // State object
- return payload;
- }
- case CaptureUpdate:
- {
- workInProgress.effectTag = workInProgress.effectTag & ~ShouldCapture | DidCapture;
- }
- // Intentional fallthrough
- case UpdateState:
- {
- var _payload = update.payload;
- var partialState;
- if (typeof _payload === 'function') {
- // Updater function
- {
- enterDisallowedContextReadInDEV();
- if ( workInProgress.mode & StrictMode) {
- _payload.call(instance, prevState, nextProps);
- }
- }
- partialState = _payload.call(instance, prevState, nextProps);
- {
- exitDisallowedContextReadInDEV();
- }
- } else {
- // Partial state object
- partialState = _payload;
- }
- if (partialState === null || partialState === undefined) {
- // Null and undefined are treated as no-ops.
- return prevState;
- } // Merge the partial state and the previous state.
- return _assign({}, prevState, partialState);
- }
- case ForceUpdate:
- {
- hasForceUpdate = true;
- return prevState;
- }
- }
- return prevState;
- }
- function processUpdateQueue(workInProgress, props, instance, renderExpirationTime) {
- // This is always non-null on a ClassComponent or HostRoot
- var queue = workInProgress.updateQueue;
- hasForceUpdate = false;
- {
- currentlyProcessingQueue = queue.shared;
- } // The last rebase update that is NOT part of the base state.
- var baseQueue = queue.baseQueue; // The last pending update that hasn't been processed yet.
- var pendingQueue = queue.shared.pending;
- if (pendingQueue !== null) {
- // We have new updates that haven't been processed yet.
- // We'll add them to the base queue.
- if (baseQueue !== null) {
- // Merge the pending queue and the base queue.
- var baseFirst = baseQueue.next;
- var pendingFirst = pendingQueue.next;
- baseQueue.next = pendingFirst;
- pendingQueue.next = baseFirst;
- }
- baseQueue = pendingQueue;
- queue.shared.pending = null; // TODO: Pass `current` as argument
- var current = workInProgress.alternate;
- if (current !== null) {
- var currentQueue = current.updateQueue;
- if (currentQueue !== null) {
- currentQueue.baseQueue = pendingQueue;
- }
- }
- } // These values may change as we process the queue.
- if (baseQueue !== null) {
- var first = baseQueue.next; // Iterate through the list of updates to compute the result.
- var newState = queue.baseState;
- var newExpirationTime = NoWork;
- var newBaseState = null;
- var newBaseQueueFirst = null;
- var newBaseQueueLast = null;
- if (first !== null) {
- var update = first;
- do {
- var updateExpirationTime = update.expirationTime;
- if (updateExpirationTime < renderExpirationTime) {
- // Priority is insufficient. Skip this update. If this is the first
- // skipped update, the previous update/state is the new base
- // update/state.
- var clone = {
- expirationTime: update.expirationTime,
- suspenseConfig: update.suspenseConfig,
- tag: update.tag,
- payload: update.payload,
- callback: update.callback,
- next: null
- };
- if (newBaseQueueLast === null) {
- newBaseQueueFirst = newBaseQueueLast = clone;
- newBaseState = newState;
- } else {
- newBaseQueueLast = newBaseQueueLast.next = clone;
- } // Update the remaining priority in the queue.
- if (updateExpirationTime > newExpirationTime) {
- newExpirationTime = updateExpirationTime;
- }
- } else {
- // This update does have sufficient priority.
- if (newBaseQueueLast !== null) {
- var _clone = {
- expirationTime: Sync,
- // This update is going to be committed so we never want uncommit it.
- suspenseConfig: update.suspenseConfig,
- tag: update.tag,
- payload: update.payload,
- callback: update.callback,
- next: null
- };
- newBaseQueueLast = newBaseQueueLast.next = _clone;
- } // Mark the event time of this update as relevant to this render pass.
- // TODO: This should ideally use the true event time of this update rather than
- // its priority which is a derived and not reverseable value.
- // TODO: We should skip this update if it was already committed but currently
- // we have no way of detecting the difference between a committed and suspended
- // update here.
- markRenderEventTimeAndConfig(updateExpirationTime, update.suspenseConfig); // Process this update.
- newState = getStateFromUpdate(workInProgress, queue, update, newState, props, instance);
- var callback = update.callback;
- if (callback !== null) {
- workInProgress.effectTag |= Callback;
- var effects = queue.effects;
- if (effects === null) {
- queue.effects = [update];
- } else {
- effects.push(update);
- }
- }
- }
- update = update.next;
- if (update === null || update === first) {
- pendingQueue = queue.shared.pending;
- if (pendingQueue === null) {
- break;
- } else {
- // An update was scheduled from inside a reducer. Add the new
- // pending updates to the end of the list and keep processing.
- update = baseQueue.next = pendingQueue.next;
- pendingQueue.next = first;
- queue.baseQueue = baseQueue = pendingQueue;
- queue.shared.pending = null;
- }
- }
- } while (true);
- }
- if (newBaseQueueLast === null) {
- newBaseState = newState;
- } else {
- newBaseQueueLast.next = newBaseQueueFirst;
- }
- queue.baseState = newBaseState;
- queue.baseQueue = newBaseQueueLast; // Set the remaining expiration time to be whatever is remaining in the queue.
- // This should be fine because the only two other things that contribute to
- // expiration time are props and context. We're already in the middle of the
- // begin phase by the time we start processing the queue, so we've already
- // dealt with the props. Context in components that specify
- // shouldComponentUpdate is tricky; but we'll have to account for
- // that regardless.
- markUnprocessedUpdateTime(newExpirationTime);
- workInProgress.expirationTime = newExpirationTime;
- workInProgress.memoizedState = newState;
- }
- {
- currentlyProcessingQueue = null;
- }
- }
- function callCallback(callback, context) {
- if (!(typeof callback === 'function')) {
- {
- throw Error( "Invalid argument passed as callback. Expected a function. Instead received: " + callback );
- }
- }
- callback.call(context);
- }
- function resetHasForceUpdateBeforeProcessing() {
- hasForceUpdate = false;
- }
- function checkHasForceUpdateAfterProcessing() {
- return hasForceUpdate;
- }
- function commitUpdateQueue(finishedWork, finishedQueue, instance) {
- // Commit the effects
- var effects = finishedQueue.effects;
- finishedQueue.effects = null;
- if (effects !== null) {
- for (var i = 0; i < effects.length; i++) {
- var effect = effects[i];
- var callback = effect.callback;
- if (callback !== null) {
- effect.callback = null;
- callCallback(callback, instance);
- }
- }
- }
- }
- var ReactCurrentBatchConfig = ReactSharedInternals.ReactCurrentBatchConfig;
- function requestCurrentSuspenseConfig() {
- return ReactCurrentBatchConfig.suspense;
- }
- var fakeInternalInstance = {};
- var isArray = Array.isArray; // React.Component uses a shared frozen object by default.
- // We'll use it to determine whether we need to initialize legacy refs.
- var emptyRefsObject = new React.Component().refs;
- var didWarnAboutStateAssignmentForComponent;
- var didWarnAboutUninitializedState;
- var didWarnAboutGetSnapshotBeforeUpdateWithoutDidUpdate;
- var didWarnAboutLegacyLifecyclesAndDerivedState;
- var didWarnAboutUndefinedDerivedState;
- var warnOnUndefinedDerivedState;
- var warnOnInvalidCallback;
- var didWarnAboutDirectlyAssigningPropsToState;
- var didWarnAboutContextTypeAndContextTypes;
- var didWarnAboutInvalidateContextType;
- {
- didWarnAboutStateAssignmentForComponent = new Set();
- didWarnAboutUninitializedState = new Set();
- didWarnAboutGetSnapshotBeforeUpdateWithoutDidUpdate = new Set();
- didWarnAboutLegacyLifecyclesAndDerivedState = new Set();
- didWarnAboutDirectlyAssigningPropsToState = new Set();
- didWarnAboutUndefinedDerivedState = new Set();
- didWarnAboutContextTypeAndContextTypes = new Set();
- didWarnAboutInvalidateContextType = new Set();
- var didWarnOnInvalidCallback = new Set();
- warnOnInvalidCallback = function (callback, callerName) {
- if (callback === null || typeof callback === 'function') {
- return;
- }
- var key = callerName + "_" + callback;
- if (!didWarnOnInvalidCallback.has(key)) {
- didWarnOnInvalidCallback.add(key);
- error('%s(...): Expected the last optional `callback` argument to be a ' + 'function. Instead received: %s.', callerName, callback);
- }
- };
- warnOnUndefinedDerivedState = function (type, partialState) {
- if (partialState === undefined) {
- var componentName = getComponentName(type) || 'Component';
- if (!didWarnAboutUndefinedDerivedState.has(componentName)) {
- didWarnAboutUndefinedDerivedState.add(componentName);
- error('%s.getDerivedStateFromProps(): A valid state object (or null) must be returned. ' + 'You have returned undefined.', componentName);
- }
- }
- }; // This is so gross but it's at least non-critical and can be removed if
- // it causes problems. This is meant to give a nicer error message for
- // ReactDOM15.unstable_renderSubtreeIntoContainer(reactDOM16Component,
- // ...)) which otherwise throws a "_processChildContext is not a function"
- // exception.
- Object.defineProperty(fakeInternalInstance, '_processChildContext', {
- enumerable: false,
- value: function () {
- {
- {
- throw Error( "_processChildContext is not available in React 16+. This likely means you have multiple copies of React and are attempting to nest a React 15 tree inside a React 16 tree using unstable_renderSubtreeIntoContainer, which isn't supported. Try to make sure you have only one copy of React (and ideally, switch to ReactDOM.createPortal)." );
- }
- }
- }
- });
- Object.freeze(fakeInternalInstance);
- }
- function applyDerivedStateFromProps(workInProgress, ctor, getDerivedStateFromProps, nextProps) {
- var prevState = workInProgress.memoizedState;
- {
- if ( workInProgress.mode & StrictMode) {
- // Invoke the function an extra time to help detect side-effects.
- getDerivedStateFromProps(nextProps, prevState);
- }
- }
- var partialState = getDerivedStateFromProps(nextProps, prevState);
- {
- warnOnUndefinedDerivedState(ctor, partialState);
- } // Merge the partial state and the previous state.
- var memoizedState = partialState === null || partialState === undefined ? prevState : _assign({}, prevState, partialState);
- workInProgress.memoizedState = memoizedState; // Once the update queue is empty, persist the derived state onto the
- // base state.
- if (workInProgress.expirationTime === NoWork) {
- // Queue is always non-null for classes
- var updateQueue = workInProgress.updateQueue;
- updateQueue.baseState = memoizedState;
- }
- }
- var classComponentUpdater = {
- isMounted: isMounted,
- enqueueSetState: function (inst, payload, callback) {
- var fiber = get(inst);
- var currentTime = requestCurrentTimeForUpdate();
- var suspenseConfig = requestCurrentSuspenseConfig();
- var expirationTime = computeExpirationForFiber(currentTime, fiber, suspenseConfig);
- var update = createUpdate(expirationTime, suspenseConfig);
- update.payload = payload;
- if (callback !== undefined && callback !== null) {
- {
- warnOnInvalidCallback(callback, 'setState');
- }
- update.callback = callback;
- }
- enqueueUpdate(fiber, update);
- scheduleWork(fiber, expirationTime);
- },
- enqueueReplaceState: function (inst, payload, callback) {
- var fiber = get(inst);
- var currentTime = requestCurrentTimeForUpdate();
- var suspenseConfig = requestCurrentSuspenseConfig();
- var expirationTime = computeExpirationForFiber(currentTime, fiber, suspenseConfig);
- var update = createUpdate(expirationTime, suspenseConfig);
- update.tag = ReplaceState;
- update.payload = payload;
- if (callback !== undefined && callback !== null) {
- {
- warnOnInvalidCallback(callback, 'replaceState');
- }
- update.callback = callback;
- }
- enqueueUpdate(fiber, update);
- scheduleWork(fiber, expirationTime);
- },
- enqueueForceUpdate: function (inst, callback) {
- var fiber = get(inst);
- var currentTime = requestCurrentTimeForUpdate();
- var suspenseConfig = requestCurrentSuspenseConfig();
- var expirationTime = computeExpirationForFiber(currentTime, fiber, suspenseConfig);
- var update = createUpdate(expirationTime, suspenseConfig);
- update.tag = ForceUpdate;
- if (callback !== undefined && callback !== null) {
- {
- warnOnInvalidCallback(callback, 'forceUpdate');
- }
- update.callback = callback;
- }
- enqueueUpdate(fiber, update);
- scheduleWork(fiber, expirationTime);
- }
- };
- function checkShouldComponentUpdate(workInProgress, ctor, oldProps, newProps, oldState, newState, nextContext) {
- var instance = workInProgress.stateNode;
- if (typeof instance.shouldComponentUpdate === 'function') {
- {
- if ( workInProgress.mode & StrictMode) {
- // Invoke the function an extra time to help detect side-effects.
- instance.shouldComponentUpdate(newProps, newState, nextContext);
- }
- }
- startPhaseTimer(workInProgress, 'shouldComponentUpdate');
- var shouldUpdate = instance.shouldComponentUpdate(newProps, newState, nextContext);
- stopPhaseTimer();
- {
- if (shouldUpdate === undefined) {
- error('%s.shouldComponentUpdate(): Returned undefined instead of a ' + 'boolean value. Make sure to return true or false.', getComponentName(ctor) || 'Component');
- }
- }
- return shouldUpdate;
- }
- if (ctor.prototype && ctor.prototype.isPureReactComponent) {
- return !shallowEqual(oldProps, newProps) || !shallowEqual(oldState, newState);
- }
- return true;
- }
- function checkClassInstance(workInProgress, ctor, newProps) {
- var instance = workInProgress.stateNode;
- {
- var name = getComponentName(ctor) || 'Component';
- var renderPresent = instance.render;
- if (!renderPresent) {
- if (ctor.prototype && typeof ctor.prototype.render === 'function') {
- error('%s(...): No `render` method found on the returned component ' + 'instance: did you accidentally return an object from the constructor?', name);
- } else {
- error('%s(...): No `render` method found on the returned component ' + 'instance: you may have forgotten to define `render`.', name);
- }
- }
- if (instance.getInitialState && !instance.getInitialState.isReactClassApproved && !instance.state) {
- error('getInitialState was defined on %s, a plain JavaScript class. ' + 'This is only supported for classes created using React.createClass. ' + 'Did you mean to define a state property instead?', name);
- }
- if (instance.getDefaultProps && !instance.getDefaultProps.isReactClassApproved) {
- error('getDefaultProps was defined on %s, a plain JavaScript class. ' + 'This is only supported for classes created using React.createClass. ' + 'Use a static property to define defaultProps instead.', name);
- }
- if (instance.propTypes) {
- error('propTypes was defined as an instance property on %s. Use a static ' + 'property to define propTypes instead.', name);
- }
- if (instance.contextType) {
- error('contextType was defined as an instance property on %s. Use a static ' + 'property to define contextType instead.', name);
- }
- {
- if (instance.contextTypes) {
- error('contextTypes was defined as an instance property on %s. Use a static ' + 'property to define contextTypes instead.', name);
- }
- if (ctor.contextType && ctor.contextTypes && !didWarnAboutContextTypeAndContextTypes.has(ctor)) {
- didWarnAboutContextTypeAndContextTypes.add(ctor);
- error('%s declares both contextTypes and contextType static properties. ' + 'The legacy contextTypes property will be ignored.', name);
- }
- }
- if (typeof instance.componentShouldUpdate === 'function') {
- error('%s has a method called ' + 'componentShouldUpdate(). Did you mean shouldComponentUpdate()? ' + 'The name is phrased as a question because the function is ' + 'expected to return a value.', name);
- }
- if (ctor.prototype && ctor.prototype.isPureReactComponent && typeof instance.shouldComponentUpdate !== 'undefined') {
- error('%s has a method called shouldComponentUpdate(). ' + 'shouldComponentUpdate should not be used when extending React.PureComponent. ' + 'Please extend React.Component if shouldComponentUpdate is used.', getComponentName(ctor) || 'A pure component');
- }
- if (typeof instance.componentDidUnmount === 'function') {
- error('%s has a method called ' + 'componentDidUnmount(). But there is no such lifecycle method. ' + 'Did you mean componentWillUnmount()?', name);
- }
- if (typeof instance.componentDidReceiveProps === 'function') {
- error('%s has a method called ' + 'componentDidReceiveProps(). But there is no such lifecycle method. ' + 'If you meant to update the state in response to changing props, ' + 'use componentWillReceiveProps(). If you meant to fetch data or ' + 'run side-effects or mutations after React has updated the UI, use componentDidUpdate().', name);
- }
- if (typeof instance.componentWillRecieveProps === 'function') {
- error('%s has a method called ' + 'componentWillRecieveProps(). Did you mean componentWillReceiveProps()?', name);
- }
- if (typeof instance.UNSAFE_componentWillRecieveProps === 'function') {
- error('%s has a method called ' + 'UNSAFE_componentWillRecieveProps(). Did you mean UNSAFE_componentWillReceiveProps()?', name);
- }
- var hasMutatedProps = instance.props !== newProps;
- if (instance.props !== undefined && hasMutatedProps) {
- error('%s(...): When calling super() in `%s`, make sure to pass ' + "up the same props that your component's constructor was passed.", name, name);
- }
- if (instance.defaultProps) {
- error('Setting defaultProps as an instance property on %s is not supported and will be ignored.' + ' Instead, define defaultProps as a static property on %s.', name, name);
- }
- if (typeof instance.getSnapshotBeforeUpdate === 'function' && typeof instance.componentDidUpdate !== 'function' && !didWarnAboutGetSnapshotBeforeUpdateWithoutDidUpdate.has(ctor)) {
- didWarnAboutGetSnapshotBeforeUpdateWithoutDidUpdate.add(ctor);
- error('%s: getSnapshotBeforeUpdate() should be used with componentDidUpdate(). ' + 'This component defines getSnapshotBeforeUpdate() only.', getComponentName(ctor));
- }
- if (typeof instance.getDerivedStateFromProps === 'function') {
- error('%s: getDerivedStateFromProps() is defined as an instance method ' + 'and will be ignored. Instead, declare it as a static method.', name);
- }
- if (typeof instance.getDerivedStateFromError === 'function') {
- error('%s: getDerivedStateFromError() is defined as an instance method ' + 'and will be ignored. Instead, declare it as a static method.', name);
- }
- if (typeof ctor.getSnapshotBeforeUpdate === 'function') {
- error('%s: getSnapshotBeforeUpdate() is defined as a static method ' + 'and will be ignored. Instead, declare it as an instance method.', name);
- }
- var _state = instance.state;
- if (_state && (typeof _state !== 'object' || isArray(_state))) {
- error('%s.state: must be set to an object or null', name);
- }
- if (typeof instance.getChildContext === 'function' && typeof ctor.childContextTypes !== 'object') {
- error('%s.getChildContext(): childContextTypes must be defined in order to ' + 'use getChildContext().', name);
- }
- }
- }
- function adoptClassInstance(workInProgress, instance) {
- instance.updater = classComponentUpdater;
- workInProgress.stateNode = instance; // The instance needs access to the fiber so that it can schedule updates
- set(instance, workInProgress);
- {
- instance._reactInternalInstance = fakeInternalInstance;
- }
- }
- function constructClassInstance(workInProgress, ctor, props) {
- var isLegacyContextConsumer = false;
- var unmaskedContext = emptyContextObject;
- var context = emptyContextObject;
- var contextType = ctor.contextType;
- {
- if ('contextType' in ctor) {
- var isValid = // Allow null for conditional declaration
- contextType === null || contextType !== undefined && contextType.$$typeof === REACT_CONTEXT_TYPE && contextType._context === undefined; // Not a <Context.Consumer>
- if (!isValid && !didWarnAboutInvalidateContextType.has(ctor)) {
- didWarnAboutInvalidateContextType.add(ctor);
- var addendum = '';
- if (contextType === undefined) {
- addendum = ' However, it is set to undefined. ' + 'This can be caused by a typo or by mixing up named and default imports. ' + 'This can also happen due to a circular dependency, so ' + 'try moving the createContext() call to a separate file.';
- } else if (typeof contextType !== 'object') {
- addendum = ' However, it is set to a ' + typeof contextType + '.';
- } else if (contextType.$$typeof === REACT_PROVIDER_TYPE) {
- addendum = ' Did you accidentally pass the Context.Provider instead?';
- } else if (contextType._context !== undefined) {
- // <Context.Consumer>
- addendum = ' Did you accidentally pass the Context.Consumer instead?';
- } else {
- addendum = ' However, it is set to an object with keys {' + Object.keys(contextType).join(', ') + '}.';
- }
- error('%s defines an invalid contextType. ' + 'contextType should point to the Context object returned by React.createContext().%s', getComponentName(ctor) || 'Component', addendum);
- }
- }
- }
- if (typeof contextType === 'object' && contextType !== null) {
- context = readContext(contextType);
- } else {
- unmaskedContext = getUnmaskedContext(workInProgress, ctor, true);
- var contextTypes = ctor.contextTypes;
- isLegacyContextConsumer = contextTypes !== null && contextTypes !== undefined;
- context = isLegacyContextConsumer ? getMaskedContext(workInProgress, unmaskedContext) : emptyContextObject;
- } // Instantiate twice to help detect side-effects.
- {
- if ( workInProgress.mode & StrictMode) {
- new ctor(props, context); // eslint-disable-line no-new
- }
- }
- var instance = new ctor(props, context);
- var state = workInProgress.memoizedState = instance.state !== null && instance.state !== undefined ? instance.state : null;
- adoptClassInstance(workInProgress, instance);
- {
- if (typeof ctor.getDerivedStateFromProps === 'function' && state === null) {
- var componentName = getComponentName(ctor) || 'Component';
- if (!didWarnAboutUninitializedState.has(componentName)) {
- didWarnAboutUninitializedState.add(componentName);
- error('`%s` uses `getDerivedStateFromProps` but its initial state is ' + '%s. This is not recommended. Instead, define the initial state by ' + 'assigning an object to `this.state` in the constructor of `%s`. ' + 'This ensures that `getDerivedStateFromProps` arguments have a consistent shape.', componentName, instance.state === null ? 'null' : 'undefined', componentName);
- }
- } // If new component APIs are defined, "unsafe" lifecycles won't be called.
- // Warn about these lifecycles if they are present.
- // Don't warn about react-lifecycles-compat polyfilled methods though.
- if (typeof ctor.getDerivedStateFromProps === 'function' || typeof instance.getSnapshotBeforeUpdate === 'function') {
- var foundWillMountName = null;
- var foundWillReceivePropsName = null;
- var foundWillUpdateName = null;
- if (typeof instance.componentWillMount === 'function' && instance.componentWillMount.__suppressDeprecationWarning !== true) {
- foundWillMountName = 'componentWillMount';
- } else if (typeof instance.UNSAFE_componentWillMount === 'function') {
- foundWillMountName = 'UNSAFE_componentWillMount';
- }
- if (typeof instance.componentWillReceiveProps === 'function' && instance.componentWillReceiveProps.__suppressDeprecationWarning !== true) {
- foundWillReceivePropsName = 'componentWillReceiveProps';
- } else if (typeof instance.UNSAFE_componentWillReceiveProps === 'function') {
- foundWillReceivePropsName = 'UNSAFE_componentWillReceiveProps';
- }
- if (typeof instance.componentWillUpdate === 'function' && instance.componentWillUpdate.__suppressDeprecationWarning !== true) {
- foundWillUpdateName = 'componentWillUpdate';
- } else if (typeof instance.UNSAFE_componentWillUpdate === 'function') {
- foundWillUpdateName = 'UNSAFE_componentWillUpdate';
- }
- if (foundWillMountName !== null || foundWillReceivePropsName !== null || foundWillUpdateName !== null) {
- var _componentName = getComponentName(ctor) || 'Component';
- var newApiName = typeof ctor.getDerivedStateFromProps === 'function' ? 'getDerivedStateFromProps()' : 'getSnapshotBeforeUpdate()';
- if (!didWarnAboutLegacyLifecyclesAndDerivedState.has(_componentName)) {
- didWarnAboutLegacyLifecyclesAndDerivedState.add(_componentName);
- error('Unsafe legacy lifecycles will not be called for components using new component APIs.\n\n' + '%s uses %s but also contains the following legacy lifecycles:%s%s%s\n\n' + 'The above lifecycles should be removed. Learn more about this warning here:\n' + 'https://fb.me/react-unsafe-component-lifecycles', _componentName, newApiName, foundWillMountName !== null ? "\n " + foundWillMountName : '', foundWillReceivePropsName !== null ? "\n " + foundWillReceivePropsName : '', foundWillUpdateName !== null ? "\n " + foundWillUpdateName : '');
- }
- }
- }
- } // Cache unmasked context so we can avoid recreating masked context unless necessary.
- // ReactFiberContext usually updates this cache but can't for newly-created instances.
- if (isLegacyContextConsumer) {
- cacheContext(workInProgress, unmaskedContext, context);
- }
- return instance;
- }
- function callComponentWillMount(workInProgress, instance) {
- startPhaseTimer(workInProgress, 'componentWillMount');
- var oldState = instance.state;
- if (typeof instance.componentWillMount === 'function') {
- instance.componentWillMount();
- }
- if (typeof instance.UNSAFE_componentWillMount === 'function') {
- instance.UNSAFE_componentWillMount();
- }
- stopPhaseTimer();
- if (oldState !== instance.state) {
- {
- error('%s.componentWillMount(): Assigning directly to this.state is ' + "deprecated (except inside a component's " + 'constructor). Use setState instead.', getComponentName(workInProgress.type) || 'Component');
- }
- classComponentUpdater.enqueueReplaceState(instance, instance.state, null);
- }
- }
- function callComponentWillReceiveProps(workInProgress, instance, newProps, nextContext) {
- var oldState = instance.state;
- startPhaseTimer(workInProgress, 'componentWillReceiveProps');
- if (typeof instance.componentWillReceiveProps === 'function') {
- instance.componentWillReceiveProps(newProps, nextContext);
- }
- if (typeof instance.UNSAFE_componentWillReceiveProps === 'function') {
- instance.UNSAFE_componentWillReceiveProps(newProps, nextContext);
- }
- stopPhaseTimer();
- if (instance.state !== oldState) {
- {
- var componentName = getComponentName(workInProgress.type) || 'Component';
- if (!didWarnAboutStateAssignmentForComponent.has(componentName)) {
- didWarnAboutStateAssignmentForComponent.add(componentName);
- error('%s.componentWillReceiveProps(): Assigning directly to ' + "this.state is deprecated (except inside a component's " + 'constructor). Use setState instead.', componentName);
- }
- }
- classComponentUpdater.enqueueReplaceState(instance, instance.state, null);
- }
- } // Invokes the mount life-cycles on a previously never rendered instance.
- function mountClassInstance(workInProgress, ctor, newProps, renderExpirationTime) {
- {
- checkClassInstance(workInProgress, ctor, newProps);
- }
- var instance = workInProgress.stateNode;
- instance.props = newProps;
- instance.state = workInProgress.memoizedState;
- instance.refs = emptyRefsObject;
- initializeUpdateQueue(workInProgress);
- var contextType = ctor.contextType;
- if (typeof contextType === 'object' && contextType !== null) {
- instance.context = readContext(contextType);
- } else {
- var unmaskedContext = getUnmaskedContext(workInProgress, ctor, true);
- instance.context = getMaskedContext(workInProgress, unmaskedContext);
- }
- {
- if (instance.state === newProps) {
- var componentName = getComponentName(ctor) || 'Component';
- if (!didWarnAboutDirectlyAssigningPropsToState.has(componentName)) {
- didWarnAboutDirectlyAssigningPropsToState.add(componentName);
- error('%s: It is not recommended to assign props directly to state ' + "because updates to props won't be reflected in state. " + 'In most cases, it is better to use props directly.', componentName);
- }
- }
- if (workInProgress.mode & StrictMode) {
- ReactStrictModeWarnings.recordLegacyContextWarning(workInProgress, instance);
- }
- {
- ReactStrictModeWarnings.recordUnsafeLifecycleWarnings(workInProgress, instance);
- }
- }
- processUpdateQueue(workInProgress, newProps, instance, renderExpirationTime);
- instance.state = workInProgress.memoizedState;
- var getDerivedStateFromProps = ctor.getDerivedStateFromProps;
- if (typeof getDerivedStateFromProps === 'function') {
- applyDerivedStateFromProps(workInProgress, ctor, getDerivedStateFromProps, newProps);
- instance.state = workInProgress.memoizedState;
- } // In order to support react-lifecycles-compat polyfilled components,
- // Unsafe lifecycles should not be invoked for components using the new APIs.
- if (typeof ctor.getDerivedStateFromProps !== 'function' && typeof instance.getSnapshotBeforeUpdate !== 'function' && (typeof instance.UNSAFE_componentWillMount === 'function' || typeof instance.componentWillMount === 'function')) {
- callComponentWillMount(workInProgress, instance); // If we had additional state updates during this life-cycle, let's
- // process them now.
- processUpdateQueue(workInProgress, newProps, instance, renderExpirationTime);
- instance.state = workInProgress.memoizedState;
- }
- if (typeof instance.componentDidMount === 'function') {
- workInProgress.effectTag |= Update;
- }
- }
- function resumeMountClassInstance(workInProgress, ctor, newProps, renderExpirationTime) {
- var instance = workInProgress.stateNode;
- var oldProps = workInProgress.memoizedProps;
- instance.props = oldProps;
- var oldContext = instance.context;
- var contextType = ctor.contextType;
- var nextContext = emptyContextObject;
- if (typeof contextType === 'object' && contextType !== null) {
- nextContext = readContext(contextType);
- } else {
- var nextLegacyUnmaskedContext = getUnmaskedContext(workInProgress, ctor, true);
- nextContext = getMaskedContext(workInProgress, nextLegacyUnmaskedContext);
- }
- var getDerivedStateFromProps = ctor.getDerivedStateFromProps;
- var hasNewLifecycles = typeof getDerivedStateFromProps === 'function' || typeof instance.getSnapshotBeforeUpdate === 'function'; // Note: During these life-cycles, instance.props/instance.state are what
- // ever the previously attempted to render - not the "current". However,
- // during componentDidUpdate we pass the "current" props.
- // In order to support react-lifecycles-compat polyfilled components,
- // Unsafe lifecycles should not be invoked for components using the new APIs.
- if (!hasNewLifecycles && (typeof instance.UNSAFE_componentWillReceiveProps === 'function' || typeof instance.componentWillReceiveProps === 'function')) {
- if (oldProps !== newProps || oldContext !== nextContext) {
- callComponentWillReceiveProps(workInProgress, instance, newProps, nextContext);
- }
- }
- resetHasForceUpdateBeforeProcessing();
- var oldState = workInProgress.memoizedState;
- var newState = instance.state = oldState;
- processUpdateQueue(workInProgress, newProps, instance, renderExpirationTime);
- newState = workInProgress.memoizedState;
- if (oldProps === newProps && oldState === newState && !hasContextChanged() && !checkHasForceUpdateAfterProcessing()) {
- // If an update was already in progress, we should schedule an Update
- // effect even though we're bailing out, so that cWU/cDU are called.
- if (typeof instance.componentDidMount === 'function') {
- workInProgress.effectTag |= Update;
- }
- return false;
- }
- if (typeof getDerivedStateFromProps === 'function') {
- applyDerivedStateFromProps(workInProgress, ctor, getDerivedStateFromProps, newProps);
- newState = workInProgress.memoizedState;
- }
- var shouldUpdate = checkHasForceUpdateAfterProcessing() || checkShouldComponentUpdate(workInProgress, ctor, oldProps, newProps, oldState, newState, nextContext);
- if (shouldUpdate) {
- // In order to support react-lifecycles-compat polyfilled components,
- // Unsafe lifecycles should not be invoked for components using the new APIs.
- if (!hasNewLifecycles && (typeof instance.UNSAFE_componentWillMount === 'function' || typeof instance.componentWillMount === 'function')) {
- startPhaseTimer(workInProgress, 'componentWillMount');
- if (typeof instance.componentWillMount === 'function') {
- instance.componentWillMount();
- }
- if (typeof instance.UNSAFE_componentWillMount === 'function') {
- instance.UNSAFE_componentWillMount();
- }
- stopPhaseTimer();
- }
- if (typeof instance.componentDidMount === 'function') {
- workInProgress.effectTag |= Update;
- }
- } else {
- // If an update was already in progress, we should schedule an Update
- // effect even though we're bailing out, so that cWU/cDU are called.
- if (typeof instance.componentDidMount === 'function') {
- workInProgress.effectTag |= Update;
- } // If shouldComponentUpdate returned false, we should still update the
- // memoized state to indicate that this work can be reused.
- workInProgress.memoizedProps = newProps;
- workInProgress.memoizedState = newState;
- } // Update the existing instance's state, props, and context pointers even
- // if shouldComponentUpdate returns false.
- instance.props = newProps;
- instance.state = newState;
- instance.context = nextContext;
- return shouldUpdate;
- } // Invokes the update life-cycles and returns false if it shouldn't rerender.
- function updateClassInstance(current, workInProgress, ctor, newProps, renderExpirationTime) {
- var instance = workInProgress.stateNode;
- cloneUpdateQueue(current, workInProgress);
- var oldProps = workInProgress.memoizedProps;
- instance.props = workInProgress.type === workInProgress.elementType ? oldProps : resolveDefaultProps(workInProgress.type, oldProps);
- var oldContext = instance.context;
- var contextType = ctor.contextType;
- var nextContext = emptyContextObject;
- if (typeof contextType === 'object' && contextType !== null) {
- nextContext = readContext(contextType);
- } else {
- var nextUnmaskedContext = getUnmaskedContext(workInProgress, ctor, true);
- nextContext = getMaskedContext(workInProgress, nextUnmaskedContext);
- }
- var getDerivedStateFromProps = ctor.getDerivedStateFromProps;
- var hasNewLifecycles = typeof getDerivedStateFromProps === 'function' || typeof instance.getSnapshotBeforeUpdate === 'function'; // Note: During these life-cycles, instance.props/instance.state are what
- // ever the previously attempted to render - not the "current". However,
- // during componentDidUpdate we pass the "current" props.
- // In order to support react-lifecycles-compat polyfilled components,
- // Unsafe lifecycles should not be invoked for components using the new APIs.
- if (!hasNewLifecycles && (typeof instance.UNSAFE_componentWillReceiveProps === 'function' || typeof instance.componentWillReceiveProps === 'function')) {
- if (oldProps !== newProps || oldContext !== nextContext) {
- callComponentWillReceiveProps(workInProgress, instance, newProps, nextContext);
- }
- }
- resetHasForceUpdateBeforeProcessing();
- var oldState = workInProgress.memoizedState;
- var newState = instance.state = oldState;
- processUpdateQueue(workInProgress, newProps, instance, renderExpirationTime);
- newState = workInProgress.memoizedState;
- if (oldProps === newProps && oldState === newState && !hasContextChanged() && !checkHasForceUpdateAfterProcessing()) {
- // If an update was already in progress, we should schedule an Update
- // effect even though we're bailing out, so that cWU/cDU are called.
- if (typeof instance.componentDidUpdate === 'function') {
- if (oldProps !== current.memoizedProps || oldState !== current.memoizedState) {
- workInProgress.effectTag |= Update;
- }
- }
- if (typeof instance.getSnapshotBeforeUpdate === 'function') {
- if (oldProps !== current.memoizedProps || oldState !== current.memoizedState) {
- workInProgress.effectTag |= Snapshot;
- }
- }
- return false;
- }
- if (typeof getDerivedStateFromProps === 'function') {
- applyDerivedStateFromProps(workInProgress, ctor, getDerivedStateFromProps, newProps);
- newState = workInProgress.memoizedState;
- }
- var shouldUpdate = checkHasForceUpdateAfterProcessing() || checkShouldComponentUpdate(workInProgress, ctor, oldProps, newProps, oldState, newState, nextContext);
- if (shouldUpdate) {
- // In order to support react-lifecycles-compat polyfilled components,
- // Unsafe lifecycles should not be invoked for components using the new APIs.
- if (!hasNewLifecycles && (typeof instance.UNSAFE_componentWillUpdate === 'function' || typeof instance.componentWillUpdate === 'function')) {
- startPhaseTimer(workInProgress, 'componentWillUpdate');
- if (typeof instance.componentWillUpdate === 'function') {
- instance.componentWillUpdate(newProps, newState, nextContext);
- }
- if (typeof instance.UNSAFE_componentWillUpdate === 'function') {
- instance.UNSAFE_componentWillUpdate(newProps, newState, nextContext);
- }
- stopPhaseTimer();
- }
- if (typeof instance.componentDidUpdate === 'function') {
- workInProgress.effectTag |= Update;
- }
- if (typeof instance.getSnapshotBeforeUpdate === 'function') {
- workInProgress.effectTag |= Snapshot;
- }
- } else {
- // If an update was already in progress, we should schedule an Update
- // effect even though we're bailing out, so that cWU/cDU are called.
- if (typeof instance.componentDidUpdate === 'function') {
- if (oldProps !== current.memoizedProps || oldState !== current.memoizedState) {
- workInProgress.effectTag |= Update;
- }
- }
- if (typeof instance.getSnapshotBeforeUpdate === 'function') {
- if (oldProps !== current.memoizedProps || oldState !== current.memoizedState) {
- workInProgress.effectTag |= Snapshot;
- }
- } // If shouldComponentUpdate returned false, we should still update the
- // memoized props/state to indicate that this work can be reused.
- workInProgress.memoizedProps = newProps;
- workInProgress.memoizedState = newState;
- } // Update the existing instance's state, props, and context pointers even
- // if shouldComponentUpdate returns false.
- instance.props = newProps;
- instance.state = newState;
- instance.context = nextContext;
- return shouldUpdate;
- }
- var didWarnAboutMaps;
- var didWarnAboutGenerators;
- var didWarnAboutStringRefs;
- var ownerHasKeyUseWarning;
- var ownerHasFunctionTypeWarning;
- var warnForMissingKey = function (child) {};
- {
- didWarnAboutMaps = false;
- didWarnAboutGenerators = false;
- didWarnAboutStringRefs = {};
- /**
- * Warn if there's no key explicitly set on dynamic arrays of children or
- * object keys are not valid. This allows us to keep track of children between
- * updates.
- */
- ownerHasKeyUseWarning = {};
- ownerHasFunctionTypeWarning = {};
- warnForMissingKey = function (child) {
- if (child === null || typeof child !== 'object') {
- return;
- }
- if (!child._store || child._store.validated || child.key != null) {
- return;
- }
- if (!(typeof child._store === 'object')) {
- {
- throw Error( "React Component in warnForMissingKey should have a _store. This error is likely caused by a bug in React. Please file an issue." );
- }
- }
- child._store.validated = true;
- var currentComponentErrorInfo = 'Each child in a list should have a unique ' + '"key" prop. See https://fb.me/react-warning-keys for ' + 'more information.' + getCurrentFiberStackInDev();
- if (ownerHasKeyUseWarning[currentComponentErrorInfo]) {
- return;
- }
- ownerHasKeyUseWarning[currentComponentErrorInfo] = true;
- error('Each child in a list should have a unique ' + '"key" prop. See https://fb.me/react-warning-keys for ' + 'more information.');
- };
- }
- var isArray$1 = Array.isArray;
- function coerceRef(returnFiber, current, element) {
- var mixedRef = element.ref;
- if (mixedRef !== null && typeof mixedRef !== 'function' && typeof mixedRef !== 'object') {
- {
- // TODO: Clean this up once we turn on the string ref warning for
- // everyone, because the strict mode case will no longer be relevant
- if ((returnFiber.mode & StrictMode || warnAboutStringRefs) && // We warn in ReactElement.js if owner and self are equal for string refs
- // because these cannot be automatically converted to an arrow function
- // using a codemod. Therefore, we don't have to warn about string refs again.
- !(element._owner && element._self && element._owner.stateNode !== element._self)) {
- var componentName = getComponentName(returnFiber.type) || 'Component';
- if (!didWarnAboutStringRefs[componentName]) {
- {
- error('A string ref, "%s", has been found within a strict mode tree. ' + 'String refs are a source of potential bugs and should be avoided. ' + 'We recommend using useRef() or createRef() instead. ' + 'Learn more about using refs safely here: ' + 'https://fb.me/react-strict-mode-string-ref%s', mixedRef, getStackByFiberInDevAndProd(returnFiber));
- }
- didWarnAboutStringRefs[componentName] = true;
- }
- }
- }
- if (element._owner) {
- var owner = element._owner;
- var inst;
- if (owner) {
- var ownerFiber = owner;
- if (!(ownerFiber.tag === ClassComponent)) {
- {
- throw Error( "Function components cannot have string refs. We recommend using useRef() instead. Learn more about using refs safely here: https://fb.me/react-strict-mode-string-ref" );
- }
- }
- inst = ownerFiber.stateNode;
- }
- if (!inst) {
- {
- throw Error( "Missing owner for string ref " + mixedRef + ". This error is likely caused by a bug in React. Please file an issue." );
- }
- }
- var stringRef = '' + mixedRef; // Check if previous string ref matches new string ref
- if (current !== null && current.ref !== null && typeof current.ref === 'function' && current.ref._stringRef === stringRef) {
- return current.ref;
- }
- var ref = function (value) {
- var refs = inst.refs;
- if (refs === emptyRefsObject) {
- // This is a lazy pooled frozen object, so we need to initialize.
- refs = inst.refs = {};
- }
- if (value === null) {
- delete refs[stringRef];
- } else {
- refs[stringRef] = value;
- }
- };
- ref._stringRef = stringRef;
- return ref;
- } else {
- if (!(typeof mixedRef === 'string')) {
- {
- throw Error( "Expected ref to be a function, a string, an object returned by React.createRef(), or null." );
- }
- }
- if (!element._owner) {
- {
- throw Error( "Element ref was specified as a string (" + mixedRef + ") but no owner was set. This could happen for one of the following reasons:\n1. You may be adding a ref to a function component\n2. You may be adding a ref to a component that was not created inside a component's render method\n3. You have multiple copies of React loaded\nSee https://fb.me/react-refs-must-have-owner for more information." );
- }
- }
- }
- }
- return mixedRef;
- }
- function throwOnInvalidObjectType(returnFiber, newChild) {
- if (returnFiber.type !== 'textarea') {
- var addendum = '';
- {
- addendum = ' If you meant to render a collection of children, use an array ' + 'instead.' + getCurrentFiberStackInDev();
- }
- {
- {
- throw Error( "Objects are not valid as a React child (found: " + (Object.prototype.toString.call(newChild) === '[object Object]' ? 'object with keys {' + Object.keys(newChild).join(', ') + '}' : newChild) + ")." + addendum );
- }
- }
- }
- }
- function warnOnFunctionType() {
- {
- var currentComponentErrorInfo = 'Functions are not valid as a React child. This may happen if ' + 'you return a Component instead of <Component /> from render. ' + 'Or maybe you meant to call this function rather than return it.' + getCurrentFiberStackInDev();
- if (ownerHasFunctionTypeWarning[currentComponentErrorInfo]) {
- return;
- }
- ownerHasFunctionTypeWarning[currentComponentErrorInfo] = true;
- error('Functions are not valid as a React child. This may happen if ' + 'you return a Component instead of <Component /> from render. ' + 'Or maybe you meant to call this function rather than return it.');
- }
- } // This wrapper function exists because I expect to clone the code in each path
- // to be able to optimize each path individually by branching early. This needs
- // a compiler or we can do it manually. Helpers that don't need this branching
- // live outside of this function.
- function ChildReconciler(shouldTrackSideEffects) {
- function deleteChild(returnFiber, childToDelete) {
- if (!shouldTrackSideEffects) {
- // Noop.
- return;
- } // Deletions are added in reversed order so we add it to the front.
- // At this point, the return fiber's effect list is empty except for
- // deletions, so we can just append the deletion to the list. The remaining
- // effects aren't added until the complete phase. Once we implement
- // resuming, this may not be true.
- var last = returnFiber.lastEffect;
- if (last !== null) {
- last.nextEffect = childToDelete;
- returnFiber.lastEffect = childToDelete;
- } else {
- returnFiber.firstEffect = returnFiber.lastEffect = childToDelete;
- }
- childToDelete.nextEffect = null;
- childToDelete.effectTag = Deletion;
- }
- function deleteRemainingChildren(returnFiber, currentFirstChild) {
- if (!shouldTrackSideEffects) {
- // Noop.
- return null;
- } // TODO: For the shouldClone case, this could be micro-optimized a bit by
- // assuming that after the first child we've already added everything.
- var childToDelete = currentFirstChild;
- while (childToDelete !== null) {
- deleteChild(returnFiber, childToDelete);
- childToDelete = childToDelete.sibling;
- }
- return null;
- }
- function mapRemainingChildren(returnFiber, currentFirstChild) {
- // Add the remaining children to a temporary map so that we can find them by
- // keys quickly. Implicit (null) keys get added to this set with their index
- // instead.
- var existingChildren = new Map();
- var existingChild = currentFirstChild;
- while (existingChild !== null) {
- if (existingChild.key !== null) {
- existingChildren.set(existingChild.key, existingChild);
- } else {
- existingChildren.set(existingChild.index, existingChild);
- }
- existingChild = existingChild.sibling;
- }
- return existingChildren;
- }
- function useFiber(fiber, pendingProps) {
- // We currently set sibling to null and index to 0 here because it is easy
- // to forget to do before returning it. E.g. for the single child case.
- var clone = createWorkInProgress(fiber, pendingProps);
- clone.index = 0;
- clone.sibling = null;
- return clone;
- }
- function placeChild(newFiber, lastPlacedIndex, newIndex) {
- newFiber.index = newIndex;
- if (!shouldTrackSideEffects) {
- // Noop.
- return lastPlacedIndex;
- }
- var current = newFiber.alternate;
- if (current !== null) {
- var oldIndex = current.index;
- if (oldIndex < lastPlacedIndex) {
- // This is a move.
- newFiber.effectTag = Placement;
- return lastPlacedIndex;
- } else {
- // This item can stay in place.
- return oldIndex;
- }
- } else {
- // This is an insertion.
- newFiber.effectTag = Placement;
- return lastPlacedIndex;
- }
- }
- function placeSingleChild(newFiber) {
- // This is simpler for the single child case. We only need to do a
- // placement for inserting new children.
- if (shouldTrackSideEffects && newFiber.alternate === null) {
- newFiber.effectTag = Placement;
- }
- return newFiber;
- }
- function updateTextNode(returnFiber, current, textContent, expirationTime) {
- if (current === null || current.tag !== HostText) {
- // Insert
- var created = createFiberFromText(textContent, returnFiber.mode, expirationTime);
- created.return = returnFiber;
- return created;
- } else {
- // Update
- var existing = useFiber(current, textContent);
- existing.return = returnFiber;
- return existing;
- }
- }
- function updateElement(returnFiber, current, element, expirationTime) {
- if (current !== null) {
- if (current.elementType === element.type || ( // Keep this check inline so it only runs on the false path:
- isCompatibleFamilyForHotReloading(current, element) )) {
- // Move based on index
- var existing = useFiber(current, element.props);
- existing.ref = coerceRef(returnFiber, current, element);
- existing.return = returnFiber;
- {
- existing._debugSource = element._source;
- existing._debugOwner = element._owner;
- }
- return existing;
- }
- } // Insert
- var created = createFiberFromElement(element, returnFiber.mode, expirationTime);
- created.ref = coerceRef(returnFiber, current, element);
- created.return = returnFiber;
- return created;
- }
- function updatePortal(returnFiber, current, portal, expirationTime) {
- if (current === null || current.tag !== HostPortal || current.stateNode.containerInfo !== portal.containerInfo || current.stateNode.implementation !== portal.implementation) {
- // Insert
- var created = createFiberFromPortal(portal, returnFiber.mode, expirationTime);
- created.return = returnFiber;
- return created;
- } else {
- // Update
- var existing = useFiber(current, portal.children || []);
- existing.return = returnFiber;
- return existing;
- }
- }
- function updateFragment(returnFiber, current, fragment, expirationTime, key) {
- if (current === null || current.tag !== Fragment) {
- // Insert
- var created = createFiberFromFragment(fragment, returnFiber.mode, expirationTime, key);
- created.return = returnFiber;
- return created;
- } else {
- // Update
- var existing = useFiber(current, fragment);
- existing.return = returnFiber;
- return existing;
- }
- }
- function createChild(returnFiber, newChild, expirationTime) {
- if (typeof newChild === 'string' || typeof newChild === 'number') {
- // Text nodes don't have keys. If the previous node is implicitly keyed
- // we can continue to replace it without aborting even if it is not a text
- // node.
- var created = createFiberFromText('' + newChild, returnFiber.mode, expirationTime);
- created.return = returnFiber;
- return created;
- }
- if (typeof newChild === 'object' && newChild !== null) {
- switch (newChild.$$typeof) {
- case REACT_ELEMENT_TYPE:
- {
- var _created = createFiberFromElement(newChild, returnFiber.mode, expirationTime);
- _created.ref = coerceRef(returnFiber, null, newChild);
- _created.return = returnFiber;
- return _created;
- }
- case REACT_PORTAL_TYPE:
- {
- var _created2 = createFiberFromPortal(newChild, returnFiber.mode, expirationTime);
- _created2.return = returnFiber;
- return _created2;
- }
- }
- if (isArray$1(newChild) || getIteratorFn(newChild)) {
- var _created3 = createFiberFromFragment(newChild, returnFiber.mode, expirationTime, null);
- _created3.return = returnFiber;
- return _created3;
- }
- throwOnInvalidObjectType(returnFiber, newChild);
- }
- {
- if (typeof newChild === 'function') {
- warnOnFunctionType();
- }
- }
- return null;
- }
- function updateSlot(returnFiber, oldFiber, newChild, expirationTime) {
- // Update the fiber if the keys match, otherwise return null.
- var key = oldFiber !== null ? oldFiber.key : null;
- if (typeof newChild === 'string' || typeof newChild === 'number') {
- // Text nodes don't have keys. If the previous node is implicitly keyed
- // we can continue to replace it without aborting even if it is not a text
- // node.
- if (key !== null) {
- return null;
- }
- return updateTextNode(returnFiber, oldFiber, '' + newChild, expirationTime);
- }
- if (typeof newChild === 'object' && newChild !== null) {
- switch (newChild.$$typeof) {
- case REACT_ELEMENT_TYPE:
- {
- if (newChild.key === key) {
- if (newChild.type === REACT_FRAGMENT_TYPE) {
- return updateFragment(returnFiber, oldFiber, newChild.props.children, expirationTime, key);
- }
- return updateElement(returnFiber, oldFiber, newChild, expirationTime);
- } else {
- return null;
- }
- }
- case REACT_PORTAL_TYPE:
- {
- if (newChild.key === key) {
- return updatePortal(returnFiber, oldFiber, newChild, expirationTime);
- } else {
- return null;
- }
- }
- }
- if (isArray$1(newChild) || getIteratorFn(newChild)) {
- if (key !== null) {
- return null;
- }
- return updateFragment(returnFiber, oldFiber, newChild, expirationTime, null);
- }
- throwOnInvalidObjectType(returnFiber, newChild);
- }
- {
- if (typeof newChild === 'function') {
- warnOnFunctionType();
- }
- }
- return null;
- }
- function updateFromMap(existingChildren, returnFiber, newIdx, newChild, expirationTime) {
- if (typeof newChild === 'string' || typeof newChild === 'number') {
- // Text nodes don't have keys, so we neither have to check the old nor
- // new node for the key. If both are text nodes, they match.
- var matchedFiber = existingChildren.get(newIdx) || null;
- return updateTextNode(returnFiber, matchedFiber, '' + newChild, expirationTime);
- }
- if (typeof newChild === 'object' && newChild !== null) {
- switch (newChild.$$typeof) {
- case REACT_ELEMENT_TYPE:
- {
- var _matchedFiber = existingChildren.get(newChild.key === null ? newIdx : newChild.key) || null;
- if (newChild.type === REACT_FRAGMENT_TYPE) {
- return updateFragment(returnFiber, _matchedFiber, newChild.props.children, expirationTime, newChild.key);
- }
- return updateElement(returnFiber, _matchedFiber, newChild, expirationTime);
- }
- case REACT_PORTAL_TYPE:
- {
- var _matchedFiber2 = existingChildren.get(newChild.key === null ? newIdx : newChild.key) || null;
- return updatePortal(returnFiber, _matchedFiber2, newChild, expirationTime);
- }
- }
- if (isArray$1(newChild) || getIteratorFn(newChild)) {
- var _matchedFiber3 = existingChildren.get(newIdx) || null;
- return updateFragment(returnFiber, _matchedFiber3, newChild, expirationTime, null);
- }
- throwOnInvalidObjectType(returnFiber, newChild);
- }
- {
- if (typeof newChild === 'function') {
- warnOnFunctionType();
- }
- }
- return null;
- }
- /**
- * Warns if there is a duplicate or missing key
- */
- function warnOnInvalidKey(child, knownKeys) {
- {
- if (typeof child !== 'object' || child === null) {
- return knownKeys;
- }
- switch (child.$$typeof) {
- case REACT_ELEMENT_TYPE:
- case REACT_PORTAL_TYPE:
- warnForMissingKey(child);
- var key = child.key;
- if (typeof key !== 'string') {
- break;
- }
- if (knownKeys === null) {
- knownKeys = new Set();
- knownKeys.add(key);
- break;
- }
- if (!knownKeys.has(key)) {
- knownKeys.add(key);
- break;
- }
- error('Encountered two children with the same key, `%s`. ' + 'Keys should be unique so that components maintain their identity ' + 'across updates. Non-unique keys may cause children to be ' + 'duplicated and/or omitted — the behavior is unsupported and ' + 'could change in a future version.', key);
- break;
- }
- }
- return knownKeys;
- }
- function reconcileChildrenArray(returnFiber, currentFirstChild, newChildren, expirationTime) {
- // This algorithm can't optimize by searching from both ends since we
- // don't have backpointers on fibers. I'm trying to see how far we can get
- // with that model. If it ends up not being worth the tradeoffs, we can
- // add it later.
- // Even with a two ended optimization, we'd want to optimize for the case
- // where there are few changes and brute force the comparison instead of
- // going for the Map. It'd like to explore hitting that path first in
- // forward-only mode and only go for the Map once we notice that we need
- // lots of look ahead. This doesn't handle reversal as well as two ended
- // search but that's unusual. Besides, for the two ended optimization to
- // work on Iterables, we'd need to copy the whole set.
- // In this first iteration, we'll just live with hitting the bad case
- // (adding everything to a Map) in for every insert/move.
- // If you change this code, also update reconcileChildrenIterator() which
- // uses the same algorithm.
- {
- // First, validate keys.
- var knownKeys = null;
- for (var i = 0; i < newChildren.length; i++) {
- var child = newChildren[i];
- knownKeys = warnOnInvalidKey(child, knownKeys);
- }
- }
- var resultingFirstChild = null;
- var previousNewFiber = null;
- var oldFiber = currentFirstChild;
- var lastPlacedIndex = 0;
- var newIdx = 0;
- var nextOldFiber = null;
- for (; oldFiber !== null && newIdx < newChildren.length; newIdx++) {
- if (oldFiber.index > newIdx) {
- nextOldFiber = oldFiber;
- oldFiber = null;
- } else {
- nextOldFiber = oldFiber.sibling;
- }
- var newFiber = updateSlot(returnFiber, oldFiber, newChildren[newIdx], expirationTime);
- if (newFiber === null) {
- // TODO: This breaks on empty slots like null children. That's
- // unfortunate because it triggers the slow path all the time. We need
- // a better way to communicate whether this was a miss or null,
- // boolean, undefined, etc.
- if (oldFiber === null) {
- oldFiber = nextOldFiber;
- }
- break;
- }
- if (shouldTrackSideEffects) {
- if (oldFiber && newFiber.alternate === null) {
- // We matched the slot, but we didn't reuse the existing fiber, so we
- // need to delete the existing child.
- deleteChild(returnFiber, oldFiber);
- }
- }
- lastPlacedIndex = placeChild(newFiber, lastPlacedIndex, newIdx);
- if (previousNewFiber === null) {
- // TODO: Move out of the loop. This only happens for the first run.
- resultingFirstChild = newFiber;
- } else {
- // TODO: Defer siblings if we're not at the right index for this slot.
- // I.e. if we had null values before, then we want to defer this
- // for each null value. However, we also don't want to call updateSlot
- // with the previous one.
- previousNewFiber.sibling = newFiber;
- }
- previousNewFiber = newFiber;
- oldFiber = nextOldFiber;
- }
- if (newIdx === newChildren.length) {
- // We've reached the end of the new children. We can delete the rest.
- deleteRemainingChildren(returnFiber, oldFiber);
- return resultingFirstChild;
- }
- if (oldFiber === null) {
- // If we don't have any more existing children we can choose a fast path
- // since the rest will all be insertions.
- for (; newIdx < newChildren.length; newIdx++) {
- var _newFiber = createChild(returnFiber, newChildren[newIdx], expirationTime);
- if (_newFiber === null) {
- continue;
- }
- lastPlacedIndex = placeChild(_newFiber, lastPlacedIndex, newIdx);
- if (previousNewFiber === null) {
- // TODO: Move out of the loop. This only happens for the first run.
- resultingFirstChild = _newFiber;
- } else {
- previousNewFiber.sibling = _newFiber;
- }
- previousNewFiber = _newFiber;
- }
- return resultingFirstChild;
- } // Add all children to a key map for quick lookups.
- var existingChildren = mapRemainingChildren(returnFiber, oldFiber); // Keep scanning and use the map to restore deleted items as moves.
- for (; newIdx < newChildren.length; newIdx++) {
- var _newFiber2 = updateFromMap(existingChildren, returnFiber, newIdx, newChildren[newIdx], expirationTime);
- if (_newFiber2 !== null) {
- if (shouldTrackSideEffects) {
- if (_newFiber2.alternate !== null) {
- // The new fiber is a work in progress, but if there exists a
- // current, that means that we reused the fiber. We need to delete
- // it from the child list so that we don't add it to the deletion
- // list.
- existingChildren.delete(_newFiber2.key === null ? newIdx : _newFiber2.key);
- }
- }
- lastPlacedIndex = placeChild(_newFiber2, lastPlacedIndex, newIdx);
- if (previousNewFiber === null) {
- resultingFirstChild = _newFiber2;
- } else {
- previousNewFiber.sibling = _newFiber2;
- }
- previousNewFiber = _newFiber2;
- }
- }
- if (shouldTrackSideEffects) {
- // Any existing children that weren't consumed above were deleted. We need
- // to add them to the deletion list.
- existingChildren.forEach(function (child) {
- return deleteChild(returnFiber, child);
- });
- }
- return resultingFirstChild;
- }
- function reconcileChildrenIterator(returnFiber, currentFirstChild, newChildrenIterable, expirationTime) {
- // This is the same implementation as reconcileChildrenArray(),
- // but using the iterator instead.
- var iteratorFn = getIteratorFn(newChildrenIterable);
- if (!(typeof iteratorFn === 'function')) {
- {
- throw Error( "An object is not an iterable. This error is likely caused by a bug in React. Please file an issue." );
- }
- }
- {
- // We don't support rendering Generators because it's a mutation.
- // See https://github.com/facebook/react/issues/12995
- if (typeof Symbol === 'function' && // $FlowFixMe Flow doesn't know about toStringTag
- newChildrenIterable[Symbol.toStringTag] === 'Generator') {
- if (!didWarnAboutGenerators) {
- error('Using Generators as children is unsupported and will likely yield ' + 'unexpected results because enumerating a generator mutates it. ' + 'You may convert it to an array with `Array.from()` or the ' + '`[...spread]` operator before rendering. Keep in mind ' + 'you might need to polyfill these features for older browsers.');
- }
- didWarnAboutGenerators = true;
- } // Warn about using Maps as children
- if (newChildrenIterable.entries === iteratorFn) {
- if (!didWarnAboutMaps) {
- error('Using Maps as children is unsupported and will likely yield ' + 'unexpected results. Convert it to a sequence/iterable of keyed ' + 'ReactElements instead.');
- }
- didWarnAboutMaps = true;
- } // First, validate keys.
- // We'll get a different iterator later for the main pass.
- var _newChildren = iteratorFn.call(newChildrenIterable);
- if (_newChildren) {
- var knownKeys = null;
- var _step = _newChildren.next();
- for (; !_step.done; _step = _newChildren.next()) {
- var child = _step.value;
- knownKeys = warnOnInvalidKey(child, knownKeys);
- }
- }
- }
- var newChildren = iteratorFn.call(newChildrenIterable);
- if (!(newChildren != null)) {
- {
- throw Error( "An iterable object provided no iterator." );
- }
- }
- var resultingFirstChild = null;
- var previousNewFiber = null;
- var oldFiber = currentFirstChild;
- var lastPlacedIndex = 0;
- var newIdx = 0;
- var nextOldFiber = null;
- var step = newChildren.next();
- for (; oldFiber !== null && !step.done; newIdx++, step = newChildren.next()) {
- if (oldFiber.index > newIdx) {
- nextOldFiber = oldFiber;
- oldFiber = null;
- } else {
- nextOldFiber = oldFiber.sibling;
- }
- var newFiber = updateSlot(returnFiber, oldFiber, step.value, expirationTime);
- if (newFiber === null) {
- // TODO: This breaks on empty slots like null children. That's
- // unfortunate because it triggers the slow path all the time. We need
- // a better way to communicate whether this was a miss or null,
- // boolean, undefined, etc.
- if (oldFiber === null) {
- oldFiber = nextOldFiber;
- }
- break;
- }
- if (shouldTrackSideEffects) {
- if (oldFiber && newFiber.alternate === null) {
- // We matched the slot, but we didn't reuse the existing fiber, so we
- // need to delete the existing child.
- deleteChild(returnFiber, oldFiber);
- }
- }
- lastPlacedIndex = placeChild(newFiber, lastPlacedIndex, newIdx);
- if (previousNewFiber === null) {
- // TODO: Move out of the loop. This only happens for the first run.
- resultingFirstChild = newFiber;
- } else {
- // TODO: Defer siblings if we're not at the right index for this slot.
- // I.e. if we had null values before, then we want to defer this
- // for each null value. However, we also don't want to call updateSlot
- // with the previous one.
- previousNewFiber.sibling = newFiber;
- }
- previousNewFiber = newFiber;
- oldFiber = nextOldFiber;
- }
- if (step.done) {
- // We've reached the end of the new children. We can delete the rest.
- deleteRemainingChildren(returnFiber, oldFiber);
- return resultingFirstChild;
- }
- if (oldFiber === null) {
- // If we don't have any more existing children we can choose a fast path
- // since the rest will all be insertions.
- for (; !step.done; newIdx++, step = newChildren.next()) {
- var _newFiber3 = createChild(returnFiber, step.value, expirationTime);
- if (_newFiber3 === null) {
- continue;
- }
- lastPlacedIndex = placeChild(_newFiber3, lastPlacedIndex, newIdx);
- if (previousNewFiber === null) {
- // TODO: Move out of the loop. This only happens for the first run.
- resultingFirstChild = _newFiber3;
- } else {
- previousNewFiber.sibling = _newFiber3;
- }
- previousNewFiber = _newFiber3;
- }
- return resultingFirstChild;
- } // Add all children to a key map for quick lookups.
- var existingChildren = mapRemainingChildren(returnFiber, oldFiber); // Keep scanning and use the map to restore deleted items as moves.
- for (; !step.done; newIdx++, step = newChildren.next()) {
- var _newFiber4 = updateFromMap(existingChildren, returnFiber, newIdx, step.value, expirationTime);
- if (_newFiber4 !== null) {
- if (shouldTrackSideEffects) {
- if (_newFiber4.alternate !== null) {
- // The new fiber is a work in progress, but if there exists a
- // current, that means that we reused the fiber. We need to delete
- // it from the child list so that we don't add it to the deletion
- // list.
- existingChildren.delete(_newFiber4.key === null ? newIdx : _newFiber4.key);
- }
- }
- lastPlacedIndex = placeChild(_newFiber4, lastPlacedIndex, newIdx);
- if (previousNewFiber === null) {
- resultingFirstChild = _newFiber4;
- } else {
- previousNewFiber.sibling = _newFiber4;
- }
- previousNewFiber = _newFiber4;
- }
- }
- if (shouldTrackSideEffects) {
- // Any existing children that weren't consumed above were deleted. We need
- // to add them to the deletion list.
- existingChildren.forEach(function (child) {
- return deleteChild(returnFiber, child);
- });
- }
- return resultingFirstChild;
- }
- function reconcileSingleTextNode(returnFiber, currentFirstChild, textContent, expirationTime) {
- // There's no need to check for keys on text nodes since we don't have a
- // way to define them.
- if (currentFirstChild !== null && currentFirstChild.tag === HostText) {
- // We already have an existing node so let's just update it and delete
- // the rest.
- deleteRemainingChildren(returnFiber, currentFirstChild.sibling);
- var existing = useFiber(currentFirstChild, textContent);
- existing.return = returnFiber;
- return existing;
- } // The existing first child is not a text node so we need to create one
- // and delete the existing ones.
- deleteRemainingChildren(returnFiber, currentFirstChild);
- var created = createFiberFromText(textContent, returnFiber.mode, expirationTime);
- created.return = returnFiber;
- return created;
- }
- function reconcileSingleElement(returnFiber, currentFirstChild, element, expirationTime) {
- var key = element.key;
- var child = currentFirstChild;
- while (child !== null) {
- // TODO: If key === null and child.key === null, then this only applies to
- // the first item in the list.
- if (child.key === key) {
- switch (child.tag) {
- case Fragment:
- {
- if (element.type === REACT_FRAGMENT_TYPE) {
- deleteRemainingChildren(returnFiber, child.sibling);
- var existing = useFiber(child, element.props.children);
- existing.return = returnFiber;
- {
- existing._debugSource = element._source;
- existing._debugOwner = element._owner;
- }
- return existing;
- }
- break;
- }
- case Block:
- // We intentionally fallthrough here if enableBlocksAPI is not on.
- // eslint-disable-next-lined no-fallthrough
- default:
- {
- if (child.elementType === element.type || ( // Keep this check inline so it only runs on the false path:
- isCompatibleFamilyForHotReloading(child, element) )) {
- deleteRemainingChildren(returnFiber, child.sibling);
- var _existing3 = useFiber(child, element.props);
- _existing3.ref = coerceRef(returnFiber, child, element);
- _existing3.return = returnFiber;
- {
- _existing3._debugSource = element._source;
- _existing3._debugOwner = element._owner;
- }
- return _existing3;
- }
- break;
- }
- } // Didn't match.
- deleteRemainingChildren(returnFiber, child);
- break;
- } else {
- deleteChild(returnFiber, child);
- }
- child = child.sibling;
- }
- if (element.type === REACT_FRAGMENT_TYPE) {
- var created = createFiberFromFragment(element.props.children, returnFiber.mode, expirationTime, element.key);
- created.return = returnFiber;
- return created;
- } else {
- var _created4 = createFiberFromElement(element, returnFiber.mode, expirationTime);
- _created4.ref = coerceRef(returnFiber, currentFirstChild, element);
- _created4.return = returnFiber;
- return _created4;
- }
- }
- function reconcileSinglePortal(returnFiber, currentFirstChild, portal, expirationTime) {
- var key = portal.key;
- var child = currentFirstChild;
- while (child !== null) {
- // TODO: If key === null and child.key === null, then this only applies to
- // the first item in the list.
- if (child.key === key) {
- if (child.tag === HostPortal && child.stateNode.containerInfo === portal.containerInfo && child.stateNode.implementation === portal.implementation) {
- deleteRemainingChildren(returnFiber, child.sibling);
- var existing = useFiber(child, portal.children || []);
- existing.return = returnFiber;
- return existing;
- } else {
- deleteRemainingChildren(returnFiber, child);
- break;
- }
- } else {
- deleteChild(returnFiber, child);
- }
- child = child.sibling;
- }
- var created = createFiberFromPortal(portal, returnFiber.mode, expirationTime);
- created.return = returnFiber;
- return created;
- } // This API will tag the children with the side-effect of the reconciliation
- // itself. They will be added to the side-effect list as we pass through the
- // children and the parent.
- function reconcileChildFibers(returnFiber, currentFirstChild, newChild, expirationTime) {
- // This function is not recursive.
- // If the top level item is an array, we treat it as a set of children,
- // not as a fragment. Nested arrays on the other hand will be treated as
- // fragment nodes. Recursion happens at the normal flow.
- // Handle top level unkeyed fragments as if they were arrays.
- // This leads to an ambiguity between <>{[...]}</> and <>...</>.
- // We treat the ambiguous cases above the same.
- var isUnkeyedTopLevelFragment = typeof newChild === 'object' && newChild !== null && newChild.type === REACT_FRAGMENT_TYPE && newChild.key === null;
- if (isUnkeyedTopLevelFragment) {
- newChild = newChild.props.children;
- } // Handle object types
- var isObject = typeof newChild === 'object' && newChild !== null;
- if (isObject) {
- switch (newChild.$$typeof) {
- case REACT_ELEMENT_TYPE:
- return placeSingleChild(reconcileSingleElement(returnFiber, currentFirstChild, newChild, expirationTime));
- case REACT_PORTAL_TYPE:
- return placeSingleChild(reconcileSinglePortal(returnFiber, currentFirstChild, newChild, expirationTime));
- }
- }
- if (typeof newChild === 'string' || typeof newChild === 'number') {
- return placeSingleChild(reconcileSingleTextNode(returnFiber, currentFirstChild, '' + newChild, expirationTime));
- }
- if (isArray$1(newChild)) {
- return reconcileChildrenArray(returnFiber, currentFirstChild, newChild, expirationTime);
- }
- if (getIteratorFn(newChild)) {
- return reconcileChildrenIterator(returnFiber, currentFirstChild, newChild, expirationTime);
- }
- if (isObject) {
- throwOnInvalidObjectType(returnFiber, newChild);
- }
- {
- if (typeof newChild === 'function') {
- warnOnFunctionType();
- }
- }
- if (typeof newChild === 'undefined' && !isUnkeyedTopLevelFragment) {
- // If the new child is undefined, and the return fiber is a composite
- // component, throw an error. If Fiber return types are disabled,
- // we already threw above.
- switch (returnFiber.tag) {
- case ClassComponent:
- {
- {
- var instance = returnFiber.stateNode;
- if (instance.render._isMockFunction) {
- // We allow auto-mocks to proceed as if they're returning null.
- break;
- }
- }
- }
- // Intentionally fall through to the next case, which handles both
- // functions and classes
- // eslint-disable-next-lined no-fallthrough
- case FunctionComponent:
- {
- var Component = returnFiber.type;
- {
- {
- throw Error( (Component.displayName || Component.name || 'Component') + "(...): Nothing was returned from render. This usually means a return statement is missing. Or, to render nothing, return null." );
- }
- }
- }
- }
- } // Remaining cases are all treated as empty.
- return deleteRemainingChildren(returnFiber, currentFirstChild);
- }
- return reconcileChildFibers;
- }
- var reconcileChildFibers = ChildReconciler(true);
- var mountChildFibers = ChildReconciler(false);
- function cloneChildFibers(current, workInProgress) {
- if (!(current === null || workInProgress.child === current.child)) {
- {
- throw Error( "Resuming work not yet implemented." );
- }
- }
- if (workInProgress.child === null) {
- return;
- }
- var currentChild = workInProgress.child;
- var newChild = createWorkInProgress(currentChild, currentChild.pendingProps);
- workInProgress.child = newChild;
- newChild.return = workInProgress;
- while (currentChild.sibling !== null) {
- currentChild = currentChild.sibling;
- newChild = newChild.sibling = createWorkInProgress(currentChild, currentChild.pendingProps);
- newChild.return = workInProgress;
- }
- newChild.sibling = null;
- } // Reset a workInProgress child set to prepare it for a second pass.
- function resetChildFibers(workInProgress, renderExpirationTime) {
- var child = workInProgress.child;
- while (child !== null) {
- resetWorkInProgress(child, renderExpirationTime);
- child = child.sibling;
- }
- }
- var NO_CONTEXT = {};
- var contextStackCursor$1 = createCursor(NO_CONTEXT);
- var contextFiberStackCursor = createCursor(NO_CONTEXT);
- var rootInstanceStackCursor = createCursor(NO_CONTEXT);
- function requiredContext(c) {
- if (!(c !== NO_CONTEXT)) {
- {
- throw Error( "Expected host context to exist. This error is likely caused by a bug in React. Please file an issue." );
- }
- }
- return c;
- }
- function getRootHostContainer() {
- var rootInstance = requiredContext(rootInstanceStackCursor.current);
- return rootInstance;
- }
- function pushHostContainer(fiber, nextRootInstance) {
- // Push current root instance onto the stack;
- // This allows us to reset root when portals are popped.
- push(rootInstanceStackCursor, nextRootInstance, fiber); // Track the context and the Fiber that provided it.
- // This enables us to pop only Fibers that provide unique contexts.
- push(contextFiberStackCursor, fiber, fiber); // Finally, we need to push the host context to the stack.
- // However, we can't just call getRootHostContext() and push it because
- // we'd have a different number of entries on the stack depending on
- // whether getRootHostContext() throws somewhere in renderer code or not.
- // So we push an empty value first. This lets us safely unwind on errors.
- push(contextStackCursor$1, NO_CONTEXT, fiber);
- var nextRootContext = getRootHostContext(nextRootInstance); // Now that we know this function doesn't throw, replace it.
- pop(contextStackCursor$1, fiber);
- push(contextStackCursor$1, nextRootContext, fiber);
- }
- function popHostContainer(fiber) {
- pop(contextStackCursor$1, fiber);
- pop(contextFiberStackCursor, fiber);
- pop(rootInstanceStackCursor, fiber);
- }
- function getHostContext() {
- var context = requiredContext(contextStackCursor$1.current);
- return context;
- }
- function pushHostContext(fiber) {
- var rootInstance = requiredContext(rootInstanceStackCursor.current);
- var context = requiredContext(contextStackCursor$1.current);
- var nextContext = getChildHostContext(context, fiber.type); // Don't push this Fiber's context unless it's unique.
- if (context === nextContext) {
- return;
- } // Track the context and the Fiber that provided it.
- // This enables us to pop only Fibers that provide unique contexts.
- push(contextFiberStackCursor, fiber, fiber);
- push(contextStackCursor$1, nextContext, fiber);
- }
- function popHostContext(fiber) {
- // Do not pop unless this Fiber provided the current context.
- // pushHostContext() only pushes Fibers that provide unique contexts.
- if (contextFiberStackCursor.current !== fiber) {
- return;
- }
- pop(contextStackCursor$1, fiber);
- pop(contextFiberStackCursor, fiber);
- }
- var DefaultSuspenseContext = 0; // The Suspense Context is split into two parts. The lower bits is
- // inherited deeply down the subtree. The upper bits only affect
- // this immediate suspense boundary and gets reset each new
- // boundary or suspense list.
- var SubtreeSuspenseContextMask = 1; // Subtree Flags:
- // InvisibleParentSuspenseContext indicates that one of our parent Suspense
- // boundaries is not currently showing visible main content.
- // Either because it is already showing a fallback or is not mounted at all.
- // We can use this to determine if it is desirable to trigger a fallback at
- // the parent. If not, then we might need to trigger undesirable boundaries
- // and/or suspend the commit to avoid hiding the parent content.
- var InvisibleParentSuspenseContext = 1; // Shallow Flags:
- // ForceSuspenseFallback can be used by SuspenseList to force newly added
- // items into their fallback state during one of the render passes.
- var ForceSuspenseFallback = 2;
- var suspenseStackCursor = createCursor(DefaultSuspenseContext);
- function hasSuspenseContext(parentContext, flag) {
- return (parentContext & flag) !== 0;
- }
- function setDefaultShallowSuspenseContext(parentContext) {
- return parentContext & SubtreeSuspenseContextMask;
- }
- function setShallowSuspenseContext(parentContext, shallowContext) {
- return parentContext & SubtreeSuspenseContextMask | shallowContext;
- }
- function addSubtreeSuspenseContext(parentContext, subtreeContext) {
- return parentContext | subtreeContext;
- }
- function pushSuspenseContext(fiber, newContext) {
- push(suspenseStackCursor, newContext, fiber);
- }
- function popSuspenseContext(fiber) {
- pop(suspenseStackCursor, fiber);
- }
- function shouldCaptureSuspense(workInProgress, hasInvisibleParent) {
- // If it was the primary children that just suspended, capture and render the
- // fallback. Otherwise, don't capture and bubble to the next boundary.
- var nextState = workInProgress.memoizedState;
- if (nextState !== null) {
- if (nextState.dehydrated !== null) {
- // A dehydrated boundary always captures.
- return true;
- }
- return false;
- }
- var props = workInProgress.memoizedProps; // In order to capture, the Suspense component must have a fallback prop.
- if (props.fallback === undefined) {
- return false;
- } // Regular boundaries always capture.
- if (props.unstable_avoidThisFallback !== true) {
- return true;
- } // If it's a boundary we should avoid, then we prefer to bubble up to the
- // parent boundary if it is currently invisible.
- if (hasInvisibleParent) {
- return false;
- } // If the parent is not able to handle it, we must handle it.
- return true;
- }
- function findFirstSuspended(row) {
- var node = row;
- while (node !== null) {
- if (node.tag === SuspenseComponent) {
- var state = node.memoizedState;
- if (state !== null) {
- var dehydrated = state.dehydrated;
- if (dehydrated === null || isSuspenseInstancePending(dehydrated) || isSuspenseInstanceFallback(dehydrated)) {
- return node;
- }
- }
- } else if (node.tag === SuspenseListComponent && // revealOrder undefined can't be trusted because it don't
- // keep track of whether it suspended or not.
- node.memoizedProps.revealOrder !== undefined) {
- var didSuspend = (node.effectTag & DidCapture) !== NoEffect;
- if (didSuspend) {
- return node;
- }
- } else if (node.child !== null) {
- node.child.return = node;
- node = node.child;
- continue;
- }
- if (node === row) {
- return null;
- }
- while (node.sibling === null) {
- if (node.return === null || node.return === row) {
- return null;
- }
- node = node.return;
- }
- node.sibling.return = node.return;
- node = node.sibling;
- }
- return null;
- }
- function createDeprecatedResponderListener(responder, props) {
- var eventResponderListener = {
- responder: responder,
- props: props
- };
- {
- Object.freeze(eventResponderListener);
- }
- return eventResponderListener;
- }
- var HasEffect =
- /* */
- 1; // Represents the phase in which the effect (not the clean-up) fires.
- var Layout =
- /* */
- 2;
- var Passive$1 =
- /* */
- 4;
- var ReactCurrentDispatcher = ReactSharedInternals.ReactCurrentDispatcher,
- ReactCurrentBatchConfig$1 = ReactSharedInternals.ReactCurrentBatchConfig;
- var didWarnAboutMismatchedHooksForComponent;
- {
- didWarnAboutMismatchedHooksForComponent = new Set();
- }
- // These are set right before calling the component.
- var renderExpirationTime = NoWork; // The work-in-progress fiber. I've named it differently to distinguish it from
- // the work-in-progress hook.
- var currentlyRenderingFiber$1 = null; // Hooks are stored as a linked list on the fiber's memoizedState field. The
- // current hook list is the list that belongs to the current fiber. The
- // work-in-progress hook list is a new list that will be added to the
- // work-in-progress fiber.
- var currentHook = null;
- var workInProgressHook = null; // Whether an update was scheduled at any point during the render phase. This
- // does not get reset if we do another render pass; only when we're completely
- // finished evaluating this component. This is an optimization so we know
- // whether we need to clear render phase updates after a throw.
- var didScheduleRenderPhaseUpdate = false;
- var RE_RENDER_LIMIT = 25; // In DEV, this is the name of the currently executing primitive hook
- var currentHookNameInDev = null; // In DEV, this list ensures that hooks are called in the same order between renders.
- // The list stores the order of hooks used during the initial render (mount).
- // Subsequent renders (updates) reference this list.
- var hookTypesDev = null;
- var hookTypesUpdateIndexDev = -1; // In DEV, this tracks whether currently rendering component needs to ignore
- // the dependencies for Hooks that need them (e.g. useEffect or useMemo).
- // When true, such Hooks will always be "remounted". Only used during hot reload.
- var ignorePreviousDependencies = false;
- function mountHookTypesDev() {
- {
- var hookName = currentHookNameInDev;
- if (hookTypesDev === null) {
- hookTypesDev = [hookName];
- } else {
- hookTypesDev.push(hookName);
- }
- }
- }
- function updateHookTypesDev() {
- {
- var hookName = currentHookNameInDev;
- if (hookTypesDev !== null) {
- hookTypesUpdateIndexDev++;
- if (hookTypesDev[hookTypesUpdateIndexDev] !== hookName) {
- warnOnHookMismatchInDev(hookName);
- }
- }
- }
- }
- function checkDepsAreArrayDev(deps) {
- {
- if (deps !== undefined && deps !== null && !Array.isArray(deps)) {
- // Verify deps, but only on mount to avoid extra checks.
- // It's unlikely their type would change as usually you define them inline.
- error('%s received a final argument that is not an array (instead, received `%s`). When ' + 'specified, the final argument must be an array.', currentHookNameInDev, typeof deps);
- }
- }
- }
- function warnOnHookMismatchInDev(currentHookName) {
- {
- var componentName = getComponentName(currentlyRenderingFiber$1.type);
- if (!didWarnAboutMismatchedHooksForComponent.has(componentName)) {
- didWarnAboutMismatchedHooksForComponent.add(componentName);
- if (hookTypesDev !== null) {
- var table = '';
- var secondColumnStart = 30;
- for (var i = 0; i <= hookTypesUpdateIndexDev; i++) {
- var oldHookName = hookTypesDev[i];
- var newHookName = i === hookTypesUpdateIndexDev ? currentHookName : oldHookName;
- var row = i + 1 + ". " + oldHookName; // Extra space so second column lines up
- // lol @ IE not supporting String#repeat
- while (row.length < secondColumnStart) {
- row += ' ';
- }
- row += newHookName + '\n';
- table += row;
- }
- error('React has detected a change in the order of Hooks called by %s. ' + 'This will lead to bugs and errors if not fixed. ' + 'For more information, read the Rules of Hooks: https://fb.me/rules-of-hooks\n\n' + ' Previous render Next render\n' + ' ------------------------------------------------------\n' + '%s' + ' ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n', componentName, table);
- }
- }
- }
- }
- function throwInvalidHookError() {
- {
- {
- throw Error( "Invalid hook call. Hooks can only be called inside of the body of a function component. This could happen for one of the following reasons:\n1. You might have mismatching versions of React and the renderer (such as React DOM)\n2. You might be breaking the Rules of Hooks\n3. You might have more than one copy of React in the same app\nSee https://fb.me/react-invalid-hook-call for tips about how to debug and fix this problem." );
- }
- }
- }
- function areHookInputsEqual(nextDeps, prevDeps) {
- {
- if (ignorePreviousDependencies) {
- // Only true when this component is being hot reloaded.
- return false;
- }
- }
- if (prevDeps === null) {
- {
- error('%s received a final argument during this render, but not during ' + 'the previous render. Even though the final argument is optional, ' + 'its type cannot change between renders.', currentHookNameInDev);
- }
- return false;
- }
- {
- // Don't bother comparing lengths in prod because these arrays should be
- // passed inline.
- if (nextDeps.length !== prevDeps.length) {
- error('The final argument passed to %s changed size between renders. The ' + 'order and size of this array must remain constant.\n\n' + 'Previous: %s\n' + 'Incoming: %s', currentHookNameInDev, "[" + prevDeps.join(', ') + "]", "[" + nextDeps.join(', ') + "]");
- }
- }
- for (var i = 0; i < prevDeps.length && i < nextDeps.length; i++) {
- if (objectIs(nextDeps[i], prevDeps[i])) {
- continue;
- }
- return false;
- }
- return true;
- }
- function renderWithHooks(current, workInProgress, Component, props, secondArg, nextRenderExpirationTime) {
- renderExpirationTime = nextRenderExpirationTime;
- currentlyRenderingFiber$1 = workInProgress;
- {
- hookTypesDev = current !== null ? current._debugHookTypes : null;
- hookTypesUpdateIndexDev = -1; // Used for hot reloading:
- ignorePreviousDependencies = current !== null && current.type !== workInProgress.type;
- }
- workInProgress.memoizedState = null;
- workInProgress.updateQueue = null;
- workInProgress.expirationTime = NoWork; // The following should have already been reset
- // currentHook = null;
- // workInProgressHook = null;
- // didScheduleRenderPhaseUpdate = false;
- // TODO Warn if no hooks are used at all during mount, then some are used during update.
- // Currently we will identify the update render as a mount because memoizedState === null.
- // This is tricky because it's valid for certain types of components (e.g. React.lazy)
- // Using memoizedState to differentiate between mount/update only works if at least one stateful hook is used.
- // Non-stateful hooks (e.g. context) don't get added to memoizedState,
- // so memoizedState would be null during updates and mounts.
- {
- if (current !== null && current.memoizedState !== null) {
- ReactCurrentDispatcher.current = HooksDispatcherOnUpdateInDEV;
- } else if (hookTypesDev !== null) {
- // This dispatcher handles an edge case where a component is updating,
- // but no stateful hooks have been used.
- // We want to match the production code behavior (which will use HooksDispatcherOnMount),
- // but with the extra DEV validation to ensure hooks ordering hasn't changed.
- // This dispatcher does that.
- ReactCurrentDispatcher.current = HooksDispatcherOnMountWithHookTypesInDEV;
- } else {
- ReactCurrentDispatcher.current = HooksDispatcherOnMountInDEV;
- }
- }
- var children = Component(props, secondArg); // Check if there was a render phase update
- if (workInProgress.expirationTime === renderExpirationTime) {
- // Keep rendering in a loop for as long as render phase updates continue to
- // be scheduled. Use a counter to prevent infinite loops.
- var numberOfReRenders = 0;
- do {
- workInProgress.expirationTime = NoWork;
- if (!(numberOfReRenders < RE_RENDER_LIMIT)) {
- {
- throw Error( "Too many re-renders. React limits the number of renders to prevent an infinite loop." );
- }
- }
- numberOfReRenders += 1;
- {
- // Even when hot reloading, allow dependencies to stabilize
- // after first render to prevent infinite render phase updates.
- ignorePreviousDependencies = false;
- } // Start over from the beginning of the list
- currentHook = null;
- workInProgressHook = null;
- workInProgress.updateQueue = null;
- {
- // Also validate hook order for cascading updates.
- hookTypesUpdateIndexDev = -1;
- }
- ReactCurrentDispatcher.current = HooksDispatcherOnRerenderInDEV ;
- children = Component(props, secondArg);
- } while (workInProgress.expirationTime === renderExpirationTime);
- } // We can assume the previous dispatcher is always this one, since we set it
- // at the beginning of the render phase and there's no re-entrancy.
- ReactCurrentDispatcher.current = ContextOnlyDispatcher;
- {
- workInProgress._debugHookTypes = hookTypesDev;
- } // This check uses currentHook so that it works the same in DEV and prod bundles.
- // hookTypesDev could catch more cases (e.g. context) but only in DEV bundles.
- var didRenderTooFewHooks = currentHook !== null && currentHook.next !== null;
- renderExpirationTime = NoWork;
- currentlyRenderingFiber$1 = null;
- currentHook = null;
- workInProgressHook = null;
- {
- currentHookNameInDev = null;
- hookTypesDev = null;
- hookTypesUpdateIndexDev = -1;
- }
- didScheduleRenderPhaseUpdate = false;
- if (!!didRenderTooFewHooks) {
- {
- throw Error( "Rendered fewer hooks than expected. This may be caused by an accidental early return statement." );
- }
- }
- return children;
- }
- function bailoutHooks(current, workInProgress, expirationTime) {
- workInProgress.updateQueue = current.updateQueue;
- workInProgress.effectTag &= ~(Passive | Update);
- if (current.expirationTime <= expirationTime) {
- current.expirationTime = NoWork;
- }
- }
- function resetHooksAfterThrow() {
- // We can assume the previous dispatcher is always this one, since we set it
- // at the beginning of the render phase and there's no re-entrancy.
- ReactCurrentDispatcher.current = ContextOnlyDispatcher;
- if (didScheduleRenderPhaseUpdate) {
- // There were render phase updates. These are only valid for this render
- // phase, which we are now aborting. Remove the updates from the queues so
- // they do not persist to the next render. Do not remove updates from hooks
- // that weren't processed.
- //
- // Only reset the updates from the queue if it has a clone. If it does
- // not have a clone, that means it wasn't processed, and the updates were
- // scheduled before we entered the render phase.
- var hook = currentlyRenderingFiber$1.memoizedState;
- while (hook !== null) {
- var queue = hook.queue;
- if (queue !== null) {
- queue.pending = null;
- }
- hook = hook.next;
- }
- }
- renderExpirationTime = NoWork;
- currentlyRenderingFiber$1 = null;
- currentHook = null;
- workInProgressHook = null;
- {
- hookTypesDev = null;
- hookTypesUpdateIndexDev = -1;
- currentHookNameInDev = null;
- }
- didScheduleRenderPhaseUpdate = false;
- }
- function mountWorkInProgressHook() {
- var hook = {
- memoizedState: null,
- baseState: null,
- baseQueue: null,
- queue: null,
- next: null
- };
- if (workInProgressHook === null) {
- // This is the first hook in the list
- currentlyRenderingFiber$1.memoizedState = workInProgressHook = hook;
- } else {
- // Append to the end of the list
- workInProgressHook = workInProgressHook.next = hook;
- }
- return workInProgressHook;
- }
- function updateWorkInProgressHook() {
- // This function is used both for updates and for re-renders triggered by a
- // render phase update. It assumes there is either a current hook we can
- // clone, or a work-in-progress hook from a previous render pass that we can
- // use as a base. When we reach the end of the base list, we must switch to
- // the dispatcher used for mounts.
- var nextCurrentHook;
- if (currentHook === null) {
- var current = currentlyRenderingFiber$1.alternate;
- if (current !== null) {
- nextCurrentHook = current.memoizedState;
- } else {
- nextCurrentHook = null;
- }
- } else {
- nextCurrentHook = currentHook.next;
- }
- var nextWorkInProgressHook;
- if (workInProgressHook === null) {
- nextWorkInProgressHook = currentlyRenderingFiber$1.memoizedState;
- } else {
- nextWorkInProgressHook = workInProgressHook.next;
- }
- if (nextWorkInProgressHook !== null) {
- // There's already a work-in-progress. Reuse it.
- workInProgressHook = nextWorkInProgressHook;
- nextWorkInProgressHook = workInProgressHook.next;
- currentHook = nextCurrentHook;
- } else {
- // Clone from the current hook.
- if (!(nextCurrentHook !== null)) {
- {
- throw Error( "Rendered more hooks than during the previous render." );
- }
- }
- currentHook = nextCurrentHook;
- var newHook = {
- memoizedState: currentHook.memoizedState,
- baseState: currentHook.baseState,
- baseQueue: currentHook.baseQueue,
- queue: currentHook.queue,
- next: null
- };
- if (workInProgressHook === null) {
- // This is the first hook in the list.
- currentlyRenderingFiber$1.memoizedState = workInProgressHook = newHook;
- } else {
- // Append to the end of the list.
- workInProgressHook = workInProgressHook.next = newHook;
- }
- }
- return workInProgressHook;
- }
- function createFunctionComponentUpdateQueue() {
- return {
- lastEffect: null
- };
- }
- function basicStateReducer(state, action) {
- // $FlowFixMe: Flow doesn't like mixed types
- return typeof action === 'function' ? action(state) : action;
- }
- function mountReducer(reducer, initialArg, init) {
- var hook = mountWorkInProgressHook();
- var initialState;
- if (init !== undefined) {
- initialState = init(initialArg);
- } else {
- initialState = initialArg;
- }
- hook.memoizedState = hook.baseState = initialState;
- var queue = hook.queue = {
- pending: null,
- dispatch: null,
- lastRenderedReducer: reducer,
- lastRenderedState: initialState
- };
- var dispatch = queue.dispatch = dispatchAction.bind(null, currentlyRenderingFiber$1, queue);
- return [hook.memoizedState, dispatch];
- }
- function updateReducer(reducer, initialArg, init) {
- var hook = updateWorkInProgressHook();
- var queue = hook.queue;
- if (!(queue !== null)) {
- {
- throw Error( "Should have a queue. This is likely a bug in React. Please file an issue." );
- }
- }
- queue.lastRenderedReducer = reducer;
- var current = currentHook; // The last rebase update that is NOT part of the base state.
- var baseQueue = current.baseQueue; // The last pending update that hasn't been processed yet.
- var pendingQueue = queue.pending;
- if (pendingQueue !== null) {
- // We have new updates that haven't been processed yet.
- // We'll add them to the base queue.
- if (baseQueue !== null) {
- // Merge the pending queue and the base queue.
- var baseFirst = baseQueue.next;
- var pendingFirst = pendingQueue.next;
- baseQueue.next = pendingFirst;
- pendingQueue.next = baseFirst;
- }
- current.baseQueue = baseQueue = pendingQueue;
- queue.pending = null;
- }
- if (baseQueue !== null) {
- // We have a queue to process.
- var first = baseQueue.next;
- var newState = current.baseState;
- var newBaseState = null;
- var newBaseQueueFirst = null;
- var newBaseQueueLast = null;
- var update = first;
- do {
- var updateExpirationTime = update.expirationTime;
- if (updateExpirationTime < renderExpirationTime) {
- // Priority is insufficient. Skip this update. If this is the first
- // skipped update, the previous update/state is the new base
- // update/state.
- var clone = {
- expirationTime: update.expirationTime,
- suspenseConfig: update.suspenseConfig,
- action: update.action,
- eagerReducer: update.eagerReducer,
- eagerState: update.eagerState,
- next: null
- };
- if (newBaseQueueLast === null) {
- newBaseQueueFirst = newBaseQueueLast = clone;
- newBaseState = newState;
- } else {
- newBaseQueueLast = newBaseQueueLast.next = clone;
- } // Update the remaining priority in the queue.
- if (updateExpirationTime > currentlyRenderingFiber$1.expirationTime) {
- currentlyRenderingFiber$1.expirationTime = updateExpirationTime;
- markUnprocessedUpdateTime(updateExpirationTime);
- }
- } else {
- // This update does have sufficient priority.
- if (newBaseQueueLast !== null) {
- var _clone = {
- expirationTime: Sync,
- // This update is going to be committed so we never want uncommit it.
- suspenseConfig: update.suspenseConfig,
- action: update.action,
- eagerReducer: update.eagerReducer,
- eagerState: update.eagerState,
- next: null
- };
- newBaseQueueLast = newBaseQueueLast.next = _clone;
- } // Mark the event time of this update as relevant to this render pass.
- // TODO: This should ideally use the true event time of this update rather than
- // its priority which is a derived and not reverseable value.
- // TODO: We should skip this update if it was already committed but currently
- // we have no way of detecting the difference between a committed and suspended
- // update here.
- markRenderEventTimeAndConfig(updateExpirationTime, update.suspenseConfig); // Process this update.
- if (update.eagerReducer === reducer) {
- // If this update was processed eagerly, and its reducer matches the
- // current reducer, we can use the eagerly computed state.
- newState = update.eagerState;
- } else {
- var action = update.action;
- newState = reducer(newState, action);
- }
- }
- update = update.next;
- } while (update !== null && update !== first);
- if (newBaseQueueLast === null) {
- newBaseState = newState;
- } else {
- newBaseQueueLast.next = newBaseQueueFirst;
- } // Mark that the fiber performed work, but only if the new state is
- // different from the current state.
- if (!objectIs(newState, hook.memoizedState)) {
- markWorkInProgressReceivedUpdate();
- }
- hook.memoizedState = newState;
- hook.baseState = newBaseState;
- hook.baseQueue = newBaseQueueLast;
- queue.lastRenderedState = newState;
- }
- var dispatch = queue.dispatch;
- return [hook.memoizedState, dispatch];
- }
- function rerenderReducer(reducer, initialArg, init) {
- var hook = updateWorkInProgressHook();
- var queue = hook.queue;
- if (!(queue !== null)) {
- {
- throw Error( "Should have a queue. This is likely a bug in React. Please file an issue." );
- }
- }
- queue.lastRenderedReducer = reducer; // This is a re-render. Apply the new render phase updates to the previous
- // work-in-progress hook.
- var dispatch = queue.dispatch;
- var lastRenderPhaseUpdate = queue.pending;
- var newState = hook.memoizedState;
- if (lastRenderPhaseUpdate !== null) {
- // The queue doesn't persist past this render pass.
- queue.pending = null;
- var firstRenderPhaseUpdate = lastRenderPhaseUpdate.next;
- var update = firstRenderPhaseUpdate;
- do {
- // Process this render phase update. We don't have to check the
- // priority because it will always be the same as the current
- // render's.
- var action = update.action;
- newState = reducer(newState, action);
- update = update.next;
- } while (update !== firstRenderPhaseUpdate); // Mark that the fiber performed work, but only if the new state is
- // different from the current state.
- if (!objectIs(newState, hook.memoizedState)) {
- markWorkInProgressReceivedUpdate();
- }
- hook.memoizedState = newState; // Don't persist the state accumulated from the render phase updates to
- // the base state unless the queue is empty.
- // TODO: Not sure if this is the desired semantics, but it's what we
- // do for gDSFP. I can't remember why.
- if (hook.baseQueue === null) {
- hook.baseState = newState;
- }
- queue.lastRenderedState = newState;
- }
- return [newState, dispatch];
- }
- function mountState(initialState) {
- var hook = mountWorkInProgressHook();
- if (typeof initialState === 'function') {
- // $FlowFixMe: Flow doesn't like mixed types
- initialState = initialState();
- }
- hook.memoizedState = hook.baseState = initialState;
- var queue = hook.queue = {
- pending: null,
- dispatch: null,
- lastRenderedReducer: basicStateReducer,
- lastRenderedState: initialState
- };
- var dispatch = queue.dispatch = dispatchAction.bind(null, currentlyRenderingFiber$1, queue);
- return [hook.memoizedState, dispatch];
- }
- function updateState(initialState) {
- return updateReducer(basicStateReducer);
- }
- function rerenderState(initialState) {
- return rerenderReducer(basicStateReducer);
- }
- function pushEffect(tag, create, destroy, deps) {
- var effect = {
- tag: tag,
- create: create,
- destroy: destroy,
- deps: deps,
- // Circular
- next: null
- };
- var componentUpdateQueue = currentlyRenderingFiber$1.updateQueue;
- if (componentUpdateQueue === null) {
- componentUpdateQueue = createFunctionComponentUpdateQueue();
- currentlyRenderingFiber$1.updateQueue = componentUpdateQueue;
- componentUpdateQueue.lastEffect = effect.next = effect;
- } else {
- var lastEffect = componentUpdateQueue.lastEffect;
- if (lastEffect === null) {
- componentUpdateQueue.lastEffect = effect.next = effect;
- } else {
- var firstEffect = lastEffect.next;
- lastEffect.next = effect;
- effect.next = firstEffect;
- componentUpdateQueue.lastEffect = effect;
- }
- }
- return effect;
- }
- function mountRef(initialValue) {
- var hook = mountWorkInProgressHook();
- var ref = {
- current: initialValue
- };
- {
- Object.seal(ref);
- }
- hook.memoizedState = ref;
- return ref;
- }
- function updateRef(initialValue) {
- var hook = updateWorkInProgressHook();
- return hook.memoizedState;
- }
- function mountEffectImpl(fiberEffectTag, hookEffectTag, create, deps) {
- var hook = mountWorkInProgressHook();
- var nextDeps = deps === undefined ? null : deps;
- currentlyRenderingFiber$1.effectTag |= fiberEffectTag;
- hook.memoizedState = pushEffect(HasEffect | hookEffectTag, create, undefined, nextDeps);
- }
- function updateEffectImpl(fiberEffectTag, hookEffectTag, create, deps) {
- var hook = updateWorkInProgressHook();
- var nextDeps = deps === undefined ? null : deps;
- var destroy = undefined;
- if (currentHook !== null) {
- var prevEffect = currentHook.memoizedState;
- destroy = prevEffect.destroy;
- if (nextDeps !== null) {
- var prevDeps = prevEffect.deps;
- if (areHookInputsEqual(nextDeps, prevDeps)) {
- pushEffect(hookEffectTag, create, destroy, nextDeps);
- return;
- }
- }
- }
- currentlyRenderingFiber$1.effectTag |= fiberEffectTag;
- hook.memoizedState = pushEffect(HasEffect | hookEffectTag, create, destroy, nextDeps);
- }
- function mountEffect(create, deps) {
- {
- // $FlowExpectedError - jest isn't a global, and isn't recognized outside of tests
- if ('undefined' !== typeof jest) {
- warnIfNotCurrentlyActingEffectsInDEV(currentlyRenderingFiber$1);
- }
- }
- return mountEffectImpl(Update | Passive, Passive$1, create, deps);
- }
- function updateEffect(create, deps) {
- {
- // $FlowExpectedError - jest isn't a global, and isn't recognized outside of tests
- if ('undefined' !== typeof jest) {
- warnIfNotCurrentlyActingEffectsInDEV(currentlyRenderingFiber$1);
- }
- }
- return updateEffectImpl(Update | Passive, Passive$1, create, deps);
- }
- function mountLayoutEffect(create, deps) {
- return mountEffectImpl(Update, Layout, create, deps);
- }
- function updateLayoutEffect(create, deps) {
- return updateEffectImpl(Update, Layout, create, deps);
- }
- function imperativeHandleEffect(create, ref) {
- if (typeof ref === 'function') {
- var refCallback = ref;
- var _inst = create();
- refCallback(_inst);
- return function () {
- refCallback(null);
- };
- } else if (ref !== null && ref !== undefined) {
- var refObject = ref;
- {
- if (!refObject.hasOwnProperty('current')) {
- error('Expected useImperativeHandle() first argument to either be a ' + 'ref callback or React.createRef() object. Instead received: %s.', 'an object with keys {' + Object.keys(refObject).join(', ') + '}');
- }
- }
- var _inst2 = create();
- refObject.current = _inst2;
- return function () {
- refObject.current = null;
- };
- }
- }
- function mountImperativeHandle(ref, create, deps) {
- {
- if (typeof create !== 'function') {
- error('Expected useImperativeHandle() second argument to be a function ' + 'that creates a handle. Instead received: %s.', create !== null ? typeof create : 'null');
- }
- } // TODO: If deps are provided, should we skip comparing the ref itself?
- var effectDeps = deps !== null && deps !== undefined ? deps.concat([ref]) : null;
- return mountEffectImpl(Update, Layout, imperativeHandleEffect.bind(null, create, ref), effectDeps);
- }
- function updateImperativeHandle(ref, create, deps) {
- {
- if (typeof create !== 'function') {
- error('Expected useImperativeHandle() second argument to be a function ' + 'that creates a handle. Instead received: %s.', create !== null ? typeof create : 'null');
- }
- } // TODO: If deps are provided, should we skip comparing the ref itself?
- var effectDeps = deps !== null && deps !== undefined ? deps.concat([ref]) : null;
- return updateEffectImpl(Update, Layout, imperativeHandleEffect.bind(null, create, ref), effectDeps);
- }
- function mountDebugValue(value, formatterFn) {// This hook is normally a no-op.
- // The react-debug-hooks package injects its own implementation
- // so that e.g. DevTools can display custom hook values.
- }
- var updateDebugValue = mountDebugValue;
- function mountCallback(callback, deps) {
- var hook = mountWorkInProgressHook();
- var nextDeps = deps === undefined ? null : deps;
- hook.memoizedState = [callback, nextDeps];
- return callback;
- }
- function updateCallback(callback, deps) {
- var hook = updateWorkInProgressHook();
- var nextDeps = deps === undefined ? null : deps;
- var prevState = hook.memoizedState;
- if (prevState !== null) {
- if (nextDeps !== null) {
- var prevDeps = prevState[1];
- if (areHookInputsEqual(nextDeps, prevDeps)) {
- return prevState[0];
- }
- }
- }
- hook.memoizedState = [callback, nextDeps];
- return callback;
- }
- function mountMemo(nextCreate, deps) {
- var hook = mountWorkInProgressHook();
- var nextDeps = deps === undefined ? null : deps;
- var nextValue = nextCreate();
- hook.memoizedState = [nextValue, nextDeps];
- return nextValue;
- }
- function updateMemo(nextCreate, deps) {
- var hook = updateWorkInProgressHook();
- var nextDeps = deps === undefined ? null : deps;
- var prevState = hook.memoizedState;
- if (prevState !== null) {
- // Assume these are defined. If they're not, areHookInputsEqual will warn.
- if (nextDeps !== null) {
- var prevDeps = prevState[1];
- if (areHookInputsEqual(nextDeps, prevDeps)) {
- return prevState[0];
- }
- }
- }
- var nextValue = nextCreate();
- hook.memoizedState = [nextValue, nextDeps];
- return nextValue;
- }
- function mountDeferredValue(value, config) {
- var _mountState = mountState(value),
- prevValue = _mountState[0],
- setValue = _mountState[1];
- mountEffect(function () {
- var previousConfig = ReactCurrentBatchConfig$1.suspense;
- ReactCurrentBatchConfig$1.suspense = config === undefined ? null : config;
- try {
- setValue(value);
- } finally {
- ReactCurrentBatchConfig$1.suspense = previousConfig;
- }
- }, [value, config]);
- return prevValue;
- }
- function updateDeferredValue(value, config) {
- var _updateState = updateState(),
- prevValue = _updateState[0],
- setValue = _updateState[1];
- updateEffect(function () {
- var previousConfig = ReactCurrentBatchConfig$1.suspense;
- ReactCurrentBatchConfig$1.suspense = config === undefined ? null : config;
- try {
- setValue(value);
- } finally {
- ReactCurrentBatchConfig$1.suspense = previousConfig;
- }
- }, [value, config]);
- return prevValue;
- }
- function rerenderDeferredValue(value, config) {
- var _rerenderState = rerenderState(),
- prevValue = _rerenderState[0],
- setValue = _rerenderState[1];
- updateEffect(function () {
- var previousConfig = ReactCurrentBatchConfig$1.suspense;
- ReactCurrentBatchConfig$1.suspense = config === undefined ? null : config;
- try {
- setValue(value);
- } finally {
- ReactCurrentBatchConfig$1.suspense = previousConfig;
- }
- }, [value, config]);
- return prevValue;
- }
- function startTransition(setPending, config, callback) {
- var priorityLevel = getCurrentPriorityLevel();
- runWithPriority$1(priorityLevel < UserBlockingPriority$1 ? UserBlockingPriority$1 : priorityLevel, function () {
- setPending(true);
- });
- runWithPriority$1(priorityLevel > NormalPriority ? NormalPriority : priorityLevel, function () {
- var previousConfig = ReactCurrentBatchConfig$1.suspense;
- ReactCurrentBatchConfig$1.suspense = config === undefined ? null : config;
- try {
- setPending(false);
- callback();
- } finally {
- ReactCurrentBatchConfig$1.suspense = previousConfig;
- }
- });
- }
- function mountTransition(config) {
- var _mountState2 = mountState(false),
- isPending = _mountState2[0],
- setPending = _mountState2[1];
- var start = mountCallback(startTransition.bind(null, setPending, config), [setPending, config]);
- return [start, isPending];
- }
- function updateTransition(config) {
- var _updateState2 = updateState(),
- isPending = _updateState2[0],
- setPending = _updateState2[1];
- var start = updateCallback(startTransition.bind(null, setPending, config), [setPending, config]);
- return [start, isPending];
- }
- function rerenderTransition(config) {
- var _rerenderState2 = rerenderState(),
- isPending = _rerenderState2[0],
- setPending = _rerenderState2[1];
- var start = updateCallback(startTransition.bind(null, setPending, config), [setPending, config]);
- return [start, isPending];
- }
- function dispatchAction(fiber, queue, action) {
- {
- if (typeof arguments[3] === 'function') {
- error("State updates from the useState() and useReducer() Hooks don't support the " + 'second callback argument. To execute a side effect after ' + 'rendering, declare it in the component body with useEffect().');
- }
- }
- var currentTime = requestCurrentTimeForUpdate();
- var suspenseConfig = requestCurrentSuspenseConfig();
- var expirationTime = computeExpirationForFiber(currentTime, fiber, suspenseConfig);
- var update = {
- expirationTime: expirationTime,
- suspenseConfig: suspenseConfig,
- action: action,
- eagerReducer: null,
- eagerState: null,
- next: null
- };
- {
- update.priority = getCurrentPriorityLevel();
- } // Append the update to the end of the list.
- var pending = queue.pending;
- if (pending === null) {
- // This is the first update. Create a circular list.
- update.next = update;
- } else {
- update.next = pending.next;
- pending.next = update;
- }
- queue.pending = update;
- var alternate = fiber.alternate;
- if (fiber === currentlyRenderingFiber$1 || alternate !== null && alternate === currentlyRenderingFiber$1) {
- // This is a render phase update. Stash it in a lazily-created map of
- // queue -> linked list of updates. After this render pass, we'll restart
- // and apply the stashed updates on top of the work-in-progress hook.
- didScheduleRenderPhaseUpdate = true;
- update.expirationTime = renderExpirationTime;
- currentlyRenderingFiber$1.expirationTime = renderExpirationTime;
- } else {
- if (fiber.expirationTime === NoWork && (alternate === null || alternate.expirationTime === NoWork)) {
- // The queue is currently empty, which means we can eagerly compute the
- // next state before entering the render phase. If the new state is the
- // same as the current state, we may be able to bail out entirely.
- var lastRenderedReducer = queue.lastRenderedReducer;
- if (lastRenderedReducer !== null) {
- var prevDispatcher;
- {
- prevDispatcher = ReactCurrentDispatcher.current;
- ReactCurrentDispatcher.current = InvalidNestedHooksDispatcherOnUpdateInDEV;
- }
- try {
- var currentState = queue.lastRenderedState;
- var eagerState = lastRenderedReducer(currentState, action); // Stash the eagerly computed state, and the reducer used to compute
- // it, on the update object. If the reducer hasn't changed by the
- // time we enter the render phase, then the eager state can be used
- // without calling the reducer again.
- update.eagerReducer = lastRenderedReducer;
- update.eagerState = eagerState;
- if (objectIs(eagerState, currentState)) {
- // Fast path. We can bail out without scheduling React to re-render.
- // It's still possible that we'll need to rebase this update later,
- // if the component re-renders for a different reason and by that
- // time the reducer has changed.
- return;
- }
- } catch (error) {// Suppress the error. It will throw again in the render phase.
- } finally {
- {
- ReactCurrentDispatcher.current = prevDispatcher;
- }
- }
- }
- }
- {
- // $FlowExpectedError - jest isn't a global, and isn't recognized outside of tests
- if ('undefined' !== typeof jest) {
- warnIfNotScopedWithMatchingAct(fiber);
- warnIfNotCurrentlyActingUpdatesInDev(fiber);
- }
- }
- scheduleWork(fiber, expirationTime);
- }
- }
- var ContextOnlyDispatcher = {
- readContext: readContext,
- useCallback: throwInvalidHookError,
- useContext: throwInvalidHookError,
- useEffect: throwInvalidHookError,
- useImperativeHandle: throwInvalidHookError,
- useLayoutEffect: throwInvalidHookError,
- useMemo: throwInvalidHookError,
- useReducer: throwInvalidHookError,
- useRef: throwInvalidHookError,
- useState: throwInvalidHookError,
- useDebugValue: throwInvalidHookError,
- useResponder: throwInvalidHookError,
- useDeferredValue: throwInvalidHookError,
- useTransition: throwInvalidHookError
- };
- var HooksDispatcherOnMountInDEV = null;
- var HooksDispatcherOnMountWithHookTypesInDEV = null;
- var HooksDispatcherOnUpdateInDEV = null;
- var HooksDispatcherOnRerenderInDEV = null;
- var InvalidNestedHooksDispatcherOnMountInDEV = null;
- var InvalidNestedHooksDispatcherOnUpdateInDEV = null;
- var InvalidNestedHooksDispatcherOnRerenderInDEV = null;
- {
- var warnInvalidContextAccess = function () {
- error('Context can only be read while React is rendering. ' + 'In classes, you can read it in the render method or getDerivedStateFromProps. ' + 'In function components, you can read it directly in the function body, but not ' + 'inside Hooks like useReducer() or useMemo().');
- };
- var warnInvalidHookAccess = function () {
- error('Do not call Hooks inside useEffect(...), useMemo(...), or other built-in Hooks. ' + 'You can only call Hooks at the top level of your React function. ' + 'For more information, see ' + 'https://fb.me/rules-of-hooks');
- };
- HooksDispatcherOnMountInDEV = {
- readContext: function (context, observedBits) {
- return readContext(context, observedBits);
- },
- useCallback: function (callback, deps) {
- currentHookNameInDev = 'useCallback';
- mountHookTypesDev();
- checkDepsAreArrayDev(deps);
- return mountCallback(callback, deps);
- },
- useContext: function (context, observedBits) {
- currentHookNameInDev = 'useContext';
- mountHookTypesDev();
- return readContext(context, observedBits);
- },
- useEffect: function (create, deps) {
- currentHookNameInDev = 'useEffect';
- mountHookTypesDev();
- checkDepsAreArrayDev(deps);
- return mountEffect(create, deps);
- },
- useImperativeHandle: function (ref, create, deps) {
- currentHookNameInDev = 'useImperativeHandle';
- mountHookTypesDev();
- checkDepsAreArrayDev(deps);
- return mountImperativeHandle(ref, create, deps);
- },
- useLayoutEffect: function (create, deps) {
- currentHookNameInDev = 'useLayoutEffect';
- mountHookTypesDev();
- checkDepsAreArrayDev(deps);
- return mountLayoutEffect(create, deps);
- },
- useMemo: function (create, deps) {
- currentHookNameInDev = 'useMemo';
- mountHookTypesDev();
- checkDepsAreArrayDev(deps);
- var prevDispatcher = ReactCurrentDispatcher.current;
- ReactCurrentDispatcher.current = InvalidNestedHooksDispatcherOnMountInDEV;
- try {
- return mountMemo(create, deps);
- } finally {
- ReactCurrentDispatcher.current = prevDispatcher;
- }
- },
- useReducer: function (reducer, initialArg, init) {
- currentHookNameInDev = 'useReducer';
- mountHookTypesDev();
- var prevDispatcher = ReactCurrentDispatcher.current;
- ReactCurrentDispatcher.current = InvalidNestedHooksDispatcherOnMountInDEV;
- try {
- return mountReducer(reducer, initialArg, init);
- } finally {
- ReactCurrentDispatcher.current = prevDispatcher;
- }
- },
- useRef: function (initialValue) {
- currentHookNameInDev = 'useRef';
- mountHookTypesDev();
- return mountRef(initialValue);
- },
- useState: function (initialState) {
- currentHookNameInDev = 'useState';
- mountHookTypesDev();
- var prevDispatcher = ReactCurrentDispatcher.current;
- ReactCurrentDispatcher.current = InvalidNestedHooksDispatcherOnMountInDEV;
- try {
- return mountState(initialState);
- } finally {
- ReactCurrentDispatcher.current = prevDispatcher;
- }
- },
- useDebugValue: function (value, formatterFn) {
- currentHookNameInDev = 'useDebugValue';
- mountHookTypesDev();
- return mountDebugValue();
- },
- useResponder: function (responder, props) {
- currentHookNameInDev = 'useResponder';
- mountHookTypesDev();
- return createDeprecatedResponderListener(responder, props);
- },
- useDeferredValue: function (value, config) {
- currentHookNameInDev = 'useDeferredValue';
- mountHookTypesDev();
- return mountDeferredValue(value, config);
- },
- useTransition: function (config) {
- currentHookNameInDev = 'useTransition';
- mountHookTypesDev();
- return mountTransition(config);
- }
- };
- HooksDispatcherOnMountWithHookTypesInDEV = {
- readContext: function (context, observedBits) {
- return readContext(context, observedBits);
- },
- useCallback: function (callback, deps) {
- currentHookNameInDev = 'useCallback';
- updateHookTypesDev();
- return mountCallback(callback, deps);
- },
- useContext: function (context, observedBits) {
- currentHookNameInDev = 'useContext';
- updateHookTypesDev();
- return readContext(context, observedBits);
- },
- useEffect: function (create, deps) {
- currentHookNameInDev = 'useEffect';
- updateHookTypesDev();
- return mountEffect(create, deps);
- },
- useImperativeHandle: function (ref, create, deps) {
- currentHookNameInDev = 'useImperativeHandle';
- updateHookTypesDev();
- return mountImperativeHandle(ref, create, deps);
- },
- useLayoutEffect: function (create, deps) {
- currentHookNameInDev = 'useLayoutEffect';
- updateHookTypesDev();
- return mountLayoutEffect(create, deps);
- },
- useMemo: function (create, deps) {
- currentHookNameInDev = 'useMemo';
- updateHookTypesDev();
- var prevDispatcher = ReactCurrentDispatcher.current;
- ReactCurrentDispatcher.current = InvalidNestedHooksDispatcherOnMountInDEV;
- try {
- return mountMemo(create, deps);
- } finally {
- ReactCurrentDispatcher.current = prevDispatcher;
- }
- },
- useReducer: function (reducer, initialArg, init) {
- currentHookNameInDev = 'useReducer';
- updateHookTypesDev();
- var prevDispatcher = ReactCurrentDispatcher.current;
- ReactCurrentDispatcher.current = InvalidNestedHooksDispatcherOnMountInDEV;
- try {
- return mountReducer(reducer, initialArg, init);
- } finally {
- ReactCurrentDispatcher.current = prevDispatcher;
- }
- },
- useRef: function (initialValue) {
- currentHookNameInDev = 'useRef';
- updateHookTypesDev();
- return mountRef(initialValue);
- },
- useState: function (initialState) {
- currentHookNameInDev = 'useState';
- updateHookTypesDev();
- var prevDispatcher = ReactCurrentDispatcher.current;
- ReactCurrentDispatcher.current = InvalidNestedHooksDispatcherOnMountInDEV;
- try {
- return mountState(initialState);
- } finally {
- ReactCurrentDispatcher.current = prevDispatcher;
- }
- },
- useDebugValue: function (value, formatterFn) {
- currentHookNameInDev = 'useDebugValue';
- updateHookTypesDev();
- return mountDebugValue();
- },
- useResponder: function (responder, props) {
- currentHookNameInDev = 'useResponder';
- updateHookTypesDev();
- return createDeprecatedResponderListener(responder, props);
- },
- useDeferredValue: function (value, config) {
- currentHookNameInDev = 'useDeferredValue';
- updateHookTypesDev();
- return mountDeferredValue(value, config);
- },
- useTransition: function (config) {
- currentHookNameInDev = 'useTransition';
- updateHookTypesDev();
- return mountTransition(config);
- }
- };
- HooksDispatcherOnUpdateInDEV = {
- readContext: function (context, observedBits) {
- return readContext(context, observedBits);
- },
- useCallback: function (callback, deps) {
- currentHookNameInDev = 'useCallback';
- updateHookTypesDev();
- return updateCallback(callback, deps);
- },
- useContext: function (context, observedBits) {
- currentHookNameInDev = 'useContext';
- updateHookTypesDev();
- return readContext(context, observedBits);
- },
- useEffect: function (create, deps) {
- currentHookNameInDev = 'useEffect';
- updateHookTypesDev();
- return updateEffect(create, deps);
- },
- useImperativeHandle: function (ref, create, deps) {
- currentHookNameInDev = 'useImperativeHandle';
- updateHookTypesDev();
- return updateImperativeHandle(ref, create, deps);
- },
- useLayoutEffect: function (create, deps) {
- currentHookNameInDev = 'useLayoutEffect';
- updateHookTypesDev();
- return updateLayoutEffect(create, deps);
- },
- useMemo: function (create, deps) {
- currentHookNameInDev = 'useMemo';
- updateHookTypesDev();
- var prevDispatcher = ReactCurrentDispatcher.current;
- ReactCurrentDispatcher.current = InvalidNestedHooksDispatcherOnUpdateInDEV;
- try {
- return updateMemo(create, deps);
- } finally {
- ReactCurrentDispatcher.current = prevDispatcher;
- }
- },
- useReducer: function (reducer, initialArg, init) {
- currentHookNameInDev = 'useReducer';
- updateHookTypesDev();
- var prevDispatcher = ReactCurrentDispatcher.current;
- ReactCurrentDispatcher.current = InvalidNestedHooksDispatcherOnUpdateInDEV;
- try {
- return updateReducer(reducer, initialArg, init);
- } finally {
- ReactCurrentDispatcher.current = prevDispatcher;
- }
- },
- useRef: function (initialValue) {
- currentHookNameInDev = 'useRef';
- updateHookTypesDev();
- return updateRef();
- },
- useState: function (initialState) {
- currentHookNameInDev = 'useState';
- updateHookTypesDev();
- var prevDispatcher = ReactCurrentDispatcher.current;
- ReactCurrentDispatcher.current = InvalidNestedHooksDispatcherOnUpdateInDEV;
- try {
- return updateState(initialState);
- } finally {
- ReactCurrentDispatcher.current = prevDispatcher;
- }
- },
- useDebugValue: function (value, formatterFn) {
- currentHookNameInDev = 'useDebugValue';
- updateHookTypesDev();
- return updateDebugValue();
- },
- useResponder: function (responder, props) {
- currentHookNameInDev = 'useResponder';
- updateHookTypesDev();
- return createDeprecatedResponderListener(responder, props);
- },
- useDeferredValue: function (value, config) {
- currentHookNameInDev = 'useDeferredValue';
- updateHookTypesDev();
- return updateDeferredValue(value, config);
- },
- useTransition: function (config) {
- currentHookNameInDev = 'useTransition';
- updateHookTypesDev();
- return updateTransition(config);
- }
- };
- HooksDispatcherOnRerenderInDEV = {
- readContext: function (context, observedBits) {
- return readContext(context, observedBits);
- },
- useCallback: function (callback, deps) {
- currentHookNameInDev = 'useCallback';
- updateHookTypesDev();
- return updateCallback(callback, deps);
- },
- useContext: function (context, observedBits) {
- currentHookNameInDev = 'useContext';
- updateHookTypesDev();
- return readContext(context, observedBits);
- },
- useEffect: function (create, deps) {
- currentHookNameInDev = 'useEffect';
- updateHookTypesDev();
- return updateEffect(create, deps);
- },
- useImperativeHandle: function (ref, create, deps) {
- currentHookNameInDev = 'useImperativeHandle';
- updateHookTypesDev();
- return updateImperativeHandle(ref, create, deps);
- },
- useLayoutEffect: function (create, deps) {
- currentHookNameInDev = 'useLayoutEffect';
- updateHookTypesDev();
- return updateLayoutEffect(create, deps);
- },
- useMemo: function (create, deps) {
- currentHookNameInDev = 'useMemo';
- updateHookTypesDev();
- var prevDispatcher = ReactCurrentDispatcher.current;
- ReactCurrentDispatcher.current = InvalidNestedHooksDispatcherOnRerenderInDEV;
- try {
- return updateMemo(create, deps);
- } finally {
- ReactCurrentDispatcher.current = prevDispatcher;
- }
- },
- useReducer: function (reducer, initialArg, init) {
- currentHookNameInDev = 'useReducer';
- updateHookTypesDev();
- var prevDispatcher = ReactCurrentDispatcher.current;
- ReactCurrentDispatcher.current = InvalidNestedHooksDispatcherOnRerenderInDEV;
- try {
- return rerenderReducer(reducer, initialArg, init);
- } finally {
- ReactCurrentDispatcher.current = prevDispatcher;
- }
- },
- useRef: function (initialValue) {
- currentHookNameInDev = 'useRef';
- updateHookTypesDev();
- return updateRef();
- },
- useState: function (initialState) {
- currentHookNameInDev = 'useState';
- updateHookTypesDev();
- var prevDispatcher = ReactCurrentDispatcher.current;
- ReactCurrentDispatcher.current = InvalidNestedHooksDispatcherOnRerenderInDEV;
- try {
- return rerenderState(initialState);
- } finally {
- ReactCurrentDispatcher.current = prevDispatcher;
- }
- },
- useDebugValue: function (value, formatterFn) {
- currentHookNameInDev = 'useDebugValue';
- updateHookTypesDev();
- return updateDebugValue();
- },
- useResponder: function (responder, props) {
- currentHookNameInDev = 'useResponder';
- updateHookTypesDev();
- return createDeprecatedResponderListener(responder, props);
- },
- useDeferredValue: function (value, config) {
- currentHookNameInDev = 'useDeferredValue';
- updateHookTypesDev();
- return rerenderDeferredValue(value, config);
- },
- useTransition: function (config) {
- currentHookNameInDev = 'useTransition';
- updateHookTypesDev();
- return rerenderTransition(config);
- }
- };
- InvalidNestedHooksDispatcherOnMountInDEV = {
- readContext: function (context, observedBits) {
- warnInvalidContextAccess();
- return readContext(context, observedBits);
- },
- useCallback: function (callback, deps) {
- currentHookNameInDev = 'useCallback';
- warnInvalidHookAccess();
- mountHookTypesDev();
- return mountCallback(callback, deps);
- },
- useContext: function (context, observedBits) {
- currentHookNameInDev = 'useContext';
- warnInvalidHookAccess();
- mountHookTypesDev();
- return readContext(context, observedBits);
- },
- useEffect: function (create, deps) {
- currentHookNameInDev = 'useEffect';
- warnInvalidHookAccess();
- mountHookTypesDev();
- return mountEffect(create, deps);
- },
- useImperativeHandle: function (ref, create, deps) {
- currentHookNameInDev = 'useImperativeHandle';
- warnInvalidHookAccess();
- mountHookTypesDev();
- return mountImperativeHandle(ref, create, deps);
- },
- useLayoutEffect: function (create, deps) {
- currentHookNameInDev = 'useLayoutEffect';
- warnInvalidHookAccess();
- mountHookTypesDev();
- return mountLayoutEffect(create, deps);
- },
- useMemo: function (create, deps) {
- currentHookNameInDev = 'useMemo';
- warnInvalidHookAccess();
- mountHookTypesDev();
- var prevDispatcher = ReactCurrentDispatcher.current;
- ReactCurrentDispatcher.current = InvalidNestedHooksDispatcherOnMountInDEV;
- try {
- return mountMemo(create, deps);
- } finally {
- ReactCurrentDispatcher.current = prevDispatcher;
- }
- },
- useReducer: function (reducer, initialArg, init) {
- currentHookNameInDev = 'useReducer';
- warnInvalidHookAccess();
- mountHookTypesDev();
- var prevDispatcher = ReactCurrentDispatcher.current;
- ReactCurrentDispatcher.current = InvalidNestedHooksDispatcherOnMountInDEV;
- try {
- return mountReducer(reducer, initialArg, init);
- } finally {
- ReactCurrentDispatcher.current = prevDispatcher;
- }
- },
- useRef: function (initialValue) {
- currentHookNameInDev = 'useRef';
- warnInvalidHookAccess();
- mountHookTypesDev();
- return mountRef(initialValue);
- },
- useState: function (initialState) {
- currentHookNameInDev = 'useState';
- warnInvalidHookAccess();
- mountHookTypesDev();
- var prevDispatcher = ReactCurrentDispatcher.current;
- ReactCurrentDispatcher.current = InvalidNestedHooksDispatcherOnMountInDEV;
- try {
- return mountState(initialState);
- } finally {
- ReactCurrentDispatcher.current = prevDispatcher;
- }
- },
- useDebugValue: function (value, formatterFn) {
- currentHookNameInDev = 'useDebugValue';
- warnInvalidHookAccess();
- mountHookTypesDev();
- return mountDebugValue();
- },
- useResponder: function (responder, props) {
- currentHookNameInDev = 'useResponder';
- warnInvalidHookAccess();
- mountHookTypesDev();
- return createDeprecatedResponderListener(responder, props);
- },
- useDeferredValue: function (value, config) {
- currentHookNameInDev = 'useDeferredValue';
- warnInvalidHookAccess();
- mountHookTypesDev();
- return mountDeferredValue(value, config);
- },
- useTransition: function (config) {
- currentHookNameInDev = 'useTransition';
- warnInvalidHookAccess();
- mountHookTypesDev();
- return mountTransition(config);
- }
- };
- InvalidNestedHooksDispatcherOnUpdateInDEV = {
- readContext: function (context, observedBits) {
- warnInvalidContextAccess();
- return readContext(context, observedBits);
- },
- useCallback: function (callback, deps) {
- currentHookNameInDev = 'useCallback';
- warnInvalidHookAccess();
- updateHookTypesDev();
- return updateCallback(callback, deps);
- },
- useContext: function (context, observedBits) {
- currentHookNameInDev = 'useContext';
- warnInvalidHookAccess();
- updateHookTypesDev();
- return readContext(context, observedBits);
- },
- useEffect: function (create, deps) {
- currentHookNameInDev = 'useEffect';
- warnInvalidHookAccess();
- updateHookTypesDev();
- return updateEffect(create, deps);
- },
- useImperativeHandle: function (ref, create, deps) {
- currentHookNameInDev = 'useImperativeHandle';
- warnInvalidHookAccess();
- updateHookTypesDev();
- return updateImperativeHandle(ref, create, deps);
- },
- useLayoutEffect: function (create, deps) {
- currentHookNameInDev = 'useLayoutEffect';
- warnInvalidHookAccess();
- updateHookTypesDev();
- return updateLayoutEffect(create, deps);
- },
- useMemo: function (create, deps) {
- currentHookNameInDev = 'useMemo';
- warnInvalidHookAccess();
- updateHookTypesDev();
- var prevDispatcher = ReactCurrentDispatcher.current;
- ReactCurrentDispatcher.current = InvalidNestedHooksDispatcherOnUpdateInDEV;
- try {
- return updateMemo(create, deps);
- } finally {
- ReactCurrentDispatcher.current = prevDispatcher;
- }
- },
- useReducer: function (reducer, initialArg, init) {
- currentHookNameInDev = 'useReducer';
- warnInvalidHookAccess();
- updateHookTypesDev();
- var prevDispatcher = ReactCurrentDispatcher.current;
- ReactCurrentDispatcher.current = InvalidNestedHooksDispatcherOnUpdateInDEV;
- try {
- return updateReducer(reducer, initialArg, init);
- } finally {
- ReactCurrentDispatcher.current = prevDispatcher;
- }
- },
- useRef: function (initialValue) {
- currentHookNameInDev = 'useRef';
- warnInvalidHookAccess();
- updateHookTypesDev();
- return updateRef();
- },
- useState: function (initialState) {
- currentHookNameInDev = 'useState';
- warnInvalidHookAccess();
- updateHookTypesDev();
- var prevDispatcher = ReactCurrentDispatcher.current;
- ReactCurrentDispatcher.current = InvalidNestedHooksDispatcherOnUpdateInDEV;
- try {
- return updateState(initialState);
- } finally {
- ReactCurrentDispatcher.current = prevDispatcher;
- }
- },
- useDebugValue: function (value, formatterFn) {
- currentHookNameInDev = 'useDebugValue';
- warnInvalidHookAccess();
- updateHookTypesDev();
- return updateDebugValue();
- },
- useResponder: function (responder, props) {
- currentHookNameInDev = 'useResponder';
- warnInvalidHookAccess();
- updateHookTypesDev();
- return createDeprecatedResponderListener(responder, props);
- },
- useDeferredValue: function (value, config) {
- currentHookNameInDev = 'useDeferredValue';
- warnInvalidHookAccess();
- updateHookTypesDev();
- return updateDeferredValue(value, config);
- },
- useTransition: function (config) {
- currentHookNameInDev = 'useTransition';
- warnInvalidHookAccess();
- updateHookTypesDev();
- return updateTransition(config);
- }
- };
- InvalidNestedHooksDispatcherOnRerenderInDEV = {
- readContext: function (context, observedBits) {
- warnInvalidContextAccess();
- return readContext(context, observedBits);
- },
- useCallback: function (callback, deps) {
- currentHookNameInDev = 'useCallback';
- warnInvalidHookAccess();
- updateHookTypesDev();
- return updateCallback(callback, deps);
- },
- useContext: function (context, observedBits) {
- currentHookNameInDev = 'useContext';
- warnInvalidHookAccess();
- updateHookTypesDev();
- return readContext(context, observedBits);
- },
- useEffect: function (create, deps) {
- currentHookNameInDev = 'useEffect';
- warnInvalidHookAccess();
- updateHookTypesDev();
- return updateEffect(create, deps);
- },
- useImperativeHandle: function (ref, create, deps) {
- currentHookNameInDev = 'useImperativeHandle';
- warnInvalidHookAccess();
- updateHookTypesDev();
- return updateImperativeHandle(ref, create, deps);
- },
- useLayoutEffect: function (create, deps) {
- currentHookNameInDev = 'useLayoutEffect';
- warnInvalidHookAccess();
- updateHookTypesDev();
- return updateLayoutEffect(create, deps);
- },
- useMemo: function (create, deps) {
- currentHookNameInDev = 'useMemo';
- warnInvalidHookAccess();
- updateHookTypesDev();
- var prevDispatcher = ReactCurrentDispatcher.current;
- ReactCurrentDispatcher.current = InvalidNestedHooksDispatcherOnUpdateInDEV;
- try {
- return updateMemo(create, deps);
- } finally {
- ReactCurrentDispatcher.current = prevDispatcher;
- }
- },
- useReducer: function (reducer, initialArg, init) {
- currentHookNameInDev = 'useReducer';
- warnInvalidHookAccess();
- updateHookTypesDev();
- var prevDispatcher = ReactCurrentDispatcher.current;
- ReactCurrentDispatcher.current = InvalidNestedHooksDispatcherOnUpdateInDEV;
- try {
- return rerenderReducer(reducer, initialArg, init);
- } finally {
- ReactCurrentDispatcher.current = prevDispatcher;
- }
- },
- useRef: function (initialValue) {
- currentHookNameInDev = 'useRef';
- warnInvalidHookAccess();
- updateHookTypesDev();
- return updateRef();
- },
- useState: function (initialState) {
- currentHookNameInDev = 'useState';
- warnInvalidHookAccess();
- updateHookTypesDev();
- var prevDispatcher = ReactCurrentDispatcher.current;
- ReactCurrentDispatcher.current = InvalidNestedHooksDispatcherOnUpdateInDEV;
- try {
- return rerenderState(initialState);
- } finally {
- ReactCurrentDispatcher.current = prevDispatcher;
- }
- },
- useDebugValue: function (value, formatterFn) {
- currentHookNameInDev = 'useDebugValue';
- warnInvalidHookAccess();
- updateHookTypesDev();
- return updateDebugValue();
- },
- useResponder: function (responder, props) {
- currentHookNameInDev = 'useResponder';
- warnInvalidHookAccess();
- updateHookTypesDev();
- return createDeprecatedResponderListener(responder, props);
- },
- useDeferredValue: function (value, config) {
- currentHookNameInDev = 'useDeferredValue';
- warnInvalidHookAccess();
- updateHookTypesDev();
- return rerenderDeferredValue(value, config);
- },
- useTransition: function (config) {
- currentHookNameInDev = 'useTransition';
- warnInvalidHookAccess();
- updateHookTypesDev();
- return rerenderTransition(config);
- }
- };
- }
- var now$1 = Scheduler.unstable_now;
- var commitTime = 0;
- var profilerStartTime = -1;
- function getCommitTime() {
- return commitTime;
- }
- function recordCommitTime() {
- commitTime = now$1();
- }
- function startProfilerTimer(fiber) {
- profilerStartTime = now$1();
- if (fiber.actualStartTime < 0) {
- fiber.actualStartTime = now$1();
- }
- }
- function stopProfilerTimerIfRunning(fiber) {
- profilerStartTime = -1;
- }
- function stopProfilerTimerIfRunningAndRecordDelta(fiber, overrideBaseTime) {
- if (profilerStartTime >= 0) {
- var elapsedTime = now$1() - profilerStartTime;
- fiber.actualDuration += elapsedTime;
- if (overrideBaseTime) {
- fiber.selfBaseDuration = elapsedTime;
- }
- profilerStartTime = -1;
- }
- }
- // This may have been an insertion or a hydration.
- var hydrationParentFiber = null;
- var nextHydratableInstance = null;
- var isHydrating = false;
- function enterHydrationState(fiber) {
- var parentInstance = fiber.stateNode.containerInfo;
- nextHydratableInstance = getFirstHydratableChild(parentInstance);
- hydrationParentFiber = fiber;
- isHydrating = true;
- return true;
- }
- function deleteHydratableInstance(returnFiber, instance) {
- {
- switch (returnFiber.tag) {
- case HostRoot:
- didNotHydrateContainerInstance(returnFiber.stateNode.containerInfo, instance);
- break;
- case HostComponent:
- didNotHydrateInstance(returnFiber.type, returnFiber.memoizedProps, returnFiber.stateNode, instance);
- break;
- }
- }
- var childToDelete = createFiberFromHostInstanceForDeletion();
- childToDelete.stateNode = instance;
- childToDelete.return = returnFiber;
- childToDelete.effectTag = Deletion; // This might seem like it belongs on progressedFirstDeletion. However,
- // these children are not part of the reconciliation list of children.
- // Even if we abort and rereconcile the children, that will try to hydrate
- // again and the nodes are still in the host tree so these will be
- // recreated.
- if (returnFiber.lastEffect !== null) {
- returnFiber.lastEffect.nextEffect = childToDelete;
- returnFiber.lastEffect = childToDelete;
- } else {
- returnFiber.firstEffect = returnFiber.lastEffect = childToDelete;
- }
- }
- function insertNonHydratedInstance(returnFiber, fiber) {
- fiber.effectTag = fiber.effectTag & ~Hydrating | Placement;
- {
- switch (returnFiber.tag) {
- case HostRoot:
- {
- var parentContainer = returnFiber.stateNode.containerInfo;
- switch (fiber.tag) {
- case HostComponent:
- var type = fiber.type;
- var props = fiber.pendingProps;
- didNotFindHydratableContainerInstance(parentContainer, type);
- break;
- case HostText:
- var text = fiber.pendingProps;
- didNotFindHydratableContainerTextInstance(parentContainer, text);
- break;
- }
- break;
- }
- case HostComponent:
- {
- var parentType = returnFiber.type;
- var parentProps = returnFiber.memoizedProps;
- var parentInstance = returnFiber.stateNode;
- switch (fiber.tag) {
- case HostComponent:
- var _type = fiber.type;
- var _props = fiber.pendingProps;
- didNotFindHydratableInstance(parentType, parentProps, parentInstance, _type);
- break;
- case HostText:
- var _text = fiber.pendingProps;
- didNotFindHydratableTextInstance(parentType, parentProps, parentInstance, _text);
- break;
- case SuspenseComponent:
- didNotFindHydratableSuspenseInstance(parentType, parentProps);
- break;
- }
- break;
- }
- default:
- return;
- }
- }
- }
- function tryHydrate(fiber, nextInstance) {
- switch (fiber.tag) {
- case HostComponent:
- {
- var type = fiber.type;
- var props = fiber.pendingProps;
- var instance = canHydrateInstance(nextInstance, type);
- if (instance !== null) {
- fiber.stateNode = instance;
- return true;
- }
- return false;
- }
- case HostText:
- {
- var text = fiber.pendingProps;
- var textInstance = canHydrateTextInstance(nextInstance, text);
- if (textInstance !== null) {
- fiber.stateNode = textInstance;
- return true;
- }
- return false;
- }
- case SuspenseComponent:
- {
- return false;
- }
- default:
- return false;
- }
- }
- function tryToClaimNextHydratableInstance(fiber) {
- if (!isHydrating) {
- return;
- }
- var nextInstance = nextHydratableInstance;
- if (!nextInstance) {
- // Nothing to hydrate. Make it an insertion.
- insertNonHydratedInstance(hydrationParentFiber, fiber);
- isHydrating = false;
- hydrationParentFiber = fiber;
- return;
- }
- var firstAttemptedInstance = nextInstance;
- if (!tryHydrate(fiber, nextInstance)) {
- // If we can't hydrate this instance let's try the next one.
- // We use this as a heuristic. It's based on intuition and not data so it
- // might be flawed or unnecessary.
- nextInstance = getNextHydratableSibling(firstAttemptedInstance);
- if (!nextInstance || !tryHydrate(fiber, nextInstance)) {
- // Nothing to hydrate. Make it an insertion.
- insertNonHydratedInstance(hydrationParentFiber, fiber);
- isHydrating = false;
- hydrationParentFiber = fiber;
- return;
- } // We matched the next one, we'll now assume that the first one was
- // superfluous and we'll delete it. Since we can't eagerly delete it
- // we'll have to schedule a deletion. To do that, this node needs a dummy
- // fiber associated with it.
- deleteHydratableInstance(hydrationParentFiber, firstAttemptedInstance);
- }
- hydrationParentFiber = fiber;
- nextHydratableInstance = getFirstHydratableChild(nextInstance);
- }
- function prepareToHydrateHostInstance(fiber, rootContainerInstance, hostContext) {
- var instance = fiber.stateNode;
- var updatePayload = hydrateInstance(instance, fiber.type, fiber.memoizedProps, rootContainerInstance, hostContext, fiber); // TODO: Type this specific to this type of component.
- fiber.updateQueue = updatePayload; // If the update payload indicates that there is a change or if there
- // is a new ref we mark this as an update.
- if (updatePayload !== null) {
- return true;
- }
- return false;
- }
- function prepareToHydrateHostTextInstance(fiber) {
- var textInstance = fiber.stateNode;
- var textContent = fiber.memoizedProps;
- var shouldUpdate = hydrateTextInstance(textInstance, textContent, fiber);
- {
- if (shouldUpdate) {
- // We assume that prepareToHydrateHostTextInstance is called in a context where the
- // hydration parent is the parent host component of this host text.
- var returnFiber = hydrationParentFiber;
- if (returnFiber !== null) {
- switch (returnFiber.tag) {
- case HostRoot:
- {
- var parentContainer = returnFiber.stateNode.containerInfo;
- didNotMatchHydratedContainerTextInstance(parentContainer, textInstance, textContent);
- break;
- }
- case HostComponent:
- {
- var parentType = returnFiber.type;
- var parentProps = returnFiber.memoizedProps;
- var parentInstance = returnFiber.stateNode;
- didNotMatchHydratedTextInstance(parentType, parentProps, parentInstance, textInstance, textContent);
- break;
- }
- }
- }
- }
- }
- return shouldUpdate;
- }
- function skipPastDehydratedSuspenseInstance(fiber) {
- var suspenseState = fiber.memoizedState;
- var suspenseInstance = suspenseState !== null ? suspenseState.dehydrated : null;
- if (!suspenseInstance) {
- {
- throw Error( "Expected to have a hydrated suspense instance. This error is likely caused by a bug in React. Please file an issue." );
- }
- }
- return getNextHydratableInstanceAfterSuspenseInstance(suspenseInstance);
- }
- function popToNextHostParent(fiber) {
- var parent = fiber.return;
- while (parent !== null && parent.tag !== HostComponent && parent.tag !== HostRoot && parent.tag !== SuspenseComponent) {
- parent = parent.return;
- }
- hydrationParentFiber = parent;
- }
- function popHydrationState(fiber) {
- if (fiber !== hydrationParentFiber) {
- // We're deeper than the current hydration context, inside an inserted
- // tree.
- return false;
- }
- if (!isHydrating) {
- // If we're not currently hydrating but we're in a hydration context, then
- // we were an insertion and now need to pop up reenter hydration of our
- // siblings.
- popToNextHostParent(fiber);
- isHydrating = true;
- return false;
- }
- var type = fiber.type; // If we have any remaining hydratable nodes, we need to delete them now.
- // We only do this deeper than head and body since they tend to have random
- // other nodes in them. We also ignore components with pure text content in
- // side of them.
- // TODO: Better heuristic.
- if (fiber.tag !== HostComponent || type !== 'head' && type !== 'body' && !shouldSetTextContent(type, fiber.memoizedProps)) {
- var nextInstance = nextHydratableInstance;
- while (nextInstance) {
- deleteHydratableInstance(fiber, nextInstance);
- nextInstance = getNextHydratableSibling(nextInstance);
- }
- }
- popToNextHostParent(fiber);
- if (fiber.tag === SuspenseComponent) {
- nextHydratableInstance = skipPastDehydratedSuspenseInstance(fiber);
- } else {
- nextHydratableInstance = hydrationParentFiber ? getNextHydratableSibling(fiber.stateNode) : null;
- }
- return true;
- }
- function resetHydrationState() {
- hydrationParentFiber = null;
- nextHydratableInstance = null;
- isHydrating = false;
- }
- var ReactCurrentOwner$1 = ReactSharedInternals.ReactCurrentOwner;
- var didReceiveUpdate = false;
- var didWarnAboutBadClass;
- var didWarnAboutModulePatternComponent;
- var didWarnAboutContextTypeOnFunctionComponent;
- var didWarnAboutGetDerivedStateOnFunctionComponent;
- var didWarnAboutFunctionRefs;
- var didWarnAboutReassigningProps;
- var didWarnAboutRevealOrder;
- var didWarnAboutTailOptions;
- {
- didWarnAboutBadClass = {};
- didWarnAboutModulePatternComponent = {};
- didWarnAboutContextTypeOnFunctionComponent = {};
- didWarnAboutGetDerivedStateOnFunctionComponent = {};
- didWarnAboutFunctionRefs = {};
- didWarnAboutReassigningProps = false;
- didWarnAboutRevealOrder = {};
- didWarnAboutTailOptions = {};
- }
- function reconcileChildren(current, workInProgress, nextChildren, renderExpirationTime) {
- if (current === null) {
- // If this is a fresh new component that hasn't been rendered yet, we
- // won't update its child set by applying minimal side-effects. Instead,
- // we will add them all to the child before it gets rendered. That means
- // we can optimize this reconciliation pass by not tracking side-effects.
- workInProgress.child = mountChildFibers(workInProgress, null, nextChildren, renderExpirationTime);
- } else {
- // If the current child is the same as the work in progress, it means that
- // we haven't yet started any work on these children. Therefore, we use
- // the clone algorithm to create a copy of all the current children.
- // If we had any progressed work already, that is invalid at this point so
- // let's throw it out.
- workInProgress.child = reconcileChildFibers(workInProgress, current.child, nextChildren, renderExpirationTime);
- }
- }
- function forceUnmountCurrentAndReconcile(current, workInProgress, nextChildren, renderExpirationTime) {
- // This function is fork of reconcileChildren. It's used in cases where we
- // want to reconcile without matching against the existing set. This has the
- // effect of all current children being unmounted; even if the type and key
- // are the same, the old child is unmounted and a new child is created.
- //
- // To do this, we're going to go through the reconcile algorithm twice. In
- // the first pass, we schedule a deletion for all the current children by
- // passing null.
- workInProgress.child = reconcileChildFibers(workInProgress, current.child, null, renderExpirationTime); // In the second pass, we mount the new children. The trick here is that we
- // pass null in place of where we usually pass the current child set. This has
- // the effect of remounting all children regardless of whether their
- // identities match.
- workInProgress.child = reconcileChildFibers(workInProgress, null, nextChildren, renderExpirationTime);
- }
- function updateForwardRef(current, workInProgress, Component, nextProps, renderExpirationTime) {
- // TODO: current can be non-null here even if the component
- // hasn't yet mounted. This happens after the first render suspends.
- // We'll need to figure out if this is fine or can cause issues.
- {
- if (workInProgress.type !== workInProgress.elementType) {
- // Lazy component props can't be validated in createElement
- // because they're only guaranteed to be resolved here.
- var innerPropTypes = Component.propTypes;
- if (innerPropTypes) {
- checkPropTypes(innerPropTypes, nextProps, // Resolved props
- 'prop', getComponentName(Component), getCurrentFiberStackInDev);
- }
- }
- }
- var render = Component.render;
- var ref = workInProgress.ref; // The rest is a fork of updateFunctionComponent
- var nextChildren;
- prepareToReadContext(workInProgress, renderExpirationTime);
- {
- ReactCurrentOwner$1.current = workInProgress;
- setIsRendering(true);
- nextChildren = renderWithHooks(current, workInProgress, render, nextProps, ref, renderExpirationTime);
- if ( workInProgress.mode & StrictMode) {
- // Only double-render components with Hooks
- if (workInProgress.memoizedState !== null) {
- nextChildren = renderWithHooks(current, workInProgress, render, nextProps, ref, renderExpirationTime);
- }
- }
- setIsRendering(false);
- }
- if (current !== null && !didReceiveUpdate) {
- bailoutHooks(current, workInProgress, renderExpirationTime);
- return bailoutOnAlreadyFinishedWork(current, workInProgress, renderExpirationTime);
- } // React DevTools reads this flag.
- workInProgress.effectTag |= PerformedWork;
- reconcileChildren(current, workInProgress, nextChildren, renderExpirationTime);
- return workInProgress.child;
- }
- function updateMemoComponent(current, workInProgress, Component, nextProps, updateExpirationTime, renderExpirationTime) {
- if (current === null) {
- var type = Component.type;
- if (isSimpleFunctionComponent(type) && Component.compare === null && // SimpleMemoComponent codepath doesn't resolve outer props either.
- Component.defaultProps === undefined) {
- var resolvedType = type;
- {
- resolvedType = resolveFunctionForHotReloading(type);
- } // If this is a plain function component without default props,
- // and with only the default shallow comparison, we upgrade it
- // to a SimpleMemoComponent to allow fast path updates.
- workInProgress.tag = SimpleMemoComponent;
- workInProgress.type = resolvedType;
- {
- validateFunctionComponentInDev(workInProgress, type);
- }
- return updateSimpleMemoComponent(current, workInProgress, resolvedType, nextProps, updateExpirationTime, renderExpirationTime);
- }
- {
- var innerPropTypes = type.propTypes;
- if (innerPropTypes) {
- // Inner memo component props aren't currently validated in createElement.
- // We could move it there, but we'd still need this for lazy code path.
- checkPropTypes(innerPropTypes, nextProps, // Resolved props
- 'prop', getComponentName(type), getCurrentFiberStackInDev);
- }
- }
- var child = createFiberFromTypeAndProps(Component.type, null, nextProps, null, workInProgress.mode, renderExpirationTime);
- child.ref = workInProgress.ref;
- child.return = workInProgress;
- workInProgress.child = child;
- return child;
- }
- {
- var _type = Component.type;
- var _innerPropTypes = _type.propTypes;
- if (_innerPropTypes) {
- // Inner memo component props aren't currently validated in createElement.
- // We could move it there, but we'd still need this for lazy code path.
- checkPropTypes(_innerPropTypes, nextProps, // Resolved props
- 'prop', getComponentName(_type), getCurrentFiberStackInDev);
- }
- }
- var currentChild = current.child; // This is always exactly one child
- if (updateExpirationTime < renderExpirationTime) {
- // This will be the props with resolved defaultProps,
- // unlike current.memoizedProps which will be the unresolved ones.
- var prevProps = currentChild.memoizedProps; // Default to shallow comparison
- var compare = Component.compare;
- compare = compare !== null ? compare : shallowEqual;
- if (compare(prevProps, nextProps) && current.ref === workInProgress.ref) {
- return bailoutOnAlreadyFinishedWork(current, workInProgress, renderExpirationTime);
- }
- } // React DevTools reads this flag.
- workInProgress.effectTag |= PerformedWork;
- var newChild = createWorkInProgress(currentChild, nextProps);
- newChild.ref = workInProgress.ref;
- newChild.return = workInProgress;
- workInProgress.child = newChild;
- return newChild;
- }
- function updateSimpleMemoComponent(current, workInProgress, Component, nextProps, updateExpirationTime, renderExpirationTime) {
- // TODO: current can be non-null here even if the component
- // hasn't yet mounted. This happens when the inner render suspends.
- // We'll need to figure out if this is fine or can cause issues.
- {
- if (workInProgress.type !== workInProgress.elementType) {
- // Lazy component props can't be validated in createElement
- // because they're only guaranteed to be resolved here.
- var outerMemoType = workInProgress.elementType;
- if (outerMemoType.$$typeof === REACT_LAZY_TYPE) {
- // We warn when you define propTypes on lazy()
- // so let's just skip over it to find memo() outer wrapper.
- // Inner props for memo are validated later.
- outerMemoType = refineResolvedLazyComponent(outerMemoType);
- }
- var outerPropTypes = outerMemoType && outerMemoType.propTypes;
- if (outerPropTypes) {
- checkPropTypes(outerPropTypes, nextProps, // Resolved (SimpleMemoComponent has no defaultProps)
- 'prop', getComponentName(outerMemoType), getCurrentFiberStackInDev);
- } // Inner propTypes will be validated in the function component path.
- }
- }
- if (current !== null) {
- var prevProps = current.memoizedProps;
- if (shallowEqual(prevProps, nextProps) && current.ref === workInProgress.ref && ( // Prevent bailout if the implementation changed due to hot reload.
- workInProgress.type === current.type )) {
- didReceiveUpdate = false;
- if (updateExpirationTime < renderExpirationTime) {
- // The pending update priority was cleared at the beginning of
- // beginWork. We're about to bail out, but there might be additional
- // updates at a lower priority. Usually, the priority level of the
- // remaining updates is accumlated during the evaluation of the
- // component (i.e. when processing the update queue). But since since
- // we're bailing out early *without* evaluating the component, we need
- // to account for it here, too. Reset to the value of the current fiber.
- // NOTE: This only applies to SimpleMemoComponent, not MemoComponent,
- // because a MemoComponent fiber does not have hooks or an update queue;
- // rather, it wraps around an inner component, which may or may not
- // contains hooks.
- // TODO: Move the reset at in beginWork out of the common path so that
- // this is no longer necessary.
- workInProgress.expirationTime = current.expirationTime;
- return bailoutOnAlreadyFinishedWork(current, workInProgress, renderExpirationTime);
- }
- }
- }
- return updateFunctionComponent(current, workInProgress, Component, nextProps, renderExpirationTime);
- }
- function updateFragment(current, workInProgress, renderExpirationTime) {
- var nextChildren = workInProgress.pendingProps;
- reconcileChildren(current, workInProgress, nextChildren, renderExpirationTime);
- return workInProgress.child;
- }
- function updateMode(current, workInProgress, renderExpirationTime) {
- var nextChildren = workInProgress.pendingProps.children;
- reconcileChildren(current, workInProgress, nextChildren, renderExpirationTime);
- return workInProgress.child;
- }
- function updateProfiler(current, workInProgress, renderExpirationTime) {
- {
- workInProgress.effectTag |= Update;
- }
- var nextProps = workInProgress.pendingProps;
- var nextChildren = nextProps.children;
- reconcileChildren(current, workInProgress, nextChildren, renderExpirationTime);
- return workInProgress.child;
- }
- function markRef(current, workInProgress) {
- var ref = workInProgress.ref;
- if (current === null && ref !== null || current !== null && current.ref !== ref) {
- // Schedule a Ref effect
- workInProgress.effectTag |= Ref;
- }
- }
- function updateFunctionComponent(current, workInProgress, Component, nextProps, renderExpirationTime) {
- {
- if (workInProgress.type !== workInProgress.elementType) {
- // Lazy component props can't be validated in createElement
- // because they're only guaranteed to be resolved here.
- var innerPropTypes = Component.propTypes;
- if (innerPropTypes) {
- checkPropTypes(innerPropTypes, nextProps, // Resolved props
- 'prop', getComponentName(Component), getCurrentFiberStackInDev);
- }
- }
- }
- var context;
- {
- var unmaskedContext = getUnmaskedContext(workInProgress, Component, true);
- context = getMaskedContext(workInProgress, unmaskedContext);
- }
- var nextChildren;
- prepareToReadContext(workInProgress, renderExpirationTime);
- {
- ReactCurrentOwner$1.current = workInProgress;
- setIsRendering(true);
- nextChildren = renderWithHooks(current, workInProgress, Component, nextProps, context, renderExpirationTime);
- if ( workInProgress.mode & StrictMode) {
- // Only double-render components with Hooks
- if (workInProgress.memoizedState !== null) {
- nextChildren = renderWithHooks(current, workInProgress, Component, nextProps, context, renderExpirationTime);
- }
- }
- setIsRendering(false);
- }
- if (current !== null && !didReceiveUpdate) {
- bailoutHooks(current, workInProgress, renderExpirationTime);
- return bailoutOnAlreadyFinishedWork(current, workInProgress, renderExpirationTime);
- } // React DevTools reads this flag.
- workInProgress.effectTag |= PerformedWork;
- reconcileChildren(current, workInProgress, nextChildren, renderExpirationTime);
- return workInProgress.child;
- }
- function updateClassComponent(current, workInProgress, Component, nextProps, renderExpirationTime) {
- {
- if (workInProgress.type !== workInProgress.elementType) {
- // Lazy component props can't be validated in createElement
- // because they're only guaranteed to be resolved here.
- var innerPropTypes = Component.propTypes;
- if (innerPropTypes) {
- checkPropTypes(innerPropTypes, nextProps, // Resolved props
- 'prop', getComponentName(Component), getCurrentFiberStackInDev);
- }
- }
- } // Push context providers early to prevent context stack mismatches.
- // During mounting we don't know the child context yet as the instance doesn't exist.
- // We will invalidate the child context in finishClassComponent() right after rendering.
- var hasContext;
- if (isContextProvider(Component)) {
- hasContext = true;
- pushContextProvider(workInProgress);
- } else {
- hasContext = false;
- }
- prepareToReadContext(workInProgress, renderExpirationTime);
- var instance = workInProgress.stateNode;
- var shouldUpdate;
- if (instance === null) {
- if (current !== null) {
- // A class component without an instance only mounts if it suspended
- // inside a non-concurrent tree, in an inconsistent state. We want to
- // treat it like a new mount, even though an empty version of it already
- // committed. Disconnect the alternate pointers.
- current.alternate = null;
- workInProgress.alternate = null; // Since this is conceptually a new fiber, schedule a Placement effect
- workInProgress.effectTag |= Placement;
- } // In the initial pass we might need to construct the instance.
- constructClassInstance(workInProgress, Component, nextProps);
- mountClassInstance(workInProgress, Component, nextProps, renderExpirationTime);
- shouldUpdate = true;
- } else if (current === null) {
- // In a resume, we'll already have an instance we can reuse.
- shouldUpdate = resumeMountClassInstance(workInProgress, Component, nextProps, renderExpirationTime);
- } else {
- shouldUpdate = updateClassInstance(current, workInProgress, Component, nextProps, renderExpirationTime);
- }
- var nextUnitOfWork = finishClassComponent(current, workInProgress, Component, shouldUpdate, hasContext, renderExpirationTime);
- {
- var inst = workInProgress.stateNode;
- if (inst.props !== nextProps) {
- if (!didWarnAboutReassigningProps) {
- error('It looks like %s is reassigning its own `this.props` while rendering. ' + 'This is not supported and can lead to confusing bugs.', getComponentName(workInProgress.type) || 'a component');
- }
- didWarnAboutReassigningProps = true;
- }
- }
- return nextUnitOfWork;
- }
- function finishClassComponent(current, workInProgress, Component, shouldUpdate, hasContext, renderExpirationTime) {
- // Refs should update even if shouldComponentUpdate returns false
- markRef(current, workInProgress);
- var didCaptureError = (workInProgress.effectTag & DidCapture) !== NoEffect;
- if (!shouldUpdate && !didCaptureError) {
- // Context providers should defer to sCU for rendering
- if (hasContext) {
- invalidateContextProvider(workInProgress, Component, false);
- }
- return bailoutOnAlreadyFinishedWork(current, workInProgress, renderExpirationTime);
- }
- var instance = workInProgress.stateNode; // Rerender
- ReactCurrentOwner$1.current = workInProgress;
- var nextChildren;
- if (didCaptureError && typeof Component.getDerivedStateFromError !== 'function') {
- // If we captured an error, but getDerivedStateFromError is not defined,
- // unmount all the children. componentDidCatch will schedule an update to
- // re-render a fallback. This is temporary until we migrate everyone to
- // the new API.
- // TODO: Warn in a future release.
- nextChildren = null;
- {
- stopProfilerTimerIfRunning();
- }
- } else {
- {
- setIsRendering(true);
- nextChildren = instance.render();
- if ( workInProgress.mode & StrictMode) {
- instance.render();
- }
- setIsRendering(false);
- }
- } // React DevTools reads this flag.
- workInProgress.effectTag |= PerformedWork;
- if (current !== null && didCaptureError) {
- // If we're recovering from an error, reconcile without reusing any of
- // the existing children. Conceptually, the normal children and the children
- // that are shown on error are two different sets, so we shouldn't reuse
- // normal children even if their identities match.
- forceUnmountCurrentAndReconcile(current, workInProgress, nextChildren, renderExpirationTime);
- } else {
- reconcileChildren(current, workInProgress, nextChildren, renderExpirationTime);
- } // Memoize state using the values we just used to render.
- // TODO: Restructure so we never read values from the instance.
- workInProgress.memoizedState = instance.state; // The context might have changed so we need to recalculate it.
- if (hasContext) {
- invalidateContextProvider(workInProgress, Component, true);
- }
- return workInProgress.child;
- }
- function pushHostRootContext(workInProgress) {
- var root = workInProgress.stateNode;
- if (root.pendingContext) {
- pushTopLevelContextObject(workInProgress, root.pendingContext, root.pendingContext !== root.context);
- } else if (root.context) {
- // Should always be set
- pushTopLevelContextObject(workInProgress, root.context, false);
- }
- pushHostContainer(workInProgress, root.containerInfo);
- }
- function updateHostRoot(current, workInProgress, renderExpirationTime) {
- pushHostRootContext(workInProgress);
- var updateQueue = workInProgress.updateQueue;
- if (!(current !== null && updateQueue !== null)) {
- {
- throw Error( "If the root does not have an updateQueue, we should have already bailed out. This error is likely caused by a bug in React. Please file an issue." );
- }
- }
- var nextProps = workInProgress.pendingProps;
- var prevState = workInProgress.memoizedState;
- var prevChildren = prevState !== null ? prevState.element : null;
- cloneUpdateQueue(current, workInProgress);
- processUpdateQueue(workInProgress, nextProps, null, renderExpirationTime);
- var nextState = workInProgress.memoizedState; // Caution: React DevTools currently depends on this property
- // being called "element".
- var nextChildren = nextState.element;
- if (nextChildren === prevChildren) {
- // If the state is the same as before, that's a bailout because we had
- // no work that expires at this time.
- resetHydrationState();
- return bailoutOnAlreadyFinishedWork(current, workInProgress, renderExpirationTime);
- }
- var root = workInProgress.stateNode;
- if (root.hydrate && enterHydrationState(workInProgress)) {
- // If we don't have any current children this might be the first pass.
- // We always try to hydrate. If this isn't a hydration pass there won't
- // be any children to hydrate which is effectively the same thing as
- // not hydrating.
- var child = mountChildFibers(workInProgress, null, nextChildren, renderExpirationTime);
- workInProgress.child = child;
- var node = child;
- while (node) {
- // Mark each child as hydrating. This is a fast path to know whether this
- // tree is part of a hydrating tree. This is used to determine if a child
- // node has fully mounted yet, and for scheduling event replaying.
- // Conceptually this is similar to Placement in that a new subtree is
- // inserted into the React tree here. It just happens to not need DOM
- // mutations because it already exists.
- node.effectTag = node.effectTag & ~Placement | Hydrating;
- node = node.sibling;
- }
- } else {
- // Otherwise reset hydration state in case we aborted and resumed another
- // root.
- reconcileChildren(current, workInProgress, nextChildren, renderExpirationTime);
- resetHydrationState();
- }
- return workInProgress.child;
- }
- function updateHostComponent(current, workInProgress, renderExpirationTime) {
- pushHostContext(workInProgress);
- if (current === null) {
- tryToClaimNextHydratableInstance(workInProgress);
- }
- var type = workInProgress.type;
- var nextProps = workInProgress.pendingProps;
- var prevProps = current !== null ? current.memoizedProps : null;
- var nextChildren = nextProps.children;
- var isDirectTextChild = shouldSetTextContent(type, nextProps);
- if (isDirectTextChild) {
- // We special case a direct text child of a host node. This is a common
- // case. We won't handle it as a reified child. We will instead handle
- // this in the host environment that also has access to this prop. That
- // avoids allocating another HostText fiber and traversing it.
- nextChildren = null;
- } else if (prevProps !== null && shouldSetTextContent(type, prevProps)) {
- // If we're switching from a direct text child to a normal child, or to
- // empty, we need to schedule the text content to be reset.
- workInProgress.effectTag |= ContentReset;
- }
- markRef(current, workInProgress); // Check the host config to see if the children are offscreen/hidden.
- if (workInProgress.mode & ConcurrentMode && renderExpirationTime !== Never && shouldDeprioritizeSubtree(type, nextProps)) {
- {
- markSpawnedWork(Never);
- } // Schedule this fiber to re-render at offscreen priority. Then bailout.
- workInProgress.expirationTime = workInProgress.childExpirationTime = Never;
- return null;
- }
- reconcileChildren(current, workInProgress, nextChildren, renderExpirationTime);
- return workInProgress.child;
- }
- function updateHostText(current, workInProgress) {
- if (current === null) {
- tryToClaimNextHydratableInstance(workInProgress);
- } // Nothing to do here. This is terminal. We'll do the completion step
- // immediately after.
- return null;
- }
- function mountLazyComponent(_current, workInProgress, elementType, updateExpirationTime, renderExpirationTime) {
- if (_current !== null) {
- // A lazy component only mounts if it suspended inside a non-
- // concurrent tree, in an inconsistent state. We want to treat it like
- // a new mount, even though an empty version of it already committed.
- // Disconnect the alternate pointers.
- _current.alternate = null;
- workInProgress.alternate = null; // Since this is conceptually a new fiber, schedule a Placement effect
- workInProgress.effectTag |= Placement;
- }
- var props = workInProgress.pendingProps; // We can't start a User Timing measurement with correct label yet.
- // Cancel and resume right after we know the tag.
- cancelWorkTimer(workInProgress);
- var Component = readLazyComponentType(elementType); // Store the unwrapped component in the type.
- workInProgress.type = Component;
- var resolvedTag = workInProgress.tag = resolveLazyComponentTag(Component);
- startWorkTimer(workInProgress);
- var resolvedProps = resolveDefaultProps(Component, props);
- var child;
- switch (resolvedTag) {
- case FunctionComponent:
- {
- {
- validateFunctionComponentInDev(workInProgress, Component);
- workInProgress.type = Component = resolveFunctionForHotReloading(Component);
- }
- child = updateFunctionComponent(null, workInProgress, Component, resolvedProps, renderExpirationTime);
- return child;
- }
- case ClassComponent:
- {
- {
- workInProgress.type = Component = resolveClassForHotReloading(Component);
- }
- child = updateClassComponent(null, workInProgress, Component, resolvedProps, renderExpirationTime);
- return child;
- }
- case ForwardRef:
- {
- {
- workInProgress.type = Component = resolveForwardRefForHotReloading(Component);
- }
- child = updateForwardRef(null, workInProgress, Component, resolvedProps, renderExpirationTime);
- return child;
- }
- case MemoComponent:
- {
- {
- if (workInProgress.type !== workInProgress.elementType) {
- var outerPropTypes = Component.propTypes;
- if (outerPropTypes) {
- checkPropTypes(outerPropTypes, resolvedProps, // Resolved for outer only
- 'prop', getComponentName(Component), getCurrentFiberStackInDev);
- }
- }
- }
- child = updateMemoComponent(null, workInProgress, Component, resolveDefaultProps(Component.type, resolvedProps), // The inner type can have defaults too
- updateExpirationTime, renderExpirationTime);
- return child;
- }
- }
- var hint = '';
- {
- if (Component !== null && typeof Component === 'object' && Component.$$typeof === REACT_LAZY_TYPE) {
- hint = ' Did you wrap a component in React.lazy() more than once?';
- }
- } // This message intentionally doesn't mention ForwardRef or MemoComponent
- // because the fact that it's a separate type of work is an
- // implementation detail.
- {
- {
- throw Error( "Element type is invalid. Received a promise that resolves to: " + Component + ". Lazy element type must resolve to a class or function." + hint );
- }
- }
- }
- function mountIncompleteClassComponent(_current, workInProgress, Component, nextProps, renderExpirationTime) {
- if (_current !== null) {
- // An incomplete component only mounts if it suspended inside a non-
- // concurrent tree, in an inconsistent state. We want to treat it like
- // a new mount, even though an empty version of it already committed.
- // Disconnect the alternate pointers.
- _current.alternate = null;
- workInProgress.alternate = null; // Since this is conceptually a new fiber, schedule a Placement effect
- workInProgress.effectTag |= Placement;
- } // Promote the fiber to a class and try rendering again.
- workInProgress.tag = ClassComponent; // The rest of this function is a fork of `updateClassComponent`
- // Push context providers early to prevent context stack mismatches.
- // During mounting we don't know the child context yet as the instance doesn't exist.
- // We will invalidate the child context in finishClassComponent() right after rendering.
- var hasContext;
- if (isContextProvider(Component)) {
- hasContext = true;
- pushContextProvider(workInProgress);
- } else {
- hasContext = false;
- }
- prepareToReadContext(workInProgress, renderExpirationTime);
- constructClassInstance(workInProgress, Component, nextProps);
- mountClassInstance(workInProgress, Component, nextProps, renderExpirationTime);
- return finishClassComponent(null, workInProgress, Component, true, hasContext, renderExpirationTime);
- }
- function mountIndeterminateComponent(_current, workInProgress, Component, renderExpirationTime) {
- if (_current !== null) {
- // An indeterminate component only mounts if it suspended inside a non-
- // concurrent tree, in an inconsistent state. We want to treat it like
- // a new mount, even though an empty version of it already committed.
- // Disconnect the alternate pointers.
- _current.alternate = null;
- workInProgress.alternate = null; // Since this is conceptually a new fiber, schedule a Placement effect
- workInProgress.effectTag |= Placement;
- }
- var props = workInProgress.pendingProps;
- var context;
- {
- var unmaskedContext = getUnmaskedContext(workInProgress, Component, false);
- context = getMaskedContext(workInProgress, unmaskedContext);
- }
- prepareToReadContext(workInProgress, renderExpirationTime);
- var value;
- {
- if (Component.prototype && typeof Component.prototype.render === 'function') {
- var componentName = getComponentName(Component) || 'Unknown';
- if (!didWarnAboutBadClass[componentName]) {
- error("The <%s /> component appears to have a render method, but doesn't extend React.Component. " + 'This is likely to cause errors. Change %s to extend React.Component instead.', componentName, componentName);
- didWarnAboutBadClass[componentName] = true;
- }
- }
- if (workInProgress.mode & StrictMode) {
- ReactStrictModeWarnings.recordLegacyContextWarning(workInProgress, null);
- }
- setIsRendering(true);
- ReactCurrentOwner$1.current = workInProgress;
- value = renderWithHooks(null, workInProgress, Component, props, context, renderExpirationTime);
- setIsRendering(false);
- } // React DevTools reads this flag.
- workInProgress.effectTag |= PerformedWork;
- if (typeof value === 'object' && value !== null && typeof value.render === 'function' && value.$$typeof === undefined) {
- {
- var _componentName = getComponentName(Component) || 'Unknown';
- if (!didWarnAboutModulePatternComponent[_componentName]) {
- error('The <%s /> component appears to be a function component that returns a class instance. ' + 'Change %s to a class that extends React.Component instead. ' + "If you can't use a class try assigning the prototype on the function as a workaround. " + "`%s.prototype = React.Component.prototype`. Don't use an arrow function since it " + 'cannot be called with `new` by React.', _componentName, _componentName, _componentName);
- didWarnAboutModulePatternComponent[_componentName] = true;
- }
- } // Proceed under the assumption that this is a class instance
- workInProgress.tag = ClassComponent; // Throw out any hooks that were used.
- workInProgress.memoizedState = null;
- workInProgress.updateQueue = null; // Push context providers early to prevent context stack mismatches.
- // During mounting we don't know the child context yet as the instance doesn't exist.
- // We will invalidate the child context in finishClassComponent() right after rendering.
- var hasContext = false;
- if (isContextProvider(Component)) {
- hasContext = true;
- pushContextProvider(workInProgress);
- } else {
- hasContext = false;
- }
- workInProgress.memoizedState = value.state !== null && value.state !== undefined ? value.state : null;
- initializeUpdateQueue(workInProgress);
- var getDerivedStateFromProps = Component.getDerivedStateFromProps;
- if (typeof getDerivedStateFromProps === 'function') {
- applyDerivedStateFromProps(workInProgress, Component, getDerivedStateFromProps, props);
- }
- adoptClassInstance(workInProgress, value);
- mountClassInstance(workInProgress, Component, props, renderExpirationTime);
- return finishClassComponent(null, workInProgress, Component, true, hasContext, renderExpirationTime);
- } else {
- // Proceed under the assumption that this is a function component
- workInProgress.tag = FunctionComponent;
- {
- if ( workInProgress.mode & StrictMode) {
- // Only double-render components with Hooks
- if (workInProgress.memoizedState !== null) {
- value = renderWithHooks(null, workInProgress, Component, props, context, renderExpirationTime);
- }
- }
- }
- reconcileChildren(null, workInProgress, value, renderExpirationTime);
- {
- validateFunctionComponentInDev(workInProgress, Component);
- }
- return workInProgress.child;
- }
- }
- function validateFunctionComponentInDev(workInProgress, Component) {
- {
- if (Component) {
- if (Component.childContextTypes) {
- error('%s(...): childContextTypes cannot be defined on a function component.', Component.displayName || Component.name || 'Component');
- }
- }
- if (workInProgress.ref !== null) {
- var info = '';
- var ownerName = getCurrentFiberOwnerNameInDevOrNull();
- if (ownerName) {
- info += '\n\nCheck the render method of `' + ownerName + '`.';
- }
- var warningKey = ownerName || workInProgress._debugID || '';
- var debugSource = workInProgress._debugSource;
- if (debugSource) {
- warningKey = debugSource.fileName + ':' + debugSource.lineNumber;
- }
- if (!didWarnAboutFunctionRefs[warningKey]) {
- didWarnAboutFunctionRefs[warningKey] = true;
- error('Function components cannot be given refs. ' + 'Attempts to access this ref will fail. ' + 'Did you mean to use React.forwardRef()?%s', info);
- }
- }
- if (typeof Component.getDerivedStateFromProps === 'function') {
- var _componentName2 = getComponentName(Component) || 'Unknown';
- if (!didWarnAboutGetDerivedStateOnFunctionComponent[_componentName2]) {
- error('%s: Function components do not support getDerivedStateFromProps.', _componentName2);
- didWarnAboutGetDerivedStateOnFunctionComponent[_componentName2] = true;
- }
- }
- if (typeof Component.contextType === 'object' && Component.contextType !== null) {
- var _componentName3 = getComponentName(Component) || 'Unknown';
- if (!didWarnAboutContextTypeOnFunctionComponent[_componentName3]) {
- error('%s: Function components do not support contextType.', _componentName3);
- didWarnAboutContextTypeOnFunctionComponent[_componentName3] = true;
- }
- }
- }
- }
- var SUSPENDED_MARKER = {
- dehydrated: null,
- retryTime: NoWork
- };
- function shouldRemainOnFallback(suspenseContext, current, workInProgress) {
- // If the context is telling us that we should show a fallback, and we're not
- // already showing content, then we should show the fallback instead.
- return hasSuspenseContext(suspenseContext, ForceSuspenseFallback) && (current === null || current.memoizedState !== null);
- }
- function updateSuspenseComponent(current, workInProgress, renderExpirationTime) {
- var mode = workInProgress.mode;
- var nextProps = workInProgress.pendingProps; // This is used by DevTools to force a boundary to suspend.
- {
- if (shouldSuspend(workInProgress)) {
- workInProgress.effectTag |= DidCapture;
- }
- }
- var suspenseContext = suspenseStackCursor.current;
- var nextDidTimeout = false;
- var didSuspend = (workInProgress.effectTag & DidCapture) !== NoEffect;
- if (didSuspend || shouldRemainOnFallback(suspenseContext, current)) {
- // Something in this boundary's subtree already suspended. Switch to
- // rendering the fallback children.
- nextDidTimeout = true;
- workInProgress.effectTag &= ~DidCapture;
- } else {
- // Attempting the main content
- if (current === null || current.memoizedState !== null) {
- // This is a new mount or this boundary is already showing a fallback state.
- // Mark this subtree context as having at least one invisible parent that could
- // handle the fallback state.
- // Boundaries without fallbacks or should be avoided are not considered since
- // they cannot handle preferred fallback states.
- if (nextProps.fallback !== undefined && nextProps.unstable_avoidThisFallback !== true) {
- suspenseContext = addSubtreeSuspenseContext(suspenseContext, InvisibleParentSuspenseContext);
- }
- }
- }
- suspenseContext = setDefaultShallowSuspenseContext(suspenseContext);
- pushSuspenseContext(workInProgress, suspenseContext); // This next part is a bit confusing. If the children timeout, we switch to
- // showing the fallback children in place of the "primary" children.
- // However, we don't want to delete the primary children because then their
- // state will be lost (both the React state and the host state, e.g.
- // uncontrolled form inputs). Instead we keep them mounted and hide them.
- // Both the fallback children AND the primary children are rendered at the
- // same time. Once the primary children are un-suspended, we can delete
- // the fallback children — don't need to preserve their state.
- //
- // The two sets of children are siblings in the host environment, but
- // semantically, for purposes of reconciliation, they are two separate sets.
- // So we store them using two fragment fibers.
- //
- // However, we want to avoid allocating extra fibers for every placeholder.
- // They're only necessary when the children time out, because that's the
- // only time when both sets are mounted.
- //
- // So, the extra fragment fibers are only used if the children time out.
- // Otherwise, we render the primary children directly. This requires some
- // custom reconciliation logic to preserve the state of the primary
- // children. It's essentially a very basic form of re-parenting.
- if (current === null) {
- // If we're currently hydrating, try to hydrate this boundary.
- // But only if this has a fallback.
- if (nextProps.fallback !== undefined) {
- tryToClaimNextHydratableInstance(workInProgress); // This could've been a dehydrated suspense component.
- } // This is the initial mount. This branch is pretty simple because there's
- // no previous state that needs to be preserved.
- if (nextDidTimeout) {
- // Mount separate fragments for primary and fallback children.
- var nextFallbackChildren = nextProps.fallback;
- var primaryChildFragment = createFiberFromFragment(null, mode, NoWork, null);
- primaryChildFragment.return = workInProgress;
- if ((workInProgress.mode & BlockingMode) === NoMode) {
- // Outside of blocking mode, we commit the effects from the
- // partially completed, timed-out tree, too.
- var progressedState = workInProgress.memoizedState;
- var progressedPrimaryChild = progressedState !== null ? workInProgress.child.child : workInProgress.child;
- primaryChildFragment.child = progressedPrimaryChild;
- var progressedChild = progressedPrimaryChild;
- while (progressedChild !== null) {
- progressedChild.return = primaryChildFragment;
- progressedChild = progressedChild.sibling;
- }
- }
- var fallbackChildFragment = createFiberFromFragment(nextFallbackChildren, mode, renderExpirationTime, null);
- fallbackChildFragment.return = workInProgress;
- primaryChildFragment.sibling = fallbackChildFragment; // Skip the primary children, and continue working on the
- // fallback children.
- workInProgress.memoizedState = SUSPENDED_MARKER;
- workInProgress.child = primaryChildFragment;
- return fallbackChildFragment;
- } else {
- // Mount the primary children without an intermediate fragment fiber.
- var nextPrimaryChildren = nextProps.children;
- workInProgress.memoizedState = null;
- return workInProgress.child = mountChildFibers(workInProgress, null, nextPrimaryChildren, renderExpirationTime);
- }
- } else {
- // This is an update. This branch is more complicated because we need to
- // ensure the state of the primary children is preserved.
- var prevState = current.memoizedState;
- if (prevState !== null) {
- // wrapped in a fragment fiber.
- var currentPrimaryChildFragment = current.child;
- var currentFallbackChildFragment = currentPrimaryChildFragment.sibling;
- if (nextDidTimeout) {
- // Still timed out. Reuse the current primary children by cloning
- // its fragment. We're going to skip over these entirely.
- var _nextFallbackChildren2 = nextProps.fallback;
- var _primaryChildFragment2 = createWorkInProgress(currentPrimaryChildFragment, currentPrimaryChildFragment.pendingProps);
- _primaryChildFragment2.return = workInProgress;
- if ((workInProgress.mode & BlockingMode) === NoMode) {
- // Outside of blocking mode, we commit the effects from the
- // partially completed, timed-out tree, too.
- var _progressedState = workInProgress.memoizedState;
- var _progressedPrimaryChild = _progressedState !== null ? workInProgress.child.child : workInProgress.child;
- if (_progressedPrimaryChild !== currentPrimaryChildFragment.child) {
- _primaryChildFragment2.child = _progressedPrimaryChild;
- var _progressedChild2 = _progressedPrimaryChild;
- while (_progressedChild2 !== null) {
- _progressedChild2.return = _primaryChildFragment2;
- _progressedChild2 = _progressedChild2.sibling;
- }
- }
- } // Because primaryChildFragment is a new fiber that we're inserting as the
- // parent of a new tree, we need to set its treeBaseDuration.
- if ( workInProgress.mode & ProfileMode) {
- // treeBaseDuration is the sum of all the child tree base durations.
- var _treeBaseDuration = 0;
- var _hiddenChild = _primaryChildFragment2.child;
- while (_hiddenChild !== null) {
- _treeBaseDuration += _hiddenChild.treeBaseDuration;
- _hiddenChild = _hiddenChild.sibling;
- }
- _primaryChildFragment2.treeBaseDuration = _treeBaseDuration;
- } // Clone the fallback child fragment, too. These we'll continue
- // working on.
- var _fallbackChildFragment2 = createWorkInProgress(currentFallbackChildFragment, _nextFallbackChildren2);
- _fallbackChildFragment2.return = workInProgress;
- _primaryChildFragment2.sibling = _fallbackChildFragment2;
- _primaryChildFragment2.childExpirationTime = NoWork; // Skip the primary children, and continue working on the
- // fallback children.
- workInProgress.memoizedState = SUSPENDED_MARKER;
- workInProgress.child = _primaryChildFragment2;
- return _fallbackChildFragment2;
- } else {
- // No longer suspended. Switch back to showing the primary children,
- // and remove the intermediate fragment fiber.
- var _nextPrimaryChildren = nextProps.children;
- var currentPrimaryChild = currentPrimaryChildFragment.child;
- var primaryChild = reconcileChildFibers(workInProgress, currentPrimaryChild, _nextPrimaryChildren, renderExpirationTime); // If this render doesn't suspend, we need to delete the fallback
- // children. Wait until the complete phase, after we've confirmed the
- // fallback is no longer needed.
- // TODO: Would it be better to store the fallback fragment on
- // the stateNode?
- // Continue rendering the children, like we normally do.
- workInProgress.memoizedState = null;
- return workInProgress.child = primaryChild;
- }
- } else {
- // The current tree has not already timed out. That means the primary
- // children are not wrapped in a fragment fiber.
- var _currentPrimaryChild = current.child;
- if (nextDidTimeout) {
- // Timed out. Wrap the children in a fragment fiber to keep them
- // separate from the fallback children.
- var _nextFallbackChildren3 = nextProps.fallback;
- var _primaryChildFragment3 = createFiberFromFragment( // It shouldn't matter what the pending props are because we aren't
- // going to render this fragment.
- null, mode, NoWork, null);
- _primaryChildFragment3.return = workInProgress;
- _primaryChildFragment3.child = _currentPrimaryChild;
- if (_currentPrimaryChild !== null) {
- _currentPrimaryChild.return = _primaryChildFragment3;
- } // Even though we're creating a new fiber, there are no new children,
- // because we're reusing an already mounted tree. So we don't need to
- // schedule a placement.
- // primaryChildFragment.effectTag |= Placement;
- if ((workInProgress.mode & BlockingMode) === NoMode) {
- // Outside of blocking mode, we commit the effects from the
- // partially completed, timed-out tree, too.
- var _progressedState2 = workInProgress.memoizedState;
- var _progressedPrimaryChild2 = _progressedState2 !== null ? workInProgress.child.child : workInProgress.child;
- _primaryChildFragment3.child = _progressedPrimaryChild2;
- var _progressedChild3 = _progressedPrimaryChild2;
- while (_progressedChild3 !== null) {
- _progressedChild3.return = _primaryChildFragment3;
- _progressedChild3 = _progressedChild3.sibling;
- }
- } // Because primaryChildFragment is a new fiber that we're inserting as the
- // parent of a new tree, we need to set its treeBaseDuration.
- if ( workInProgress.mode & ProfileMode) {
- // treeBaseDuration is the sum of all the child tree base durations.
- var _treeBaseDuration2 = 0;
- var _hiddenChild2 = _primaryChildFragment3.child;
- while (_hiddenChild2 !== null) {
- _treeBaseDuration2 += _hiddenChild2.treeBaseDuration;
- _hiddenChild2 = _hiddenChild2.sibling;
- }
- _primaryChildFragment3.treeBaseDuration = _treeBaseDuration2;
- } // Create a fragment from the fallback children, too.
- var _fallbackChildFragment3 = createFiberFromFragment(_nextFallbackChildren3, mode, renderExpirationTime, null);
- _fallbackChildFragment3.return = workInProgress;
- _primaryChildFragment3.sibling = _fallbackChildFragment3;
- _fallbackChildFragment3.effectTag |= Placement;
- _primaryChildFragment3.childExpirationTime = NoWork; // Skip the primary children, and continue working on the
- // fallback children.
- workInProgress.memoizedState = SUSPENDED_MARKER;
- workInProgress.child = _primaryChildFragment3;
- return _fallbackChildFragment3;
- } else {
- // Still haven't timed out. Continue rendering the children, like we
- // normally do.
- workInProgress.memoizedState = null;
- var _nextPrimaryChildren2 = nextProps.children;
- return workInProgress.child = reconcileChildFibers(workInProgress, _currentPrimaryChild, _nextPrimaryChildren2, renderExpirationTime);
- }
- }
- }
- }
- function scheduleWorkOnFiber(fiber, renderExpirationTime) {
- if (fiber.expirationTime < renderExpirationTime) {
- fiber.expirationTime = renderExpirationTime;
- }
- var alternate = fiber.alternate;
- if (alternate !== null && alternate.expirationTime < renderExpirationTime) {
- alternate.expirationTime = renderExpirationTime;
- }
- scheduleWorkOnParentPath(fiber.return, renderExpirationTime);
- }
- function propagateSuspenseContextChange(workInProgress, firstChild, renderExpirationTime) {
- // Mark any Suspense boundaries with fallbacks as having work to do.
- // If they were previously forced into fallbacks, they may now be able
- // to unblock.
- var node = firstChild;
- while (node !== null) {
- if (node.tag === SuspenseComponent) {
- var state = node.memoizedState;
- if (state !== null) {
- scheduleWorkOnFiber(node, renderExpirationTime);
- }
- } else if (node.tag === SuspenseListComponent) {
- // If the tail is hidden there might not be an Suspense boundaries
- // to schedule work on. In this case we have to schedule it on the
- // list itself.
- // We don't have to traverse to the children of the list since
- // the list will propagate the change when it rerenders.
- scheduleWorkOnFiber(node, renderExpirationTime);
- } else if (node.child !== null) {
- node.child.return = node;
- node = node.child;
- continue;
- }
- if (node === workInProgress) {
- return;
- }
- while (node.sibling === null) {
- if (node.return === null || node.return === workInProgress) {
- return;
- }
- node = node.return;
- }
- node.sibling.return = node.return;
- node = node.sibling;
- }
- }
- function findLastContentRow(firstChild) {
- // This is going to find the last row among these children that is already
- // showing content on the screen, as opposed to being in fallback state or
- // new. If a row has multiple Suspense boundaries, any of them being in the
- // fallback state, counts as the whole row being in a fallback state.
- // Note that the "rows" will be workInProgress, but any nested children
- // will still be current since we haven't rendered them yet. The mounted
- // order may not be the same as the new order. We use the new order.
- var row = firstChild;
- var lastContentRow = null;
- while (row !== null) {
- var currentRow = row.alternate; // New rows can't be content rows.
- if (currentRow !== null && findFirstSuspended(currentRow) === null) {
- lastContentRow = row;
- }
- row = row.sibling;
- }
- return lastContentRow;
- }
- function validateRevealOrder(revealOrder) {
- {
- if (revealOrder !== undefined && revealOrder !== 'forwards' && revealOrder !== 'backwards' && revealOrder !== 'together' && !didWarnAboutRevealOrder[revealOrder]) {
- didWarnAboutRevealOrder[revealOrder] = true;
- if (typeof revealOrder === 'string') {
- switch (revealOrder.toLowerCase()) {
- case 'together':
- case 'forwards':
- case 'backwards':
- {
- error('"%s" is not a valid value for revealOrder on <SuspenseList />. ' + 'Use lowercase "%s" instead.', revealOrder, revealOrder.toLowerCase());
- break;
- }
- case 'forward':
- case 'backward':
- {
- error('"%s" is not a valid value for revealOrder on <SuspenseList />. ' + 'React uses the -s suffix in the spelling. Use "%ss" instead.', revealOrder, revealOrder.toLowerCase());
- break;
- }
- default:
- error('"%s" is not a supported revealOrder on <SuspenseList />. ' + 'Did you mean "together", "forwards" or "backwards"?', revealOrder);
- break;
- }
- } else {
- error('%s is not a supported value for revealOrder on <SuspenseList />. ' + 'Did you mean "together", "forwards" or "backwards"?', revealOrder);
- }
- }
- }
- }
- function validateTailOptions(tailMode, revealOrder) {
- {
- if (tailMode !== undefined && !didWarnAboutTailOptions[tailMode]) {
- if (tailMode !== 'collapsed' && tailMode !== 'hidden') {
- didWarnAboutTailOptions[tailMode] = true;
- error('"%s" is not a supported value for tail on <SuspenseList />. ' + 'Did you mean "collapsed" or "hidden"?', tailMode);
- } else if (revealOrder !== 'forwards' && revealOrder !== 'backwards') {
- didWarnAboutTailOptions[tailMode] = true;
- error('<SuspenseList tail="%s" /> is only valid if revealOrder is ' + '"forwards" or "backwards". ' + 'Did you mean to specify revealOrder="forwards"?', tailMode);
- }
- }
- }
- }
- function validateSuspenseListNestedChild(childSlot, index) {
- {
- var isArray = Array.isArray(childSlot);
- var isIterable = !isArray && typeof getIteratorFn(childSlot) === 'function';
- if (isArray || isIterable) {
- var type = isArray ? 'array' : 'iterable';
- error('A nested %s was passed to row #%s in <SuspenseList />. Wrap it in ' + 'an additional SuspenseList to configure its revealOrder: ' + '<SuspenseList revealOrder=...> ... ' + '<SuspenseList revealOrder=...>{%s}</SuspenseList> ... ' + '</SuspenseList>', type, index, type);
- return false;
- }
- }
- return true;
- }
- function validateSuspenseListChildren(children, revealOrder) {
- {
- if ((revealOrder === 'forwards' || revealOrder === 'backwards') && children !== undefined && children !== null && children !== false) {
- if (Array.isArray(children)) {
- for (var i = 0; i < children.length; i++) {
- if (!validateSuspenseListNestedChild(children[i], i)) {
- return;
- }
- }
- } else {
- var iteratorFn = getIteratorFn(children);
- if (typeof iteratorFn === 'function') {
- var childrenIterator = iteratorFn.call(children);
- if (childrenIterator) {
- var step = childrenIterator.next();
- var _i = 0;
- for (; !step.done; step = childrenIterator.next()) {
- if (!validateSuspenseListNestedChild(step.value, _i)) {
- return;
- }
- _i++;
- }
- }
- } else {
- error('A single row was passed to a <SuspenseList revealOrder="%s" />. ' + 'This is not useful since it needs multiple rows. ' + 'Did you mean to pass multiple children or an array?', revealOrder);
- }
- }
- }
- }
- }
- function initSuspenseListRenderState(workInProgress, isBackwards, tail, lastContentRow, tailMode, lastEffectBeforeRendering) {
- var renderState = workInProgress.memoizedState;
- if (renderState === null) {
- workInProgress.memoizedState = {
- isBackwards: isBackwards,
- rendering: null,
- renderingStartTime: 0,
- last: lastContentRow,
- tail: tail,
- tailExpiration: 0,
- tailMode: tailMode,
- lastEffect: lastEffectBeforeRendering
- };
- } else {
- // We can reuse the existing object from previous renders.
- renderState.isBackwards = isBackwards;
- renderState.rendering = null;
- renderState.renderingStartTime = 0;
- renderState.last = lastContentRow;
- renderState.tail = tail;
- renderState.tailExpiration = 0;
- renderState.tailMode = tailMode;
- renderState.lastEffect = lastEffectBeforeRendering;
- }
- } // This can end up rendering this component multiple passes.
- // The first pass splits the children fibers into two sets. A head and tail.
- // We first render the head. If anything is in fallback state, we do another
- // pass through beginWork to rerender all children (including the tail) with
- // the force suspend context. If the first render didn't have anything in
- // in fallback state. Then we render each row in the tail one-by-one.
- // That happens in the completeWork phase without going back to beginWork.
- function updateSuspenseListComponent(current, workInProgress, renderExpirationTime) {
- var nextProps = workInProgress.pendingProps;
- var revealOrder = nextProps.revealOrder;
- var tailMode = nextProps.tail;
- var newChildren = nextProps.children;
- validateRevealOrder(revealOrder);
- validateTailOptions(tailMode, revealOrder);
- validateSuspenseListChildren(newChildren, revealOrder);
- reconcileChildren(current, workInProgress, newChildren, renderExpirationTime);
- var suspenseContext = suspenseStackCursor.current;
- var shouldForceFallback = hasSuspenseContext(suspenseContext, ForceSuspenseFallback);
- if (shouldForceFallback) {
- suspenseContext = setShallowSuspenseContext(suspenseContext, ForceSuspenseFallback);
- workInProgress.effectTag |= DidCapture;
- } else {
- var didSuspendBefore = current !== null && (current.effectTag & DidCapture) !== NoEffect;
- if (didSuspendBefore) {
- // If we previously forced a fallback, we need to schedule work
- // on any nested boundaries to let them know to try to render
- // again. This is the same as context updating.
- propagateSuspenseContextChange(workInProgress, workInProgress.child, renderExpirationTime);
- }
- suspenseContext = setDefaultShallowSuspenseContext(suspenseContext);
- }
- pushSuspenseContext(workInProgress, suspenseContext);
- if ((workInProgress.mode & BlockingMode) === NoMode) {
- // Outside of blocking mode, SuspenseList doesn't work so we just
- // use make it a noop by treating it as the default revealOrder.
- workInProgress.memoizedState = null;
- } else {
- switch (revealOrder) {
- case 'forwards':
- {
- var lastContentRow = findLastContentRow(workInProgress.child);
- var tail;
- if (lastContentRow === null) {
- // The whole list is part of the tail.
- // TODO: We could fast path by just rendering the tail now.
- tail = workInProgress.child;
- workInProgress.child = null;
- } else {
- // Disconnect the tail rows after the content row.
- // We're going to render them separately later.
- tail = lastContentRow.sibling;
- lastContentRow.sibling = null;
- }
- initSuspenseListRenderState(workInProgress, false, // isBackwards
- tail, lastContentRow, tailMode, workInProgress.lastEffect);
- break;
- }
- case 'backwards':
- {
- // We're going to find the first row that has existing content.
- // At the same time we're going to reverse the list of everything
- // we pass in the meantime. That's going to be our tail in reverse
- // order.
- var _tail = null;
- var row = workInProgress.child;
- workInProgress.child = null;
- while (row !== null) {
- var currentRow = row.alternate; // New rows can't be content rows.
- if (currentRow !== null && findFirstSuspended(currentRow) === null) {
- // This is the beginning of the main content.
- workInProgress.child = row;
- break;
- }
- var nextRow = row.sibling;
- row.sibling = _tail;
- _tail = row;
- row = nextRow;
- } // TODO: If workInProgress.child is null, we can continue on the tail immediately.
- initSuspenseListRenderState(workInProgress, true, // isBackwards
- _tail, null, // last
- tailMode, workInProgress.lastEffect);
- break;
- }
- case 'together':
- {
- initSuspenseListRenderState(workInProgress, false, // isBackwards
- null, // tail
- null, // last
- undefined, workInProgress.lastEffect);
- break;
- }
- default:
- {
- // The default reveal order is the same as not having
- // a boundary.
- workInProgress.memoizedState = null;
- }
- }
- }
- return workInProgress.child;
- }
- function updatePortalComponent(current, workInProgress, renderExpirationTime) {
- pushHostContainer(workInProgress, workInProgress.stateNode.containerInfo);
- var nextChildren = workInProgress.pendingProps;
- if (current === null) {
- // Portals are special because we don't append the children during mount
- // but at commit. Therefore we need to track insertions which the normal
- // flow doesn't do during mount. This doesn't happen at the root because
- // the root always starts with a "current" with a null child.
- // TODO: Consider unifying this with how the root works.
- workInProgress.child = reconcileChildFibers(workInProgress, null, nextChildren, renderExpirationTime);
- } else {
- reconcileChildren(current, workInProgress, nextChildren, renderExpirationTime);
- }
- return workInProgress.child;
- }
- function updateContextProvider(current, workInProgress, renderExpirationTime) {
- var providerType = workInProgress.type;
- var context = providerType._context;
- var newProps = workInProgress.pendingProps;
- var oldProps = workInProgress.memoizedProps;
- var newValue = newProps.value;
- {
- var providerPropTypes = workInProgress.type.propTypes;
- if (providerPropTypes) {
- checkPropTypes(providerPropTypes, newProps, 'prop', 'Context.Provider', getCurrentFiberStackInDev);
- }
- }
- pushProvider(workInProgress, newValue);
- if (oldProps !== null) {
- var oldValue = oldProps.value;
- var changedBits = calculateChangedBits(context, newValue, oldValue);
- if (changedBits === 0) {
- // No change. Bailout early if children are the same.
- if (oldProps.children === newProps.children && !hasContextChanged()) {
- return bailoutOnAlreadyFinishedWork(current, workInProgress, renderExpirationTime);
- }
- } else {
- // The context value changed. Search for matching consumers and schedule
- // them to update.
- propagateContextChange(workInProgress, context, changedBits, renderExpirationTime);
- }
- }
- var newChildren = newProps.children;
- reconcileChildren(current, workInProgress, newChildren, renderExpirationTime);
- return workInProgress.child;
- }
- var hasWarnedAboutUsingContextAsConsumer = false;
- function updateContextConsumer(current, workInProgress, renderExpirationTime) {
- var context = workInProgress.type; // The logic below for Context differs depending on PROD or DEV mode. In
- // DEV mode, we create a separate object for Context.Consumer that acts
- // like a proxy to Context. This proxy object adds unnecessary code in PROD
- // so we use the old behaviour (Context.Consumer references Context) to
- // reduce size and overhead. The separate object references context via
- // a property called "_context", which also gives us the ability to check
- // in DEV mode if this property exists or not and warn if it does not.
- {
- if (context._context === undefined) {
- // This may be because it's a Context (rather than a Consumer).
- // Or it may be because it's older React where they're the same thing.
- // We only want to warn if we're sure it's a new React.
- if (context !== context.Consumer) {
- if (!hasWarnedAboutUsingContextAsConsumer) {
- hasWarnedAboutUsingContextAsConsumer = true;
- error('Rendering <Context> directly is not supported and will be removed in ' + 'a future major release. Did you mean to render <Context.Consumer> instead?');
- }
- }
- } else {
- context = context._context;
- }
- }
- var newProps = workInProgress.pendingProps;
- var render = newProps.children;
- {
- if (typeof render !== 'function') {
- error('A context consumer was rendered with multiple children, or a child ' + "that isn't a function. A context consumer expects a single child " + 'that is a function. If you did pass a function, make sure there ' + 'is no trailing or leading whitespace around it.');
- }
- }
- prepareToReadContext(workInProgress, renderExpirationTime);
- var newValue = readContext(context, newProps.unstable_observedBits);
- var newChildren;
- {
- ReactCurrentOwner$1.current = workInProgress;
- setIsRendering(true);
- newChildren = render(newValue);
- setIsRendering(false);
- } // React DevTools reads this flag.
- workInProgress.effectTag |= PerformedWork;
- reconcileChildren(current, workInProgress, newChildren, renderExpirationTime);
- return workInProgress.child;
- }
- function markWorkInProgressReceivedUpdate() {
- didReceiveUpdate = true;
- }
- function bailoutOnAlreadyFinishedWork(current, workInProgress, renderExpirationTime) {
- cancelWorkTimer(workInProgress);
- if (current !== null) {
- // Reuse previous dependencies
- workInProgress.dependencies = current.dependencies;
- }
- {
- // Don't update "base" render times for bailouts.
- stopProfilerTimerIfRunning();
- }
- var updateExpirationTime = workInProgress.expirationTime;
- if (updateExpirationTime !== NoWork) {
- markUnprocessedUpdateTime(updateExpirationTime);
- } // Check if the children have any pending work.
- var childExpirationTime = workInProgress.childExpirationTime;
- if (childExpirationTime < renderExpirationTime) {
- // The children don't have any work either. We can skip them.
- // TODO: Once we add back resuming, we should check if the children are
- // a work-in-progress set. If so, we need to transfer their effects.
- return null;
- } else {
- // This fiber doesn't have work, but its subtree does. Clone the child
- // fibers and continue.
- cloneChildFibers(current, workInProgress);
- return workInProgress.child;
- }
- }
- function remountFiber(current, oldWorkInProgress, newWorkInProgress) {
- {
- var returnFiber = oldWorkInProgress.return;
- if (returnFiber === null) {
- throw new Error('Cannot swap the root fiber.');
- } // Disconnect from the old current.
- // It will get deleted.
- current.alternate = null;
- oldWorkInProgress.alternate = null; // Connect to the new tree.
- newWorkInProgress.index = oldWorkInProgress.index;
- newWorkInProgress.sibling = oldWorkInProgress.sibling;
- newWorkInProgress.return = oldWorkInProgress.return;
- newWorkInProgress.ref = oldWorkInProgress.ref; // Replace the child/sibling pointers above it.
- if (oldWorkInProgress === returnFiber.child) {
- returnFiber.child = newWorkInProgress;
- } else {
- var prevSibling = returnFiber.child;
- if (prevSibling === null) {
- throw new Error('Expected parent to have a child.');
- }
- while (prevSibling.sibling !== oldWorkInProgress) {
- prevSibling = prevSibling.sibling;
- if (prevSibling === null) {
- throw new Error('Expected to find the previous sibling.');
- }
- }
- prevSibling.sibling = newWorkInProgress;
- } // Delete the old fiber and place the new one.
- // Since the old fiber is disconnected, we have to schedule it manually.
- var last = returnFiber.lastEffect;
- if (last !== null) {
- last.nextEffect = current;
- returnFiber.lastEffect = current;
- } else {
- returnFiber.firstEffect = returnFiber.lastEffect = current;
- }
- current.nextEffect = null;
- current.effectTag = Deletion;
- newWorkInProgress.effectTag |= Placement; // Restart work from the new fiber.
- return newWorkInProgress;
- }
- }
- function beginWork(current, workInProgress, renderExpirationTime) {
- var updateExpirationTime = workInProgress.expirationTime;
- {
- if (workInProgress._debugNeedsRemount && current !== null) {
- // This will restart the begin phase with a new fiber.
- return remountFiber(current, workInProgress, createFiberFromTypeAndProps(workInProgress.type, workInProgress.key, workInProgress.pendingProps, workInProgress._debugOwner || null, workInProgress.mode, workInProgress.expirationTime));
- }
- }
- if (current !== null) {
- var oldProps = current.memoizedProps;
- var newProps = workInProgress.pendingProps;
- if (oldProps !== newProps || hasContextChanged() || ( // Force a re-render if the implementation changed due to hot reload:
- workInProgress.type !== current.type )) {
- // If props or context changed, mark the fiber as having performed work.
- // This may be unset if the props are determined to be equal later (memo).
- didReceiveUpdate = true;
- } else if (updateExpirationTime < renderExpirationTime) {
- didReceiveUpdate = false; // This fiber does not have any pending work. Bailout without entering
- // the begin phase. There's still some bookkeeping we that needs to be done
- // in this optimized path, mostly pushing stuff onto the stack.
- switch (workInProgress.tag) {
- case HostRoot:
- pushHostRootContext(workInProgress);
- resetHydrationState();
- break;
- case HostComponent:
- pushHostContext(workInProgress);
- if (workInProgress.mode & ConcurrentMode && renderExpirationTime !== Never && shouldDeprioritizeSubtree(workInProgress.type, newProps)) {
- {
- markSpawnedWork(Never);
- } // Schedule this fiber to re-render at offscreen priority. Then bailout.
- workInProgress.expirationTime = workInProgress.childExpirationTime = Never;
- return null;
- }
- break;
- case ClassComponent:
- {
- var Component = workInProgress.type;
- if (isContextProvider(Component)) {
- pushContextProvider(workInProgress);
- }
- break;
- }
- case HostPortal:
- pushHostContainer(workInProgress, workInProgress.stateNode.containerInfo);
- break;
- case ContextProvider:
- {
- var newValue = workInProgress.memoizedProps.value;
- pushProvider(workInProgress, newValue);
- break;
- }
- case Profiler:
- {
- // Profiler should only call onRender when one of its descendants actually rendered.
- var hasChildWork = workInProgress.childExpirationTime >= renderExpirationTime;
- if (hasChildWork) {
- workInProgress.effectTag |= Update;
- }
- }
- break;
- case SuspenseComponent:
- {
- var state = workInProgress.memoizedState;
- if (state !== null) {
- // whether to retry the primary children, or to skip over it and
- // go straight to the fallback. Check the priority of the primary
- // child fragment.
- var primaryChildFragment = workInProgress.child;
- var primaryChildExpirationTime = primaryChildFragment.childExpirationTime;
- if (primaryChildExpirationTime !== NoWork && primaryChildExpirationTime >= renderExpirationTime) {
- // The primary children have pending work. Use the normal path
- // to attempt to render the primary children again.
- return updateSuspenseComponent(current, workInProgress, renderExpirationTime);
- } else {
- pushSuspenseContext(workInProgress, setDefaultShallowSuspenseContext(suspenseStackCursor.current)); // The primary children do not have pending work with sufficient
- // priority. Bailout.
- var child = bailoutOnAlreadyFinishedWork(current, workInProgress, renderExpirationTime);
- if (child !== null) {
- // The fallback children have pending work. Skip over the
- // primary children and work on the fallback.
- return child.sibling;
- } else {
- return null;
- }
- }
- } else {
- pushSuspenseContext(workInProgress, setDefaultShallowSuspenseContext(suspenseStackCursor.current));
- }
- break;
- }
- case SuspenseListComponent:
- {
- var didSuspendBefore = (current.effectTag & DidCapture) !== NoEffect;
- var _hasChildWork = workInProgress.childExpirationTime >= renderExpirationTime;
- if (didSuspendBefore) {
- if (_hasChildWork) {
- // If something was in fallback state last time, and we have all the
- // same children then we're still in progressive loading state.
- // Something might get unblocked by state updates or retries in the
- // tree which will affect the tail. So we need to use the normal
- // path to compute the correct tail.
- return updateSuspenseListComponent(current, workInProgress, renderExpirationTime);
- } // If none of the children had any work, that means that none of
- // them got retried so they'll still be blocked in the same way
- // as before. We can fast bail out.
- workInProgress.effectTag |= DidCapture;
- } // If nothing suspended before and we're rendering the same children,
- // then the tail doesn't matter. Anything new that suspends will work
- // in the "together" mode, so we can continue from the state we had.
- var renderState = workInProgress.memoizedState;
- if (renderState !== null) {
- // Reset to the "together" mode in case we've started a different
- // update in the past but didn't complete it.
- renderState.rendering = null;
- renderState.tail = null;
- }
- pushSuspenseContext(workInProgress, suspenseStackCursor.current);
- if (_hasChildWork) {
- break;
- } else {
- // If none of the children had any work, that means that none of
- // them got retried so they'll still be blocked in the same way
- // as before. We can fast bail out.
- return null;
- }
- }
- }
- return bailoutOnAlreadyFinishedWork(current, workInProgress, renderExpirationTime);
- } else {
- // An update was scheduled on this fiber, but there are no new props
- // nor legacy context. Set this to false. If an update queue or context
- // consumer produces a changed value, it will set this to true. Otherwise,
- // the component will assume the children have not changed and bail out.
- didReceiveUpdate = false;
- }
- } else {
- didReceiveUpdate = false;
- } // Before entering the begin phase, clear pending update priority.
- // TODO: This assumes that we're about to evaluate the component and process
- // the update queue. However, there's an exception: SimpleMemoComponent
- // sometimes bails out later in the begin phase. This indicates that we should
- // move this assignment out of the common path and into each branch.
- workInProgress.expirationTime = NoWork;
- switch (workInProgress.tag) {
- case IndeterminateComponent:
- {
- return mountIndeterminateComponent(current, workInProgress, workInProgress.type, renderExpirationTime);
- }
- case LazyComponent:
- {
- var elementType = workInProgress.elementType;
- return mountLazyComponent(current, workInProgress, elementType, updateExpirationTime, renderExpirationTime);
- }
- case FunctionComponent:
- {
- var _Component = workInProgress.type;
- var unresolvedProps = workInProgress.pendingProps;
- var resolvedProps = workInProgress.elementType === _Component ? unresolvedProps : resolveDefaultProps(_Component, unresolvedProps);
- return updateFunctionComponent(current, workInProgress, _Component, resolvedProps, renderExpirationTime);
- }
- case ClassComponent:
- {
- var _Component2 = workInProgress.type;
- var _unresolvedProps = workInProgress.pendingProps;
- var _resolvedProps = workInProgress.elementType === _Component2 ? _unresolvedProps : resolveDefaultProps(_Component2, _unresolvedProps);
- return updateClassComponent(current, workInProgress, _Component2, _resolvedProps, renderExpirationTime);
- }
- case HostRoot:
- return updateHostRoot(current, workInProgress, renderExpirationTime);
- case HostComponent:
- return updateHostComponent(current, workInProgress, renderExpirationTime);
- case HostText:
- return updateHostText(current, workInProgress);
- case SuspenseComponent:
- return updateSuspenseComponent(current, workInProgress, renderExpirationTime);
- case HostPortal:
- return updatePortalComponent(current, workInProgress, renderExpirationTime);
- case ForwardRef:
- {
- var type = workInProgress.type;
- var _unresolvedProps2 = workInProgress.pendingProps;
- var _resolvedProps2 = workInProgress.elementType === type ? _unresolvedProps2 : resolveDefaultProps(type, _unresolvedProps2);
- return updateForwardRef(current, workInProgress, type, _resolvedProps2, renderExpirationTime);
- }
- case Fragment:
- return updateFragment(current, workInProgress, renderExpirationTime);
- case Mode:
- return updateMode(current, workInProgress, renderExpirationTime);
- case Profiler:
- return updateProfiler(current, workInProgress, renderExpirationTime);
- case ContextProvider:
- return updateContextProvider(current, workInProgress, renderExpirationTime);
- case ContextConsumer:
- return updateContextConsumer(current, workInProgress, renderExpirationTime);
- case MemoComponent:
- {
- var _type2 = workInProgress.type;
- var _unresolvedProps3 = workInProgress.pendingProps; // Resolve outer props first, then resolve inner props.
- var _resolvedProps3 = resolveDefaultProps(_type2, _unresolvedProps3);
- {
- if (workInProgress.type !== workInProgress.elementType) {
- var outerPropTypes = _type2.propTypes;
- if (outerPropTypes) {
- checkPropTypes(outerPropTypes, _resolvedProps3, // Resolved for outer only
- 'prop', getComponentName(_type2), getCurrentFiberStackInDev);
- }
- }
- }
- _resolvedProps3 = resolveDefaultProps(_type2.type, _resolvedProps3);
- return updateMemoComponent(current, workInProgress, _type2, _resolvedProps3, updateExpirationTime, renderExpirationTime);
- }
- case SimpleMemoComponent:
- {
- return updateSimpleMemoComponent(current, workInProgress, workInProgress.type, workInProgress.pendingProps, updateExpirationTime, renderExpirationTime);
- }
- case IncompleteClassComponent:
- {
- var _Component3 = workInProgress.type;
- var _unresolvedProps4 = workInProgress.pendingProps;
- var _resolvedProps4 = workInProgress.elementType === _Component3 ? _unresolvedProps4 : resolveDefaultProps(_Component3, _unresolvedProps4);
- return mountIncompleteClassComponent(current, workInProgress, _Component3, _resolvedProps4, renderExpirationTime);
- }
- case SuspenseListComponent:
- {
- return updateSuspenseListComponent(current, workInProgress, renderExpirationTime);
- }
- }
- {
- {
- throw Error( "Unknown unit of work tag (" + workInProgress.tag + "). This error is likely caused by a bug in React. Please file an issue." );
- }
- }
- }
- function markUpdate(workInProgress) {
- // Tag the fiber with an update effect. This turns a Placement into
- // a PlacementAndUpdate.
- workInProgress.effectTag |= Update;
- }
- function markRef$1(workInProgress) {
- workInProgress.effectTag |= Ref;
- }
- var appendAllChildren;
- var updateHostContainer;
- var updateHostComponent$1;
- var updateHostText$1;
- {
- // Mutation mode
- appendAllChildren = function (parent, workInProgress, needsVisibilityToggle, isHidden) {
- // We only have the top Fiber that was created but we need recurse down its
- // children to find all the terminal nodes.
- var node = workInProgress.child;
- while (node !== null) {
- if (node.tag === HostComponent || node.tag === HostText) {
- appendInitialChild(parent, node.stateNode);
- } else if (node.tag === HostPortal) ; else if (node.child !== null) {
- node.child.return = node;
- node = node.child;
- continue;
- }
- if (node === workInProgress) {
- return;
- }
- while (node.sibling === null) {
- if (node.return === null || node.return === workInProgress) {
- return;
- }
- node = node.return;
- }
- node.sibling.return = node.return;
- node = node.sibling;
- }
- };
- updateHostContainer = function (workInProgress) {// Noop
- };
- updateHostComponent$1 = function (current, workInProgress, type, newProps, rootContainerInstance) {
- // If we have an alternate, that means this is an update and we need to
- // schedule a side-effect to do the updates.
- var oldProps = current.memoizedProps;
- if (oldProps === newProps) {
- // In mutation mode, this is sufficient for a bailout because
- // we won't touch this node even if children changed.
- return;
- } // If we get updated because one of our children updated, we don't
- // have newProps so we'll have to reuse them.
- // TODO: Split the update API as separate for the props vs. children.
- // Even better would be if children weren't special cased at all tho.
- var instance = workInProgress.stateNode;
- var currentHostContext = getHostContext(); // TODO: Experiencing an error where oldProps is null. Suggests a host
- // component is hitting the resume path. Figure out why. Possibly
- // related to `hidden`.
- var updatePayload = prepareUpdate(instance, type, oldProps, newProps, rootContainerInstance, currentHostContext); // TODO: Type this specific to this type of component.
- workInProgress.updateQueue = updatePayload; // If the update payload indicates that there is a change or if there
- // is a new ref we mark this as an update. All the work is done in commitWork.
- if (updatePayload) {
- markUpdate(workInProgress);
- }
- };
- updateHostText$1 = function (current, workInProgress, oldText, newText) {
- // If the text differs, mark it as an update. All the work in done in commitWork.
- if (oldText !== newText) {
- markUpdate(workInProgress);
- }
- };
- }
- function cutOffTailIfNeeded(renderState, hasRenderedATailFallback) {
- switch (renderState.tailMode) {
- case 'hidden':
- {
- // Any insertions at the end of the tail list after this point
- // should be invisible. If there are already mounted boundaries
- // anything before them are not considered for collapsing.
- // Therefore we need to go through the whole tail to find if
- // there are any.
- var tailNode = renderState.tail;
- var lastTailNode = null;
- while (tailNode !== null) {
- if (tailNode.alternate !== null) {
- lastTailNode = tailNode;
- }
- tailNode = tailNode.sibling;
- } // Next we're simply going to delete all insertions after the
- // last rendered item.
- if (lastTailNode === null) {
- // All remaining items in the tail are insertions.
- renderState.tail = null;
- } else {
- // Detach the insertion after the last node that was already
- // inserted.
- lastTailNode.sibling = null;
- }
- break;
- }
- case 'collapsed':
- {
- // Any insertions at the end of the tail list after this point
- // should be invisible. If there are already mounted boundaries
- // anything before them are not considered for collapsing.
- // Therefore we need to go through the whole tail to find if
- // there are any.
- var _tailNode = renderState.tail;
- var _lastTailNode = null;
- while (_tailNode !== null) {
- if (_tailNode.alternate !== null) {
- _lastTailNode = _tailNode;
- }
- _tailNode = _tailNode.sibling;
- } // Next we're simply going to delete all insertions after the
- // last rendered item.
- if (_lastTailNode === null) {
- // All remaining items in the tail are insertions.
- if (!hasRenderedATailFallback && renderState.tail !== null) {
- // We suspended during the head. We want to show at least one
- // row at the tail. So we'll keep on and cut off the rest.
- renderState.tail.sibling = null;
- } else {
- renderState.tail = null;
- }
- } else {
- // Detach the insertion after the last node that was already
- // inserted.
- _lastTailNode.sibling = null;
- }
- break;
- }
- }
- }
- function completeWork(current, workInProgress, renderExpirationTime) {
- var newProps = workInProgress.pendingProps;
- switch (workInProgress.tag) {
- case IndeterminateComponent:
- case LazyComponent:
- case SimpleMemoComponent:
- case FunctionComponent:
- case ForwardRef:
- case Fragment:
- case Mode:
- case Profiler:
- case ContextConsumer:
- case MemoComponent:
- return null;
- case ClassComponent:
- {
- var Component = workInProgress.type;
- if (isContextProvider(Component)) {
- popContext(workInProgress);
- }
- return null;
- }
- case HostRoot:
- {
- popHostContainer(workInProgress);
- popTopLevelContextObject(workInProgress);
- var fiberRoot = workInProgress.stateNode;
- if (fiberRoot.pendingContext) {
- fiberRoot.context = fiberRoot.pendingContext;
- fiberRoot.pendingContext = null;
- }
- if (current === null || current.child === null) {
- // If we hydrated, pop so that we can delete any remaining children
- // that weren't hydrated.
- var wasHydrated = popHydrationState(workInProgress);
- if (wasHydrated) {
- // If we hydrated, then we'll need to schedule an update for
- // the commit side-effects on the root.
- markUpdate(workInProgress);
- }
- }
- updateHostContainer(workInProgress);
- return null;
- }
- case HostComponent:
- {
- popHostContext(workInProgress);
- var rootContainerInstance = getRootHostContainer();
- var type = workInProgress.type;
- if (current !== null && workInProgress.stateNode != null) {
- updateHostComponent$1(current, workInProgress, type, newProps, rootContainerInstance);
- if (current.ref !== workInProgress.ref) {
- markRef$1(workInProgress);
- }
- } else {
- if (!newProps) {
- if (!(workInProgress.stateNode !== null)) {
- {
- throw Error( "We must have new props for new mounts. This error is likely caused by a bug in React. Please file an issue." );
- }
- } // This can happen when we abort work.
- return null;
- }
- var currentHostContext = getHostContext(); // TODO: Move createInstance to beginWork and keep it on a context
- // "stack" as the parent. Then append children as we go in beginWork
- // or completeWork depending on whether we want to add them top->down or
- // bottom->up. Top->down is faster in IE11.
- var _wasHydrated = popHydrationState(workInProgress);
- if (_wasHydrated) {
- // TODO: Move this and createInstance step into the beginPhase
- // to consolidate.
- if (prepareToHydrateHostInstance(workInProgress, rootContainerInstance, currentHostContext)) {
- // If changes to the hydrated node need to be applied at the
- // commit-phase we mark this as such.
- markUpdate(workInProgress);
- }
- } else {
- var instance = createInstance(type, newProps, rootContainerInstance, currentHostContext, workInProgress);
- appendAllChildren(instance, workInProgress, false, false); // This needs to be set before we mount Flare event listeners
- workInProgress.stateNode = instance;
- // (eg DOM renderer supports auto-focus for certain elements).
- // Make sure such renderers get scheduled for later work.
- if (finalizeInitialChildren(instance, type, newProps, rootContainerInstance)) {
- markUpdate(workInProgress);
- }
- }
- if (workInProgress.ref !== null) {
- // If there is a ref on a host node we need to schedule a callback
- markRef$1(workInProgress);
- }
- }
- return null;
- }
- case HostText:
- {
- var newText = newProps;
- if (current && workInProgress.stateNode != null) {
- var oldText = current.memoizedProps; // If we have an alternate, that means this is an update and we need
- // to schedule a side-effect to do the updates.
- updateHostText$1(current, workInProgress, oldText, newText);
- } else {
- if (typeof newText !== 'string') {
- if (!(workInProgress.stateNode !== null)) {
- {
- throw Error( "We must have new props for new mounts. This error is likely caused by a bug in React. Please file an issue." );
- }
- } // This can happen when we abort work.
- }
- var _rootContainerInstance = getRootHostContainer();
- var _currentHostContext = getHostContext();
- var _wasHydrated2 = popHydrationState(workInProgress);
- if (_wasHydrated2) {
- if (prepareToHydrateHostTextInstance(workInProgress)) {
- markUpdate(workInProgress);
- }
- } else {
- workInProgress.stateNode = createTextInstance(newText, _rootContainerInstance, _currentHostContext, workInProgress);
- }
- }
- return null;
- }
- case SuspenseComponent:
- {
- popSuspenseContext(workInProgress);
- var nextState = workInProgress.memoizedState;
- if ((workInProgress.effectTag & DidCapture) !== NoEffect) {
- // Something suspended. Re-render with the fallback children.
- workInProgress.expirationTime = renderExpirationTime; // Do not reset the effect list.
- return workInProgress;
- }
- var nextDidTimeout = nextState !== null;
- var prevDidTimeout = false;
- if (current === null) {
- if (workInProgress.memoizedProps.fallback !== undefined) {
- popHydrationState(workInProgress);
- }
- } else {
- var prevState = current.memoizedState;
- prevDidTimeout = prevState !== null;
- if (!nextDidTimeout && prevState !== null) {
- // We just switched from the fallback to the normal children.
- // Delete the fallback.
- // TODO: Would it be better to store the fallback fragment on
- // the stateNode during the begin phase?
- var currentFallbackChild = current.child.sibling;
- if (currentFallbackChild !== null) {
- // Deletions go at the beginning of the return fiber's effect list
- var first = workInProgress.firstEffect;
- if (first !== null) {
- workInProgress.firstEffect = currentFallbackChild;
- currentFallbackChild.nextEffect = first;
- } else {
- workInProgress.firstEffect = workInProgress.lastEffect = currentFallbackChild;
- currentFallbackChild.nextEffect = null;
- }
- currentFallbackChild.effectTag = Deletion;
- }
- }
- }
- if (nextDidTimeout && !prevDidTimeout) {
- // If this subtreee is running in blocking mode we can suspend,
- // otherwise we won't suspend.
- // TODO: This will still suspend a synchronous tree if anything
- // in the concurrent tree already suspended during this render.
- // This is a known bug.
- if ((workInProgress.mode & BlockingMode) !== NoMode) {
- // TODO: Move this back to throwException because this is too late
- // if this is a large tree which is common for initial loads. We
- // don't know if we should restart a render or not until we get
- // this marker, and this is too late.
- // If this render already had a ping or lower pri updates,
- // and this is the first time we know we're going to suspend we
- // should be able to immediately restart from within throwException.
- var hasInvisibleChildContext = current === null && workInProgress.memoizedProps.unstable_avoidThisFallback !== true;
- if (hasInvisibleChildContext || hasSuspenseContext(suspenseStackCursor.current, InvisibleParentSuspenseContext)) {
- // If this was in an invisible tree or a new render, then showing
- // this boundary is ok.
- renderDidSuspend();
- } else {
- // Otherwise, we're going to have to hide content so we should
- // suspend for longer if possible.
- renderDidSuspendDelayIfPossible();
- }
- }
- }
- {
- // TODO: Only schedule updates if these values are non equal, i.e. it changed.
- if (nextDidTimeout || prevDidTimeout) {
- // If this boundary just timed out, schedule an effect to attach a
- // retry listener to the promise. This flag is also used to hide the
- // primary children. In mutation mode, we also need the flag to
- // *unhide* children that were previously hidden, so check if this
- // is currently timed out, too.
- workInProgress.effectTag |= Update;
- }
- }
- return null;
- }
- case HostPortal:
- popHostContainer(workInProgress);
- updateHostContainer(workInProgress);
- return null;
- case ContextProvider:
- // Pop provider fiber
- popProvider(workInProgress);
- return null;
- case IncompleteClassComponent:
- {
- // Same as class component case. I put it down here so that the tags are
- // sequential to ensure this switch is compiled to a jump table.
- var _Component = workInProgress.type;
- if (isContextProvider(_Component)) {
- popContext(workInProgress);
- }
- return null;
- }
- case SuspenseListComponent:
- {
- popSuspenseContext(workInProgress);
- var renderState = workInProgress.memoizedState;
- if (renderState === null) {
- // We're running in the default, "independent" mode.
- // We don't do anything in this mode.
- return null;
- }
- var didSuspendAlready = (workInProgress.effectTag & DidCapture) !== NoEffect;
- var renderedTail = renderState.rendering;
- if (renderedTail === null) {
- // We just rendered the head.
- if (!didSuspendAlready) {
- // This is the first pass. We need to figure out if anything is still
- // suspended in the rendered set.
- // If new content unsuspended, but there's still some content that
- // didn't. Then we need to do a second pass that forces everything
- // to keep showing their fallbacks.
- // We might be suspended if something in this render pass suspended, or
- // something in the previous committed pass suspended. Otherwise,
- // there's no chance so we can skip the expensive call to
- // findFirstSuspended.
- var cannotBeSuspended = renderHasNotSuspendedYet() && (current === null || (current.effectTag & DidCapture) === NoEffect);
- if (!cannotBeSuspended) {
- var row = workInProgress.child;
- while (row !== null) {
- var suspended = findFirstSuspended(row);
- if (suspended !== null) {
- didSuspendAlready = true;
- workInProgress.effectTag |= DidCapture;
- cutOffTailIfNeeded(renderState, false); // If this is a newly suspended tree, it might not get committed as
- // part of the second pass. In that case nothing will subscribe to
- // its thennables. Instead, we'll transfer its thennables to the
- // SuspenseList so that it can retry if they resolve.
- // There might be multiple of these in the list but since we're
- // going to wait for all of them anyway, it doesn't really matter
- // which ones gets to ping. In theory we could get clever and keep
- // track of how many dependencies remain but it gets tricky because
- // in the meantime, we can add/remove/change items and dependencies.
- // We might bail out of the loop before finding any but that
- // doesn't matter since that means that the other boundaries that
- // we did find already has their listeners attached.
- var newThennables = suspended.updateQueue;
- if (newThennables !== null) {
- workInProgress.updateQueue = newThennables;
- workInProgress.effectTag |= Update;
- } // Rerender the whole list, but this time, we'll force fallbacks
- // to stay in place.
- // Reset the effect list before doing the second pass since that's now invalid.
- if (renderState.lastEffect === null) {
- workInProgress.firstEffect = null;
- }
- workInProgress.lastEffect = renderState.lastEffect; // Reset the child fibers to their original state.
- resetChildFibers(workInProgress, renderExpirationTime); // Set up the Suspense Context to force suspense and immediately
- // rerender the children.
- pushSuspenseContext(workInProgress, setShallowSuspenseContext(suspenseStackCursor.current, ForceSuspenseFallback));
- return workInProgress.child;
- }
- row = row.sibling;
- }
- }
- } else {
- cutOffTailIfNeeded(renderState, false);
- } // Next we're going to render the tail.
- } else {
- // Append the rendered row to the child list.
- if (!didSuspendAlready) {
- var _suspended = findFirstSuspended(renderedTail);
- if (_suspended !== null) {
- workInProgress.effectTag |= DidCapture;
- didSuspendAlready = true; // Ensure we transfer the update queue to the parent so that it doesn't
- // get lost if this row ends up dropped during a second pass.
- var _newThennables = _suspended.updateQueue;
- if (_newThennables !== null) {
- workInProgress.updateQueue = _newThennables;
- workInProgress.effectTag |= Update;
- }
- cutOffTailIfNeeded(renderState, true); // This might have been modified.
- if (renderState.tail === null && renderState.tailMode === 'hidden' && !renderedTail.alternate) {
- // We need to delete the row we just rendered.
- // Reset the effect list to what it was before we rendered this
- // child. The nested children have already appended themselves.
- var lastEffect = workInProgress.lastEffect = renderState.lastEffect; // Remove any effects that were appended after this point.
- if (lastEffect !== null) {
- lastEffect.nextEffect = null;
- } // We're done.
- return null;
- }
- } else if ( // The time it took to render last row is greater than time until
- // the expiration.
- now() * 2 - renderState.renderingStartTime > renderState.tailExpiration && renderExpirationTime > Never) {
- // We have now passed our CPU deadline and we'll just give up further
- // attempts to render the main content and only render fallbacks.
- // The assumption is that this is usually faster.
- workInProgress.effectTag |= DidCapture;
- didSuspendAlready = true;
- cutOffTailIfNeeded(renderState, false); // Since nothing actually suspended, there will nothing to ping this
- // to get it started back up to attempt the next item. If we can show
- // them, then they really have the same priority as this render.
- // So we'll pick it back up the very next render pass once we've had
- // an opportunity to yield for paint.
- var nextPriority = renderExpirationTime - 1;
- workInProgress.expirationTime = workInProgress.childExpirationTime = nextPriority;
- {
- markSpawnedWork(nextPriority);
- }
- }
- }
- if (renderState.isBackwards) {
- // The effect list of the backwards tail will have been added
- // to the end. This breaks the guarantee that life-cycles fire in
- // sibling order but that isn't a strong guarantee promised by React.
- // Especially since these might also just pop in during future commits.
- // Append to the beginning of the list.
- renderedTail.sibling = workInProgress.child;
- workInProgress.child = renderedTail;
- } else {
- var previousSibling = renderState.last;
- if (previousSibling !== null) {
- previousSibling.sibling = renderedTail;
- } else {
- workInProgress.child = renderedTail;
- }
- renderState.last = renderedTail;
- }
- }
- if (renderState.tail !== null) {
- // We still have tail rows to render.
- if (renderState.tailExpiration === 0) {
- // Heuristic for how long we're willing to spend rendering rows
- // until we just give up and show what we have so far.
- var TAIL_EXPIRATION_TIMEOUT_MS = 500;
- renderState.tailExpiration = now() + TAIL_EXPIRATION_TIMEOUT_MS; // TODO: This is meant to mimic the train model or JND but this
- // is a per component value. It should really be since the start
- // of the total render or last commit. Consider using something like
- // globalMostRecentFallbackTime. That doesn't account for being
- // suspended for part of the time or when it's a new render.
- // It should probably use a global start time value instead.
- } // Pop a row.
- var next = renderState.tail;
- renderState.rendering = next;
- renderState.tail = next.sibling;
- renderState.lastEffect = workInProgress.lastEffect;
- renderState.renderingStartTime = now();
- next.sibling = null; // Restore the context.
- // TODO: We can probably just avoid popping it instead and only
- // setting it the first time we go from not suspended to suspended.
- var suspenseContext = suspenseStackCursor.current;
- if (didSuspendAlready) {
- suspenseContext = setShallowSuspenseContext(suspenseContext, ForceSuspenseFallback);
- } else {
- suspenseContext = setDefaultShallowSuspenseContext(suspenseContext);
- }
- pushSuspenseContext(workInProgress, suspenseContext); // Do a pass over the next row.
- return next;
- }
- return null;
- }
- }
- {
- {
- throw Error( "Unknown unit of work tag (" + workInProgress.tag + "). This error is likely caused by a bug in React. Please file an issue." );
- }
- }
- }
- function unwindWork(workInProgress, renderExpirationTime) {
- switch (workInProgress.tag) {
- case ClassComponent:
- {
- var Component = workInProgress.type;
- if (isContextProvider(Component)) {
- popContext(workInProgress);
- }
- var effectTag = workInProgress.effectTag;
- if (effectTag & ShouldCapture) {
- workInProgress.effectTag = effectTag & ~ShouldCapture | DidCapture;
- return workInProgress;
- }
- return null;
- }
- case HostRoot:
- {
- popHostContainer(workInProgress);
- popTopLevelContextObject(workInProgress);
- var _effectTag = workInProgress.effectTag;
- if (!((_effectTag & DidCapture) === NoEffect)) {
- {
- throw Error( "The root failed to unmount after an error. This is likely a bug in React. Please file an issue." );
- }
- }
- workInProgress.effectTag = _effectTag & ~ShouldCapture | DidCapture;
- return workInProgress;
- }
- case HostComponent:
- {
- // TODO: popHydrationState
- popHostContext(workInProgress);
- return null;
- }
- case SuspenseComponent:
- {
- popSuspenseContext(workInProgress);
- var _effectTag2 = workInProgress.effectTag;
- if (_effectTag2 & ShouldCapture) {
- workInProgress.effectTag = _effectTag2 & ~ShouldCapture | DidCapture; // Captured a suspense effect. Re-render the boundary.
- return workInProgress;
- }
- return null;
- }
- case SuspenseListComponent:
- {
- popSuspenseContext(workInProgress); // SuspenseList doesn't actually catch anything. It should've been
- // caught by a nested boundary. If not, it should bubble through.
- return null;
- }
- case HostPortal:
- popHostContainer(workInProgress);
- return null;
- case ContextProvider:
- popProvider(workInProgress);
- return null;
- default:
- return null;
- }
- }
- function unwindInterruptedWork(interruptedWork) {
- switch (interruptedWork.tag) {
- case ClassComponent:
- {
- var childContextTypes = interruptedWork.type.childContextTypes;
- if (childContextTypes !== null && childContextTypes !== undefined) {
- popContext(interruptedWork);
- }
- break;
- }
- case HostRoot:
- {
- popHostContainer(interruptedWork);
- popTopLevelContextObject(interruptedWork);
- break;
- }
- case HostComponent:
- {
- popHostContext(interruptedWork);
- break;
- }
- case HostPortal:
- popHostContainer(interruptedWork);
- break;
- case SuspenseComponent:
- popSuspenseContext(interruptedWork);
- break;
- case SuspenseListComponent:
- popSuspenseContext(interruptedWork);
- break;
- case ContextProvider:
- popProvider(interruptedWork);
- break;
- }
- }
- function createCapturedValue(value, source) {
- // If the value is an error, call this function immediately after it is thrown
- // so the stack is accurate.
- return {
- value: value,
- source: source,
- stack: getStackByFiberInDevAndProd(source)
- };
- }
- function logCapturedError(capturedError) {
- var error = capturedError.error;
- {
- var componentName = capturedError.componentName,
- componentStack = capturedError.componentStack,
- errorBoundaryName = capturedError.errorBoundaryName,
- errorBoundaryFound = capturedError.errorBoundaryFound,
- willRetry = capturedError.willRetry; // Browsers support silencing uncaught errors by calling
- // `preventDefault()` in window `error` handler.
- // We record this information as an expando on the error.
- if (error != null && error._suppressLogging) {
- if (errorBoundaryFound && willRetry) {
- // The error is recoverable and was silenced.
- // Ignore it and don't print the stack addendum.
- // This is handy for testing error boundaries without noise.
- return;
- } // The error is fatal. Since the silencing might have
- // been accidental, we'll surface it anyway.
- // However, the browser would have silenced the original error
- // so we'll print it first, and then print the stack addendum.
- console['error'](error); // Don't transform to our wrapper
- // For a more detailed description of this block, see:
- // https://github.com/facebook/react/pull/13384
- }
- var componentNameMessage = componentName ? "The above error occurred in the <" + componentName + "> component:" : 'The above error occurred in one of your React components:';
- var errorBoundaryMessage; // errorBoundaryFound check is sufficient; errorBoundaryName check is to satisfy Flow.
- if (errorBoundaryFound && errorBoundaryName) {
- if (willRetry) {
- errorBoundaryMessage = "React will try to recreate this component tree from scratch " + ("using the error boundary you provided, " + errorBoundaryName + ".");
- } else {
- errorBoundaryMessage = "This error was initially handled by the error boundary " + errorBoundaryName + ".\n" + "Recreating the tree from scratch failed so React will unmount the tree.";
- }
- } else {
- errorBoundaryMessage = 'Consider adding an error boundary to your tree to customize error handling behavior.\n' + 'Visit https://fb.me/react-error-boundaries to learn more about error boundaries.';
- }
- var combinedMessage = "" + componentNameMessage + componentStack + "\n\n" + ("" + errorBoundaryMessage); // In development, we provide our own message with just the component stack.
- // We don't include the original error message and JS stack because the browser
- // has already printed it. Even if the application swallows the error, it is still
- // displayed by the browser thanks to the DEV-only fake event trick in ReactErrorUtils.
- console['error'](combinedMessage); // Don't transform to our wrapper
- }
- }
- var didWarnAboutUndefinedSnapshotBeforeUpdate = null;
- {
- didWarnAboutUndefinedSnapshotBeforeUpdate = new Set();
- }
- var PossiblyWeakSet = typeof WeakSet === 'function' ? WeakSet : Set;
- function logError(boundary, errorInfo) {
- var source = errorInfo.source;
- var stack = errorInfo.stack;
- if (stack === null && source !== null) {
- stack = getStackByFiberInDevAndProd(source);
- }
- var capturedError = {
- componentName: source !== null ? getComponentName(source.type) : null,
- componentStack: stack !== null ? stack : '',
- error: errorInfo.value,
- errorBoundary: null,
- errorBoundaryName: null,
- errorBoundaryFound: false,
- willRetry: false
- };
- if (boundary !== null && boundary.tag === ClassComponent) {
- capturedError.errorBoundary = boundary.stateNode;
- capturedError.errorBoundaryName = getComponentName(boundary.type);
- capturedError.errorBoundaryFound = true;
- capturedError.willRetry = true;
- }
- try {
- logCapturedError(capturedError);
- } catch (e) {
- // This method must not throw, or React internal state will get messed up.
- // If console.error is overridden, or logCapturedError() shows a dialog that throws,
- // we want to report this error outside of the normal stack as a last resort.
- // https://github.com/facebook/react/issues/13188
- setTimeout(function () {
- throw e;
- });
- }
- }
- var callComponentWillUnmountWithTimer = function (current, instance) {
- startPhaseTimer(current, 'componentWillUnmount');
- instance.props = current.memoizedProps;
- instance.state = current.memoizedState;
- instance.componentWillUnmount();
- stopPhaseTimer();
- }; // Capture errors so they don't interrupt unmounting.
- function safelyCallComponentWillUnmount(current, instance) {
- {
- invokeGuardedCallback(null, callComponentWillUnmountWithTimer, null, current, instance);
- if (hasCaughtError()) {
- var unmountError = clearCaughtError();
- captureCommitPhaseError(current, unmountError);
- }
- }
- }
- function safelyDetachRef(current) {
- var ref = current.ref;
- if (ref !== null) {
- if (typeof ref === 'function') {
- {
- invokeGuardedCallback(null, ref, null, null);
- if (hasCaughtError()) {
- var refError = clearCaughtError();
- captureCommitPhaseError(current, refError);
- }
- }
- } else {
- ref.current = null;
- }
- }
- }
- function safelyCallDestroy(current, destroy) {
- {
- invokeGuardedCallback(null, destroy, null);
- if (hasCaughtError()) {
- var error = clearCaughtError();
- captureCommitPhaseError(current, error);
- }
- }
- }
- function commitBeforeMutationLifeCycles(current, finishedWork) {
- switch (finishedWork.tag) {
- case FunctionComponent:
- case ForwardRef:
- case SimpleMemoComponent:
- case Block:
- {
- return;
- }
- case ClassComponent:
- {
- if (finishedWork.effectTag & Snapshot) {
- if (current !== null) {
- var prevProps = current.memoizedProps;
- var prevState = current.memoizedState;
- startPhaseTimer(finishedWork, 'getSnapshotBeforeUpdate');
- var instance = finishedWork.stateNode; // We could update instance props and state here,
- // but instead we rely on them being set during last render.
- // TODO: revisit this when we implement resuming.
- {
- if (finishedWork.type === finishedWork.elementType && !didWarnAboutReassigningProps) {
- if (instance.props !== finishedWork.memoizedProps) {
- error('Expected %s props to match memoized props before ' + 'getSnapshotBeforeUpdate. ' + 'This might either be because of a bug in React, or because ' + 'a component reassigns its own `this.props`. ' + 'Please file an issue.', getComponentName(finishedWork.type) || 'instance');
- }
- if (instance.state !== finishedWork.memoizedState) {
- error('Expected %s state to match memoized state before ' + 'getSnapshotBeforeUpdate. ' + 'This might either be because of a bug in React, or because ' + 'a component reassigns its own `this.props`. ' + 'Please file an issue.', getComponentName(finishedWork.type) || 'instance');
- }
- }
- }
- var snapshot = instance.getSnapshotBeforeUpdate(finishedWork.elementType === finishedWork.type ? prevProps : resolveDefaultProps(finishedWork.type, prevProps), prevState);
- {
- var didWarnSet = didWarnAboutUndefinedSnapshotBeforeUpdate;
- if (snapshot === undefined && !didWarnSet.has(finishedWork.type)) {
- didWarnSet.add(finishedWork.type);
- error('%s.getSnapshotBeforeUpdate(): A snapshot value (or null) ' + 'must be returned. You have returned undefined.', getComponentName(finishedWork.type));
- }
- }
- instance.__reactInternalSnapshotBeforeUpdate = snapshot;
- stopPhaseTimer();
- }
- }
- return;
- }
- case HostRoot:
- case HostComponent:
- case HostText:
- case HostPortal:
- case IncompleteClassComponent:
- // Nothing to do for these component types
- return;
- }
- {
- {
- throw Error( "This unit of work tag should not have side-effects. This error is likely caused by a bug in React. Please file an issue." );
- }
- }
- }
- function commitHookEffectListUnmount(tag, finishedWork) {
- var updateQueue = finishedWork.updateQueue;
- var lastEffect = updateQueue !== null ? updateQueue.lastEffect : null;
- if (lastEffect !== null) {
- var firstEffect = lastEffect.next;
- var effect = firstEffect;
- do {
- if ((effect.tag & tag) === tag) {
- // Unmount
- var destroy = effect.destroy;
- effect.destroy = undefined;
- if (destroy !== undefined) {
- destroy();
- }
- }
- effect = effect.next;
- } while (effect !== firstEffect);
- }
- }
- function commitHookEffectListMount(tag, finishedWork) {
- var updateQueue = finishedWork.updateQueue;
- var lastEffect = updateQueue !== null ? updateQueue.lastEffect : null;
- if (lastEffect !== null) {
- var firstEffect = lastEffect.next;
- var effect = firstEffect;
- do {
- if ((effect.tag & tag) === tag) {
- // Mount
- var create = effect.create;
- effect.destroy = create();
- {
- var destroy = effect.destroy;
- if (destroy !== undefined && typeof destroy !== 'function') {
- var addendum = void 0;
- if (destroy === null) {
- addendum = ' You returned null. If your effect does not require clean ' + 'up, return undefined (or nothing).';
- } else if (typeof destroy.then === 'function') {
- addendum = '\n\nIt looks like you wrote useEffect(async () => ...) or returned a Promise. ' + 'Instead, write the async function inside your effect ' + 'and call it immediately:\n\n' + 'useEffect(() => {\n' + ' async function fetchData() {\n' + ' // You can await here\n' + ' const response = await MyAPI.getData(someId);\n' + ' // ...\n' + ' }\n' + ' fetchData();\n' + "}, [someId]); // Or [] if effect doesn't need props or state\n\n" + 'Learn more about data fetching with Hooks: https://fb.me/react-hooks-data-fetching';
- } else {
- addendum = ' You returned: ' + destroy;
- }
- error('An effect function must not return anything besides a function, ' + 'which is used for clean-up.%s%s', addendum, getStackByFiberInDevAndProd(finishedWork));
- }
- }
- }
- effect = effect.next;
- } while (effect !== firstEffect);
- }
- }
- function commitPassiveHookEffects(finishedWork) {
- if ((finishedWork.effectTag & Passive) !== NoEffect) {
- switch (finishedWork.tag) {
- case FunctionComponent:
- case ForwardRef:
- case SimpleMemoComponent:
- case Block:
- {
- // TODO (#17945) We should call all passive destroy functions (for all fibers)
- // before calling any create functions. The current approach only serializes
- // these for a single fiber.
- commitHookEffectListUnmount(Passive$1 | HasEffect, finishedWork);
- commitHookEffectListMount(Passive$1 | HasEffect, finishedWork);
- break;
- }
- }
- }
- }
- function commitLifeCycles(finishedRoot, current, finishedWork, committedExpirationTime) {
- switch (finishedWork.tag) {
- case FunctionComponent:
- case ForwardRef:
- case SimpleMemoComponent:
- case Block:
- {
- // At this point layout effects have already been destroyed (during mutation phase).
- // This is done to prevent sibling component effects from interfering with each other,
- // e.g. a destroy function in one component should never override a ref set
- // by a create function in another component during the same commit.
- commitHookEffectListMount(Layout | HasEffect, finishedWork);
- return;
- }
- case ClassComponent:
- {
- var instance = finishedWork.stateNode;
- if (finishedWork.effectTag & Update) {
- if (current === null) {
- startPhaseTimer(finishedWork, 'componentDidMount'); // We could update instance props and state here,
- // but instead we rely on them being set during last render.
- // TODO: revisit this when we implement resuming.
- {
- if (finishedWork.type === finishedWork.elementType && !didWarnAboutReassigningProps) {
- if (instance.props !== finishedWork.memoizedProps) {
- error('Expected %s props to match memoized props before ' + 'componentDidMount. ' + 'This might either be because of a bug in React, or because ' + 'a component reassigns its own `this.props`. ' + 'Please file an issue.', getComponentName(finishedWork.type) || 'instance');
- }
- if (instance.state !== finishedWork.memoizedState) {
- error('Expected %s state to match memoized state before ' + 'componentDidMount. ' + 'This might either be because of a bug in React, or because ' + 'a component reassigns its own `this.props`. ' + 'Please file an issue.', getComponentName(finishedWork.type) || 'instance');
- }
- }
- }
- instance.componentDidMount();
- stopPhaseTimer();
- } else {
- var prevProps = finishedWork.elementType === finishedWork.type ? current.memoizedProps : resolveDefaultProps(finishedWork.type, current.memoizedProps);
- var prevState = current.memoizedState;
- startPhaseTimer(finishedWork, 'componentDidUpdate'); // We could update instance props and state here,
- // but instead we rely on them being set during last render.
- // TODO: revisit this when we implement resuming.
- {
- if (finishedWork.type === finishedWork.elementType && !didWarnAboutReassigningProps) {
- if (instance.props !== finishedWork.memoizedProps) {
- error('Expected %s props to match memoized props before ' + 'componentDidUpdate. ' + 'This might either be because of a bug in React, or because ' + 'a component reassigns its own `this.props`. ' + 'Please file an issue.', getComponentName(finishedWork.type) || 'instance');
- }
- if (instance.state !== finishedWork.memoizedState) {
- error('Expected %s state to match memoized state before ' + 'componentDidUpdate. ' + 'This might either be because of a bug in React, or because ' + 'a component reassigns its own `this.props`. ' + 'Please file an issue.', getComponentName(finishedWork.type) || 'instance');
- }
- }
- }
- instance.componentDidUpdate(prevProps, prevState, instance.__reactInternalSnapshotBeforeUpdate);
- stopPhaseTimer();
- }
- }
- var updateQueue = finishedWork.updateQueue;
- if (updateQueue !== null) {
- {
- if (finishedWork.type === finishedWork.elementType && !didWarnAboutReassigningProps) {
- if (instance.props !== finishedWork.memoizedProps) {
- error('Expected %s props to match memoized props before ' + 'processing the update queue. ' + 'This might either be because of a bug in React, or because ' + 'a component reassigns its own `this.props`. ' + 'Please file an issue.', getComponentName(finishedWork.type) || 'instance');
- }
- if (instance.state !== finishedWork.memoizedState) {
- error('Expected %s state to match memoized state before ' + 'processing the update queue. ' + 'This might either be because of a bug in React, or because ' + 'a component reassigns its own `this.props`. ' + 'Please file an issue.', getComponentName(finishedWork.type) || 'instance');
- }
- }
- } // We could update instance props and state here,
- // but instead we rely on them being set during last render.
- // TODO: revisit this when we implement resuming.
- commitUpdateQueue(finishedWork, updateQueue, instance);
- }
- return;
- }
- case HostRoot:
- {
- var _updateQueue = finishedWork.updateQueue;
- if (_updateQueue !== null) {
- var _instance = null;
- if (finishedWork.child !== null) {
- switch (finishedWork.child.tag) {
- case HostComponent:
- _instance = getPublicInstance(finishedWork.child.stateNode);
- break;
- case ClassComponent:
- _instance = finishedWork.child.stateNode;
- break;
- }
- }
- commitUpdateQueue(finishedWork, _updateQueue, _instance);
- }
- return;
- }
- case HostComponent:
- {
- var _instance2 = finishedWork.stateNode; // Renderers may schedule work to be done after host components are mounted
- // (eg DOM renderer may schedule auto-focus for inputs and form controls).
- // These effects should only be committed when components are first mounted,
- // aka when there is no current/alternate.
- if (current === null && finishedWork.effectTag & Update) {
- var type = finishedWork.type;
- var props = finishedWork.memoizedProps;
- commitMount(_instance2, type, props);
- }
- return;
- }
- case HostText:
- {
- // We have no life-cycles associated with text.
- return;
- }
- case HostPortal:
- {
- // We have no life-cycles associated with portals.
- return;
- }
- case Profiler:
- {
- {
- var onRender = finishedWork.memoizedProps.onRender;
- if (typeof onRender === 'function') {
- {
- onRender(finishedWork.memoizedProps.id, current === null ? 'mount' : 'update', finishedWork.actualDuration, finishedWork.treeBaseDuration, finishedWork.actualStartTime, getCommitTime(), finishedRoot.memoizedInteractions);
- }
- }
- }
- return;
- }
- case SuspenseComponent:
- {
- commitSuspenseHydrationCallbacks(finishedRoot, finishedWork);
- return;
- }
- case SuspenseListComponent:
- case IncompleteClassComponent:
- case FundamentalComponent:
- case ScopeComponent:
- return;
- }
- {
- {
- throw Error( "This unit of work tag should not have side-effects. This error is likely caused by a bug in React. Please file an issue." );
- }
- }
- }
- function hideOrUnhideAllChildren(finishedWork, isHidden) {
- {
- // We only have the top Fiber that was inserted but we need to recurse down its
- // children to find all the terminal nodes.
- var node = finishedWork;
- while (true) {
- if (node.tag === HostComponent) {
- var instance = node.stateNode;
- if (isHidden) {
- hideInstance(instance);
- } else {
- unhideInstance(node.stateNode, node.memoizedProps);
- }
- } else if (node.tag === HostText) {
- var _instance3 = node.stateNode;
- if (isHidden) {
- hideTextInstance(_instance3);
- } else {
- unhideTextInstance(_instance3, node.memoizedProps);
- }
- } else if (node.tag === SuspenseComponent && node.memoizedState !== null && node.memoizedState.dehydrated === null) {
- // Found a nested Suspense component that timed out. Skip over the
- // primary child fragment, which should remain hidden.
- var fallbackChildFragment = node.child.sibling;
- fallbackChildFragment.return = node;
- node = fallbackChildFragment;
- continue;
- } else if (node.child !== null) {
- node.child.return = node;
- node = node.child;
- continue;
- }
- if (node === finishedWork) {
- return;
- }
- while (node.sibling === null) {
- if (node.return === null || node.return === finishedWork) {
- return;
- }
- node = node.return;
- }
- node.sibling.return = node.return;
- node = node.sibling;
- }
- }
- }
- function commitAttachRef(finishedWork) {
- var ref = finishedWork.ref;
- if (ref !== null) {
- var instance = finishedWork.stateNode;
- var instanceToUse;
- switch (finishedWork.tag) {
- case HostComponent:
- instanceToUse = getPublicInstance(instance);
- break;
- default:
- instanceToUse = instance;
- } // Moved outside to ensure DCE works with this flag
- if (typeof ref === 'function') {
- ref(instanceToUse);
- } else {
- {
- if (!ref.hasOwnProperty('current')) {
- error('Unexpected ref object provided for %s. ' + 'Use either a ref-setter function or React.createRef().%s', getComponentName(finishedWork.type), getStackByFiberInDevAndProd(finishedWork));
- }
- }
- ref.current = instanceToUse;
- }
- }
- }
- function commitDetachRef(current) {
- var currentRef = current.ref;
- if (currentRef !== null) {
- if (typeof currentRef === 'function') {
- currentRef(null);
- } else {
- currentRef.current = null;
- }
- }
- } // User-originating errors (lifecycles and refs) should not interrupt
- // deletion, so don't let them throw. Host-originating errors should
- // interrupt deletion, so it's okay
- function commitUnmount(finishedRoot, current, renderPriorityLevel) {
- onCommitUnmount(current);
- switch (current.tag) {
- case FunctionComponent:
- case ForwardRef:
- case MemoComponent:
- case SimpleMemoComponent:
- case Block:
- {
- var updateQueue = current.updateQueue;
- if (updateQueue !== null) {
- var lastEffect = updateQueue.lastEffect;
- if (lastEffect !== null) {
- var firstEffect = lastEffect.next;
- {
- // When the owner fiber is deleted, the destroy function of a passive
- // effect hook is called during the synchronous commit phase. This is
- // a concession to implementation complexity. Calling it in the
- // passive effect phase (like they usually are, when dependencies
- // change during an update) would require either traversing the
- // children of the deleted fiber again, or including unmount effects
- // as part of the fiber effect list.
- //
- // Because this is during the sync commit phase, we need to change
- // the priority.
- //
- // TODO: Reconsider this implementation trade off.
- var priorityLevel = renderPriorityLevel > NormalPriority ? NormalPriority : renderPriorityLevel;
- runWithPriority$1(priorityLevel, function () {
- var effect = firstEffect;
- do {
- var _destroy = effect.destroy;
- if (_destroy !== undefined) {
- safelyCallDestroy(current, _destroy);
- }
- effect = effect.next;
- } while (effect !== firstEffect);
- });
- }
- }
- }
- return;
- }
- case ClassComponent:
- {
- safelyDetachRef(current);
- var instance = current.stateNode;
- if (typeof instance.componentWillUnmount === 'function') {
- safelyCallComponentWillUnmount(current, instance);
- }
- return;
- }
- case HostComponent:
- {
- safelyDetachRef(current);
- return;
- }
- case HostPortal:
- {
- // TODO: this is recursive.
- // We are also not using this parent because
- // the portal will get pushed immediately.
- {
- unmountHostComponents(finishedRoot, current, renderPriorityLevel);
- }
- return;
- }
- case FundamentalComponent:
- {
- return;
- }
- case DehydratedFragment:
- {
- return;
- }
- case ScopeComponent:
- {
- return;
- }
- }
- }
- function commitNestedUnmounts(finishedRoot, root, renderPriorityLevel) {
- // While we're inside a removed host node we don't want to call
- // removeChild on the inner nodes because they're removed by the top
- // call anyway. We also want to call componentWillUnmount on all
- // composites before this host node is removed from the tree. Therefore
- // we do an inner loop while we're still inside the host node.
- var node = root;
- while (true) {
- commitUnmount(finishedRoot, node, renderPriorityLevel); // Visit children because they may contain more composite or host nodes.
- // Skip portals because commitUnmount() currently visits them recursively.
- if (node.child !== null && ( // If we use mutation we drill down into portals using commitUnmount above.
- // If we don't use mutation we drill down into portals here instead.
- node.tag !== HostPortal)) {
- node.child.return = node;
- node = node.child;
- continue;
- }
- if (node === root) {
- return;
- }
- while (node.sibling === null) {
- if (node.return === null || node.return === root) {
- return;
- }
- node = node.return;
- }
- node.sibling.return = node.return;
- node = node.sibling;
- }
- }
- function detachFiber(current) {
- var alternate = current.alternate; // Cut off the return pointers to disconnect it from the tree. Ideally, we
- // should clear the child pointer of the parent alternate to let this
- // get GC:ed but we don't know which for sure which parent is the current
- // one so we'll settle for GC:ing the subtree of this child. This child
- // itself will be GC:ed when the parent updates the next time.
- current.return = null;
- current.child = null;
- current.memoizedState = null;
- current.updateQueue = null;
- current.dependencies = null;
- current.alternate = null;
- current.firstEffect = null;
- current.lastEffect = null;
- current.pendingProps = null;
- current.memoizedProps = null;
- current.stateNode = null;
- if (alternate !== null) {
- detachFiber(alternate);
- }
- }
- function getHostParentFiber(fiber) {
- var parent = fiber.return;
- while (parent !== null) {
- if (isHostParent(parent)) {
- return parent;
- }
- parent = parent.return;
- }
- {
- {
- throw Error( "Expected to find a host parent. This error is likely caused by a bug in React. Please file an issue." );
- }
- }
- }
- function isHostParent(fiber) {
- return fiber.tag === HostComponent || fiber.tag === HostRoot || fiber.tag === HostPortal;
- }
- function getHostSibling(fiber) {
- // We're going to search forward into the tree until we find a sibling host
- // node. Unfortunately, if multiple insertions are done in a row we have to
- // search past them. This leads to exponential search for the next sibling.
- // TODO: Find a more efficient way to do this.
- var node = fiber;
- siblings: while (true) {
- // If we didn't find anything, let's try the next sibling.
- while (node.sibling === null) {
- if (node.return === null || isHostParent(node.return)) {
- // If we pop out of the root or hit the parent the fiber we are the
- // last sibling.
- return null;
- }
- node = node.return;
- }
- node.sibling.return = node.return;
- node = node.sibling;
- while (node.tag !== HostComponent && node.tag !== HostText && node.tag !== DehydratedFragment) {
- // If it is not host node and, we might have a host node inside it.
- // Try to search down until we find one.
- if (node.effectTag & Placement) {
- // If we don't have a child, try the siblings instead.
- continue siblings;
- } // If we don't have a child, try the siblings instead.
- // We also skip portals because they are not part of this host tree.
- if (node.child === null || node.tag === HostPortal) {
- continue siblings;
- } else {
- node.child.return = node;
- node = node.child;
- }
- } // Check if this host node is stable or about to be placed.
- if (!(node.effectTag & Placement)) {
- // Found it!
- return node.stateNode;
- }
- }
- }
- function commitPlacement(finishedWork) {
- var parentFiber = getHostParentFiber(finishedWork); // Note: these two variables *must* always be updated together.
- var parent;
- var isContainer;
- var parentStateNode = parentFiber.stateNode;
- switch (parentFiber.tag) {
- case HostComponent:
- parent = parentStateNode;
- isContainer = false;
- break;
- case HostRoot:
- parent = parentStateNode.containerInfo;
- isContainer = true;
- break;
- case HostPortal:
- parent = parentStateNode.containerInfo;
- isContainer = true;
- break;
- case FundamentalComponent:
- // eslint-disable-next-line-no-fallthrough
- default:
- {
- {
- throw Error( "Invalid host parent fiber. This error is likely caused by a bug in React. Please file an issue." );
- }
- }
- }
- if (parentFiber.effectTag & ContentReset) {
- // Reset the text content of the parent before doing any insertions
- resetTextContent(parent); // Clear ContentReset from the effect tag
- parentFiber.effectTag &= ~ContentReset;
- }
- var before = getHostSibling(finishedWork); // We only have the top Fiber that was inserted but we need to recurse down its
- // children to find all the terminal nodes.
- if (isContainer) {
- insertOrAppendPlacementNodeIntoContainer(finishedWork, before, parent);
- } else {
- insertOrAppendPlacementNode(finishedWork, before, parent);
- }
- }
- function insertOrAppendPlacementNodeIntoContainer(node, before, parent) {
- var tag = node.tag;
- var isHost = tag === HostComponent || tag === HostText;
- if (isHost || enableFundamentalAPI ) {
- var stateNode = isHost ? node.stateNode : node.stateNode.instance;
- if (before) {
- insertInContainerBefore(parent, stateNode, before);
- } else {
- appendChildToContainer(parent, stateNode);
- }
- } else if (tag === HostPortal) ; else {
- var child = node.child;
- if (child !== null) {
- insertOrAppendPlacementNodeIntoContainer(child, before, parent);
- var sibling = child.sibling;
- while (sibling !== null) {
- insertOrAppendPlacementNodeIntoContainer(sibling, before, parent);
- sibling = sibling.sibling;
- }
- }
- }
- }
- function insertOrAppendPlacementNode(node, before, parent) {
- var tag = node.tag;
- var isHost = tag === HostComponent || tag === HostText;
- if (isHost || enableFundamentalAPI ) {
- var stateNode = isHost ? node.stateNode : node.stateNode.instance;
- if (before) {
- insertBefore(parent, stateNode, before);
- } else {
- appendChild(parent, stateNode);
- }
- } else if (tag === HostPortal) ; else {
- var child = node.child;
- if (child !== null) {
- insertOrAppendPlacementNode(child, before, parent);
- var sibling = child.sibling;
- while (sibling !== null) {
- insertOrAppendPlacementNode(sibling, before, parent);
- sibling = sibling.sibling;
- }
- }
- }
- }
- function unmountHostComponents(finishedRoot, current, renderPriorityLevel) {
- // We only have the top Fiber that was deleted but we need to recurse down its
- // children to find all the terminal nodes.
- var node = current; // Each iteration, currentParent is populated with node's host parent if not
- // currentParentIsValid.
- var currentParentIsValid = false; // Note: these two variables *must* always be updated together.
- var currentParent;
- var currentParentIsContainer;
- while (true) {
- if (!currentParentIsValid) {
- var parent = node.return;
- findParent: while (true) {
- if (!(parent !== null)) {
- {
- throw Error( "Expected to find a host parent. This error is likely caused by a bug in React. Please file an issue." );
- }
- }
- var parentStateNode = parent.stateNode;
- switch (parent.tag) {
- case HostComponent:
- currentParent = parentStateNode;
- currentParentIsContainer = false;
- break findParent;
- case HostRoot:
- currentParent = parentStateNode.containerInfo;
- currentParentIsContainer = true;
- break findParent;
- case HostPortal:
- currentParent = parentStateNode.containerInfo;
- currentParentIsContainer = true;
- break findParent;
- }
- parent = parent.return;
- }
- currentParentIsValid = true;
- }
- if (node.tag === HostComponent || node.tag === HostText) {
- commitNestedUnmounts(finishedRoot, node, renderPriorityLevel); // After all the children have unmounted, it is now safe to remove the
- // node from the tree.
- if (currentParentIsContainer) {
- removeChildFromContainer(currentParent, node.stateNode);
- } else {
- removeChild(currentParent, node.stateNode);
- } // Don't visit children because we already visited them.
- } else if (node.tag === HostPortal) {
- if (node.child !== null) {
- // When we go into a portal, it becomes the parent to remove from.
- // We will reassign it back when we pop the portal on the way up.
- currentParent = node.stateNode.containerInfo;
- currentParentIsContainer = true; // Visit children because portals might contain host components.
- node.child.return = node;
- node = node.child;
- continue;
- }
- } else {
- commitUnmount(finishedRoot, node, renderPriorityLevel); // Visit children because we may find more host components below.
- if (node.child !== null) {
- node.child.return = node;
- node = node.child;
- continue;
- }
- }
- if (node === current) {
- return;
- }
- while (node.sibling === null) {
- if (node.return === null || node.return === current) {
- return;
- }
- node = node.return;
- if (node.tag === HostPortal) {
- // When we go out of the portal, we need to restore the parent.
- // Since we don't keep a stack of them, we will search for it.
- currentParentIsValid = false;
- }
- }
- node.sibling.return = node.return;
- node = node.sibling;
- }
- }
- function commitDeletion(finishedRoot, current, renderPriorityLevel) {
- {
- // Recursively delete all host nodes from the parent.
- // Detach refs and call componentWillUnmount() on the whole subtree.
- unmountHostComponents(finishedRoot, current, renderPriorityLevel);
- }
- detachFiber(current);
- }
- function commitWork(current, finishedWork) {
- switch (finishedWork.tag) {
- case FunctionComponent:
- case ForwardRef:
- case MemoComponent:
- case SimpleMemoComponent:
- case Block:
- {
- // Layout effects are destroyed during the mutation phase so that all
- // destroy functions for all fibers are called before any create functions.
- // This prevents sibling component effects from interfering with each other,
- // e.g. a destroy function in one component should never override a ref set
- // by a create function in another component during the same commit.
- commitHookEffectListUnmount(Layout | HasEffect, finishedWork);
- return;
- }
- case ClassComponent:
- {
- return;
- }
- case HostComponent:
- {
- var instance = finishedWork.stateNode;
- if (instance != null) {
- // Commit the work prepared earlier.
- var newProps = finishedWork.memoizedProps; // For hydration we reuse the update path but we treat the oldProps
- // as the newProps. The updatePayload will contain the real change in
- // this case.
- var oldProps = current !== null ? current.memoizedProps : newProps;
- var type = finishedWork.type; // TODO: Type the updateQueue to be specific to host components.
- var updatePayload = finishedWork.updateQueue;
- finishedWork.updateQueue = null;
- if (updatePayload !== null) {
- commitUpdate(instance, updatePayload, type, oldProps, newProps);
- }
- }
- return;
- }
- case HostText:
- {
- if (!(finishedWork.stateNode !== null)) {
- {
- throw Error( "This should have a text node initialized. This error is likely caused by a bug in React. Please file an issue." );
- }
- }
- var textInstance = finishedWork.stateNode;
- var newText = finishedWork.memoizedProps; // For hydration we reuse the update path but we treat the oldProps
- // as the newProps. The updatePayload will contain the real change in
- // this case.
- var oldText = current !== null ? current.memoizedProps : newText;
- commitTextUpdate(textInstance, oldText, newText);
- return;
- }
- case HostRoot:
- {
- {
- var _root = finishedWork.stateNode;
- if (_root.hydrate) {
- // We've just hydrated. No need to hydrate again.
- _root.hydrate = false;
- commitHydratedContainer(_root.containerInfo);
- }
- }
- return;
- }
- case Profiler:
- {
- return;
- }
- case SuspenseComponent:
- {
- commitSuspenseComponent(finishedWork);
- attachSuspenseRetryListeners(finishedWork);
- return;
- }
- case SuspenseListComponent:
- {
- attachSuspenseRetryListeners(finishedWork);
- return;
- }
- case IncompleteClassComponent:
- {
- return;
- }
- }
- {
- {
- throw Error( "This unit of work tag should not have side-effects. This error is likely caused by a bug in React. Please file an issue." );
- }
- }
- }
- function commitSuspenseComponent(finishedWork) {
- var newState = finishedWork.memoizedState;
- var newDidTimeout;
- var primaryChildParent = finishedWork;
- if (newState === null) {
- newDidTimeout = false;
- } else {
- newDidTimeout = true;
- primaryChildParent = finishedWork.child;
- markCommitTimeOfFallback();
- }
- if ( primaryChildParent !== null) {
- hideOrUnhideAllChildren(primaryChildParent, newDidTimeout);
- }
- }
- function commitSuspenseHydrationCallbacks(finishedRoot, finishedWork) {
- var newState = finishedWork.memoizedState;
- if (newState === null) {
- var current = finishedWork.alternate;
- if (current !== null) {
- var prevState = current.memoizedState;
- if (prevState !== null) {
- var suspenseInstance = prevState.dehydrated;
- if (suspenseInstance !== null) {
- commitHydratedSuspenseInstance(suspenseInstance);
- }
- }
- }
- }
- }
- function attachSuspenseRetryListeners(finishedWork) {
- // If this boundary just timed out, then it will have a set of thenables.
- // For each thenable, attach a listener so that when it resolves, React
- // attempts to re-render the boundary in the primary (pre-timeout) state.
- var thenables = finishedWork.updateQueue;
- if (thenables !== null) {
- finishedWork.updateQueue = null;
- var retryCache = finishedWork.stateNode;
- if (retryCache === null) {
- retryCache = finishedWork.stateNode = new PossiblyWeakSet();
- }
- thenables.forEach(function (thenable) {
- // Memoize using the boundary fiber to prevent redundant listeners.
- var retry = resolveRetryThenable.bind(null, finishedWork, thenable);
- if (!retryCache.has(thenable)) {
- {
- if (thenable.__reactDoNotTraceInteractions !== true) {
- retry = tracing.unstable_wrap(retry);
- }
- }
- retryCache.add(thenable);
- thenable.then(retry, retry);
- }
- });
- }
- }
- function commitResetTextContent(current) {
- resetTextContent(current.stateNode);
- }
- var PossiblyWeakMap$1 = typeof WeakMap === 'function' ? WeakMap : Map;
- function createRootErrorUpdate(fiber, errorInfo, expirationTime) {
- var update = createUpdate(expirationTime, null); // Unmount the root by rendering null.
- update.tag = CaptureUpdate; // Caution: React DevTools currently depends on this property
- // being called "element".
- update.payload = {
- element: null
- };
- var error = errorInfo.value;
- update.callback = function () {
- onUncaughtError(error);
- logError(fiber, errorInfo);
- };
- return update;
- }
- function createClassErrorUpdate(fiber, errorInfo, expirationTime) {
- var update = createUpdate(expirationTime, null);
- update.tag = CaptureUpdate;
- var getDerivedStateFromError = fiber.type.getDerivedStateFromError;
- if (typeof getDerivedStateFromError === 'function') {
- var error$1 = errorInfo.value;
- update.payload = function () {
- logError(fiber, errorInfo);
- return getDerivedStateFromError(error$1);
- };
- }
- var inst = fiber.stateNode;
- if (inst !== null && typeof inst.componentDidCatch === 'function') {
- update.callback = function callback() {
- {
- markFailedErrorBoundaryForHotReloading(fiber);
- }
- if (typeof getDerivedStateFromError !== 'function') {
- // To preserve the preexisting retry behavior of error boundaries,
- // we keep track of which ones already failed during this batch.
- // This gets reset before we yield back to the browser.
- // TODO: Warn in strict mode if getDerivedStateFromError is
- // not defined.
- markLegacyErrorBoundaryAsFailed(this); // Only log here if componentDidCatch is the only error boundary method defined
- logError(fiber, errorInfo);
- }
- var error$1 = errorInfo.value;
- var stack = errorInfo.stack;
- this.componentDidCatch(error$1, {
- componentStack: stack !== null ? stack : ''
- });
- {
- if (typeof getDerivedStateFromError !== 'function') {
- // If componentDidCatch is the only error boundary method defined,
- // then it needs to call setState to recover from errors.
- // If no state update is scheduled then the boundary will swallow the error.
- if (fiber.expirationTime !== Sync) {
- error('%s: Error boundaries should implement getDerivedStateFromError(). ' + 'In that method, return a state update to display an error message or fallback UI.', getComponentName(fiber.type) || 'Unknown');
- }
- }
- }
- };
- } else {
- update.callback = function () {
- markFailedErrorBoundaryForHotReloading(fiber);
- };
- }
- return update;
- }
- function attachPingListener(root, renderExpirationTime, thenable) {
- // Attach a listener to the promise to "ping" the root and retry. But
- // only if one does not already exist for the current render expiration
- // time (which acts like a "thread ID" here).
- var pingCache = root.pingCache;
- var threadIDs;
- if (pingCache === null) {
- pingCache = root.pingCache = new PossiblyWeakMap$1();
- threadIDs = new Set();
- pingCache.set(thenable, threadIDs);
- } else {
- threadIDs = pingCache.get(thenable);
- if (threadIDs === undefined) {
- threadIDs = new Set();
- pingCache.set(thenable, threadIDs);
- }
- }
- if (!threadIDs.has(renderExpirationTime)) {
- // Memoize using the thread ID to prevent redundant listeners.
- threadIDs.add(renderExpirationTime);
- var ping = pingSuspendedRoot.bind(null, root, thenable, renderExpirationTime);
- thenable.then(ping, ping);
- }
- }
- function throwException(root, returnFiber, sourceFiber, value, renderExpirationTime) {
- // The source fiber did not complete.
- sourceFiber.effectTag |= Incomplete; // Its effect list is no longer valid.
- sourceFiber.firstEffect = sourceFiber.lastEffect = null;
- if (value !== null && typeof value === 'object' && typeof value.then === 'function') {
- // This is a thenable.
- var thenable = value;
- if ((sourceFiber.mode & BlockingMode) === NoMode) {
- // Reset the memoizedState to what it was before we attempted
- // to render it.
- var currentSource = sourceFiber.alternate;
- if (currentSource) {
- sourceFiber.updateQueue = currentSource.updateQueue;
- sourceFiber.memoizedState = currentSource.memoizedState;
- sourceFiber.expirationTime = currentSource.expirationTime;
- } else {
- sourceFiber.updateQueue = null;
- sourceFiber.memoizedState = null;
- }
- }
- var hasInvisibleParentBoundary = hasSuspenseContext(suspenseStackCursor.current, InvisibleParentSuspenseContext); // Schedule the nearest Suspense to re-render the timed out view.
- var _workInProgress = returnFiber;
- do {
- if (_workInProgress.tag === SuspenseComponent && shouldCaptureSuspense(_workInProgress, hasInvisibleParentBoundary)) {
- // Found the nearest boundary.
- // Stash the promise on the boundary fiber. If the boundary times out, we'll
- // attach another listener to flip the boundary back to its normal state.
- var thenables = _workInProgress.updateQueue;
- if (thenables === null) {
- var updateQueue = new Set();
- updateQueue.add(thenable);
- _workInProgress.updateQueue = updateQueue;
- } else {
- thenables.add(thenable);
- } // If the boundary is outside of blocking mode, we should *not*
- // suspend the commit. Pretend as if the suspended component rendered
- // null and keep rendering. In the commit phase, we'll schedule a
- // subsequent synchronous update to re-render the Suspense.
- //
- // Note: It doesn't matter whether the component that suspended was
- // inside a blocking mode tree. If the Suspense is outside of it, we
- // should *not* suspend the commit.
- if ((_workInProgress.mode & BlockingMode) === NoMode) {
- _workInProgress.effectTag |= DidCapture; // We're going to commit this fiber even though it didn't complete.
- // But we shouldn't call any lifecycle methods or callbacks. Remove
- // all lifecycle effect tags.
- sourceFiber.effectTag &= ~(LifecycleEffectMask | Incomplete);
- if (sourceFiber.tag === ClassComponent) {
- var currentSourceFiber = sourceFiber.alternate;
- if (currentSourceFiber === null) {
- // This is a new mount. Change the tag so it's not mistaken for a
- // completed class component. For example, we should not call
- // componentWillUnmount if it is deleted.
- sourceFiber.tag = IncompleteClassComponent;
- } else {
- // When we try rendering again, we should not reuse the current fiber,
- // since it's known to be in an inconsistent state. Use a force update to
- // prevent a bail out.
- var update = createUpdate(Sync, null);
- update.tag = ForceUpdate;
- enqueueUpdate(sourceFiber, update);
- }
- } // The source fiber did not complete. Mark it with Sync priority to
- // indicate that it still has pending work.
- sourceFiber.expirationTime = Sync; // Exit without suspending.
- return;
- } // Confirmed that the boundary is in a concurrent mode tree. Continue
- // with the normal suspend path.
- //
- // After this we'll use a set of heuristics to determine whether this
- // render pass will run to completion or restart or "suspend" the commit.
- // The actual logic for this is spread out in different places.
- //
- // This first principle is that if we're going to suspend when we complete
- // a root, then we should also restart if we get an update or ping that
- // might unsuspend it, and vice versa. The only reason to suspend is
- // because you think you might want to restart before committing. However,
- // it doesn't make sense to restart only while in the period we're suspended.
- //
- // Restarting too aggressively is also not good because it starves out any
- // intermediate loading state. So we use heuristics to determine when.
- // Suspense Heuristics
- //
- // If nothing threw a Promise or all the same fallbacks are already showing,
- // then don't suspend/restart.
- //
- // If this is an initial render of a new tree of Suspense boundaries and
- // those trigger a fallback, then don't suspend/restart. We want to ensure
- // that we can show the initial loading state as quickly as possible.
- //
- // If we hit a "Delayed" case, such as when we'd switch from content back into
- // a fallback, then we should always suspend/restart. SuspenseConfig applies to
- // this case. If none is defined, JND is used instead.
- //
- // If we're already showing a fallback and it gets "retried", allowing us to show
- // another level, but there's still an inner boundary that would show a fallback,
- // then we suspend/restart for 500ms since the last time we showed a fallback
- // anywhere in the tree. This effectively throttles progressive loading into a
- // consistent train of commits. This also gives us an opportunity to restart to
- // get to the completed state slightly earlier.
- //
- // If there's ambiguity due to batching it's resolved in preference of:
- // 1) "delayed", 2) "initial render", 3) "retry".
- //
- // We want to ensure that a "busy" state doesn't get force committed. We want to
- // ensure that new initial loading states can commit as soon as possible.
- attachPingListener(root, renderExpirationTime, thenable);
- _workInProgress.effectTag |= ShouldCapture;
- _workInProgress.expirationTime = renderExpirationTime;
- return;
- } // This boundary already captured during this render. Continue to the next
- // boundary.
- _workInProgress = _workInProgress.return;
- } while (_workInProgress !== null); // No boundary was found. Fallthrough to error mode.
- // TODO: Use invariant so the message is stripped in prod?
- value = new Error((getComponentName(sourceFiber.type) || 'A React component') + ' suspended while rendering, but no fallback UI was specified.\n' + '\n' + 'Add a <Suspense fallback=...> component higher in the tree to ' + 'provide a loading indicator or placeholder to display.' + getStackByFiberInDevAndProd(sourceFiber));
- } // We didn't find a boundary that could handle this type of exception. Start
- // over and traverse parent path again, this time treating the exception
- // as an error.
- renderDidError();
- value = createCapturedValue(value, sourceFiber);
- var workInProgress = returnFiber;
- do {
- switch (workInProgress.tag) {
- case HostRoot:
- {
- var _errorInfo = value;
- workInProgress.effectTag |= ShouldCapture;
- workInProgress.expirationTime = renderExpirationTime;
- var _update = createRootErrorUpdate(workInProgress, _errorInfo, renderExpirationTime);
- enqueueCapturedUpdate(workInProgress, _update);
- return;
- }
- case ClassComponent:
- // Capture and retry
- var errorInfo = value;
- var ctor = workInProgress.type;
- var instance = workInProgress.stateNode;
- if ((workInProgress.effectTag & DidCapture) === NoEffect && (typeof ctor.getDerivedStateFromError === 'function' || instance !== null && typeof instance.componentDidCatch === 'function' && !isAlreadyFailedLegacyErrorBoundary(instance))) {
- workInProgress.effectTag |= ShouldCapture;
- workInProgress.expirationTime = renderExpirationTime; // Schedule the error boundary to re-render using updated state
- var _update2 = createClassErrorUpdate(workInProgress, errorInfo, renderExpirationTime);
- enqueueCapturedUpdate(workInProgress, _update2);
- return;
- }
- break;
- }
- workInProgress = workInProgress.return;
- } while (workInProgress !== null);
- }
- var ceil = Math.ceil;
- var ReactCurrentDispatcher$1 = ReactSharedInternals.ReactCurrentDispatcher,
- ReactCurrentOwner$2 = ReactSharedInternals.ReactCurrentOwner,
- IsSomeRendererActing = ReactSharedInternals.IsSomeRendererActing;
- var NoContext =
- /* */
- 0;
- var BatchedContext =
- /* */
- 1;
- var EventContext =
- /* */
- 2;
- var DiscreteEventContext =
- /* */
- 4;
- var LegacyUnbatchedContext =
- /* */
- 8;
- var RenderContext =
- /* */
- 16;
- var CommitContext =
- /* */
- 32;
- var RootIncomplete = 0;
- var RootFatalErrored = 1;
- var RootErrored = 2;
- var RootSuspended = 3;
- var RootSuspendedWithDelay = 4;
- var RootCompleted = 5;
- // Describes where we are in the React execution stack
- var executionContext = NoContext; // The root we're working on
- var workInProgressRoot = null; // The fiber we're working on
- var workInProgress = null; // The expiration time we're rendering
- var renderExpirationTime$1 = NoWork; // Whether to root completed, errored, suspended, etc.
- var workInProgressRootExitStatus = RootIncomplete; // A fatal error, if one is thrown
- var workInProgressRootFatalError = null; // Most recent event time among processed updates during this render.
- // This is conceptually a time stamp but expressed in terms of an ExpirationTime
- // because we deal mostly with expiration times in the hot path, so this avoids
- // the conversion happening in the hot path.
- var workInProgressRootLatestProcessedExpirationTime = Sync;
- var workInProgressRootLatestSuspenseTimeout = Sync;
- var workInProgressRootCanSuspendUsingConfig = null; // The work left over by components that were visited during this render. Only
- // includes unprocessed updates, not work in bailed out children.
- var workInProgressRootNextUnprocessedUpdateTime = NoWork; // If we're pinged while rendering we don't always restart immediately.
- // This flag determines if it might be worthwhile to restart if an opportunity
- // happens latere.
- var workInProgressRootHasPendingPing = false; // The most recent time we committed a fallback. This lets us ensure a train
- // model where we don't commit new loading states in too quick succession.
- var globalMostRecentFallbackTime = 0;
- var FALLBACK_THROTTLE_MS = 500;
- var nextEffect = null;
- var hasUncaughtError = false;
- var firstUncaughtError = null;
- var legacyErrorBoundariesThatAlreadyFailed = null;
- var rootDoesHavePassiveEffects = false;
- var rootWithPendingPassiveEffects = null;
- var pendingPassiveEffectsRenderPriority = NoPriority;
- var pendingPassiveEffectsExpirationTime = NoWork;
- var rootsWithPendingDiscreteUpdates = null; // Use these to prevent an infinite loop of nested updates
- var NESTED_UPDATE_LIMIT = 50;
- var nestedUpdateCount = 0;
- var rootWithNestedUpdates = null;
- var NESTED_PASSIVE_UPDATE_LIMIT = 50;
- var nestedPassiveUpdateCount = 0;
- var interruptedBy = null; // Marks the need to reschedule pending interactions at these expiration times
- // during the commit phase. This enables them to be traced across components
- // that spawn new work during render. E.g. hidden boundaries, suspended SSR
- // hydration or SuspenseList.
- var spawnedWorkDuringRender = null; // Expiration times are computed by adding to the current time (the start
- // time). However, if two updates are scheduled within the same event, we
- // should treat their start times as simultaneous, even if the actual clock
- // time has advanced between the first and second call.
- // In other words, because expiration times determine how updates are batched,
- // we want all updates of like priority that occur within the same event to
- // receive the same expiration time. Otherwise we get tearing.
- var currentEventTime = NoWork;
- function requestCurrentTimeForUpdate() {
- if ((executionContext & (RenderContext | CommitContext)) !== NoContext) {
- // We're inside React, so it's fine to read the actual time.
- return msToExpirationTime(now());
- } // We're not inside React, so we may be in the middle of a browser event.
- if (currentEventTime !== NoWork) {
- // Use the same start time for all updates until we enter React again.
- return currentEventTime;
- } // This is the first update since React yielded. Compute a new start time.
- currentEventTime = msToExpirationTime(now());
- return currentEventTime;
- }
- function getCurrentTime() {
- return msToExpirationTime(now());
- }
- function computeExpirationForFiber(currentTime, fiber, suspenseConfig) {
- var mode = fiber.mode;
- if ((mode & BlockingMode) === NoMode) {
- return Sync;
- }
- var priorityLevel = getCurrentPriorityLevel();
- if ((mode & ConcurrentMode) === NoMode) {
- return priorityLevel === ImmediatePriority ? Sync : Batched;
- }
- if ((executionContext & RenderContext) !== NoContext) {
- // Use whatever time we're already rendering
- // TODO: Should there be a way to opt out, like with `runWithPriority`?
- return renderExpirationTime$1;
- }
- var expirationTime;
- if (suspenseConfig !== null) {
- // Compute an expiration time based on the Suspense timeout.
- expirationTime = computeSuspenseExpiration(currentTime, suspenseConfig.timeoutMs | 0 || LOW_PRIORITY_EXPIRATION);
- } else {
- // Compute an expiration time based on the Scheduler priority.
- switch (priorityLevel) {
- case ImmediatePriority:
- expirationTime = Sync;
- break;
- case UserBlockingPriority$1:
- // TODO: Rename this to computeUserBlockingExpiration
- expirationTime = computeInteractiveExpiration(currentTime);
- break;
- case NormalPriority:
- case LowPriority:
- // TODO: Handle LowPriority
- // TODO: Rename this to... something better.
- expirationTime = computeAsyncExpiration(currentTime);
- break;
- case IdlePriority:
- expirationTime = Idle;
- break;
- default:
- {
- {
- throw Error( "Expected a valid priority level" );
- }
- }
- }
- } // If we're in the middle of rendering a tree, do not update at the same
- // expiration time that is already rendering.
- // TODO: We shouldn't have to do this if the update is on a different root.
- // Refactor computeExpirationForFiber + scheduleUpdate so we have access to
- // the root when we check for this condition.
- if (workInProgressRoot !== null && expirationTime === renderExpirationTime$1) {
- // This is a trick to move this update into a separate batch
- expirationTime -= 1;
- }
- return expirationTime;
- }
- function scheduleUpdateOnFiber(fiber, expirationTime) {
- checkForNestedUpdates();
- warnAboutRenderPhaseUpdatesInDEV(fiber);
- var root = markUpdateTimeFromFiberToRoot(fiber, expirationTime);
- if (root === null) {
- warnAboutUpdateOnUnmountedFiberInDEV(fiber);
- return;
- }
- checkForInterruption(fiber, expirationTime);
- recordScheduleUpdate(); // TODO: computeExpirationForFiber also reads the priority. Pass the
- // priority as an argument to that function and this one.
- var priorityLevel = getCurrentPriorityLevel();
- if (expirationTime === Sync) {
- if ( // Check if we're inside unbatchedUpdates
- (executionContext & LegacyUnbatchedContext) !== NoContext && // Check if we're not already rendering
- (executionContext & (RenderContext | CommitContext)) === NoContext) {
- // Register pending interactions on the root to avoid losing traced interaction data.
- schedulePendingInteractions(root, expirationTime); // This is a legacy edge case. The initial mount of a ReactDOM.render-ed
- // root inside of batchedUpdates should be synchronous, but layout updates
- // should be deferred until the end of the batch.
- performSyncWorkOnRoot(root);
- } else {
- ensureRootIsScheduled(root);
- schedulePendingInteractions(root, expirationTime);
- if (executionContext === NoContext) {
- // Flush the synchronous work now, unless we're already working or inside
- // a batch. This is intentionally inside scheduleUpdateOnFiber instead of
- // scheduleCallbackForFiber to preserve the ability to schedule a callback
- // without immediately flushing it. We only do this for user-initiated
- // updates, to preserve historical behavior of legacy mode.
- flushSyncCallbackQueue();
- }
- }
- } else {
- ensureRootIsScheduled(root);
- schedulePendingInteractions(root, expirationTime);
- }
- if ((executionContext & DiscreteEventContext) !== NoContext && ( // Only updates at user-blocking priority or greater are considered
- // discrete, even inside a discrete event.
- priorityLevel === UserBlockingPriority$1 || priorityLevel === ImmediatePriority)) {
- // This is the result of a discrete event. Track the lowest priority
- // discrete update per root so we can flush them early, if needed.
- if (rootsWithPendingDiscreteUpdates === null) {
- rootsWithPendingDiscreteUpdates = new Map([[root, expirationTime]]);
- } else {
- var lastDiscreteTime = rootsWithPendingDiscreteUpdates.get(root);
- if (lastDiscreteTime === undefined || lastDiscreteTime > expirationTime) {
- rootsWithPendingDiscreteUpdates.set(root, expirationTime);
- }
- }
- }
- }
- var scheduleWork = scheduleUpdateOnFiber; // This is split into a separate function so we can mark a fiber with pending
- // work without treating it as a typical update that originates from an event;
- // e.g. retrying a Suspense boundary isn't an update, but it does schedule work
- // on a fiber.
- function markUpdateTimeFromFiberToRoot(fiber, expirationTime) {
- // Update the source fiber's expiration time
- if (fiber.expirationTime < expirationTime) {
- fiber.expirationTime = expirationTime;
- }
- var alternate = fiber.alternate;
- if (alternate !== null && alternate.expirationTime < expirationTime) {
- alternate.expirationTime = expirationTime;
- } // Walk the parent path to the root and update the child expiration time.
- var node = fiber.return;
- var root = null;
- if (node === null && fiber.tag === HostRoot) {
- root = fiber.stateNode;
- } else {
- while (node !== null) {
- alternate = node.alternate;
- if (node.childExpirationTime < expirationTime) {
- node.childExpirationTime = expirationTime;
- if (alternate !== null && alternate.childExpirationTime < expirationTime) {
- alternate.childExpirationTime = expirationTime;
- }
- } else if (alternate !== null && alternate.childExpirationTime < expirationTime) {
- alternate.childExpirationTime = expirationTime;
- }
- if (node.return === null && node.tag === HostRoot) {
- root = node.stateNode;
- break;
- }
- node = node.return;
- }
- }
- if (root !== null) {
- if (workInProgressRoot === root) {
- // Received an update to a tree that's in the middle of rendering. Mark
- // that's unprocessed work on this root.
- markUnprocessedUpdateTime(expirationTime);
- if (workInProgressRootExitStatus === RootSuspendedWithDelay) {
- // The root already suspended with a delay, which means this render
- // definitely won't finish. Since we have a new update, let's mark it as
- // suspended now, right before marking the incoming update. This has the
- // effect of interrupting the current render and switching to the update.
- // TODO: This happens to work when receiving an update during the render
- // phase, because of the trick inside computeExpirationForFiber to
- // subtract 1 from `renderExpirationTime` to move it into a
- // separate bucket. But we should probably model it with an exception,
- // using the same mechanism we use to force hydration of a subtree.
- // TODO: This does not account for low pri updates that were already
- // scheduled before the root started rendering. Need to track the next
- // pending expiration time (perhaps by backtracking the return path) and
- // then trigger a restart in the `renderDidSuspendDelayIfPossible` path.
- markRootSuspendedAtTime(root, renderExpirationTime$1);
- }
- } // Mark that the root has a pending update.
- markRootUpdatedAtTime(root, expirationTime);
- }
- return root;
- }
- function getNextRootExpirationTimeToWorkOn(root) {
- // Determines the next expiration time that the root should render, taking
- // into account levels that may be suspended, or levels that may have
- // received a ping.
- var lastExpiredTime = root.lastExpiredTime;
- if (lastExpiredTime !== NoWork) {
- return lastExpiredTime;
- } // "Pending" refers to any update that hasn't committed yet, including if it
- // suspended. The "suspended" range is therefore a subset.
- var firstPendingTime = root.firstPendingTime;
- if (!isRootSuspendedAtTime(root, firstPendingTime)) {
- // The highest priority pending time is not suspended. Let's work on that.
- return firstPendingTime;
- } // If the first pending time is suspended, check if there's a lower priority
- // pending level that we know about. Or check if we received a ping. Work
- // on whichever is higher priority.
- var lastPingedTime = root.lastPingedTime;
- var nextKnownPendingLevel = root.nextKnownPendingLevel;
- var nextLevel = lastPingedTime > nextKnownPendingLevel ? lastPingedTime : nextKnownPendingLevel;
- if ( nextLevel <= Idle && firstPendingTime !== nextLevel) {
- // Don't work on Idle/Never priority unless everything else is committed.
- return NoWork;
- }
- return nextLevel;
- } // Use this function to schedule a task for a root. There's only one task per
- // root; if a task was already scheduled, we'll check to make sure the
- // expiration time of the existing task is the same as the expiration time of
- // the next level that the root has work on. This function is called on every
- // update, and right before exiting a task.
- function ensureRootIsScheduled(root) {
- var lastExpiredTime = root.lastExpiredTime;
- if (lastExpiredTime !== NoWork) {
- // Special case: Expired work should flush synchronously.
- root.callbackExpirationTime = Sync;
- root.callbackPriority = ImmediatePriority;
- root.callbackNode = scheduleSyncCallback(performSyncWorkOnRoot.bind(null, root));
- return;
- }
- var expirationTime = getNextRootExpirationTimeToWorkOn(root);
- var existingCallbackNode = root.callbackNode;
- if (expirationTime === NoWork) {
- // There's nothing to work on.
- if (existingCallbackNode !== null) {
- root.callbackNode = null;
- root.callbackExpirationTime = NoWork;
- root.callbackPriority = NoPriority;
- }
- return;
- } // TODO: If this is an update, we already read the current time. Pass the
- // time as an argument.
- var currentTime = requestCurrentTimeForUpdate();
- var priorityLevel = inferPriorityFromExpirationTime(currentTime, expirationTime); // If there's an existing render task, confirm it has the correct priority and
- // expiration time. Otherwise, we'll cancel it and schedule a new one.
- if (existingCallbackNode !== null) {
- var existingCallbackPriority = root.callbackPriority;
- var existingCallbackExpirationTime = root.callbackExpirationTime;
- if ( // Callback must have the exact same expiration time.
- existingCallbackExpirationTime === expirationTime && // Callback must have greater or equal priority.
- existingCallbackPriority >= priorityLevel) {
- // Existing callback is sufficient.
- return;
- } // Need to schedule a new task.
- // TODO: Instead of scheduling a new task, we should be able to change the
- // priority of the existing one.
- cancelCallback(existingCallbackNode);
- }
- root.callbackExpirationTime = expirationTime;
- root.callbackPriority = priorityLevel;
- var callbackNode;
- if (expirationTime === Sync) {
- // Sync React callbacks are scheduled on a special internal queue
- callbackNode = scheduleSyncCallback(performSyncWorkOnRoot.bind(null, root));
- } else {
- callbackNode = scheduleCallback(priorityLevel, performConcurrentWorkOnRoot.bind(null, root), // Compute a task timeout based on the expiration time. This also affects
- // ordering because tasks are processed in timeout order.
- {
- timeout: expirationTimeToMs(expirationTime) - now()
- });
- }
- root.callbackNode = callbackNode;
- } // This is the entry point for every concurrent task, i.e. anything that
- // goes through Scheduler.
- function performConcurrentWorkOnRoot(root, didTimeout) {
- // Since we know we're in a React event, we can clear the current
- // event time. The next update will compute a new event time.
- currentEventTime = NoWork;
- if (didTimeout) {
- // The render task took too long to complete. Mark the current time as
- // expired to synchronously render all expired work in a single batch.
- var currentTime = requestCurrentTimeForUpdate();
- markRootExpiredAtTime(root, currentTime); // This will schedule a synchronous callback.
- ensureRootIsScheduled(root);
- return null;
- } // Determine the next expiration time to work on, using the fields stored
- // on the root.
- var expirationTime = getNextRootExpirationTimeToWorkOn(root);
- if (expirationTime !== NoWork) {
- var originalCallbackNode = root.callbackNode;
- if (!((executionContext & (RenderContext | CommitContext)) === NoContext)) {
- {
- throw Error( "Should not already be working." );
- }
- }
- flushPassiveEffects(); // If the root or expiration time have changed, throw out the existing stack
- // and prepare a fresh one. Otherwise we'll continue where we left off.
- if (root !== workInProgressRoot || expirationTime !== renderExpirationTime$1) {
- prepareFreshStack(root, expirationTime);
- startWorkOnPendingInteractions(root, expirationTime);
- } // If we have a work-in-progress fiber, it means there's still work to do
- // in this root.
- if (workInProgress !== null) {
- var prevExecutionContext = executionContext;
- executionContext |= RenderContext;
- var prevDispatcher = pushDispatcher();
- var prevInteractions = pushInteractions(root);
- startWorkLoopTimer(workInProgress);
- do {
- try {
- workLoopConcurrent();
- break;
- } catch (thrownValue) {
- handleError(root, thrownValue);
- }
- } while (true);
- resetContextDependencies();
- executionContext = prevExecutionContext;
- popDispatcher(prevDispatcher);
- {
- popInteractions(prevInteractions);
- }
- if (workInProgressRootExitStatus === RootFatalErrored) {
- var fatalError = workInProgressRootFatalError;
- stopInterruptedWorkLoopTimer();
- prepareFreshStack(root, expirationTime);
- markRootSuspendedAtTime(root, expirationTime);
- ensureRootIsScheduled(root);
- throw fatalError;
- }
- if (workInProgress !== null) {
- // There's still work left over. Exit without committing.
- stopInterruptedWorkLoopTimer();
- } else {
- // We now have a consistent tree. The next step is either to commit it,
- // or, if something suspended, wait to commit it after a timeout.
- stopFinishedWorkLoopTimer();
- var finishedWork = root.finishedWork = root.current.alternate;
- root.finishedExpirationTime = expirationTime;
- finishConcurrentRender(root, finishedWork, workInProgressRootExitStatus, expirationTime);
- }
- ensureRootIsScheduled(root);
- if (root.callbackNode === originalCallbackNode) {
- // The task node scheduled for this root is the same one that's
- // currently executed. Need to return a continuation.
- return performConcurrentWorkOnRoot.bind(null, root);
- }
- }
- }
- return null;
- }
- function finishConcurrentRender(root, finishedWork, exitStatus, expirationTime) {
- // Set this to null to indicate there's no in-progress render.
- workInProgressRoot = null;
- switch (exitStatus) {
- case RootIncomplete:
- case RootFatalErrored:
- {
- {
- {
- throw Error( "Root did not complete. This is a bug in React." );
- }
- }
- }
- // Flow knows about invariant, so it complains if I add a break
- // statement, but eslint doesn't know about invariant, so it complains
- // if I do. eslint-disable-next-line no-fallthrough
- case RootErrored:
- {
- // If this was an async render, the error may have happened due to
- // a mutation in a concurrent event. Try rendering one more time,
- // synchronously, to see if the error goes away. If there are
- // lower priority updates, let's include those, too, in case they
- // fix the inconsistency. Render at Idle to include all updates.
- // If it was Idle or Never or some not-yet-invented time, render
- // at that time.
- markRootExpiredAtTime(root, expirationTime > Idle ? Idle : expirationTime); // We assume that this second render pass will be synchronous
- // and therefore not hit this path again.
- break;
- }
- case RootSuspended:
- {
- markRootSuspendedAtTime(root, expirationTime);
- var lastSuspendedTime = root.lastSuspendedTime;
- if (expirationTime === lastSuspendedTime) {
- root.nextKnownPendingLevel = getRemainingExpirationTime(finishedWork);
- } // We have an acceptable loading state. We need to figure out if we
- // should immediately commit it or wait a bit.
- // If we have processed new updates during this render, we may now
- // have a new loading state ready. We want to ensure that we commit
- // that as soon as possible.
- var hasNotProcessedNewUpdates = workInProgressRootLatestProcessedExpirationTime === Sync;
- if (hasNotProcessedNewUpdates && // do not delay if we're inside an act() scope
- !( IsThisRendererActing.current)) {
- // If we have not processed any new updates during this pass, then
- // this is either a retry of an existing fallback state or a
- // hidden tree. Hidden trees shouldn't be batched with other work
- // and after that's fixed it can only be a retry. We're going to
- // throttle committing retries so that we don't show too many
- // loading states too quickly.
- var msUntilTimeout = globalMostRecentFallbackTime + FALLBACK_THROTTLE_MS - now(); // Don't bother with a very short suspense time.
- if (msUntilTimeout > 10) {
- if (workInProgressRootHasPendingPing) {
- var lastPingedTime = root.lastPingedTime;
- if (lastPingedTime === NoWork || lastPingedTime >= expirationTime) {
- // This render was pinged but we didn't get to restart
- // earlier so try restarting now instead.
- root.lastPingedTime = expirationTime;
- prepareFreshStack(root, expirationTime);
- break;
- }
- }
- var nextTime = getNextRootExpirationTimeToWorkOn(root);
- if (nextTime !== NoWork && nextTime !== expirationTime) {
- // There's additional work on this root.
- break;
- }
- if (lastSuspendedTime !== NoWork && lastSuspendedTime !== expirationTime) {
- // We should prefer to render the fallback of at the last
- // suspended level. Ping the last suspended level to try
- // rendering it again.
- root.lastPingedTime = lastSuspendedTime;
- break;
- } // The render is suspended, it hasn't timed out, and there's no
- // lower priority work to do. Instead of committing the fallback
- // immediately, wait for more data to arrive.
- root.timeoutHandle = scheduleTimeout(commitRoot.bind(null, root), msUntilTimeout);
- break;
- }
- } // The work expired. Commit immediately.
- commitRoot(root);
- break;
- }
- case RootSuspendedWithDelay:
- {
- markRootSuspendedAtTime(root, expirationTime);
- var _lastSuspendedTime = root.lastSuspendedTime;
- if (expirationTime === _lastSuspendedTime) {
- root.nextKnownPendingLevel = getRemainingExpirationTime(finishedWork);
- }
- if ( // do not delay if we're inside an act() scope
- !( IsThisRendererActing.current)) {
- // We're suspended in a state that should be avoided. We'll try to
- // avoid committing it for as long as the timeouts let us.
- if (workInProgressRootHasPendingPing) {
- var _lastPingedTime = root.lastPingedTime;
- if (_lastPingedTime === NoWork || _lastPingedTime >= expirationTime) {
- // This render was pinged but we didn't get to restart earlier
- // so try restarting now instead.
- root.lastPingedTime = expirationTime;
- prepareFreshStack(root, expirationTime);
- break;
- }
- }
- var _nextTime = getNextRootExpirationTimeToWorkOn(root);
- if (_nextTime !== NoWork && _nextTime !== expirationTime) {
- // There's additional work on this root.
- break;
- }
- if (_lastSuspendedTime !== NoWork && _lastSuspendedTime !== expirationTime) {
- // We should prefer to render the fallback of at the last
- // suspended level. Ping the last suspended level to try
- // rendering it again.
- root.lastPingedTime = _lastSuspendedTime;
- break;
- }
- var _msUntilTimeout;
- if (workInProgressRootLatestSuspenseTimeout !== Sync) {
- // We have processed a suspense config whose expiration time we
- // can use as the timeout.
- _msUntilTimeout = expirationTimeToMs(workInProgressRootLatestSuspenseTimeout) - now();
- } else if (workInProgressRootLatestProcessedExpirationTime === Sync) {
- // This should never normally happen because only new updates
- // cause delayed states, so we should have processed something.
- // However, this could also happen in an offscreen tree.
- _msUntilTimeout = 0;
- } else {
- // If we don't have a suspense config, we're going to use a
- // heuristic to determine how long we can suspend.
- var eventTimeMs = inferTimeFromExpirationTime(workInProgressRootLatestProcessedExpirationTime);
- var currentTimeMs = now();
- var timeUntilExpirationMs = expirationTimeToMs(expirationTime) - currentTimeMs;
- var timeElapsed = currentTimeMs - eventTimeMs;
- if (timeElapsed < 0) {
- // We get this wrong some time since we estimate the time.
- timeElapsed = 0;
- }
- _msUntilTimeout = jnd(timeElapsed) - timeElapsed; // Clamp the timeout to the expiration time. TODO: Once the
- // event time is exact instead of inferred from expiration time
- // we don't need this.
- if (timeUntilExpirationMs < _msUntilTimeout) {
- _msUntilTimeout = timeUntilExpirationMs;
- }
- } // Don't bother with a very short suspense time.
- if (_msUntilTimeout > 10) {
- // The render is suspended, it hasn't timed out, and there's no
- // lower priority work to do. Instead of committing the fallback
- // immediately, wait for more data to arrive.
- root.timeoutHandle = scheduleTimeout(commitRoot.bind(null, root), _msUntilTimeout);
- break;
- }
- } // The work expired. Commit immediately.
- commitRoot(root);
- break;
- }
- case RootCompleted:
- {
- // The work completed. Ready to commit.
- if ( // do not delay if we're inside an act() scope
- !( IsThisRendererActing.current) && workInProgressRootLatestProcessedExpirationTime !== Sync && workInProgressRootCanSuspendUsingConfig !== null) {
- // If we have exceeded the minimum loading delay, which probably
- // means we have shown a spinner already, we might have to suspend
- // a bit longer to ensure that the spinner is shown for
- // enough time.
- var _msUntilTimeout2 = computeMsUntilSuspenseLoadingDelay(workInProgressRootLatestProcessedExpirationTime, expirationTime, workInProgressRootCanSuspendUsingConfig);
- if (_msUntilTimeout2 > 10) {
- markRootSuspendedAtTime(root, expirationTime);
- root.timeoutHandle = scheduleTimeout(commitRoot.bind(null, root), _msUntilTimeout2);
- break;
- }
- }
- commitRoot(root);
- break;
- }
- default:
- {
- {
- {
- throw Error( "Unknown root exit status." );
- }
- }
- }
- }
- } // This is the entry point for synchronous tasks that don't go
- // through Scheduler
- function performSyncWorkOnRoot(root) {
- // Check if there's expired work on this root. Otherwise, render at Sync.
- var lastExpiredTime = root.lastExpiredTime;
- var expirationTime = lastExpiredTime !== NoWork ? lastExpiredTime : Sync;
- if (!((executionContext & (RenderContext | CommitContext)) === NoContext)) {
- {
- throw Error( "Should not already be working." );
- }
- }
- flushPassiveEffects(); // If the root or expiration time have changed, throw out the existing stack
- // and prepare a fresh one. Otherwise we'll continue where we left off.
- if (root !== workInProgressRoot || expirationTime !== renderExpirationTime$1) {
- prepareFreshStack(root, expirationTime);
- startWorkOnPendingInteractions(root, expirationTime);
- } // If we have a work-in-progress fiber, it means there's still work to do
- // in this root.
- if (workInProgress !== null) {
- var prevExecutionContext = executionContext;
- executionContext |= RenderContext;
- var prevDispatcher = pushDispatcher();
- var prevInteractions = pushInteractions(root);
- startWorkLoopTimer(workInProgress);
- do {
- try {
- workLoopSync();
- break;
- } catch (thrownValue) {
- handleError(root, thrownValue);
- }
- } while (true);
- resetContextDependencies();
- executionContext = prevExecutionContext;
- popDispatcher(prevDispatcher);
- {
- popInteractions(prevInteractions);
- }
- if (workInProgressRootExitStatus === RootFatalErrored) {
- var fatalError = workInProgressRootFatalError;
- stopInterruptedWorkLoopTimer();
- prepareFreshStack(root, expirationTime);
- markRootSuspendedAtTime(root, expirationTime);
- ensureRootIsScheduled(root);
- throw fatalError;
- }
- if (workInProgress !== null) {
- // This is a sync render, so we should have finished the whole tree.
- {
- {
- throw Error( "Cannot commit an incomplete root. This error is likely caused by a bug in React. Please file an issue." );
- }
- }
- } else {
- // We now have a consistent tree. Because this is a sync render, we
- // will commit it even if something suspended.
- stopFinishedWorkLoopTimer();
- root.finishedWork = root.current.alternate;
- root.finishedExpirationTime = expirationTime;
- finishSyncRender(root);
- } // Before exiting, make sure there's a callback scheduled for the next
- // pending level.
- ensureRootIsScheduled(root);
- }
- return null;
- }
- function finishSyncRender(root) {
- // Set this to null to indicate there's no in-progress render.
- workInProgressRoot = null;
- commitRoot(root);
- }
- function flushDiscreteUpdates() {
- // TODO: Should be able to flush inside batchedUpdates, but not inside `act`.
- // However, `act` uses `batchedUpdates`, so there's no way to distinguish
- // those two cases. Need to fix this before exposing flushDiscreteUpdates
- // as a public API.
- if ((executionContext & (BatchedContext | RenderContext | CommitContext)) !== NoContext) {
- {
- if ((executionContext & RenderContext) !== NoContext) {
- error('unstable_flushDiscreteUpdates: Cannot flush updates when React is ' + 'already rendering.');
- }
- } // We're already rendering, so we can't synchronously flush pending work.
- // This is probably a nested event dispatch triggered by a lifecycle/effect,
- // like `el.focus()`. Exit.
- return;
- }
- flushPendingDiscreteUpdates(); // If the discrete updates scheduled passive effects, flush them now so that
- // they fire before the next serial event.
- flushPassiveEffects();
- }
- function syncUpdates(fn, a, b, c) {
- return runWithPriority$1(ImmediatePriority, fn.bind(null, a, b, c));
- }
- function flushPendingDiscreteUpdates() {
- if (rootsWithPendingDiscreteUpdates !== null) {
- // For each root with pending discrete updates, schedule a callback to
- // immediately flush them.
- var roots = rootsWithPendingDiscreteUpdates;
- rootsWithPendingDiscreteUpdates = null;
- roots.forEach(function (expirationTime, root) {
- markRootExpiredAtTime(root, expirationTime);
- ensureRootIsScheduled(root);
- }); // Now flush the immediate queue.
- flushSyncCallbackQueue();
- }
- }
- function batchedUpdates$1(fn, a) {
- var prevExecutionContext = executionContext;
- executionContext |= BatchedContext;
- try {
- return fn(a);
- } finally {
- executionContext = prevExecutionContext;
- if (executionContext === NoContext) {
- // Flush the immediate callbacks that were scheduled during this batch
- flushSyncCallbackQueue();
- }
- }
- }
- function batchedEventUpdates$1(fn, a) {
- var prevExecutionContext = executionContext;
- executionContext |= EventContext;
- try {
- return fn(a);
- } finally {
- executionContext = prevExecutionContext;
- if (executionContext === NoContext) {
- // Flush the immediate callbacks that were scheduled during this batch
- flushSyncCallbackQueue();
- }
- }
- }
- function discreteUpdates$1(fn, a, b, c, d) {
- var prevExecutionContext = executionContext;
- executionContext |= DiscreteEventContext;
- try {
- // Should this
- return runWithPriority$1(UserBlockingPriority$1, fn.bind(null, a, b, c, d));
- } finally {
- executionContext = prevExecutionContext;
- if (executionContext === NoContext) {
- // Flush the immediate callbacks that were scheduled during this batch
- flushSyncCallbackQueue();
- }
- }
- }
- function unbatchedUpdates(fn, a) {
- var prevExecutionContext = executionContext;
- executionContext &= ~BatchedContext;
- executionContext |= LegacyUnbatchedContext;
- try {
- return fn(a);
- } finally {
- executionContext = prevExecutionContext;
- if (executionContext === NoContext) {
- // Flush the immediate callbacks that were scheduled during this batch
- flushSyncCallbackQueue();
- }
- }
- }
- function flushSync(fn, a) {
- if ((executionContext & (RenderContext | CommitContext)) !== NoContext) {
- {
- {
- throw Error( "flushSync was called from inside a lifecycle method. It cannot be called when React is already rendering." );
- }
- }
- }
- var prevExecutionContext = executionContext;
- executionContext |= BatchedContext;
- try {
- return runWithPriority$1(ImmediatePriority, fn.bind(null, a));
- } finally {
- executionContext = prevExecutionContext; // Flush the immediate callbacks that were scheduled during this batch.
- // Note that this will happen even if batchedUpdates is higher up
- // the stack.
- flushSyncCallbackQueue();
- }
- }
- function prepareFreshStack(root, expirationTime) {
- root.finishedWork = null;
- root.finishedExpirationTime = NoWork;
- var timeoutHandle = root.timeoutHandle;
- if (timeoutHandle !== noTimeout) {
- // The root previous suspended and scheduled a timeout to commit a fallback
- // state. Now that we have additional work, cancel the timeout.
- root.timeoutHandle = noTimeout; // $FlowFixMe Complains noTimeout is not a TimeoutID, despite the check above
- cancelTimeout(timeoutHandle);
- }
- if (workInProgress !== null) {
- var interruptedWork = workInProgress.return;
- while (interruptedWork !== null) {
- unwindInterruptedWork(interruptedWork);
- interruptedWork = interruptedWork.return;
- }
- }
- workInProgressRoot = root;
- workInProgress = createWorkInProgress(root.current, null);
- renderExpirationTime$1 = expirationTime;
- workInProgressRootExitStatus = RootIncomplete;
- workInProgressRootFatalError = null;
- workInProgressRootLatestProcessedExpirationTime = Sync;
- workInProgressRootLatestSuspenseTimeout = Sync;
- workInProgressRootCanSuspendUsingConfig = null;
- workInProgressRootNextUnprocessedUpdateTime = NoWork;
- workInProgressRootHasPendingPing = false;
- {
- spawnedWorkDuringRender = null;
- }
- {
- ReactStrictModeWarnings.discardPendingWarnings();
- }
- }
- function handleError(root, thrownValue) {
- do {
- try {
- // Reset module-level state that was set during the render phase.
- resetContextDependencies();
- resetHooksAfterThrow();
- resetCurrentFiber();
- if (workInProgress === null || workInProgress.return === null) {
- // Expected to be working on a non-root fiber. This is a fatal error
- // because there's no ancestor that can handle it; the root is
- // supposed to capture all errors that weren't caught by an error
- // boundary.
- workInProgressRootExitStatus = RootFatalErrored;
- workInProgressRootFatalError = thrownValue; // Set `workInProgress` to null. This represents advancing to the next
- // sibling, or the parent if there are no siblings. But since the root
- // has no siblings nor a parent, we set it to null. Usually this is
- // handled by `completeUnitOfWork` or `unwindWork`, but since we're
- // interntionally not calling those, we need set it here.
- // TODO: Consider calling `unwindWork` to pop the contexts.
- workInProgress = null;
- return null;
- }
- if (enableProfilerTimer && workInProgress.mode & ProfileMode) {
- // Record the time spent rendering before an error was thrown. This
- // avoids inaccurate Profiler durations in the case of a
- // suspended render.
- stopProfilerTimerIfRunningAndRecordDelta(workInProgress, true);
- }
- throwException(root, workInProgress.return, workInProgress, thrownValue, renderExpirationTime$1);
- workInProgress = completeUnitOfWork(workInProgress);
- } catch (yetAnotherThrownValue) {
- // Something in the return path also threw.
- thrownValue = yetAnotherThrownValue;
- continue;
- } // Return to the normal work loop.
- return;
- } while (true);
- }
- function pushDispatcher(root) {
- var prevDispatcher = ReactCurrentDispatcher$1.current;
- ReactCurrentDispatcher$1.current = ContextOnlyDispatcher;
- if (prevDispatcher === null) {
- // The React isomorphic package does not include a default dispatcher.
- // Instead the first renderer will lazily attach one, in order to give
- // nicer error messages.
- return ContextOnlyDispatcher;
- } else {
- return prevDispatcher;
- }
- }
- function popDispatcher(prevDispatcher) {
- ReactCurrentDispatcher$1.current = prevDispatcher;
- }
- function pushInteractions(root) {
- {
- var prevInteractions = tracing.__interactionsRef.current;
- tracing.__interactionsRef.current = root.memoizedInteractions;
- return prevInteractions;
- }
- }
- function popInteractions(prevInteractions) {
- {
- tracing.__interactionsRef.current = prevInteractions;
- }
- }
- function markCommitTimeOfFallback() {
- globalMostRecentFallbackTime = now();
- }
- function markRenderEventTimeAndConfig(expirationTime, suspenseConfig) {
- if (expirationTime < workInProgressRootLatestProcessedExpirationTime && expirationTime > Idle) {
- workInProgressRootLatestProcessedExpirationTime = expirationTime;
- }
- if (suspenseConfig !== null) {
- if (expirationTime < workInProgressRootLatestSuspenseTimeout && expirationTime > Idle) {
- workInProgressRootLatestSuspenseTimeout = expirationTime; // Most of the time we only have one config and getting wrong is not bad.
- workInProgressRootCanSuspendUsingConfig = suspenseConfig;
- }
- }
- }
- function markUnprocessedUpdateTime(expirationTime) {
- if (expirationTime > workInProgressRootNextUnprocessedUpdateTime) {
- workInProgressRootNextUnprocessedUpdateTime = expirationTime;
- }
- }
- function renderDidSuspend() {
- if (workInProgressRootExitStatus === RootIncomplete) {
- workInProgressRootExitStatus = RootSuspended;
- }
- }
- function renderDidSuspendDelayIfPossible() {
- if (workInProgressRootExitStatus === RootIncomplete || workInProgressRootExitStatus === RootSuspended) {
- workInProgressRootExitStatus = RootSuspendedWithDelay;
- } // Check if there's a lower priority update somewhere else in the tree.
- if (workInProgressRootNextUnprocessedUpdateTime !== NoWork && workInProgressRoot !== null) {
- // Mark the current render as suspended, and then mark that there's a
- // pending update.
- // TODO: This should immediately interrupt the current render, instead
- // of waiting until the next time we yield.
- markRootSuspendedAtTime(workInProgressRoot, renderExpirationTime$1);
- markRootUpdatedAtTime(workInProgressRoot, workInProgressRootNextUnprocessedUpdateTime);
- }
- }
- function renderDidError() {
- if (workInProgressRootExitStatus !== RootCompleted) {
- workInProgressRootExitStatus = RootErrored;
- }
- } // Called during render to determine if anything has suspended.
- // Returns false if we're not sure.
- function renderHasNotSuspendedYet() {
- // If something errored or completed, we can't really be sure,
- // so those are false.
- return workInProgressRootExitStatus === RootIncomplete;
- }
- function inferTimeFromExpirationTime(expirationTime) {
- // We don't know exactly when the update was scheduled, but we can infer an
- // approximate start time from the expiration time.
- var earliestExpirationTimeMs = expirationTimeToMs(expirationTime);
- return earliestExpirationTimeMs - LOW_PRIORITY_EXPIRATION;
- }
- function inferTimeFromExpirationTimeWithSuspenseConfig(expirationTime, suspenseConfig) {
- // We don't know exactly when the update was scheduled, but we can infer an
- // approximate start time from the expiration time by subtracting the timeout
- // that was added to the event time.
- var earliestExpirationTimeMs = expirationTimeToMs(expirationTime);
- return earliestExpirationTimeMs - (suspenseConfig.timeoutMs | 0 || LOW_PRIORITY_EXPIRATION);
- } // The work loop is an extremely hot path. Tell Closure not to inline it.
- /** @noinline */
- function workLoopSync() {
- // Already timed out, so perform work without checking if we need to yield.
- while (workInProgress !== null) {
- workInProgress = performUnitOfWork(workInProgress);
- }
- }
- /** @noinline */
- function workLoopConcurrent() {
- // Perform work until Scheduler asks us to yield
- while (workInProgress !== null && !shouldYield()) {
- workInProgress = performUnitOfWork(workInProgress);
- }
- }
- function performUnitOfWork(unitOfWork) {
- // The current, flushed, state of this fiber is the alternate. Ideally
- // nothing should rely on this, but relying on it here means that we don't
- // need an additional field on the work in progress.
- var current = unitOfWork.alternate;
- startWorkTimer(unitOfWork);
- setCurrentFiber(unitOfWork);
- var next;
- if ( (unitOfWork.mode & ProfileMode) !== NoMode) {
- startProfilerTimer(unitOfWork);
- next = beginWork$1(current, unitOfWork, renderExpirationTime$1);
- stopProfilerTimerIfRunningAndRecordDelta(unitOfWork, true);
- } else {
- next = beginWork$1(current, unitOfWork, renderExpirationTime$1);
- }
- resetCurrentFiber();
- unitOfWork.memoizedProps = unitOfWork.pendingProps;
- if (next === null) {
- // If this doesn't spawn new work, complete the current work.
- next = completeUnitOfWork(unitOfWork);
- }
- ReactCurrentOwner$2.current = null;
- return next;
- }
- function completeUnitOfWork(unitOfWork) {
- // Attempt to complete the current unit of work, then move to the next
- // sibling. If there are no more siblings, return to the parent fiber.
- workInProgress = unitOfWork;
- do {
- // The current, flushed, state of this fiber is the alternate. Ideally
- // nothing should rely on this, but relying on it here means that we don't
- // need an additional field on the work in progress.
- var current = workInProgress.alternate;
- var returnFiber = workInProgress.return; // Check if the work completed or if something threw.
- if ((workInProgress.effectTag & Incomplete) === NoEffect) {
- setCurrentFiber(workInProgress);
- var next = void 0;
- if ( (workInProgress.mode & ProfileMode) === NoMode) {
- next = completeWork(current, workInProgress, renderExpirationTime$1);
- } else {
- startProfilerTimer(workInProgress);
- next = completeWork(current, workInProgress, renderExpirationTime$1); // Update render duration assuming we didn't error.
- stopProfilerTimerIfRunningAndRecordDelta(workInProgress, false);
- }
- stopWorkTimer(workInProgress);
- resetCurrentFiber();
- resetChildExpirationTime(workInProgress);
- if (next !== null) {
- // Completing this fiber spawned new work. Work on that next.
- return next;
- }
- if (returnFiber !== null && // Do not append effects to parents if a sibling failed to complete
- (returnFiber.effectTag & Incomplete) === NoEffect) {
- // Append all the effects of the subtree and this fiber onto the effect
- // list of the parent. The completion order of the children affects the
- // side-effect order.
- if (returnFiber.firstEffect === null) {
- returnFiber.firstEffect = workInProgress.firstEffect;
- }
- if (workInProgress.lastEffect !== null) {
- if (returnFiber.lastEffect !== null) {
- returnFiber.lastEffect.nextEffect = workInProgress.firstEffect;
- }
- returnFiber.lastEffect = workInProgress.lastEffect;
- } // If this fiber had side-effects, we append it AFTER the children's
- // side-effects. We can perform certain side-effects earlier if needed,
- // by doing multiple passes over the effect list. We don't want to
- // schedule our own side-effect on our own list because if end up
- // reusing children we'll schedule this effect onto itself since we're
- // at the end.
- var effectTag = workInProgress.effectTag; // Skip both NoWork and PerformedWork tags when creating the effect
- // list. PerformedWork effect is read by React DevTools but shouldn't be
- // committed.
- if (effectTag > PerformedWork) {
- if (returnFiber.lastEffect !== null) {
- returnFiber.lastEffect.nextEffect = workInProgress;
- } else {
- returnFiber.firstEffect = workInProgress;
- }
- returnFiber.lastEffect = workInProgress;
- }
- }
- } else {
- // This fiber did not complete because something threw. Pop values off
- // the stack without entering the complete phase. If this is a boundary,
- // capture values if possible.
- var _next = unwindWork(workInProgress); // Because this fiber did not complete, don't reset its expiration time.
- if ( (workInProgress.mode & ProfileMode) !== NoMode) {
- // Record the render duration for the fiber that errored.
- stopProfilerTimerIfRunningAndRecordDelta(workInProgress, false); // Include the time spent working on failed children before continuing.
- var actualDuration = workInProgress.actualDuration;
- var child = workInProgress.child;
- while (child !== null) {
- actualDuration += child.actualDuration;
- child = child.sibling;
- }
- workInProgress.actualDuration = actualDuration;
- }
- if (_next !== null) {
- // If completing this work spawned new work, do that next. We'll come
- // back here again.
- // Since we're restarting, remove anything that is not a host effect
- // from the effect tag.
- // TODO: The name stopFailedWorkTimer is misleading because Suspense
- // also captures and restarts.
- stopFailedWorkTimer(workInProgress);
- _next.effectTag &= HostEffectMask;
- return _next;
- }
- stopWorkTimer(workInProgress);
- if (returnFiber !== null) {
- // Mark the parent fiber as incomplete and clear its effect list.
- returnFiber.firstEffect = returnFiber.lastEffect = null;
- returnFiber.effectTag |= Incomplete;
- }
- }
- var siblingFiber = workInProgress.sibling;
- if (siblingFiber !== null) {
- // If there is more work to do in this returnFiber, do that next.
- return siblingFiber;
- } // Otherwise, return to the parent
- workInProgress = returnFiber;
- } while (workInProgress !== null); // We've reached the root.
- if (workInProgressRootExitStatus === RootIncomplete) {
- workInProgressRootExitStatus = RootCompleted;
- }
- return null;
- }
- function getRemainingExpirationTime(fiber) {
- var updateExpirationTime = fiber.expirationTime;
- var childExpirationTime = fiber.childExpirationTime;
- return updateExpirationTime > childExpirationTime ? updateExpirationTime : childExpirationTime;
- }
- function resetChildExpirationTime(completedWork) {
- if (renderExpirationTime$1 !== Never && completedWork.childExpirationTime === Never) {
- // The children of this component are hidden. Don't bubble their
- // expiration times.
- return;
- }
- var newChildExpirationTime = NoWork; // Bubble up the earliest expiration time.
- if ( (completedWork.mode & ProfileMode) !== NoMode) {
- // In profiling mode, resetChildExpirationTime is also used to reset
- // profiler durations.
- var actualDuration = completedWork.actualDuration;
- var treeBaseDuration = completedWork.selfBaseDuration; // When a fiber is cloned, its actualDuration is reset to 0. This value will
- // only be updated if work is done on the fiber (i.e. it doesn't bailout).
- // When work is done, it should bubble to the parent's actualDuration. If
- // the fiber has not been cloned though, (meaning no work was done), then
- // this value will reflect the amount of time spent working on a previous
- // render. In that case it should not bubble. We determine whether it was
- // cloned by comparing the child pointer.
- var shouldBubbleActualDurations = completedWork.alternate === null || completedWork.child !== completedWork.alternate.child;
- var child = completedWork.child;
- while (child !== null) {
- var childUpdateExpirationTime = child.expirationTime;
- var childChildExpirationTime = child.childExpirationTime;
- if (childUpdateExpirationTime > newChildExpirationTime) {
- newChildExpirationTime = childUpdateExpirationTime;
- }
- if (childChildExpirationTime > newChildExpirationTime) {
- newChildExpirationTime = childChildExpirationTime;
- }
- if (shouldBubbleActualDurations) {
- actualDuration += child.actualDuration;
- }
- treeBaseDuration += child.treeBaseDuration;
- child = child.sibling;
- }
- completedWork.actualDuration = actualDuration;
- completedWork.treeBaseDuration = treeBaseDuration;
- } else {
- var _child = completedWork.child;
- while (_child !== null) {
- var _childUpdateExpirationTime = _child.expirationTime;
- var _childChildExpirationTime = _child.childExpirationTime;
- if (_childUpdateExpirationTime > newChildExpirationTime) {
- newChildExpirationTime = _childUpdateExpirationTime;
- }
- if (_childChildExpirationTime > newChildExpirationTime) {
- newChildExpirationTime = _childChildExpirationTime;
- }
- _child = _child.sibling;
- }
- }
- completedWork.childExpirationTime = newChildExpirationTime;
- }
- function commitRoot(root) {
- var renderPriorityLevel = getCurrentPriorityLevel();
- runWithPriority$1(ImmediatePriority, commitRootImpl.bind(null, root, renderPriorityLevel));
- return null;
- }
- function commitRootImpl(root, renderPriorityLevel) {
- do {
- // `flushPassiveEffects` will call `flushSyncUpdateQueue` at the end, which
- // means `flushPassiveEffects` will sometimes result in additional
- // passive effects. So we need to keep flushing in a loop until there are
- // no more pending effects.
- // TODO: Might be better if `flushPassiveEffects` did not automatically
- // flush synchronous work at the end, to avoid factoring hazards like this.
- flushPassiveEffects();
- } while (rootWithPendingPassiveEffects !== null);
- flushRenderPhaseStrictModeWarningsInDEV();
- if (!((executionContext & (RenderContext | CommitContext)) === NoContext)) {
- {
- throw Error( "Should not already be working." );
- }
- }
- var finishedWork = root.finishedWork;
- var expirationTime = root.finishedExpirationTime;
- if (finishedWork === null) {
- return null;
- }
- root.finishedWork = null;
- root.finishedExpirationTime = NoWork;
- if (!(finishedWork !== root.current)) {
- {
- throw Error( "Cannot commit the same tree as before. This error is likely caused by a bug in React. Please file an issue." );
- }
- } // commitRoot never returns a continuation; it always finishes synchronously.
- // So we can clear these now to allow a new callback to be scheduled.
- root.callbackNode = null;
- root.callbackExpirationTime = NoWork;
- root.callbackPriority = NoPriority;
- root.nextKnownPendingLevel = NoWork;
- startCommitTimer(); // Update the first and last pending times on this root. The new first
- // pending time is whatever is left on the root fiber.
- var remainingExpirationTimeBeforeCommit = getRemainingExpirationTime(finishedWork);
- markRootFinishedAtTime(root, expirationTime, remainingExpirationTimeBeforeCommit);
- if (root === workInProgressRoot) {
- // We can reset these now that they are finished.
- workInProgressRoot = null;
- workInProgress = null;
- renderExpirationTime$1 = NoWork;
- } // This indicates that the last root we worked on is not the same one that
- // we're committing now. This most commonly happens when a suspended root
- // times out.
- // Get the list of effects.
- var firstEffect;
- if (finishedWork.effectTag > PerformedWork) {
- // A fiber's effect list consists only of its children, not itself. So if
- // the root has an effect, we need to add it to the end of the list. The
- // resulting list is the set that would belong to the root's parent, if it
- // had one; that is, all the effects in the tree including the root.
- if (finishedWork.lastEffect !== null) {
- finishedWork.lastEffect.nextEffect = finishedWork;
- firstEffect = finishedWork.firstEffect;
- } else {
- firstEffect = finishedWork;
- }
- } else {
- // There is no effect on the root.
- firstEffect = finishedWork.firstEffect;
- }
- if (firstEffect !== null) {
- var prevExecutionContext = executionContext;
- executionContext |= CommitContext;
- var prevInteractions = pushInteractions(root); // Reset this to null before calling lifecycles
- ReactCurrentOwner$2.current = null; // The commit phase is broken into several sub-phases. We do a separate pass
- // of the effect list for each phase: all mutation effects come before all
- // layout effects, and so on.
- // The first phase a "before mutation" phase. We use this phase to read the
- // state of the host tree right before we mutate it. This is where
- // getSnapshotBeforeUpdate is called.
- startCommitSnapshotEffectsTimer();
- prepareForCommit(root.containerInfo);
- nextEffect = firstEffect;
- do {
- {
- invokeGuardedCallback(null, commitBeforeMutationEffects, null);
- if (hasCaughtError()) {
- if (!(nextEffect !== null)) {
- {
- throw Error( "Should be working on an effect." );
- }
- }
- var error = clearCaughtError();
- captureCommitPhaseError(nextEffect, error);
- nextEffect = nextEffect.nextEffect;
- }
- }
- } while (nextEffect !== null);
- stopCommitSnapshotEffectsTimer();
- {
- // Mark the current commit time to be shared by all Profilers in this
- // batch. This enables them to be grouped later.
- recordCommitTime();
- } // The next phase is the mutation phase, where we mutate the host tree.
- startCommitHostEffectsTimer();
- nextEffect = firstEffect;
- do {
- {
- invokeGuardedCallback(null, commitMutationEffects, null, root, renderPriorityLevel);
- if (hasCaughtError()) {
- if (!(nextEffect !== null)) {
- {
- throw Error( "Should be working on an effect." );
- }
- }
- var _error = clearCaughtError();
- captureCommitPhaseError(nextEffect, _error);
- nextEffect = nextEffect.nextEffect;
- }
- }
- } while (nextEffect !== null);
- stopCommitHostEffectsTimer();
- resetAfterCommit(root.containerInfo); // The work-in-progress tree is now the current tree. This must come after
- // the mutation phase, so that the previous tree is still current during
- // componentWillUnmount, but before the layout phase, so that the finished
- // work is current during componentDidMount/Update.
- root.current = finishedWork; // The next phase is the layout phase, where we call effects that read
- // the host tree after it's been mutated. The idiomatic use case for this is
- // layout, but class component lifecycles also fire here for legacy reasons.
- startCommitLifeCyclesTimer();
- nextEffect = firstEffect;
- do {
- {
- invokeGuardedCallback(null, commitLayoutEffects, null, root, expirationTime);
- if (hasCaughtError()) {
- if (!(nextEffect !== null)) {
- {
- throw Error( "Should be working on an effect." );
- }
- }
- var _error2 = clearCaughtError();
- captureCommitPhaseError(nextEffect, _error2);
- nextEffect = nextEffect.nextEffect;
- }
- }
- } while (nextEffect !== null);
- stopCommitLifeCyclesTimer();
- nextEffect = null; // Tell Scheduler to yield at the end of the frame, so the browser has an
- // opportunity to paint.
- requestPaint();
- {
- popInteractions(prevInteractions);
- }
- executionContext = prevExecutionContext;
- } else {
- // No effects.
- root.current = finishedWork; // Measure these anyway so the flamegraph explicitly shows that there were
- // no effects.
- // TODO: Maybe there's a better way to report this.
- startCommitSnapshotEffectsTimer();
- stopCommitSnapshotEffectsTimer();
- {
- recordCommitTime();
- }
- startCommitHostEffectsTimer();
- stopCommitHostEffectsTimer();
- startCommitLifeCyclesTimer();
- stopCommitLifeCyclesTimer();
- }
- stopCommitTimer();
- var rootDidHavePassiveEffects = rootDoesHavePassiveEffects;
- if (rootDoesHavePassiveEffects) {
- // This commit has passive effects. Stash a reference to them. But don't
- // schedule a callback until after flushing layout work.
- rootDoesHavePassiveEffects = false;
- rootWithPendingPassiveEffects = root;
- pendingPassiveEffectsExpirationTime = expirationTime;
- pendingPassiveEffectsRenderPriority = renderPriorityLevel;
- } else {
- // We are done with the effect chain at this point so let's clear the
- // nextEffect pointers to assist with GC. If we have passive effects, we'll
- // clear this in flushPassiveEffects.
- nextEffect = firstEffect;
- while (nextEffect !== null) {
- var nextNextEffect = nextEffect.nextEffect;
- nextEffect.nextEffect = null;
- nextEffect = nextNextEffect;
- }
- } // Check if there's remaining work on this root
- var remainingExpirationTime = root.firstPendingTime;
- if (remainingExpirationTime !== NoWork) {
- {
- if (spawnedWorkDuringRender !== null) {
- var expirationTimes = spawnedWorkDuringRender;
- spawnedWorkDuringRender = null;
- for (var i = 0; i < expirationTimes.length; i++) {
- scheduleInteractions(root, expirationTimes[i], root.memoizedInteractions);
- }
- }
- schedulePendingInteractions(root, remainingExpirationTime);
- }
- } else {
- // If there's no remaining work, we can clear the set of already failed
- // error boundaries.
- legacyErrorBoundariesThatAlreadyFailed = null;
- }
- {
- if (!rootDidHavePassiveEffects) {
- // If there are no passive effects, then we can complete the pending interactions.
- // Otherwise, we'll wait until after the passive effects are flushed.
- // Wait to do this until after remaining work has been scheduled,
- // so that we don't prematurely signal complete for interactions when there's e.g. hidden work.
- finishPendingInteractions(root, expirationTime);
- }
- }
- if (remainingExpirationTime === Sync) {
- // Count the number of times the root synchronously re-renders without
- // finishing. If there are too many, it indicates an infinite update loop.
- if (root === rootWithNestedUpdates) {
- nestedUpdateCount++;
- } else {
- nestedUpdateCount = 0;
- rootWithNestedUpdates = root;
- }
- } else {
- nestedUpdateCount = 0;
- }
- onCommitRoot(finishedWork.stateNode, expirationTime); // Always call this before exiting `commitRoot`, to ensure that any
- // additional work on this root is scheduled.
- ensureRootIsScheduled(root);
- if (hasUncaughtError) {
- hasUncaughtError = false;
- var _error3 = firstUncaughtError;
- firstUncaughtError = null;
- throw _error3;
- }
- if ((executionContext & LegacyUnbatchedContext) !== NoContext) {
- // This is a legacy edge case. We just committed the initial mount of
- // a ReactDOM.render-ed root inside of batchedUpdates. The commit fired
- // synchronously, but layout updates should be deferred until the end
- // of the batch.
- return null;
- } // If layout work was scheduled, flush it now.
- flushSyncCallbackQueue();
- return null;
- }
- function commitBeforeMutationEffects() {
- while (nextEffect !== null) {
- var effectTag = nextEffect.effectTag;
- if ((effectTag & Snapshot) !== NoEffect) {
- setCurrentFiber(nextEffect);
- recordEffect();
- var current = nextEffect.alternate;
- commitBeforeMutationLifeCycles(current, nextEffect);
- resetCurrentFiber();
- }
- if ((effectTag & Passive) !== NoEffect) {
- // If there are passive effects, schedule a callback to flush at
- // the earliest opportunity.
- if (!rootDoesHavePassiveEffects) {
- rootDoesHavePassiveEffects = true;
- scheduleCallback(NormalPriority, function () {
- flushPassiveEffects();
- return null;
- });
- }
- }
- nextEffect = nextEffect.nextEffect;
- }
- }
- function commitMutationEffects(root, renderPriorityLevel) {
- // TODO: Should probably move the bulk of this function to commitWork.
- while (nextEffect !== null) {
- setCurrentFiber(nextEffect);
- var effectTag = nextEffect.effectTag;
- if (effectTag & ContentReset) {
- commitResetTextContent(nextEffect);
- }
- if (effectTag & Ref) {
- var current = nextEffect.alternate;
- if (current !== null) {
- commitDetachRef(current);
- }
- } // The following switch statement is only concerned about placement,
- // updates, and deletions. To avoid needing to add a case for every possible
- // bitmap value, we remove the secondary effects from the effect tag and
- // switch on that value.
- var primaryEffectTag = effectTag & (Placement | Update | Deletion | Hydrating);
- switch (primaryEffectTag) {
- case Placement:
- {
- commitPlacement(nextEffect); // Clear the "placement" from effect tag so that we know that this is
- // inserted, before any life-cycles like componentDidMount gets called.
- // TODO: findDOMNode doesn't rely on this any more but isMounted does
- // and isMounted is deprecated anyway so we should be able to kill this.
- nextEffect.effectTag &= ~Placement;
- break;
- }
- case PlacementAndUpdate:
- {
- // Placement
- commitPlacement(nextEffect); // Clear the "placement" from effect tag so that we know that this is
- // inserted, before any life-cycles like componentDidMount gets called.
- nextEffect.effectTag &= ~Placement; // Update
- var _current = nextEffect.alternate;
- commitWork(_current, nextEffect);
- break;
- }
- case Hydrating:
- {
- nextEffect.effectTag &= ~Hydrating;
- break;
- }
- case HydratingAndUpdate:
- {
- nextEffect.effectTag &= ~Hydrating; // Update
- var _current2 = nextEffect.alternate;
- commitWork(_current2, nextEffect);
- break;
- }
- case Update:
- {
- var _current3 = nextEffect.alternate;
- commitWork(_current3, nextEffect);
- break;
- }
- case Deletion:
- {
- commitDeletion(root, nextEffect, renderPriorityLevel);
- break;
- }
- } // TODO: Only record a mutation effect if primaryEffectTag is non-zero.
- recordEffect();
- resetCurrentFiber();
- nextEffect = nextEffect.nextEffect;
- }
- }
- function commitLayoutEffects(root, committedExpirationTime) {
- // TODO: Should probably move the bulk of this function to commitWork.
- while (nextEffect !== null) {
- setCurrentFiber(nextEffect);
- var effectTag = nextEffect.effectTag;
- if (effectTag & (Update | Callback)) {
- recordEffect();
- var current = nextEffect.alternate;
- commitLifeCycles(root, current, nextEffect);
- }
- if (effectTag & Ref) {
- recordEffect();
- commitAttachRef(nextEffect);
- }
- resetCurrentFiber();
- nextEffect = nextEffect.nextEffect;
- }
- }
- function flushPassiveEffects() {
- if (pendingPassiveEffectsRenderPriority !== NoPriority) {
- var priorityLevel = pendingPassiveEffectsRenderPriority > NormalPriority ? NormalPriority : pendingPassiveEffectsRenderPriority;
- pendingPassiveEffectsRenderPriority = NoPriority;
- return runWithPriority$1(priorityLevel, flushPassiveEffectsImpl);
- }
- }
- function flushPassiveEffectsImpl() {
- if (rootWithPendingPassiveEffects === null) {
- return false;
- }
- var root = rootWithPendingPassiveEffects;
- var expirationTime = pendingPassiveEffectsExpirationTime;
- rootWithPendingPassiveEffects = null;
- pendingPassiveEffectsExpirationTime = NoWork;
- if (!((executionContext & (RenderContext | CommitContext)) === NoContext)) {
- {
- throw Error( "Cannot flush passive effects while already rendering." );
- }
- }
- var prevExecutionContext = executionContext;
- executionContext |= CommitContext;
- var prevInteractions = pushInteractions(root);
- {
- // Note: This currently assumes there are no passive effects on the root fiber
- // because the root is not part of its own effect list.
- // This could change in the future.
- var _effect2 = root.current.firstEffect;
- while (_effect2 !== null) {
- {
- setCurrentFiber(_effect2);
- invokeGuardedCallback(null, commitPassiveHookEffects, null, _effect2);
- if (hasCaughtError()) {
- if (!(_effect2 !== null)) {
- {
- throw Error( "Should be working on an effect." );
- }
- }
- var _error5 = clearCaughtError();
- captureCommitPhaseError(_effect2, _error5);
- }
- resetCurrentFiber();
- }
- var nextNextEffect = _effect2.nextEffect; // Remove nextEffect pointer to assist GC
- _effect2.nextEffect = null;
- _effect2 = nextNextEffect;
- }
- }
- {
- popInteractions(prevInteractions);
- finishPendingInteractions(root, expirationTime);
- }
- executionContext = prevExecutionContext;
- flushSyncCallbackQueue(); // If additional passive effects were scheduled, increment a counter. If this
- // exceeds the limit, we'll fire a warning.
- nestedPassiveUpdateCount = rootWithPendingPassiveEffects === null ? 0 : nestedPassiveUpdateCount + 1;
- return true;
- }
- function isAlreadyFailedLegacyErrorBoundary(instance) {
- return legacyErrorBoundariesThatAlreadyFailed !== null && legacyErrorBoundariesThatAlreadyFailed.has(instance);
- }
- function markLegacyErrorBoundaryAsFailed(instance) {
- if (legacyErrorBoundariesThatAlreadyFailed === null) {
- legacyErrorBoundariesThatAlreadyFailed = new Set([instance]);
- } else {
- legacyErrorBoundariesThatAlreadyFailed.add(instance);
- }
- }
- function prepareToThrowUncaughtError(error) {
- if (!hasUncaughtError) {
- hasUncaughtError = true;
- firstUncaughtError = error;
- }
- }
- var onUncaughtError = prepareToThrowUncaughtError;
- function captureCommitPhaseErrorOnRoot(rootFiber, sourceFiber, error) {
- var errorInfo = createCapturedValue(error, sourceFiber);
- var update = createRootErrorUpdate(rootFiber, errorInfo, Sync);
- enqueueUpdate(rootFiber, update);
- var root = markUpdateTimeFromFiberToRoot(rootFiber, Sync);
- if (root !== null) {
- ensureRootIsScheduled(root);
- schedulePendingInteractions(root, Sync);
- }
- }
- function captureCommitPhaseError(sourceFiber, error) {
- if (sourceFiber.tag === HostRoot) {
- // Error was thrown at the root. There is no parent, so the root
- // itself should capture it.
- captureCommitPhaseErrorOnRoot(sourceFiber, sourceFiber, error);
- return;
- }
- var fiber = sourceFiber.return;
- while (fiber !== null) {
- if (fiber.tag === HostRoot) {
- captureCommitPhaseErrorOnRoot(fiber, sourceFiber, error);
- return;
- } else if (fiber.tag === ClassComponent) {
- var ctor = fiber.type;
- var instance = fiber.stateNode;
- if (typeof ctor.getDerivedStateFromError === 'function' || typeof instance.componentDidCatch === 'function' && !isAlreadyFailedLegacyErrorBoundary(instance)) {
- var errorInfo = createCapturedValue(error, sourceFiber);
- var update = createClassErrorUpdate(fiber, errorInfo, // TODO: This is always sync
- Sync);
- enqueueUpdate(fiber, update);
- var root = markUpdateTimeFromFiberToRoot(fiber, Sync);
- if (root !== null) {
- ensureRootIsScheduled(root);
- schedulePendingInteractions(root, Sync);
- }
- return;
- }
- }
- fiber = fiber.return;
- }
- }
- function pingSuspendedRoot(root, thenable, suspendedTime) {
- var pingCache = root.pingCache;
- if (pingCache !== null) {
- // The thenable resolved, so we no longer need to memoize, because it will
- // never be thrown again.
- pingCache.delete(thenable);
- }
- if (workInProgressRoot === root && renderExpirationTime$1 === suspendedTime) {
- // Received a ping at the same priority level at which we're currently
- // rendering. We might want to restart this render. This should mirror
- // the logic of whether or not a root suspends once it completes.
- // TODO: If we're rendering sync either due to Sync, Batched or expired,
- // we should probably never restart.
- // If we're suspended with delay, we'll always suspend so we can always
- // restart. If we're suspended without any updates, it might be a retry.
- // If it's early in the retry we can restart. We can't know for sure
- // whether we'll eventually process an update during this render pass,
- // but it's somewhat unlikely that we get to a ping before that, since
- // getting to the root most update is usually very fast.
- if (workInProgressRootExitStatus === RootSuspendedWithDelay || workInProgressRootExitStatus === RootSuspended && workInProgressRootLatestProcessedExpirationTime === Sync && now() - globalMostRecentFallbackTime < FALLBACK_THROTTLE_MS) {
- // Restart from the root. Don't need to schedule a ping because
- // we're already working on this tree.
- prepareFreshStack(root, renderExpirationTime$1);
- } else {
- // Even though we can't restart right now, we might get an
- // opportunity later. So we mark this render as having a ping.
- workInProgressRootHasPendingPing = true;
- }
- return;
- }
- if (!isRootSuspendedAtTime(root, suspendedTime)) {
- // The root is no longer suspended at this time.
- return;
- }
- var lastPingedTime = root.lastPingedTime;
- if (lastPingedTime !== NoWork && lastPingedTime < suspendedTime) {
- // There's already a lower priority ping scheduled.
- return;
- } // Mark the time at which this ping was scheduled.
- root.lastPingedTime = suspendedTime;
- ensureRootIsScheduled(root);
- schedulePendingInteractions(root, suspendedTime);
- }
- function retryTimedOutBoundary(boundaryFiber, retryTime) {
- // The boundary fiber (a Suspense component or SuspenseList component)
- // previously was rendered in its fallback state. One of the promises that
- // suspended it has resolved, which means at least part of the tree was
- // likely unblocked. Try rendering again, at a new expiration time.
- if (retryTime === NoWork) {
- var suspenseConfig = null; // Retries don't carry over the already committed update.
- var currentTime = requestCurrentTimeForUpdate();
- retryTime = computeExpirationForFiber(currentTime, boundaryFiber, suspenseConfig);
- } // TODO: Special case idle priority?
- var root = markUpdateTimeFromFiberToRoot(boundaryFiber, retryTime);
- if (root !== null) {
- ensureRootIsScheduled(root);
- schedulePendingInteractions(root, retryTime);
- }
- }
- function resolveRetryThenable(boundaryFiber, thenable) {
- var retryTime = NoWork; // Default
- var retryCache;
- {
- retryCache = boundaryFiber.stateNode;
- }
- if (retryCache !== null) {
- // The thenable resolved, so we no longer need to memoize, because it will
- // never be thrown again.
- retryCache.delete(thenable);
- }
- retryTimedOutBoundary(boundaryFiber, retryTime);
- } // Computes the next Just Noticeable Difference (JND) boundary.
- // The theory is that a person can't tell the difference between small differences in time.
- // Therefore, if we wait a bit longer than necessary that won't translate to a noticeable
- // difference in the experience. However, waiting for longer might mean that we can avoid
- // showing an intermediate loading state. The longer we have already waited, the harder it
- // is to tell small differences in time. Therefore, the longer we've already waited,
- // the longer we can wait additionally. At some point we have to give up though.
- // We pick a train model where the next boundary commits at a consistent schedule.
- // These particular numbers are vague estimates. We expect to adjust them based on research.
- function jnd(timeElapsed) {
- return timeElapsed < 120 ? 120 : timeElapsed < 480 ? 480 : timeElapsed < 1080 ? 1080 : timeElapsed < 1920 ? 1920 : timeElapsed < 3000 ? 3000 : timeElapsed < 4320 ? 4320 : ceil(timeElapsed / 1960) * 1960;
- }
- function computeMsUntilSuspenseLoadingDelay(mostRecentEventTime, committedExpirationTime, suspenseConfig) {
- var busyMinDurationMs = suspenseConfig.busyMinDurationMs | 0;
- if (busyMinDurationMs <= 0) {
- return 0;
- }
- var busyDelayMs = suspenseConfig.busyDelayMs | 0; // Compute the time until this render pass would expire.
- var currentTimeMs = now();
- var eventTimeMs = inferTimeFromExpirationTimeWithSuspenseConfig(mostRecentEventTime, suspenseConfig);
- var timeElapsed = currentTimeMs - eventTimeMs;
- if (timeElapsed <= busyDelayMs) {
- // If we haven't yet waited longer than the initial delay, we don't
- // have to wait any additional time.
- return 0;
- }
- var msUntilTimeout = busyDelayMs + busyMinDurationMs - timeElapsed; // This is the value that is passed to `setTimeout`.
- return msUntilTimeout;
- }
- function checkForNestedUpdates() {
- if (nestedUpdateCount > NESTED_UPDATE_LIMIT) {
- nestedUpdateCount = 0;
- rootWithNestedUpdates = null;
- {
- {
- throw Error( "Maximum update depth exceeded. This can happen when a component repeatedly calls setState inside componentWillUpdate or componentDidUpdate. React limits the number of nested updates to prevent infinite loops." );
- }
- }
- }
- {
- if (nestedPassiveUpdateCount > NESTED_PASSIVE_UPDATE_LIMIT) {
- nestedPassiveUpdateCount = 0;
- error('Maximum update depth exceeded. This can happen when a component ' + "calls setState inside useEffect, but useEffect either doesn't " + 'have a dependency array, or one of the dependencies changes on ' + 'every render.');
- }
- }
- }
- function flushRenderPhaseStrictModeWarningsInDEV() {
- {
- ReactStrictModeWarnings.flushLegacyContextWarning();
- {
- ReactStrictModeWarnings.flushPendingUnsafeLifecycleWarnings();
- }
- }
- }
- function stopFinishedWorkLoopTimer() {
- var didCompleteRoot = true;
- stopWorkLoopTimer(interruptedBy, didCompleteRoot);
- interruptedBy = null;
- }
- function stopInterruptedWorkLoopTimer() {
- // TODO: Track which fiber caused the interruption.
- var didCompleteRoot = false;
- stopWorkLoopTimer(interruptedBy, didCompleteRoot);
- interruptedBy = null;
- }
- function checkForInterruption(fiberThatReceivedUpdate, updateExpirationTime) {
- if ( workInProgressRoot !== null && updateExpirationTime > renderExpirationTime$1) {
- interruptedBy = fiberThatReceivedUpdate;
- }
- }
- var didWarnStateUpdateForUnmountedComponent = null;
- function warnAboutUpdateOnUnmountedFiberInDEV(fiber) {
- {
- var tag = fiber.tag;
- if (tag !== HostRoot && tag !== ClassComponent && tag !== FunctionComponent && tag !== ForwardRef && tag !== MemoComponent && tag !== SimpleMemoComponent && tag !== Block) {
- // Only warn for user-defined components, not internal ones like Suspense.
- return;
- }
- // the problematic code almost always lies inside that component.
- var componentName = getComponentName(fiber.type) || 'ReactComponent';
- if (didWarnStateUpdateForUnmountedComponent !== null) {
- if (didWarnStateUpdateForUnmountedComponent.has(componentName)) {
- return;
- }
- didWarnStateUpdateForUnmountedComponent.add(componentName);
- } else {
- didWarnStateUpdateForUnmountedComponent = new Set([componentName]);
- }
- error("Can't perform a React state update on an unmounted component. This " + 'is a no-op, but it indicates a memory leak in your application. To ' + 'fix, cancel all subscriptions and asynchronous tasks in %s.%s', tag === ClassComponent ? 'the componentWillUnmount method' : 'a useEffect cleanup function', getStackByFiberInDevAndProd(fiber));
- }
- }
- var beginWork$1;
- {
- var dummyFiber = null;
- beginWork$1 = function (current, unitOfWork, expirationTime) {
- // If a component throws an error, we replay it again in a synchronously
- // dispatched event, so that the debugger will treat it as an uncaught
- // error See ReactErrorUtils for more information.
- // Before entering the begin phase, copy the work-in-progress onto a dummy
- // fiber. If beginWork throws, we'll use this to reset the state.
- var originalWorkInProgressCopy = assignFiberPropertiesInDEV(dummyFiber, unitOfWork);
- try {
- return beginWork(current, unitOfWork, expirationTime);
- } catch (originalError) {
- if (originalError !== null && typeof originalError === 'object' && typeof originalError.then === 'function') {
- // Don't replay promises. Treat everything else like an error.
- throw originalError;
- } // Keep this code in sync with handleError; any changes here must have
- // corresponding changes there.
- resetContextDependencies();
- resetHooksAfterThrow(); // Don't reset current debug fiber, since we're about to work on the
- // same fiber again.
- // Unwind the failed stack frame
- unwindInterruptedWork(unitOfWork); // Restore the original properties of the fiber.
- assignFiberPropertiesInDEV(unitOfWork, originalWorkInProgressCopy);
- if ( unitOfWork.mode & ProfileMode) {
- // Reset the profiler timer.
- startProfilerTimer(unitOfWork);
- } // Run beginWork again.
- invokeGuardedCallback(null, beginWork, null, current, unitOfWork, expirationTime);
- if (hasCaughtError()) {
- var replayError = clearCaughtError(); // `invokeGuardedCallback` sometimes sets an expando `_suppressLogging`.
- // Rethrow this error instead of the original one.
- throw replayError;
- } else {
- // This branch is reachable if the render phase is impure.
- throw originalError;
- }
- }
- };
- }
- var didWarnAboutUpdateInRender = false;
- var didWarnAboutUpdateInRenderForAnotherComponent;
- {
- didWarnAboutUpdateInRenderForAnotherComponent = new Set();
- }
- function warnAboutRenderPhaseUpdatesInDEV(fiber) {
- {
- if (isRendering && (executionContext & RenderContext) !== NoContext) {
- switch (fiber.tag) {
- case FunctionComponent:
- case ForwardRef:
- case SimpleMemoComponent:
- {
- var renderingComponentName = workInProgress && getComponentName(workInProgress.type) || 'Unknown'; // Dedupe by the rendering component because it's the one that needs to be fixed.
- var dedupeKey = renderingComponentName;
- if (!didWarnAboutUpdateInRenderForAnotherComponent.has(dedupeKey)) {
- didWarnAboutUpdateInRenderForAnotherComponent.add(dedupeKey);
- var setStateComponentName = getComponentName(fiber.type) || 'Unknown';
- error('Cannot update a component (`%s`) while rendering a ' + 'different component (`%s`). To locate the bad setState() call inside `%s`, ' + 'follow the stack trace as described in https://fb.me/setstate-in-render', setStateComponentName, renderingComponentName, renderingComponentName);
- }
- break;
- }
- case ClassComponent:
- {
- if (!didWarnAboutUpdateInRender) {
- error('Cannot update during an existing state transition (such as ' + 'within `render`). Render methods should be a pure ' + 'function of props and state.');
- didWarnAboutUpdateInRender = true;
- }
- break;
- }
- }
- }
- }
- } // a 'shared' variable that changes when act() opens/closes in tests.
- var IsThisRendererActing = {
- current: false
- };
- function warnIfNotScopedWithMatchingAct(fiber) {
- {
- if ( IsSomeRendererActing.current === true && IsThisRendererActing.current !== true) {
- error("It looks like you're using the wrong act() around your test interactions.\n" + 'Be sure to use the matching version of act() corresponding to your renderer:\n\n' + '// for react-dom:\n' + "import {act} from 'react-dom/test-utils';\n" + '// ...\n' + 'act(() => ...);\n\n' + '// for react-test-renderer:\n' + "import TestRenderer from 'react-test-renderer';\n" + 'const {act} = TestRenderer;\n' + '// ...\n' + 'act(() => ...);' + '%s', getStackByFiberInDevAndProd(fiber));
- }
- }
- }
- function warnIfNotCurrentlyActingEffectsInDEV(fiber) {
- {
- if ( (fiber.mode & StrictMode) !== NoMode && IsSomeRendererActing.current === false && IsThisRendererActing.current === false) {
- error('An update to %s ran an effect, but was not wrapped in act(...).\n\n' + 'When testing, code that causes React state updates should be ' + 'wrapped into act(...):\n\n' + 'act(() => {\n' + ' /* fire events that update state */\n' + '});\n' + '/* assert on the output */\n\n' + "This ensures that you're testing the behavior the user would see " + 'in the browser.' + ' Learn more at https://fb.me/react-wrap-tests-with-act' + '%s', getComponentName(fiber.type), getStackByFiberInDevAndProd(fiber));
- }
- }
- }
- function warnIfNotCurrentlyActingUpdatesInDEV(fiber) {
- {
- if ( executionContext === NoContext && IsSomeRendererActing.current === false && IsThisRendererActing.current === false) {
- error('An update to %s inside a test was not wrapped in act(...).\n\n' + 'When testing, code that causes React state updates should be ' + 'wrapped into act(...):\n\n' + 'act(() => {\n' + ' /* fire events that update state */\n' + '});\n' + '/* assert on the output */\n\n' + "This ensures that you're testing the behavior the user would see " + 'in the browser.' + ' Learn more at https://fb.me/react-wrap-tests-with-act' + '%s', getComponentName(fiber.type), getStackByFiberInDevAndProd(fiber));
- }
- }
- }
- var warnIfNotCurrentlyActingUpdatesInDev = warnIfNotCurrentlyActingUpdatesInDEV; // In tests, we want to enforce a mocked scheduler.
- var didWarnAboutUnmockedScheduler = false; // TODO Before we release concurrent mode, revisit this and decide whether a mocked
- // scheduler is the actual recommendation. The alternative could be a testing build,
- // a new lib, or whatever; we dunno just yet. This message is for early adopters
- // to get their tests right.
- function warnIfUnmockedScheduler(fiber) {
- {
- if (didWarnAboutUnmockedScheduler === false && Scheduler.unstable_flushAllWithoutAsserting === undefined) {
- if (fiber.mode & BlockingMode || fiber.mode & ConcurrentMode) {
- didWarnAboutUnmockedScheduler = true;
- error('In Concurrent or Sync modes, the "scheduler" module needs to be mocked ' + 'to guarantee consistent behaviour across tests and browsers. ' + 'For example, with jest: \n' + "jest.mock('scheduler', () => require('scheduler/unstable_mock'));\n\n" + 'For more info, visit https://fb.me/react-mock-scheduler');
- }
- }
- }
- }
- function computeThreadID(root, expirationTime) {
- // Interaction threads are unique per root and expiration time.
- return expirationTime * 1000 + root.interactionThreadID;
- }
- function markSpawnedWork(expirationTime) {
- if (spawnedWorkDuringRender === null) {
- spawnedWorkDuringRender = [expirationTime];
- } else {
- spawnedWorkDuringRender.push(expirationTime);
- }
- }
- function scheduleInteractions(root, expirationTime, interactions) {
- if (interactions.size > 0) {
- var pendingInteractionMap = root.pendingInteractionMap;
- var pendingInteractions = pendingInteractionMap.get(expirationTime);
- if (pendingInteractions != null) {
- interactions.forEach(function (interaction) {
- if (!pendingInteractions.has(interaction)) {
- // Update the pending async work count for previously unscheduled interaction.
- interaction.__count++;
- }
- pendingInteractions.add(interaction);
- });
- } else {
- pendingInteractionMap.set(expirationTime, new Set(interactions)); // Update the pending async work count for the current interactions.
- interactions.forEach(function (interaction) {
- interaction.__count++;
- });
- }
- var subscriber = tracing.__subscriberRef.current;
- if (subscriber !== null) {
- var threadID = computeThreadID(root, expirationTime);
- subscriber.onWorkScheduled(interactions, threadID);
- }
- }
- }
- function schedulePendingInteractions(root, expirationTime) {
- scheduleInteractions(root, expirationTime, tracing.__interactionsRef.current);
- }
- function startWorkOnPendingInteractions(root, expirationTime) {
- // we can accurately attribute time spent working on it, And so that cascading
- // work triggered during the render phase will be associated with it.
- var interactions = new Set();
- root.pendingInteractionMap.forEach(function (scheduledInteractions, scheduledExpirationTime) {
- if (scheduledExpirationTime >= expirationTime) {
- scheduledInteractions.forEach(function (interaction) {
- return interactions.add(interaction);
- });
- }
- }); // Store the current set of interactions on the FiberRoot for a few reasons:
- // We can re-use it in hot functions like performConcurrentWorkOnRoot()
- // without having to recalculate it. We will also use it in commitWork() to
- // pass to any Profiler onRender() hooks. This also provides DevTools with a
- // way to access it when the onCommitRoot() hook is called.
- root.memoizedInteractions = interactions;
- if (interactions.size > 0) {
- var subscriber = tracing.__subscriberRef.current;
- if (subscriber !== null) {
- var threadID = computeThreadID(root, expirationTime);
- try {
- subscriber.onWorkStarted(interactions, threadID);
- } catch (error) {
- // If the subscriber throws, rethrow it in a separate task
- scheduleCallback(ImmediatePriority, function () {
- throw error;
- });
- }
- }
- }
- }
- function finishPendingInteractions(root, committedExpirationTime) {
- var earliestRemainingTimeAfterCommit = root.firstPendingTime;
- var subscriber;
- try {
- subscriber = tracing.__subscriberRef.current;
- if (subscriber !== null && root.memoizedInteractions.size > 0) {
- var threadID = computeThreadID(root, committedExpirationTime);
- subscriber.onWorkStopped(root.memoizedInteractions, threadID);
- }
- } catch (error) {
- // If the subscriber throws, rethrow it in a separate task
- scheduleCallback(ImmediatePriority, function () {
- throw error;
- });
- } finally {
- // Clear completed interactions from the pending Map.
- // Unless the render was suspended or cascading work was scheduled,
- // In which case– leave pending interactions until the subsequent render.
- var pendingInteractionMap = root.pendingInteractionMap;
- pendingInteractionMap.forEach(function (scheduledInteractions, scheduledExpirationTime) {
- // Only decrement the pending interaction count if we're done.
- // If there's still work at the current priority,
- // That indicates that we are waiting for suspense data.
- if (scheduledExpirationTime > earliestRemainingTimeAfterCommit) {
- pendingInteractionMap.delete(scheduledExpirationTime);
- scheduledInteractions.forEach(function (interaction) {
- interaction.__count--;
- if (subscriber !== null && interaction.__count === 0) {
- try {
- subscriber.onInteractionScheduledWorkCompleted(interaction);
- } catch (error) {
- // If the subscriber throws, rethrow it in a separate task
- scheduleCallback(ImmediatePriority, function () {
- throw error;
- });
- }
- }
- });
- }
- });
- }
- }
- var onScheduleFiberRoot = null;
- var onCommitFiberRoot = null;
- var onCommitFiberUnmount = null;
- var hasLoggedError = false;
- var isDevToolsPresent = typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ !== 'undefined';
- function injectInternals(internals) {
- if (typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ === 'undefined') {
- // No DevTools
- return false;
- }
- var hook = __REACT_DEVTOOLS_GLOBAL_HOOK__;
- if (hook.isDisabled) {
- // This isn't a real property on the hook, but it can be set to opt out
- // of DevTools integration and associated warnings and logs.
- // https://github.com/facebook/react/issues/3877
- return true;
- }
- if (!hook.supportsFiber) {
- {
- error('The installed version of React DevTools is too old and will not work ' + 'with the current version of React. Please update React DevTools. ' + 'https://fb.me/react-devtools');
- } // DevTools exists, even though it doesn't support Fiber.
- return true;
- }
- try {
- var rendererID = hook.inject(internals); // We have successfully injected, so now it is safe to set up hooks.
- if (true) {
- // Only used by Fast Refresh
- if (typeof hook.onScheduleFiberRoot === 'function') {
- onScheduleFiberRoot = function (root, children) {
- try {
- hook.onScheduleFiberRoot(rendererID, root, children);
- } catch (err) {
- if (true && !hasLoggedError) {
- hasLoggedError = true;
- error('React instrumentation encountered an error: %s', err);
- }
- }
- };
- }
- }
- onCommitFiberRoot = function (root, expirationTime) {
- try {
- var didError = (root.current.effectTag & DidCapture) === DidCapture;
- if (enableProfilerTimer) {
- var currentTime = getCurrentTime();
- var priorityLevel = inferPriorityFromExpirationTime(currentTime, expirationTime);
- hook.onCommitFiberRoot(rendererID, root, priorityLevel, didError);
- } else {
- hook.onCommitFiberRoot(rendererID, root, undefined, didError);
- }
- } catch (err) {
- if (true) {
- if (!hasLoggedError) {
- hasLoggedError = true;
- error('React instrumentation encountered an error: %s', err);
- }
- }
- }
- };
- onCommitFiberUnmount = function (fiber) {
- try {
- hook.onCommitFiberUnmount(rendererID, fiber);
- } catch (err) {
- if (true) {
- if (!hasLoggedError) {
- hasLoggedError = true;
- error('React instrumentation encountered an error: %s', err);
- }
- }
- }
- };
- } catch (err) {
- // Catch all errors because it is unsafe to throw during initialization.
- {
- error('React instrumentation encountered an error: %s.', err);
- }
- } // DevTools exists
- return true;
- }
- function onScheduleRoot(root, children) {
- if (typeof onScheduleFiberRoot === 'function') {
- onScheduleFiberRoot(root, children);
- }
- }
- function onCommitRoot(root, expirationTime) {
- if (typeof onCommitFiberRoot === 'function') {
- onCommitFiberRoot(root, expirationTime);
- }
- }
- function onCommitUnmount(fiber) {
- if (typeof onCommitFiberUnmount === 'function') {
- onCommitFiberUnmount(fiber);
- }
- }
- var hasBadMapPolyfill;
- {
- hasBadMapPolyfill = false;
- try {
- var nonExtensibleObject = Object.preventExtensions({});
- var testMap = new Map([[nonExtensibleObject, null]]);
- var testSet = new Set([nonExtensibleObject]); // This is necessary for Rollup to not consider these unused.
- // https://github.com/rollup/rollup/issues/1771
- // TODO: we can remove these if Rollup fixes the bug.
- testMap.set(0, 0);
- testSet.add(0);
- } catch (e) {
- // TODO: Consider warning about bad polyfills
- hasBadMapPolyfill = true;
- }
- }
- var debugCounter = 1;
- function FiberNode(tag, pendingProps, key, mode) {
- // Instance
- this.tag = tag;
- this.key = key;
- this.elementType = null;
- this.type = null;
- this.stateNode = null; // Fiber
- this.return = null;
- this.child = null;
- this.sibling = null;
- this.index = 0;
- this.ref = null;
- this.pendingProps = pendingProps;
- this.memoizedProps = null;
- this.updateQueue = null;
- this.memoizedState = null;
- this.dependencies = null;
- this.mode = mode; // Effects
- this.effectTag = NoEffect;
- this.nextEffect = null;
- this.firstEffect = null;
- this.lastEffect = null;
- this.expirationTime = NoWork;
- this.childExpirationTime = NoWork;
- this.alternate = null;
- {
- // Note: The following is done to avoid a v8 performance cliff.
- //
- // Initializing the fields below to smis and later updating them with
- // double values will cause Fibers to end up having separate shapes.
- // This behavior/bug has something to do with Object.preventExtension().
- // Fortunately this only impacts DEV builds.
- // Unfortunately it makes React unusably slow for some applications.
- // To work around this, initialize the fields below with doubles.
- //
- // Learn more about this here:
- // https://github.com/facebook/react/issues/14365
- // https://bugs.chromium.org/p/v8/issues/detail?id=8538
- this.actualDuration = Number.NaN;
- this.actualStartTime = Number.NaN;
- this.selfBaseDuration = Number.NaN;
- this.treeBaseDuration = Number.NaN; // It's okay to replace the initial doubles with smis after initialization.
- // This won't trigger the performance cliff mentioned above,
- // and it simplifies other profiler code (including DevTools).
- this.actualDuration = 0;
- this.actualStartTime = -1;
- this.selfBaseDuration = 0;
- this.treeBaseDuration = 0;
- } // This is normally DEV-only except www when it adds listeners.
- // TODO: remove the User Timing integration in favor of Root Events.
- {
- this._debugID = debugCounter++;
- this._debugIsCurrentlyTiming = false;
- }
- {
- this._debugSource = null;
- this._debugOwner = null;
- this._debugNeedsRemount = false;
- this._debugHookTypes = null;
- if (!hasBadMapPolyfill && typeof Object.preventExtensions === 'function') {
- Object.preventExtensions(this);
- }
- }
- } // This is a constructor function, rather than a POJO constructor, still
- // please ensure we do the following:
- // 1) Nobody should add any instance methods on this. Instance methods can be
- // more difficult to predict when they get optimized and they are almost
- // never inlined properly in static compilers.
- // 2) Nobody should rely on `instanceof Fiber` for type testing. We should
- // always know when it is a fiber.
- // 3) We might want to experiment with using numeric keys since they are easier
- // to optimize in a non-JIT environment.
- // 4) We can easily go from a constructor to a createFiber object literal if that
- // is faster.
- // 5) It should be easy to port this to a C struct and keep a C implementation
- // compatible.
- var createFiber = function (tag, pendingProps, key, mode) {
- // $FlowFixMe: the shapes are exact here but Flow doesn't like constructors
- return new FiberNode(tag, pendingProps, key, mode);
- };
- function shouldConstruct(Component) {
- var prototype = Component.prototype;
- return !!(prototype && prototype.isReactComponent);
- }
- function isSimpleFunctionComponent(type) {
- return typeof type === 'function' && !shouldConstruct(type) && type.defaultProps === undefined;
- }
- function resolveLazyComponentTag(Component) {
- if (typeof Component === 'function') {
- return shouldConstruct(Component) ? ClassComponent : FunctionComponent;
- } else if (Component !== undefined && Component !== null) {
- var $$typeof = Component.$$typeof;
- if ($$typeof === REACT_FORWARD_REF_TYPE) {
- return ForwardRef;
- }
- if ($$typeof === REACT_MEMO_TYPE) {
- return MemoComponent;
- }
- }
- return IndeterminateComponent;
- } // This is used to create an alternate fiber to do work on.
- function createWorkInProgress(current, pendingProps) {
- var workInProgress = current.alternate;
- if (workInProgress === null) {
- // We use a double buffering pooling technique because we know that we'll
- // only ever need at most two versions of a tree. We pool the "other" unused
- // node that we're free to reuse. This is lazily created to avoid allocating
- // extra objects for things that are never updated. It also allow us to
- // reclaim the extra memory if needed.
- workInProgress = createFiber(current.tag, pendingProps, current.key, current.mode);
- workInProgress.elementType = current.elementType;
- workInProgress.type = current.type;
- workInProgress.stateNode = current.stateNode;
- {
- // DEV-only fields
- {
- workInProgress._debugID = current._debugID;
- }
- workInProgress._debugSource = current._debugSource;
- workInProgress._debugOwner = current._debugOwner;
- workInProgress._debugHookTypes = current._debugHookTypes;
- }
- workInProgress.alternate = current;
- current.alternate = workInProgress;
- } else {
- workInProgress.pendingProps = pendingProps; // We already have an alternate.
- // Reset the effect tag.
- workInProgress.effectTag = NoEffect; // The effect list is no longer valid.
- workInProgress.nextEffect = null;
- workInProgress.firstEffect = null;
- workInProgress.lastEffect = null;
- {
- // We intentionally reset, rather than copy, actualDuration & actualStartTime.
- // This prevents time from endlessly accumulating in new commits.
- // This has the downside of resetting values for different priority renders,
- // But works for yielding (the common case) and should support resuming.
- workInProgress.actualDuration = 0;
- workInProgress.actualStartTime = -1;
- }
- }
- workInProgress.childExpirationTime = current.childExpirationTime;
- workInProgress.expirationTime = current.expirationTime;
- workInProgress.child = current.child;
- workInProgress.memoizedProps = current.memoizedProps;
- workInProgress.memoizedState = current.memoizedState;
- workInProgress.updateQueue = current.updateQueue; // Clone the dependencies object. This is mutated during the render phase, so
- // it cannot be shared with the current fiber.
- var currentDependencies = current.dependencies;
- workInProgress.dependencies = currentDependencies === null ? null : {
- expirationTime: currentDependencies.expirationTime,
- firstContext: currentDependencies.firstContext,
- responders: currentDependencies.responders
- }; // These will be overridden during the parent's reconciliation
- workInProgress.sibling = current.sibling;
- workInProgress.index = current.index;
- workInProgress.ref = current.ref;
- {
- workInProgress.selfBaseDuration = current.selfBaseDuration;
- workInProgress.treeBaseDuration = current.treeBaseDuration;
- }
- {
- workInProgress._debugNeedsRemount = current._debugNeedsRemount;
- switch (workInProgress.tag) {
- case IndeterminateComponent:
- case FunctionComponent:
- case SimpleMemoComponent:
- workInProgress.type = resolveFunctionForHotReloading(current.type);
- break;
- case ClassComponent:
- workInProgress.type = resolveClassForHotReloading(current.type);
- break;
- case ForwardRef:
- workInProgress.type = resolveForwardRefForHotReloading(current.type);
- break;
- }
- }
- return workInProgress;
- } // Used to reuse a Fiber for a second pass.
- function resetWorkInProgress(workInProgress, renderExpirationTime) {
- // This resets the Fiber to what createFiber or createWorkInProgress would
- // have set the values to before during the first pass. Ideally this wouldn't
- // be necessary but unfortunately many code paths reads from the workInProgress
- // when they should be reading from current and writing to workInProgress.
- // We assume pendingProps, index, key, ref, return are still untouched to
- // avoid doing another reconciliation.
- // Reset the effect tag but keep any Placement tags, since that's something
- // that child fiber is setting, not the reconciliation.
- workInProgress.effectTag &= Placement; // The effect list is no longer valid.
- workInProgress.nextEffect = null;
- workInProgress.firstEffect = null;
- workInProgress.lastEffect = null;
- var current = workInProgress.alternate;
- if (current === null) {
- // Reset to createFiber's initial values.
- workInProgress.childExpirationTime = NoWork;
- workInProgress.expirationTime = renderExpirationTime;
- workInProgress.child = null;
- workInProgress.memoizedProps = null;
- workInProgress.memoizedState = null;
- workInProgress.updateQueue = null;
- workInProgress.dependencies = null;
- {
- // Note: We don't reset the actualTime counts. It's useful to accumulate
- // actual time across multiple render passes.
- workInProgress.selfBaseDuration = 0;
- workInProgress.treeBaseDuration = 0;
- }
- } else {
- // Reset to the cloned values that createWorkInProgress would've.
- workInProgress.childExpirationTime = current.childExpirationTime;
- workInProgress.expirationTime = current.expirationTime;
- workInProgress.child = current.child;
- workInProgress.memoizedProps = current.memoizedProps;
- workInProgress.memoizedState = current.memoizedState;
- workInProgress.updateQueue = current.updateQueue; // Clone the dependencies object. This is mutated during the render phase, so
- // it cannot be shared with the current fiber.
- var currentDependencies = current.dependencies;
- workInProgress.dependencies = currentDependencies === null ? null : {
- expirationTime: currentDependencies.expirationTime,
- firstContext: currentDependencies.firstContext,
- responders: currentDependencies.responders
- };
- {
- // Note: We don't reset the actualTime counts. It's useful to accumulate
- // actual time across multiple render passes.
- workInProgress.selfBaseDuration = current.selfBaseDuration;
- workInProgress.treeBaseDuration = current.treeBaseDuration;
- }
- }
- return workInProgress;
- }
- function createHostRootFiber(tag) {
- var mode;
- if (tag === ConcurrentRoot) {
- mode = ConcurrentMode | BlockingMode | StrictMode;
- } else if (tag === BlockingRoot) {
- mode = BlockingMode | StrictMode;
- } else {
- mode = NoMode;
- }
- if ( isDevToolsPresent) {
- // Always collect profile timings when DevTools are present.
- // This enables DevTools to start capturing timing at any point–
- // Without some nodes in the tree having empty base times.
- mode |= ProfileMode;
- }
- return createFiber(HostRoot, null, null, mode);
- }
- function createFiberFromTypeAndProps(type, // React$ElementType
- key, pendingProps, owner, mode, expirationTime) {
- var fiber;
- var fiberTag = IndeterminateComponent; // The resolved type is set if we know what the final type will be. I.e. it's not lazy.
- var resolvedType = type;
- if (typeof type === 'function') {
- if (shouldConstruct(type)) {
- fiberTag = ClassComponent;
- {
- resolvedType = resolveClassForHotReloading(resolvedType);
- }
- } else {
- {
- resolvedType = resolveFunctionForHotReloading(resolvedType);
- }
- }
- } else if (typeof type === 'string') {
- fiberTag = HostComponent;
- } else {
- getTag: switch (type) {
- case REACT_FRAGMENT_TYPE:
- return createFiberFromFragment(pendingProps.children, mode, expirationTime, key);
- case REACT_CONCURRENT_MODE_TYPE:
- fiberTag = Mode;
- mode |= ConcurrentMode | BlockingMode | StrictMode;
- break;
- case REACT_STRICT_MODE_TYPE:
- fiberTag = Mode;
- mode |= StrictMode;
- break;
- case REACT_PROFILER_TYPE:
- return createFiberFromProfiler(pendingProps, mode, expirationTime, key);
- case REACT_SUSPENSE_TYPE:
- return createFiberFromSuspense(pendingProps, mode, expirationTime, key);
- case REACT_SUSPENSE_LIST_TYPE:
- return createFiberFromSuspenseList(pendingProps, mode, expirationTime, key);
- default:
- {
- if (typeof type === 'object' && type !== null) {
- switch (type.$$typeof) {
- case REACT_PROVIDER_TYPE:
- fiberTag = ContextProvider;
- break getTag;
- case REACT_CONTEXT_TYPE:
- // This is a consumer
- fiberTag = ContextConsumer;
- break getTag;
- case REACT_FORWARD_REF_TYPE:
- fiberTag = ForwardRef;
- {
- resolvedType = resolveForwardRefForHotReloading(resolvedType);
- }
- break getTag;
- case REACT_MEMO_TYPE:
- fiberTag = MemoComponent;
- break getTag;
- case REACT_LAZY_TYPE:
- fiberTag = LazyComponent;
- resolvedType = null;
- break getTag;
- case REACT_BLOCK_TYPE:
- fiberTag = Block;
- break getTag;
- }
- }
- var info = '';
- {
- if (type === undefined || typeof type === 'object' && type !== null && Object.keys(type).length === 0) {
- info += ' You likely forgot to export your component from the file ' + "it's defined in, or you might have mixed up default and " + 'named imports.';
- }
- var ownerName = owner ? getComponentName(owner.type) : null;
- if (ownerName) {
- info += '\n\nCheck the render method of `' + ownerName + '`.';
- }
- }
- {
- {
- throw Error( "Element type is invalid: expected a string (for built-in components) or a class/function (for composite components) but got: " + (type == null ? type : typeof type) + "." + info );
- }
- }
- }
- }
- }
- fiber = createFiber(fiberTag, pendingProps, key, mode);
- fiber.elementType = type;
- fiber.type = resolvedType;
- fiber.expirationTime = expirationTime;
- return fiber;
- }
- function createFiberFromElement(element, mode, expirationTime) {
- var owner = null;
- {
- owner = element._owner;
- }
- var type = element.type;
- var key = element.key;
- var pendingProps = element.props;
- var fiber = createFiberFromTypeAndProps(type, key, pendingProps, owner, mode, expirationTime);
- {
- fiber._debugSource = element._source;
- fiber._debugOwner = element._owner;
- }
- return fiber;
- }
- function createFiberFromFragment(elements, mode, expirationTime, key) {
- var fiber = createFiber(Fragment, elements, key, mode);
- fiber.expirationTime = expirationTime;
- return fiber;
- }
- function createFiberFromProfiler(pendingProps, mode, expirationTime, key) {
- {
- if (typeof pendingProps.id !== 'string' || typeof pendingProps.onRender !== 'function') {
- error('Profiler must specify an "id" string and "onRender" function as props');
- }
- }
- var fiber = createFiber(Profiler, pendingProps, key, mode | ProfileMode); // TODO: The Profiler fiber shouldn't have a type. It has a tag.
- fiber.elementType = REACT_PROFILER_TYPE;
- fiber.type = REACT_PROFILER_TYPE;
- fiber.expirationTime = expirationTime;
- return fiber;
- }
- function createFiberFromSuspense(pendingProps, mode, expirationTime, key) {
- var fiber = createFiber(SuspenseComponent, pendingProps, key, mode); // TODO: The SuspenseComponent fiber shouldn't have a type. It has a tag.
- // This needs to be fixed in getComponentName so that it relies on the tag
- // instead.
- fiber.type = REACT_SUSPENSE_TYPE;
- fiber.elementType = REACT_SUSPENSE_TYPE;
- fiber.expirationTime = expirationTime;
- return fiber;
- }
- function createFiberFromSuspenseList(pendingProps, mode, expirationTime, key) {
- var fiber = createFiber(SuspenseListComponent, pendingProps, key, mode);
- {
- // TODO: The SuspenseListComponent fiber shouldn't have a type. It has a tag.
- // This needs to be fixed in getComponentName so that it relies on the tag
- // instead.
- fiber.type = REACT_SUSPENSE_LIST_TYPE;
- }
- fiber.elementType = REACT_SUSPENSE_LIST_TYPE;
- fiber.expirationTime = expirationTime;
- return fiber;
- }
- function createFiberFromText(content, mode, expirationTime) {
- var fiber = createFiber(HostText, content, null, mode);
- fiber.expirationTime = expirationTime;
- return fiber;
- }
- function createFiberFromHostInstanceForDeletion() {
- var fiber = createFiber(HostComponent, null, null, NoMode); // TODO: These should not need a type.
- fiber.elementType = 'DELETED';
- fiber.type = 'DELETED';
- return fiber;
- }
- function createFiberFromPortal(portal, mode, expirationTime) {
- var pendingProps = portal.children !== null ? portal.children : [];
- var fiber = createFiber(HostPortal, pendingProps, portal.key, mode);
- fiber.expirationTime = expirationTime;
- fiber.stateNode = {
- containerInfo: portal.containerInfo,
- pendingChildren: null,
- // Used by persistent updates
- implementation: portal.implementation
- };
- return fiber;
- } // Used for stashing WIP properties to replay failed work in DEV.
- function assignFiberPropertiesInDEV(target, source) {
- if (target === null) {
- // This Fiber's initial properties will always be overwritten.
- // We only use a Fiber to ensure the same hidden class so DEV isn't slow.
- target = createFiber(IndeterminateComponent, null, null, NoMode);
- } // This is intentionally written as a list of all properties.
- // We tried to use Object.assign() instead but this is called in
- // the hottest path, and Object.assign() was too slow:
- // https://github.com/facebook/react/issues/12502
- // This code is DEV-only so size is not a concern.
- target.tag = source.tag;
- target.key = source.key;
- target.elementType = source.elementType;
- target.type = source.type;
- target.stateNode = source.stateNode;
- target.return = source.return;
- target.child = source.child;
- target.sibling = source.sibling;
- target.index = source.index;
- target.ref = source.ref;
- target.pendingProps = source.pendingProps;
- target.memoizedProps = source.memoizedProps;
- target.updateQueue = source.updateQueue;
- target.memoizedState = source.memoizedState;
- target.dependencies = source.dependencies;
- target.mode = source.mode;
- target.effectTag = source.effectTag;
- target.nextEffect = source.nextEffect;
- target.firstEffect = source.firstEffect;
- target.lastEffect = source.lastEffect;
- target.expirationTime = source.expirationTime;
- target.childExpirationTime = source.childExpirationTime;
- target.alternate = source.alternate;
- {
- target.actualDuration = source.actualDuration;
- target.actualStartTime = source.actualStartTime;
- target.selfBaseDuration = source.selfBaseDuration;
- target.treeBaseDuration = source.treeBaseDuration;
- }
- {
- target._debugID = source._debugID;
- }
- target._debugSource = source._debugSource;
- target._debugOwner = source._debugOwner;
- target._debugIsCurrentlyTiming = source._debugIsCurrentlyTiming;
- target._debugNeedsRemount = source._debugNeedsRemount;
- target._debugHookTypes = source._debugHookTypes;
- return target;
- }
- function FiberRootNode(containerInfo, tag, hydrate) {
- this.tag = tag;
- this.current = null;
- this.containerInfo = containerInfo;
- this.pendingChildren = null;
- this.pingCache = null;
- this.finishedExpirationTime = NoWork;
- this.finishedWork = null;
- this.timeoutHandle = noTimeout;
- this.context = null;
- this.pendingContext = null;
- this.hydrate = hydrate;
- this.callbackNode = null;
- this.callbackPriority = NoPriority;
- this.firstPendingTime = NoWork;
- this.firstSuspendedTime = NoWork;
- this.lastSuspendedTime = NoWork;
- this.nextKnownPendingLevel = NoWork;
- this.lastPingedTime = NoWork;
- this.lastExpiredTime = NoWork;
- {
- this.interactionThreadID = tracing.unstable_getThreadID();
- this.memoizedInteractions = new Set();
- this.pendingInteractionMap = new Map();
- }
- }
- function createFiberRoot(containerInfo, tag, hydrate, hydrationCallbacks) {
- var root = new FiberRootNode(containerInfo, tag, hydrate);
- // stateNode is any.
- var uninitializedFiber = createHostRootFiber(tag);
- root.current = uninitializedFiber;
- uninitializedFiber.stateNode = root;
- initializeUpdateQueue(uninitializedFiber);
- return root;
- }
- function isRootSuspendedAtTime(root, expirationTime) {
- var firstSuspendedTime = root.firstSuspendedTime;
- var lastSuspendedTime = root.lastSuspendedTime;
- return firstSuspendedTime !== NoWork && firstSuspendedTime >= expirationTime && lastSuspendedTime <= expirationTime;
- }
- function markRootSuspendedAtTime(root, expirationTime) {
- var firstSuspendedTime = root.firstSuspendedTime;
- var lastSuspendedTime = root.lastSuspendedTime;
- if (firstSuspendedTime < expirationTime) {
- root.firstSuspendedTime = expirationTime;
- }
- if (lastSuspendedTime > expirationTime || firstSuspendedTime === NoWork) {
- root.lastSuspendedTime = expirationTime;
- }
- if (expirationTime <= root.lastPingedTime) {
- root.lastPingedTime = NoWork;
- }
- if (expirationTime <= root.lastExpiredTime) {
- root.lastExpiredTime = NoWork;
- }
- }
- function markRootUpdatedAtTime(root, expirationTime) {
- // Update the range of pending times
- var firstPendingTime = root.firstPendingTime;
- if (expirationTime > firstPendingTime) {
- root.firstPendingTime = expirationTime;
- } // Update the range of suspended times. Treat everything lower priority or
- // equal to this update as unsuspended.
- var firstSuspendedTime = root.firstSuspendedTime;
- if (firstSuspendedTime !== NoWork) {
- if (expirationTime >= firstSuspendedTime) {
- // The entire suspended range is now unsuspended.
- root.firstSuspendedTime = root.lastSuspendedTime = root.nextKnownPendingLevel = NoWork;
- } else if (expirationTime >= root.lastSuspendedTime) {
- root.lastSuspendedTime = expirationTime + 1;
- } // This is a pending level. Check if it's higher priority than the next
- // known pending level.
- if (expirationTime > root.nextKnownPendingLevel) {
- root.nextKnownPendingLevel = expirationTime;
- }
- }
- }
- function markRootFinishedAtTime(root, finishedExpirationTime, remainingExpirationTime) {
- // Update the range of pending times
- root.firstPendingTime = remainingExpirationTime; // Update the range of suspended times. Treat everything higher priority or
- // equal to this update as unsuspended.
- if (finishedExpirationTime <= root.lastSuspendedTime) {
- // The entire suspended range is now unsuspended.
- root.firstSuspendedTime = root.lastSuspendedTime = root.nextKnownPendingLevel = NoWork;
- } else if (finishedExpirationTime <= root.firstSuspendedTime) {
- // Part of the suspended range is now unsuspended. Narrow the range to
- // include everything between the unsuspended time (non-inclusive) and the
- // last suspended time.
- root.firstSuspendedTime = finishedExpirationTime - 1;
- }
- if (finishedExpirationTime <= root.lastPingedTime) {
- // Clear the pinged time
- root.lastPingedTime = NoWork;
- }
- if (finishedExpirationTime <= root.lastExpiredTime) {
- // Clear the expired time
- root.lastExpiredTime = NoWork;
- }
- }
- function markRootExpiredAtTime(root, expirationTime) {
- var lastExpiredTime = root.lastExpiredTime;
- if (lastExpiredTime === NoWork || lastExpiredTime > expirationTime) {
- root.lastExpiredTime = expirationTime;
- }
- }
- var didWarnAboutNestedUpdates;
- var didWarnAboutFindNodeInStrictMode;
- {
- didWarnAboutNestedUpdates = false;
- didWarnAboutFindNodeInStrictMode = {};
- }
- function getContextForSubtree(parentComponent) {
- if (!parentComponent) {
- return emptyContextObject;
- }
- var fiber = get(parentComponent);
- var parentContext = findCurrentUnmaskedContext(fiber);
- if (fiber.tag === ClassComponent) {
- var Component = fiber.type;
- if (isContextProvider(Component)) {
- return processChildContext(fiber, Component, parentContext);
- }
- }
- return parentContext;
- }
- function findHostInstanceWithWarning(component, methodName) {
- {
- var fiber = get(component);
- if (fiber === undefined) {
- if (typeof component.render === 'function') {
- {
- {
- throw Error( "Unable to find node on an unmounted component." );
- }
- }
- } else {
- {
- {
- throw Error( "Argument appears to not be a ReactComponent. Keys: " + Object.keys(component) );
- }
- }
- }
- }
- var hostFiber = findCurrentHostFiber(fiber);
- if (hostFiber === null) {
- return null;
- }
- if (hostFiber.mode & StrictMode) {
- var componentName = getComponentName(fiber.type) || 'Component';
- if (!didWarnAboutFindNodeInStrictMode[componentName]) {
- didWarnAboutFindNodeInStrictMode[componentName] = true;
- if (fiber.mode & StrictMode) {
- error('%s is deprecated in StrictMode. ' + '%s was passed an instance of %s which is inside StrictMode. ' + 'Instead, add a ref directly to the element you want to reference. ' + 'Learn more about using refs safely here: ' + 'https://fb.me/react-strict-mode-find-node%s', methodName, methodName, componentName, getStackByFiberInDevAndProd(hostFiber));
- } else {
- error('%s is deprecated in StrictMode. ' + '%s was passed an instance of %s which renders StrictMode children. ' + 'Instead, add a ref directly to the element you want to reference. ' + 'Learn more about using refs safely here: ' + 'https://fb.me/react-strict-mode-find-node%s', methodName, methodName, componentName, getStackByFiberInDevAndProd(hostFiber));
- }
- }
- }
- return hostFiber.stateNode;
- }
- }
- function createContainer(containerInfo, tag, hydrate, hydrationCallbacks) {
- return createFiberRoot(containerInfo, tag, hydrate);
- }
- function updateContainer(element, container, parentComponent, callback) {
- {
- onScheduleRoot(container, element);
- }
- var current$1 = container.current;
- var currentTime = requestCurrentTimeForUpdate();
- {
- // $FlowExpectedError - jest isn't a global, and isn't recognized outside of tests
- if ('undefined' !== typeof jest) {
- warnIfUnmockedScheduler(current$1);
- warnIfNotScopedWithMatchingAct(current$1);
- }
- }
- var suspenseConfig = requestCurrentSuspenseConfig();
- var expirationTime = computeExpirationForFiber(currentTime, current$1, suspenseConfig);
- var context = getContextForSubtree(parentComponent);
- if (container.context === null) {
- container.context = context;
- } else {
- container.pendingContext = context;
- }
- {
- if (isRendering && current !== null && !didWarnAboutNestedUpdates) {
- didWarnAboutNestedUpdates = true;
- error('Render methods should be a pure function of props and state; ' + 'triggering nested component updates from render is not allowed. ' + 'If necessary, trigger nested updates in componentDidUpdate.\n\n' + 'Check the render method of %s.', getComponentName(current.type) || 'Unknown');
- }
- }
- var update = createUpdate(expirationTime, suspenseConfig); // Caution: React DevTools currently depends on this property
- // being called "element".
- update.payload = {
- element: element
- };
- callback = callback === undefined ? null : callback;
- if (callback !== null) {
- {
- if (typeof callback !== 'function') {
- error('render(...): Expected the last optional `callback` argument to be a ' + 'function. Instead received: %s.', callback);
- }
- }
- update.callback = callback;
- }
- enqueueUpdate(current$1, update);
- scheduleWork(current$1, expirationTime);
- return expirationTime;
- }
- function getPublicRootInstance(container) {
- var containerFiber = container.current;
- if (!containerFiber.child) {
- return null;
- }
- switch (containerFiber.child.tag) {
- case HostComponent:
- return getPublicInstance(containerFiber.child.stateNode);
- default:
- return containerFiber.child.stateNode;
- }
- }
- function markRetryTimeImpl(fiber, retryTime) {
- var suspenseState = fiber.memoizedState;
- if (suspenseState !== null && suspenseState.dehydrated !== null) {
- if (suspenseState.retryTime < retryTime) {
- suspenseState.retryTime = retryTime;
- }
- }
- } // Increases the priority of thennables when they resolve within this boundary.
- function markRetryTimeIfNotHydrated(fiber, retryTime) {
- markRetryTimeImpl(fiber, retryTime);
- var alternate = fiber.alternate;
- if (alternate) {
- markRetryTimeImpl(alternate, retryTime);
- }
- }
- function attemptUserBlockingHydration$1(fiber) {
- if (fiber.tag !== SuspenseComponent) {
- // We ignore HostRoots here because we can't increase
- // their priority and they should not suspend on I/O,
- // since you have to wrap anything that might suspend in
- // Suspense.
- return;
- }
- var expTime = computeInteractiveExpiration(requestCurrentTimeForUpdate());
- scheduleWork(fiber, expTime);
- markRetryTimeIfNotHydrated(fiber, expTime);
- }
- function attemptContinuousHydration$1(fiber) {
- if (fiber.tag !== SuspenseComponent) {
- // We ignore HostRoots here because we can't increase
- // their priority and they should not suspend on I/O,
- // since you have to wrap anything that might suspend in
- // Suspense.
- return;
- }
- scheduleWork(fiber, ContinuousHydration);
- markRetryTimeIfNotHydrated(fiber, ContinuousHydration);
- }
- function attemptHydrationAtCurrentPriority$1(fiber) {
- if (fiber.tag !== SuspenseComponent) {
- // We ignore HostRoots here because we can't increase
- // their priority other than synchronously flush it.
- return;
- }
- var currentTime = requestCurrentTimeForUpdate();
- var expTime = computeExpirationForFiber(currentTime, fiber, null);
- scheduleWork(fiber, expTime);
- markRetryTimeIfNotHydrated(fiber, expTime);
- }
- function findHostInstanceWithNoPortals(fiber) {
- var hostFiber = findCurrentHostFiberWithNoPortals(fiber);
- if (hostFiber === null) {
- return null;
- }
- if (hostFiber.tag === FundamentalComponent) {
- return hostFiber.stateNode.instance;
- }
- return hostFiber.stateNode;
- }
- var shouldSuspendImpl = function (fiber) {
- return false;
- };
- function shouldSuspend(fiber) {
- return shouldSuspendImpl(fiber);
- }
- var overrideHookState = null;
- var overrideProps = null;
- var scheduleUpdate = null;
- var setSuspenseHandler = null;
- {
- var copyWithSetImpl = function (obj, path, idx, value) {
- if (idx >= path.length) {
- return value;
- }
- var key = path[idx];
- var updated = Array.isArray(obj) ? obj.slice() : _assign({}, obj); // $FlowFixMe number or string is fine here
- updated[key] = copyWithSetImpl(obj[key], path, idx + 1, value);
- return updated;
- };
- var copyWithSet = function (obj, path, value) {
- return copyWithSetImpl(obj, path, 0, value);
- }; // Support DevTools editable values for useState and useReducer.
- overrideHookState = function (fiber, id, path, value) {
- // For now, the "id" of stateful hooks is just the stateful hook index.
- // This may change in the future with e.g. nested hooks.
- var currentHook = fiber.memoizedState;
- while (currentHook !== null && id > 0) {
- currentHook = currentHook.next;
- id--;
- }
- if (currentHook !== null) {
- var newState = copyWithSet(currentHook.memoizedState, path, value);
- currentHook.memoizedState = newState;
- currentHook.baseState = newState; // We aren't actually adding an update to the queue,
- // because there is no update we can add for useReducer hooks that won't trigger an error.
- // (There's no appropriate action type for DevTools overrides.)
- // As a result though, React will see the scheduled update as a noop and bailout.
- // Shallow cloning props works as a workaround for now to bypass the bailout check.
- fiber.memoizedProps = _assign({}, fiber.memoizedProps);
- scheduleWork(fiber, Sync);
- }
- }; // Support DevTools props for function components, forwardRef, memo, host components, etc.
- overrideProps = function (fiber, path, value) {
- fiber.pendingProps = copyWithSet(fiber.memoizedProps, path, value);
- if (fiber.alternate) {
- fiber.alternate.pendingProps = fiber.pendingProps;
- }
- scheduleWork(fiber, Sync);
- };
- scheduleUpdate = function (fiber) {
- scheduleWork(fiber, Sync);
- };
- setSuspenseHandler = function (newShouldSuspendImpl) {
- shouldSuspendImpl = newShouldSuspendImpl;
- };
- }
- function injectIntoDevTools(devToolsConfig) {
- var findFiberByHostInstance = devToolsConfig.findFiberByHostInstance;
- var ReactCurrentDispatcher = ReactSharedInternals.ReactCurrentDispatcher;
- return injectInternals(_assign({}, devToolsConfig, {
- overrideHookState: overrideHookState,
- overrideProps: overrideProps,
- setSuspenseHandler: setSuspenseHandler,
- scheduleUpdate: scheduleUpdate,
- currentDispatcherRef: ReactCurrentDispatcher,
- findHostInstanceByFiber: function (fiber) {
- var hostFiber = findCurrentHostFiber(fiber);
- if (hostFiber === null) {
- return null;
- }
- return hostFiber.stateNode;
- },
- findFiberByHostInstance: function (instance) {
- if (!findFiberByHostInstance) {
- // Might not be implemented by the renderer.
- return null;
- }
- return findFiberByHostInstance(instance);
- },
- // React Refresh
- findHostInstancesForRefresh: findHostInstancesForRefresh ,
- scheduleRefresh: scheduleRefresh ,
- scheduleRoot: scheduleRoot ,
- setRefreshHandler: setRefreshHandler ,
- // Enables DevTools to append owner stacks to error messages in DEV mode.
- getCurrentFiber: function () {
- return current;
- }
- }));
- }
- var IsSomeRendererActing$1 = ReactSharedInternals.IsSomeRendererActing;
- function ReactDOMRoot(container, options) {
- this._internalRoot = createRootImpl(container, ConcurrentRoot, options);
- }
- function ReactDOMBlockingRoot(container, tag, options) {
- this._internalRoot = createRootImpl(container, tag, options);
- }
- ReactDOMRoot.prototype.render = ReactDOMBlockingRoot.prototype.render = function (children) {
- var root = this._internalRoot;
- {
- if (typeof arguments[1] === 'function') {
- error('render(...): does not support the second callback argument. ' + 'To execute a side effect after rendering, declare it in a component body with useEffect().');
- }
- var container = root.containerInfo;
- if (container.nodeType !== COMMENT_NODE) {
- var hostInstance = findHostInstanceWithNoPortals(root.current);
- if (hostInstance) {
- if (hostInstance.parentNode !== container) {
- error('render(...): It looks like the React-rendered content of the ' + 'root container was removed without using React. This is not ' + 'supported and will cause errors. Instead, call ' + "root.unmount() to empty a root's container.");
- }
- }
- }
- }
- updateContainer(children, root, null, null);
- };
- ReactDOMRoot.prototype.unmount = ReactDOMBlockingRoot.prototype.unmount = function () {
- {
- if (typeof arguments[0] === 'function') {
- error('unmount(...): does not support a callback argument. ' + 'To execute a side effect after rendering, declare it in a component body with useEffect().');
- }
- }
- var root = this._internalRoot;
- var container = root.containerInfo;
- updateContainer(null, root, null, function () {
- unmarkContainerAsRoot(container);
- });
- };
- function createRootImpl(container, tag, options) {
- // Tag is either LegacyRoot or Concurrent Root
- var hydrate = options != null && options.hydrate === true;
- var hydrationCallbacks = options != null && options.hydrationOptions || null;
- var root = createContainer(container, tag, hydrate);
- markContainerAsRoot(root.current, container);
- if (hydrate && tag !== LegacyRoot) {
- var doc = container.nodeType === DOCUMENT_NODE ? container : container.ownerDocument;
- eagerlyTrapReplayableEvents(container, doc);
- }
- return root;
- }
- function createLegacyRoot(container, options) {
- return new ReactDOMBlockingRoot(container, LegacyRoot, options);
- }
- function isValidContainer(node) {
- return !!(node && (node.nodeType === ELEMENT_NODE || node.nodeType === DOCUMENT_NODE || node.nodeType === DOCUMENT_FRAGMENT_NODE || node.nodeType === COMMENT_NODE && node.nodeValue === ' react-mount-point-unstable '));
- }
- var ReactCurrentOwner$3 = ReactSharedInternals.ReactCurrentOwner;
- var topLevelUpdateWarnings;
- var warnedAboutHydrateAPI = false;
- {
- topLevelUpdateWarnings = function (container) {
- if (container._reactRootContainer && container.nodeType !== COMMENT_NODE) {
- var hostInstance = findHostInstanceWithNoPortals(container._reactRootContainer._internalRoot.current);
- if (hostInstance) {
- if (hostInstance.parentNode !== container) {
- error('render(...): It looks like the React-rendered content of this ' + 'container was removed without using React. This is not ' + 'supported and will cause errors. Instead, call ' + 'ReactDOM.unmountComponentAtNode to empty a container.');
- }
- }
- }
- var isRootRenderedBySomeReact = !!container._reactRootContainer;
- var rootEl = getReactRootElementInContainer(container);
- var hasNonRootReactChild = !!(rootEl && getInstanceFromNode$1(rootEl));
- if (hasNonRootReactChild && !isRootRenderedBySomeReact) {
- error('render(...): Replacing React-rendered children with a new root ' + 'component. If you intended to update the children of this node, ' + 'you should instead have the existing children update their state ' + 'and render the new components instead of calling ReactDOM.render.');
- }
- if (container.nodeType === ELEMENT_NODE && container.tagName && container.tagName.toUpperCase() === 'BODY') {
- error('render(): Rendering components directly into document.body is ' + 'discouraged, since its children are often manipulated by third-party ' + 'scripts and browser extensions. This may lead to subtle ' + 'reconciliation issues. Try rendering into a container element created ' + 'for your app.');
- }
- };
- }
- function getReactRootElementInContainer(container) {
- if (!container) {
- return null;
- }
- if (container.nodeType === DOCUMENT_NODE) {
- return container.documentElement;
- } else {
- return container.firstChild;
- }
- }
- function shouldHydrateDueToLegacyHeuristic(container) {
- var rootElement = getReactRootElementInContainer(container);
- return !!(rootElement && rootElement.nodeType === ELEMENT_NODE && rootElement.hasAttribute(ROOT_ATTRIBUTE_NAME));
- }
- function legacyCreateRootFromDOMContainer(container, forceHydrate) {
- var shouldHydrate = forceHydrate || shouldHydrateDueToLegacyHeuristic(container); // First clear any existing content.
- if (!shouldHydrate) {
- var warned = false;
- var rootSibling;
- while (rootSibling = container.lastChild) {
- {
- if (!warned && rootSibling.nodeType === ELEMENT_NODE && rootSibling.hasAttribute(ROOT_ATTRIBUTE_NAME)) {
- warned = true;
- error('render(): Target node has markup rendered by React, but there ' + 'are unrelated nodes as well. This is most commonly caused by ' + 'white-space inserted around server-rendered markup.');
- }
- }
- container.removeChild(rootSibling);
- }
- }
- {
- if (shouldHydrate && !forceHydrate && !warnedAboutHydrateAPI) {
- warnedAboutHydrateAPI = true;
- warn('render(): Calling ReactDOM.render() to hydrate server-rendered markup ' + 'will stop working in React v17. Replace the ReactDOM.render() call ' + 'with ReactDOM.hydrate() if you want React to attach to the server HTML.');
- }
- }
- return createLegacyRoot(container, shouldHydrate ? {
- hydrate: true
- } : undefined);
- }
- function warnOnInvalidCallback$1(callback, callerName) {
- {
- if (callback !== null && typeof callback !== 'function') {
- error('%s(...): Expected the last optional `callback` argument to be a ' + 'function. Instead received: %s.', callerName, callback);
- }
- }
- }
- function legacyRenderSubtreeIntoContainer(parentComponent, children, container, forceHydrate, callback) {
- {
- topLevelUpdateWarnings(container);
- warnOnInvalidCallback$1(callback === undefined ? null : callback, 'render');
- } // TODO: Without `any` type, Flow says "Property cannot be accessed on any
- // member of intersection type." Whyyyyyy.
- var root = container._reactRootContainer;
- var fiberRoot;
- if (!root) {
- // Initial mount
- root = container._reactRootContainer = legacyCreateRootFromDOMContainer(container, forceHydrate);
- fiberRoot = root._internalRoot;
- if (typeof callback === 'function') {
- var originalCallback = callback;
- callback = function () {
- var instance = getPublicRootInstance(fiberRoot);
- originalCallback.call(instance);
- };
- } // Initial mount should not be batched.
- unbatchedUpdates(function () {
- updateContainer(children, fiberRoot, parentComponent, callback);
- });
- } else {
- fiberRoot = root._internalRoot;
- if (typeof callback === 'function') {
- var _originalCallback = callback;
- callback = function () {
- var instance = getPublicRootInstance(fiberRoot);
- _originalCallback.call(instance);
- };
- } // Update
- updateContainer(children, fiberRoot, parentComponent, callback);
- }
- return getPublicRootInstance(fiberRoot);
- }
- function findDOMNode(componentOrElement) {
- {
- var owner = ReactCurrentOwner$3.current;
- if (owner !== null && owner.stateNode !== null) {
- var warnedAboutRefsInRender = owner.stateNode._warnedAboutRefsInRender;
- if (!warnedAboutRefsInRender) {
- error('%s is accessing findDOMNode inside its render(). ' + 'render() should be a pure function of props and state. It should ' + 'never access something that requires stale data from the previous ' + 'render, such as refs. Move this logic to componentDidMount and ' + 'componentDidUpdate instead.', getComponentName(owner.type) || 'A component');
- }
- owner.stateNode._warnedAboutRefsInRender = true;
- }
- }
- if (componentOrElement == null) {
- return null;
- }
- if (componentOrElement.nodeType === ELEMENT_NODE) {
- return componentOrElement;
- }
- {
- return findHostInstanceWithWarning(componentOrElement, 'findDOMNode');
- }
- }
- function hydrate(element, container, callback) {
- if (!isValidContainer(container)) {
- {
- throw Error( "Target container is not a DOM element." );
- }
- }
- {
- var isModernRoot = isContainerMarkedAsRoot(container) && container._reactRootContainer === undefined;
- if (isModernRoot) {
- error('You are calling ReactDOM.hydrate() on a container that was previously ' + 'passed to ReactDOM.createRoot(). This is not supported. ' + 'Did you mean to call createRoot(container, {hydrate: true}).render(element)?');
- }
- } // TODO: throw or warn if we couldn't hydrate?
- return legacyRenderSubtreeIntoContainer(null, element, container, true, callback);
- }
- function render(element, container, callback) {
- if (!isValidContainer(container)) {
- {
- throw Error( "Target container is not a DOM element." );
- }
- }
- {
- var isModernRoot = isContainerMarkedAsRoot(container) && container._reactRootContainer === undefined;
- if (isModernRoot) {
- error('You are calling ReactDOM.render() on a container that was previously ' + 'passed to ReactDOM.createRoot(). This is not supported. ' + 'Did you mean to call root.render(element)?');
- }
- }
- return legacyRenderSubtreeIntoContainer(null, element, container, false, callback);
- }
- function unstable_renderSubtreeIntoContainer(parentComponent, element, containerNode, callback) {
- if (!isValidContainer(containerNode)) {
- {
- throw Error( "Target container is not a DOM element." );
- }
- }
- if (!(parentComponent != null && has(parentComponent))) {
- {
- throw Error( "parentComponent must be a valid React Component" );
- }
- }
- return legacyRenderSubtreeIntoContainer(parentComponent, element, containerNode, false, callback);
- }
- function unmountComponentAtNode(container) {
- if (!isValidContainer(container)) {
- {
- throw Error( "unmountComponentAtNode(...): Target container is not a DOM element." );
- }
- }
- {
- var isModernRoot = isContainerMarkedAsRoot(container) && container._reactRootContainer === undefined;
- if (isModernRoot) {
- error('You are calling ReactDOM.unmountComponentAtNode() on a container that was previously ' + 'passed to ReactDOM.createRoot(). This is not supported. Did you mean to call root.unmount()?');
- }
- }
- if (container._reactRootContainer) {
- {
- var rootEl = getReactRootElementInContainer(container);
- var renderedByDifferentReact = rootEl && !getInstanceFromNode$1(rootEl);
- if (renderedByDifferentReact) {
- error("unmountComponentAtNode(): The node you're attempting to unmount " + 'was rendered by another copy of React.');
- }
- } // Unmount should not be batched.
- unbatchedUpdates(function () {
- legacyRenderSubtreeIntoContainer(null, null, container, false, function () {
- // $FlowFixMe This should probably use `delete container._reactRootContainer`
- container._reactRootContainer = null;
- unmarkContainerAsRoot(container);
- });
- }); // If you call unmountComponentAtNode twice in quick succession, you'll
- // get `true` twice. That's probably fine?
- return true;
- } else {
- {
- var _rootEl = getReactRootElementInContainer(container);
- var hasNonRootReactChild = !!(_rootEl && getInstanceFromNode$1(_rootEl)); // Check if the container itself is a React root node.
- var isContainerReactRoot = container.nodeType === ELEMENT_NODE && isValidContainer(container.parentNode) && !!container.parentNode._reactRootContainer;
- if (hasNonRootReactChild) {
- error("unmountComponentAtNode(): The node you're attempting to unmount " + 'was rendered by React and is not a top-level container. %s', isContainerReactRoot ? 'You may have accidentally passed in a React root node instead ' + 'of its container.' : 'Instead, have the parent component update its state and ' + 'rerender in order to remove this component.');
- }
- }
- return false;
- }
- }
- function createPortal(children, containerInfo, // TODO: figure out the API for cross-renderer implementation.
- implementation) {
- var key = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : null;
- return {
- // This tag allow us to uniquely identify this as a React Portal
- $$typeof: REACT_PORTAL_TYPE,
- key: key == null ? null : '' + key,
- children: children,
- containerInfo: containerInfo,
- implementation: implementation
- };
- }
- var ReactVersion = '16.14.0';
- setAttemptUserBlockingHydration(attemptUserBlockingHydration$1);
- setAttemptContinuousHydration(attemptContinuousHydration$1);
- setAttemptHydrationAtCurrentPriority(attemptHydrationAtCurrentPriority$1);
- var didWarnAboutUnstableCreatePortal = false;
- {
- if (typeof Map !== 'function' || // $FlowIssue Flow incorrectly thinks Map has no prototype
- Map.prototype == null || typeof Map.prototype.forEach !== 'function' || typeof Set !== 'function' || // $FlowIssue Flow incorrectly thinks Set has no prototype
- Set.prototype == null || typeof Set.prototype.clear !== 'function' || typeof Set.prototype.forEach !== 'function') {
- error('React depends on Map and Set built-in types. Make sure that you load a ' + 'polyfill in older browsers. https://fb.me/react-polyfills');
- }
- }
- setRestoreImplementation(restoreControlledState$3);
- setBatchingImplementation(batchedUpdates$1, discreteUpdates$1, flushDiscreteUpdates, batchedEventUpdates$1);
- function createPortal$1(children, container) {
- var key = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : null;
- if (!isValidContainer(container)) {
- {
- throw Error( "Target container is not a DOM element." );
- }
- } // TODO: pass ReactDOM portal implementation as third argument
- // $FlowFixMe The Flow type is opaque but there's no way to actually create it.
- return createPortal(children, container, null, key);
- }
- function renderSubtreeIntoContainer(parentComponent, element, containerNode, callback) {
- return unstable_renderSubtreeIntoContainer(parentComponent, element, containerNode, callback);
- }
- function unstable_createPortal(children, container) {
- var key = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : null;
- {
- if (!didWarnAboutUnstableCreatePortal) {
- didWarnAboutUnstableCreatePortal = true;
- warn('The ReactDOM.unstable_createPortal() alias has been deprecated, ' + 'and will be removed in React 17+. Update your code to use ' + 'ReactDOM.createPortal() instead. It has the exact same API, ' + 'but without the "unstable_" prefix.');
- }
- }
- return createPortal$1(children, container, key);
- }
- var Internals = {
- // Keep in sync with ReactDOMUnstableNativeDependencies.js
- // ReactTestUtils.js, and ReactTestUtilsAct.js. This is an array for better minification.
- Events: [getInstanceFromNode$1, getNodeFromInstance$1, getFiberCurrentPropsFromNode$1, injectEventPluginsByName, eventNameDispatchConfigs, accumulateTwoPhaseDispatches, accumulateDirectDispatches, enqueueStateRestore, restoreStateIfNeeded, dispatchEvent, runEventsInBatch, flushPassiveEffects, IsThisRendererActing]
- };
- var foundDevTools = injectIntoDevTools({
- findFiberByHostInstance: getClosestInstanceFromNode,
- bundleType: 1 ,
- version: ReactVersion,
- rendererPackageName: 'react-dom'
- });
- {
- if (!foundDevTools && canUseDOM && window.top === window.self) {
- // If we're in Chrome or Firefox, provide a download link if not installed.
- if (navigator.userAgent.indexOf('Chrome') > -1 && navigator.userAgent.indexOf('Edge') === -1 || navigator.userAgent.indexOf('Firefox') > -1) {
- var protocol = window.location.protocol; // Don't warn in exotic cases like chrome-extension://.
- if (/^(https?|file):$/.test(protocol)) {
- // eslint-disable-next-line react-internal/no-production-logging
- console.info('%cDownload the React DevTools ' + 'for a better development experience: ' + 'https://fb.me/react-devtools' + (protocol === 'file:' ? '\nYou might need to use a local HTTP server (instead of file://): ' + 'https://fb.me/react-devtools-faq' : ''), 'font-weight:bold');
- }
- }
- }
- }
- exports.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED = Internals;
- exports.createPortal = createPortal$1;
- exports.findDOMNode = findDOMNode;
- exports.flushSync = flushSync;
- exports.hydrate = hydrate;
- exports.render = render;
- exports.unmountComponentAtNode = unmountComponentAtNode;
- exports.unstable_batchedUpdates = batchedUpdates$1;
- exports.unstable_createPortal = unstable_createPortal;
- exports.unstable_renderSubtreeIntoContainer = renderSubtreeIntoContainer;
- exports.version = ReactVersion;
- })();
- }
- /***/ }),
- /***/ "./node_modules/react-dom/index.js":
- /*!*****************************************!*\
- !*** ./node_modules/react-dom/index.js ***!
- \*****************************************/
- /*! dynamic exports provided */
- /*! exports used: default */
- /***/ (function(module, exports, __webpack_require__) {
- "use strict";
- function checkDCE() {
- /* global __REACT_DEVTOOLS_GLOBAL_HOOK__ */
- if (
- typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ === 'undefined' ||
- typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE !== 'function'
- ) {
- return;
- }
- if (true) {
- // This branch is unreachable because this function is only called
- // in production, but the condition is true only in development.
- // Therefore if the branch is still here, dead code elimination wasn't
- // properly applied.
- // Don't change the message. React DevTools relies on it. Also make sure
- // this message doesn't occur elsewhere in this function, or it will cause
- // a false positive.
- throw new Error('^_^');
- }
- try {
- // Verify that the code above has been dead code eliminated (DCE'd).
- __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(checkDCE);
- } catch (err) {
- // DevTools shouldn't crash React, no matter what.
- // We should still report in case we break this code.
- console.error(err);
- }
- }
- if (false) {
- // DCE check should happen before ReactDOM bundle executes so that
- // DevTools can report bad minification during injection.
- checkDCE();
- module.exports = require('./cjs/react-dom.production.min.js');
- } else {
- module.exports = __webpack_require__(/*! ./cjs/react-dom.development.js */ "./node_modules/react-dom/cjs/react-dom.development.js");
- }
- /***/ }),
- /***/ "./node_modules/react-error-overlay/lib/index.js":
- /*!*******************************************************!*\
- !*** ./node_modules/react-error-overlay/lib/index.js ***!
- \*******************************************************/
- /*! dynamic exports provided */
- /*! all exports used */
- /***/ (function(module, exports, __webpack_require__) {
- (function webpackUniversalModuleDefinition(root, factory) {
- if(true)
- module.exports = factory();
- else if(typeof define === 'function' && define.amd)
- define([], factory);
- else if(typeof exports === 'object')
- exports["ReactErrorOverlay"] = factory();
- else
- root["ReactErrorOverlay"] = factory();
- })(this, function() {
- return /******/ (function(modules) { // webpackBootstrap
- /******/ // The module cache
- /******/ var installedModules = {};
- /******/
- /******/ // The require function
- /******/ function __webpack_require__(moduleId) {
- /******/
- /******/ // Check if module is in cache
- /******/ if(installedModules[moduleId]) {
- /******/ return installedModules[moduleId].exports;
- /******/ }
- /******/ // Create a new module (and put it into the cache)
- /******/ var module = installedModules[moduleId] = {
- /******/ i: moduleId,
- /******/ l: false,
- /******/ exports: {}
- /******/ };
- /******/
- /******/ // Execute the module function
- /******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
- /******/
- /******/ // Flag the module as loaded
- /******/ module.l = true;
- /******/
- /******/ // Return the exports of the module
- /******/ return module.exports;
- /******/ }
- /******/
- /******/
- /******/ // expose the modules object (__webpack_modules__)
- /******/ __webpack_require__.m = modules;
- /******/
- /******/ // expose the module cache
- /******/ __webpack_require__.c = installedModules;
- /******/
- /******/ // define getter function for harmony exports
- /******/ __webpack_require__.d = function(exports, name, getter) {
- /******/ if(!__webpack_require__.o(exports, name)) {
- /******/ Object.defineProperty(exports, name, {
- /******/ configurable: false,
- /******/ enumerable: true,
- /******/ get: getter
- /******/ });
- /******/ }
- /******/ };
- /******/
- /******/ // getDefaultExport function for compatibility with non-harmony modules
- /******/ __webpack_require__.n = function(module) {
- /******/ var getter = module && module.__esModule ?
- /******/ function getDefault() { return module['default']; } :
- /******/ function getModuleExports() { return module; };
- /******/ __webpack_require__.d(getter, 'a', getter);
- /******/ return getter;
- /******/ };
- /******/
- /******/ // Object.prototype.hasOwnProperty.call
- /******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
- /******/
- /******/ // __webpack_public_path__
- /******/ __webpack_require__.p = "";
- /******/
- /******/ // Load entry module and return exports
- /******/ return __webpack_require__(__webpack_require__.s = 9);
- /******/ })
- /************************************************************************/
- /******/ ([
- /* 0 */
- /***/ (function(module, exports) {
- /* -*- Mode: js; js-indent-level: 2; -*- */
- /*
- * Copyright 2011 Mozilla Foundation and contributors
- * Licensed under the New BSD license. See LICENSE or:
- * http://opensource.org/licenses/BSD-3-Clause
- */
- /**
- * This is a helper function for getting values from parameter/options
- * objects.
- *
- * @param args The object we are extracting values from
- * @param name The name of the property we are getting.
- * @param defaultValue An optional value to return if the property is missing
- * from the object. If this is not specified and the property is missing, an
- * error will be thrown.
- */
- function getArg(aArgs, aName, aDefaultValue) {
- if (aName in aArgs) {
- return aArgs[aName];
- } else if (arguments.length === 3) {
- return aDefaultValue;
- } else {
- throw new Error('"' + aName + '" is a required argument.');
- }
- }
- exports.getArg = getArg;
- var urlRegexp = /^(?:([\w+\-.]+):)?\/\/(?:(\w+:\w+)@)?([\w.]*)(?::(\d+))?(\S*)$/;
- var dataUrlRegexp = /^data:.+\,.+$/;
- function urlParse(aUrl) {
- var match = aUrl.match(urlRegexp);
- if (!match) {
- return null;
- }
- return {
- scheme: match[1],
- auth: match[2],
- host: match[3],
- port: match[4],
- path: match[5]
- };
- }
- exports.urlParse = urlParse;
- function urlGenerate(aParsedUrl) {
- var url = '';
- if (aParsedUrl.scheme) {
- url += aParsedUrl.scheme + ':';
- }
- url += '//';
- if (aParsedUrl.auth) {
- url += aParsedUrl.auth + '@';
- }
- if (aParsedUrl.host) {
- url += aParsedUrl.host;
- }
- if (aParsedUrl.port) {
- url += ":" + aParsedUrl.port
- }
- if (aParsedUrl.path) {
- url += aParsedUrl.path;
- }
- return url;
- }
- exports.urlGenerate = urlGenerate;
- /**
- * Normalizes a path, or the path portion of a URL:
- *
- * - Replaces consecutive slashes with one slash.
- * - Removes unnecessary '.' parts.
- * - Removes unnecessary '<dir>/..' parts.
- *
- * Based on code in the Node.js 'path' core module.
- *
- * @param aPath The path or url to normalize.
- */
- function normalize(aPath) {
- var path = aPath;
- var url = urlParse(aPath);
- if (url) {
- if (!url.path) {
- return aPath;
- }
- path = url.path;
- }
- var isAbsolute = exports.isAbsolute(path);
- var parts = path.split(/\/+/);
- for (var part, up = 0, i = parts.length - 1; i >= 0; i--) {
- part = parts[i];
- if (part === '.') {
- parts.splice(i, 1);
- } else if (part === '..') {
- up++;
- } else if (up > 0) {
- if (part === '') {
- // The first part is blank if the path is absolute. Trying to go
- // above the root is a no-op. Therefore we can remove all '..' parts
- // directly after the root.
- parts.splice(i + 1, up);
- up = 0;
- } else {
- parts.splice(i, 2);
- up--;
- }
- }
- }
- path = parts.join('/');
- if (path === '') {
- path = isAbsolute ? '/' : '.';
- }
- if (url) {
- url.path = path;
- return urlGenerate(url);
- }
- return path;
- }
- exports.normalize = normalize;
- /**
- * Joins two paths/URLs.
- *
- * @param aRoot The root path or URL.
- * @param aPath The path or URL to be joined with the root.
- *
- * - If aPath is a URL or a data URI, aPath is returned, unless aPath is a
- * scheme-relative URL: Then the scheme of aRoot, if any, is prepended
- * first.
- * - Otherwise aPath is a path. If aRoot is a URL, then its path portion
- * is updated with the result and aRoot is returned. Otherwise the result
- * is returned.
- * - If aPath is absolute, the result is aPath.
- * - Otherwise the two paths are joined with a slash.
- * - Joining for example 'http://' and 'www.example.com' is also supported.
- */
- function join(aRoot, aPath) {
- if (aRoot === "") {
- aRoot = ".";
- }
- if (aPath === "") {
- aPath = ".";
- }
- var aPathUrl = urlParse(aPath);
- var aRootUrl = urlParse(aRoot);
- if (aRootUrl) {
- aRoot = aRootUrl.path || '/';
- }
- // `join(foo, '//www.example.org')`
- if (aPathUrl && !aPathUrl.scheme) {
- if (aRootUrl) {
- aPathUrl.scheme = aRootUrl.scheme;
- }
- return urlGenerate(aPathUrl);
- }
- if (aPathUrl || aPath.match(dataUrlRegexp)) {
- return aPath;
- }
- // `join('http://', 'www.example.com')`
- if (aRootUrl && !aRootUrl.host && !aRootUrl.path) {
- aRootUrl.host = aPath;
- return urlGenerate(aRootUrl);
- }
- var joined = aPath.charAt(0) === '/'
- ? aPath
- : normalize(aRoot.replace(/\/+$/, '') + '/' + aPath);
- if (aRootUrl) {
- aRootUrl.path = joined;
- return urlGenerate(aRootUrl);
- }
- return joined;
- }
- exports.join = join;
- exports.isAbsolute = function (aPath) {
- return aPath.charAt(0) === '/' || !!aPath.match(urlRegexp);
- };
- /**
- * Make a path relative to a URL or another path.
- *
- * @param aRoot The root path or URL.
- * @param aPath The path or URL to be made relative to aRoot.
- */
- function relative(aRoot, aPath) {
- if (aRoot === "") {
- aRoot = ".";
- }
- aRoot = aRoot.replace(/\/$/, '');
- // It is possible for the path to be above the root. In this case, simply
- // checking whether the root is a prefix of the path won't work. Instead, we
- // need to remove components from the root one by one, until either we find
- // a prefix that fits, or we run out of components to remove.
- var level = 0;
- while (aPath.indexOf(aRoot + '/') !== 0) {
- var index = aRoot.lastIndexOf("/");
- if (index < 0) {
- return aPath;
- }
- // If the only part of the root that is left is the scheme (i.e. http://,
- // file:///, etc.), one or more slashes (/), or simply nothing at all, we
- // have exhausted all components, so the path is not relative to the root.
- aRoot = aRoot.slice(0, index);
- if (aRoot.match(/^([^\/]+:\/)?\/*$/)) {
- return aPath;
- }
- ++level;
- }
- // Make sure we add a "../" for each component we removed from the root.
- return Array(level + 1).join("../") + aPath.substr(aRoot.length + 1);
- }
- exports.relative = relative;
- var supportsNullProto = (function () {
- var obj = Object.create(null);
- return !('__proto__' in obj);
- }());
- function identity (s) {
- return s;
- }
- /**
- * Because behavior goes wacky when you set `__proto__` on objects, we
- * have to prefix all the strings in our set with an arbitrary character.
- *
- * See https://github.com/mozilla/source-map/pull/31 and
- * https://github.com/mozilla/source-map/issues/30
- *
- * @param String aStr
- */
- function toSetString(aStr) {
- if (isProtoString(aStr)) {
- return '$' + aStr;
- }
- return aStr;
- }
- exports.toSetString = supportsNullProto ? identity : toSetString;
- function fromSetString(aStr) {
- if (isProtoString(aStr)) {
- return aStr.slice(1);
- }
- return aStr;
- }
- exports.fromSetString = supportsNullProto ? identity : fromSetString;
- function isProtoString(s) {
- if (!s) {
- return false;
- }
- var length = s.length;
- if (length < 9 /* "__proto__".length */) {
- return false;
- }
- if (s.charCodeAt(length - 1) !== 95 /* '_' */ ||
- s.charCodeAt(length - 2) !== 95 /* '_' */ ||
- s.charCodeAt(length - 3) !== 111 /* 'o' */ ||
- s.charCodeAt(length - 4) !== 116 /* 't' */ ||
- s.charCodeAt(length - 5) !== 111 /* 'o' */ ||
- s.charCodeAt(length - 6) !== 114 /* 'r' */ ||
- s.charCodeAt(length - 7) !== 112 /* 'p' */ ||
- s.charCodeAt(length - 8) !== 95 /* '_' */ ||
- s.charCodeAt(length - 9) !== 95 /* '_' */) {
- return false;
- }
- for (var i = length - 10; i >= 0; i--) {
- if (s.charCodeAt(i) !== 36 /* '$' */) {
- return false;
- }
- }
- return true;
- }
- /**
- * Comparator between two mappings where the original positions are compared.
- *
- * Optionally pass in `true` as `onlyCompareGenerated` to consider two
- * mappings with the same original source/line/column, but different generated
- * line and column the same. Useful when searching for a mapping with a
- * stubbed out mapping.
- */
- function compareByOriginalPositions(mappingA, mappingB, onlyCompareOriginal) {
- var cmp = mappingA.source - mappingB.source;
- if (cmp !== 0) {
- return cmp;
- }
- cmp = mappingA.originalLine - mappingB.originalLine;
- if (cmp !== 0) {
- return cmp;
- }
- cmp = mappingA.originalColumn - mappingB.originalColumn;
- if (cmp !== 0 || onlyCompareOriginal) {
- return cmp;
- }
- cmp = mappingA.generatedColumn - mappingB.generatedColumn;
- if (cmp !== 0) {
- return cmp;
- }
- cmp = mappingA.generatedLine - mappingB.generatedLine;
- if (cmp !== 0) {
- return cmp;
- }
- return mappingA.name - mappingB.name;
- }
- exports.compareByOriginalPositions = compareByOriginalPositions;
- /**
- * Comparator between two mappings with deflated source and name indices where
- * the generated positions are compared.
- *
- * Optionally pass in `true` as `onlyCompareGenerated` to consider two
- * mappings with the same generated line and column, but different
- * source/name/original line and column the same. Useful when searching for a
- * mapping with a stubbed out mapping.
- */
- function compareByGeneratedPositionsDeflated(mappingA, mappingB, onlyCompareGenerated) {
- var cmp = mappingA.generatedLine - mappingB.generatedLine;
- if (cmp !== 0) {
- return cmp;
- }
- cmp = mappingA.generatedColumn - mappingB.generatedColumn;
- if (cmp !== 0 || onlyCompareGenerated) {
- return cmp;
- }
- cmp = mappingA.source - mappingB.source;
- if (cmp !== 0) {
- return cmp;
- }
- cmp = mappingA.originalLine - mappingB.originalLine;
- if (cmp !== 0) {
- return cmp;
- }
- cmp = mappingA.originalColumn - mappingB.originalColumn;
- if (cmp !== 0) {
- return cmp;
- }
- return mappingA.name - mappingB.name;
- }
- exports.compareByGeneratedPositionsDeflated = compareByGeneratedPositionsDeflated;
- function strcmp(aStr1, aStr2) {
- if (aStr1 === aStr2) {
- return 0;
- }
- if (aStr1 > aStr2) {
- return 1;
- }
- return -1;
- }
- /**
- * Comparator between two mappings with inflated source and name strings where
- * the generated positions are compared.
- */
- function compareByGeneratedPositionsInflated(mappingA, mappingB) {
- var cmp = mappingA.generatedLine - mappingB.generatedLine;
- if (cmp !== 0) {
- return cmp;
- }
- cmp = mappingA.generatedColumn - mappingB.generatedColumn;
- if (cmp !== 0) {
- return cmp;
- }
- cmp = strcmp(mappingA.source, mappingB.source);
- if (cmp !== 0) {
- return cmp;
- }
- cmp = mappingA.originalLine - mappingB.originalLine;
- if (cmp !== 0) {
- return cmp;
- }
- cmp = mappingA.originalColumn - mappingB.originalColumn;
- if (cmp !== 0) {
- return cmp;
- }
- return strcmp(mappingA.name, mappingB.name);
- }
- exports.compareByGeneratedPositionsInflated = compareByGeneratedPositionsInflated;
- /***/ }),
- /* 1 */
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
- "use strict";
- /* unused harmony export StackFrame */
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return ScriptLine; });
- var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
- function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
- /**
- * Copyright (c) 2015-present, Facebook, Inc.
- *
- * This source code is licensed under the MIT license found in the
- * LICENSE file in the root directory of this source tree.
- */
- /** A container holding a script line. */
- var ScriptLine =
- /** The content (or value) of this line of source. */
- function ScriptLine(lineNumber, content) {
- var highlight = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;
- _classCallCheck(this, ScriptLine);
- this.lineNumber = lineNumber;
- this.content = content;
- this.highlight = highlight;
- }
- /** Whether or not this line should be highlighted. Particularly useful for error reporting with context. */
- /** The line number of this line of source. */
- ;
- /**
- * A representation of a stack frame.
- */
- var StackFrame = function () {
- function StackFrame() {
- var functionName = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : null;
- var fileName = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null;
- var lineNumber = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : null;
- var columnNumber = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : null;
- var scriptCode = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : null;
- var sourceFunctionName = arguments.length > 5 && arguments[5] !== undefined ? arguments[5] : null;
- var sourceFileName = arguments.length > 6 && arguments[6] !== undefined ? arguments[6] : null;
- var sourceLineNumber = arguments.length > 7 && arguments[7] !== undefined ? arguments[7] : null;
- var sourceColumnNumber = arguments.length > 8 && arguments[8] !== undefined ? arguments[8] : null;
- var sourceScriptCode = arguments.length > 9 && arguments[9] !== undefined ? arguments[9] : null;
- _classCallCheck(this, StackFrame);
- if (functionName && functionName.indexOf('Object.') === 0) {
- functionName = functionName.slice('Object.'.length);
- }
- if (
- // Chrome has a bug with inferring function.name:
- // https://github.com/facebookincubator/create-react-app/issues/2097
- // Let's ignore a meaningless name we get for top-level modules.
- functionName === 'friendlySyntaxErrorLabel' || functionName === 'exports.__esModule' || functionName === '<anonymous>' || !functionName) {
- functionName = null;
- }
- this.functionName = functionName;
- this.fileName = fileName;
- this.lineNumber = lineNumber;
- this.columnNumber = columnNumber;
- this._originalFunctionName = sourceFunctionName;
- this._originalFileName = sourceFileName;
- this._originalLineNumber = sourceLineNumber;
- this._originalColumnNumber = sourceColumnNumber;
- this._scriptCode = scriptCode;
- this._originalScriptCode = sourceScriptCode;
- }
- /**
- * Returns the name of this function.
- */
- _createClass(StackFrame, [{
- key: 'getFunctionName',
- value: function getFunctionName() {
- return this.functionName || '(anonymous function)';
- }
- /**
- * Returns the source of the frame.
- * This contains the file name, line number, and column number when available.
- */
- }, {
- key: 'getSource',
- value: function getSource() {
- var str = '';
- if (this.fileName != null) {
- str += this.fileName + ':';
- }
- if (this.lineNumber != null) {
- str += this.lineNumber + ':';
- }
- if (this.columnNumber != null) {
- str += this.columnNumber + ':';
- }
- return str.slice(0, -1);
- }
- /**
- * Returns a pretty version of this stack frame.
- */
- }, {
- key: 'toString',
- value: function toString() {
- var functionName = this.getFunctionName();
- var source = this.getSource();
- return '' + functionName + (source ? ' (' + source + ')' : '');
- }
- }]);
- return StackFrame;
- }();
- /* harmony default export */ __webpack_exports__["b"] = (StackFrame);
- /***/ }),
- /* 2 */
- /***/ (function(module, exports, __webpack_require__) {
- module.exports = __webpack_require__(19);
- /***/ }),
- /* 3 */
- /***/ (function(module, exports) {
- // shim for using process in browser
- var process = module.exports = {};
- // cached from whatever global is present so that test runners that stub it
- // don't break things. But we need to wrap it in a try catch in case it is
- // wrapped in strict mode code which doesn't define any globals. It's inside a
- // function because try/catches deoptimize in certain engines.
- var cachedSetTimeout;
- var cachedClearTimeout;
- function defaultSetTimout() {
- throw new Error('setTimeout has not been defined');
- }
- function defaultClearTimeout () {
- throw new Error('clearTimeout has not been defined');
- }
- (function () {
- try {
- if (typeof setTimeout === 'function') {
- cachedSetTimeout = setTimeout;
- } else {
- cachedSetTimeout = defaultSetTimout;
- }
- } catch (e) {
- cachedSetTimeout = defaultSetTimout;
- }
- try {
- if (typeof clearTimeout === 'function') {
- cachedClearTimeout = clearTimeout;
- } else {
- cachedClearTimeout = defaultClearTimeout;
- }
- } catch (e) {
- cachedClearTimeout = defaultClearTimeout;
- }
- } ())
- function runTimeout(fun) {
- if (cachedSetTimeout === setTimeout) {
- //normal enviroments in sane situations
- return setTimeout(fun, 0);
- }
- // if setTimeout wasn't available but was latter defined
- if ((cachedSetTimeout === defaultSetTimout || !cachedSetTimeout) && setTimeout) {
- cachedSetTimeout = setTimeout;
- return setTimeout(fun, 0);
- }
- try {
- // when when somebody has screwed with setTimeout but no I.E. maddness
- return cachedSetTimeout(fun, 0);
- } catch(e){
- try {
- // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally
- return cachedSetTimeout.call(null, fun, 0);
- } catch(e){
- // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error
- return cachedSetTimeout.call(this, fun, 0);
- }
- }
- }
- function runClearTimeout(marker) {
- if (cachedClearTimeout === clearTimeout) {
- //normal enviroments in sane situations
- return clearTimeout(marker);
- }
- // if clearTimeout wasn't available but was latter defined
- if ((cachedClearTimeout === defaultClearTimeout || !cachedClearTimeout) && clearTimeout) {
- cachedClearTimeout = clearTimeout;
- return clearTimeout(marker);
- }
- try {
- // when when somebody has screwed with setTimeout but no I.E. maddness
- return cachedClearTimeout(marker);
- } catch (e){
- try {
- // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally
- return cachedClearTimeout.call(null, marker);
- } catch (e){
- // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error.
- // Some versions of I.E. have different rules for clearTimeout vs setTimeout
- return cachedClearTimeout.call(this, marker);
- }
- }
- }
- var queue = [];
- var draining = false;
- var currentQueue;
- var queueIndex = -1;
- function cleanUpNextTick() {
- if (!draining || !currentQueue) {
- return;
- }
- draining = false;
- if (currentQueue.length) {
- queue = currentQueue.concat(queue);
- } else {
- queueIndex = -1;
- }
- if (queue.length) {
- drainQueue();
- }
- }
- function drainQueue() {
- if (draining) {
- return;
- }
- var timeout = runTimeout(cleanUpNextTick);
- draining = true;
- var len = queue.length;
- while(len) {
- currentQueue = queue;
- queue = [];
- while (++queueIndex < len) {
- if (currentQueue) {
- currentQueue[queueIndex].run();
- }
- }
- queueIndex = -1;
- len = queue.length;
- }
- currentQueue = null;
- draining = false;
- runClearTimeout(timeout);
- }
- process.nextTick = function (fun) {
- var args = new Array(arguments.length - 1);
- if (arguments.length > 1) {
- for (var i = 1; i < arguments.length; i++) {
- args[i - 1] = arguments[i];
- }
- }
- queue.push(new Item(fun, args));
- if (queue.length === 1 && !draining) {
- runTimeout(drainQueue);
- }
- };
- // v8 likes predictible objects
- function Item(fun, array) {
- this.fun = fun;
- this.array = array;
- }
- Item.prototype.run = function () {
- this.fun.apply(null, this.array);
- };
- process.title = 'browser';
- process.browser = true;
- process.env = {};
- process.argv = [];
- process.version = ''; // empty string to avoid regexp issues
- process.versions = {};
- function noop() {}
- process.on = noop;
- process.addListener = noop;
- process.once = noop;
- process.off = noop;
- process.removeListener = noop;
- process.removeAllListeners = noop;
- process.emit = noop;
- process.prependListener = noop;
- process.prependOnceListener = noop;
- process.listeners = function (name) { return [] }
- process.binding = function (name) {
- throw new Error('process.binding is not supported');
- };
- process.cwd = function () { return '/' };
- process.chdir = function (dir) {
- throw new Error('process.chdir is not supported');
- };
- process.umask = function() { return 0; };
- /***/ }),
- /* 4 */
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
- "use strict";
- /* unused harmony export extractSourceMapUrl */
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return getSourceMap; });
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_babel_runtime_regenerator__ = __webpack_require__(2);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_babel_runtime_regenerator___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_babel_runtime_regenerator__);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_source_map__ = __webpack_require__(21);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_source_map___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_source_map__);
- var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
- /**
- * Returns an instance of <code>{@link SourceMap}</code> for a given fileUri and fileContents.
- * @param {string} fileUri The URI of the source file.
- * @param {string} fileContents The contents of the source file.
- */
- var getSourceMap = function () {
- var _ref = _asyncToGenerator( /*#__PURE__*/__WEBPACK_IMPORTED_MODULE_0_babel_runtime_regenerator___default.a.mark(function _callee(fileUri, fileContents) {
- var sm, base64, match2, index, url, obj;
- return __WEBPACK_IMPORTED_MODULE_0_babel_runtime_regenerator___default.a.wrap(function _callee$(_context) {
- while (1) {
- switch (_context.prev = _context.next) {
- case 0:
- _context.next = 2;
- return extractSourceMapUrl(fileUri, fileContents);
- case 2:
- sm = _context.sent;
- if (!(sm.indexOf('data:') === 0)) {
- _context.next = 14;
- break;
- }
- base64 = /^data:application\/json;([\w=:"-]+;)*base64,/;
- match2 = sm.match(base64);
- if (match2) {
- _context.next = 8;
- break;
- }
- throw new Error('Sorry, non-base64 inline source-map encoding is not supported.');
- case 8:
- sm = sm.substring(match2[0].length);
- sm = window.atob(sm);
- sm = JSON.parse(sm);
- return _context.abrupt('return', new SourceMap(new __WEBPACK_IMPORTED_MODULE_1_source_map__["SourceMapConsumer"](sm)));
- case 14:
- index = fileUri.lastIndexOf('/');
- url = fileUri.substring(0, index + 1) + sm;
- _context.next = 18;
- return fetch(url).then(function (res) {
- return res.json();
- });
- case 18:
- obj = _context.sent;
- return _context.abrupt('return', new SourceMap(new __WEBPACK_IMPORTED_MODULE_1_source_map__["SourceMapConsumer"](obj)));
- case 20:
- case 'end':
- return _context.stop();
- }
- }
- }, _callee, this);
- }));
- return function getSourceMap(_x, _x2) {
- return _ref.apply(this, arguments);
- };
- }();
- function _asyncToGenerator(fn) { return function () { var gen = fn.apply(this, arguments); return new Promise(function (resolve, reject) { function step(key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { return Promise.resolve(value).then(function (value) { step("next", value); }, function (err) { step("throw", err); }); } } return step("next"); }); }; }
- function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
- /**
- * Copyright (c) 2015-present, Facebook, Inc.
- *
- * This source code is licensed under the MIT license found in the
- * LICENSE file in the root directory of this source tree.
- */
- /**
- * A wrapped instance of a <code>{@link https://github.com/mozilla/source-map SourceMapConsumer}</code>.
- *
- * This exposes methods which will be indifferent to changes made in <code>{@link https://github.com/mozilla/source-map source-map}</code>.
- */
- var SourceMap = function () {
- function SourceMap(sourceMap) {
- _classCallCheck(this, SourceMap);
- this.__source_map = sourceMap;
- }
- /**
- * Returns the original code position for a generated code position.
- * @param {number} line The line of the generated code position.
- * @param {number} column The column of the generated code position.
- */
- _createClass(SourceMap, [{
- key: 'getOriginalPosition',
- value: function getOriginalPosition(line, column) {
- var _source_map$original = this.__source_map.originalPositionFor({
- line: line,
- column: column
- }),
- l = _source_map$original.line,
- c = _source_map$original.column,
- s = _source_map$original.source;
- return { line: l, column: c, source: s };
- }
- /**
- * Returns the generated code position for an original position.
- * @param {string} source The source file of the original code position.
- * @param {number} line The line of the original code position.
- * @param {number} column The column of the original code position.
- */
- }, {
- key: 'getGeneratedPosition',
- value: function getGeneratedPosition(source, line, column) {
- var _source_map$generate = this.__source_map.generatedPositionFor({
- source: source,
- line: line,
- column: column
- }),
- l = _source_map$generate.line,
- c = _source_map$generate.column;
- return {
- line: l,
- column: c
- };
- }
- /**
- * Returns the code for a given source file name.
- * @param {string} sourceName The name of the source file.
- */
- }, {
- key: 'getSource',
- value: function getSource(sourceName) {
- return this.__source_map.sourceContentFor(sourceName);
- }
- }, {
- key: 'getSources',
- value: function getSources() {
- return this.__source_map.sources;
- }
- }]);
- return SourceMap;
- }();
- function extractSourceMapUrl(fileUri, fileContents) {
- var regex = /\/\/[#@] ?sourceMappingURL=([^\s'"]+)\s*$/gm;
- var match = null;
- for (;;) {
- var next = regex.exec(fileContents);
- if (next == null) {
- break;
- }
- match = next;
- }
- if (!(match && match[1])) {
- return Promise.reject('Cannot find a source map directive for ' + fileUri + '.');
- }
- return Promise.resolve(match[1].toString());
- }
- /* unused harmony default export */ var _unused_webpack_default_export = (getSourceMap);
- /***/ }),
- /* 5 */
- /***/ (function(module, exports, __webpack_require__) {
- /* -*- Mode: js; js-indent-level: 2; -*- */
- /*
- * Copyright 2011 Mozilla Foundation and contributors
- * Licensed under the New BSD license. See LICENSE or:
- * http://opensource.org/licenses/BSD-3-Clause
- */
- var base64VLQ = __webpack_require__(6);
- var util = __webpack_require__(0);
- var ArraySet = __webpack_require__(7).ArraySet;
- var MappingList = __webpack_require__(23).MappingList;
- /**
- * An instance of the SourceMapGenerator represents a source map which is
- * being built incrementally. You may pass an object with the following
- * properties:
- *
- * - file: The filename of the generated source.
- * - sourceRoot: A root for all relative URLs in this source map.
- */
- function SourceMapGenerator(aArgs) {
- if (!aArgs) {
- aArgs = {};
- }
- this._file = util.getArg(aArgs, 'file', null);
- this._sourceRoot = util.getArg(aArgs, 'sourceRoot', null);
- this._skipValidation = util.getArg(aArgs, 'skipValidation', false);
- this._sources = new ArraySet();
- this._names = new ArraySet();
- this._mappings = new MappingList();
- this._sourcesContents = null;
- }
- SourceMapGenerator.prototype._version = 3;
- /**
- * Creates a new SourceMapGenerator based on a SourceMapConsumer
- *
- * @param aSourceMapConsumer The SourceMap.
- */
- SourceMapGenerator.fromSourceMap =
- function SourceMapGenerator_fromSourceMap(aSourceMapConsumer) {
- var sourceRoot = aSourceMapConsumer.sourceRoot;
- var generator = new SourceMapGenerator({
- file: aSourceMapConsumer.file,
- sourceRoot: sourceRoot
- });
- aSourceMapConsumer.eachMapping(function (mapping) {
- var newMapping = {
- generated: {
- line: mapping.generatedLine,
- column: mapping.generatedColumn
- }
- };
- if (mapping.source != null) {
- newMapping.source = mapping.source;
- if (sourceRoot != null) {
- newMapping.source = util.relative(sourceRoot, newMapping.source);
- }
- newMapping.original = {
- line: mapping.originalLine,
- column: mapping.originalColumn
- };
- if (mapping.name != null) {
- newMapping.name = mapping.name;
- }
- }
- generator.addMapping(newMapping);
- });
- aSourceMapConsumer.sources.forEach(function (sourceFile) {
- var content = aSourceMapConsumer.sourceContentFor(sourceFile);
- if (content != null) {
- generator.setSourceContent(sourceFile, content);
- }
- });
- return generator;
- };
- /**
- * Add a single mapping from original source line and column to the generated
- * source's line and column for this source map being created. The mapping
- * object should have the following properties:
- *
- * - generated: An object with the generated line and column positions.
- * - original: An object with the original line and column positions.
- * - source: The original source file (relative to the sourceRoot).
- * - name: An optional original token name for this mapping.
- */
- SourceMapGenerator.prototype.addMapping =
- function SourceMapGenerator_addMapping(aArgs) {
- var generated = util.getArg(aArgs, 'generated');
- var original = util.getArg(aArgs, 'original', null);
- var source = util.getArg(aArgs, 'source', null);
- var name = util.getArg(aArgs, 'name', null);
- if (!this._skipValidation) {
- this._validateMapping(generated, original, source, name);
- }
- if (source != null) {
- source = String(source);
- if (!this._sources.has(source)) {
- this._sources.add(source);
- }
- }
- if (name != null) {
- name = String(name);
- if (!this._names.has(name)) {
- this._names.add(name);
- }
- }
- this._mappings.add({
- generatedLine: generated.line,
- generatedColumn: generated.column,
- originalLine: original != null && original.line,
- originalColumn: original != null && original.column,
- source: source,
- name: name
- });
- };
- /**
- * Set the source content for a source file.
- */
- SourceMapGenerator.prototype.setSourceContent =
- function SourceMapGenerator_setSourceContent(aSourceFile, aSourceContent) {
- var source = aSourceFile;
- if (this._sourceRoot != null) {
- source = util.relative(this._sourceRoot, source);
- }
- if (aSourceContent != null) {
- // Add the source content to the _sourcesContents map.
- // Create a new _sourcesContents map if the property is null.
- if (!this._sourcesContents) {
- this._sourcesContents = Object.create(null);
- }
- this._sourcesContents[util.toSetString(source)] = aSourceContent;
- } else if (this._sourcesContents) {
- // Remove the source file from the _sourcesContents map.
- // If the _sourcesContents map is empty, set the property to null.
- delete this._sourcesContents[util.toSetString(source)];
- if (Object.keys(this._sourcesContents).length === 0) {
- this._sourcesContents = null;
- }
- }
- };
- /**
- * Applies the mappings of a sub-source-map for a specific source file to the
- * source map being generated. Each mapping to the supplied source file is
- * rewritten using the supplied source map. Note: The resolution for the
- * resulting mappings is the minimium of this map and the supplied map.
- *
- * @param aSourceMapConsumer The source map to be applied.
- * @param aSourceFile Optional. The filename of the source file.
- * If omitted, SourceMapConsumer's file property will be used.
- * @param aSourceMapPath Optional. The dirname of the path to the source map
- * to be applied. If relative, it is relative to the SourceMapConsumer.
- * This parameter is needed when the two source maps aren't in the same
- * directory, and the source map to be applied contains relative source
- * paths. If so, those relative source paths need to be rewritten
- * relative to the SourceMapGenerator.
- */
- SourceMapGenerator.prototype.applySourceMap =
- function SourceMapGenerator_applySourceMap(aSourceMapConsumer, aSourceFile, aSourceMapPath) {
- var sourceFile = aSourceFile;
- // If aSourceFile is omitted, we will use the file property of the SourceMap
- if (aSourceFile == null) {
- if (aSourceMapConsumer.file == null) {
- throw new Error(
- 'SourceMapGenerator.prototype.applySourceMap requires either an explicit source file, ' +
- 'or the source map\'s "file" property. Both were omitted.'
- );
- }
- sourceFile = aSourceMapConsumer.file;
- }
- var sourceRoot = this._sourceRoot;
- // Make "sourceFile" relative if an absolute Url is passed.
- if (sourceRoot != null) {
- sourceFile = util.relative(sourceRoot, sourceFile);
- }
- // Applying the SourceMap can add and remove items from the sources and
- // the names array.
- var newSources = new ArraySet();
- var newNames = new ArraySet();
- // Find mappings for the "sourceFile"
- this._mappings.unsortedForEach(function (mapping) {
- if (mapping.source === sourceFile && mapping.originalLine != null) {
- // Check if it can be mapped by the source map, then update the mapping.
- var original = aSourceMapConsumer.originalPositionFor({
- line: mapping.originalLine,
- column: mapping.originalColumn
- });
- if (original.source != null) {
- // Copy mapping
- mapping.source = original.source;
- if (aSourceMapPath != null) {
- mapping.source = util.join(aSourceMapPath, mapping.source)
- }
- if (sourceRoot != null) {
- mapping.source = util.relative(sourceRoot, mapping.source);
- }
- mapping.originalLine = original.line;
- mapping.originalColumn = original.column;
- if (original.name != null) {
- mapping.name = original.name;
- }
- }
- }
- var source = mapping.source;
- if (source != null && !newSources.has(source)) {
- newSources.add(source);
- }
- var name = mapping.name;
- if (name != null && !newNames.has(name)) {
- newNames.add(name);
- }
- }, this);
- this._sources = newSources;
- this._names = newNames;
- // Copy sourcesContents of applied map.
- aSourceMapConsumer.sources.forEach(function (sourceFile) {
- var content = aSourceMapConsumer.sourceContentFor(sourceFile);
- if (content != null) {
- if (aSourceMapPath != null) {
- sourceFile = util.join(aSourceMapPath, sourceFile);
- }
- if (sourceRoot != null) {
- sourceFile = util.relative(sourceRoot, sourceFile);
- }
- this.setSourceContent(sourceFile, content);
- }
- }, this);
- };
- /**
- * A mapping can have one of the three levels of data:
- *
- * 1. Just the generated position.
- * 2. The Generated position, original position, and original source.
- * 3. Generated and original position, original source, as well as a name
- * token.
- *
- * To maintain consistency, we validate that any new mapping being added falls
- * in to one of these categories.
- */
- SourceMapGenerator.prototype._validateMapping =
- function SourceMapGenerator_validateMapping(aGenerated, aOriginal, aSource,
- aName) {
- if (aGenerated && 'line' in aGenerated && 'column' in aGenerated
- && aGenerated.line > 0 && aGenerated.column >= 0
- && !aOriginal && !aSource && !aName) {
- // Case 1.
- return;
- }
- else if (aGenerated && 'line' in aGenerated && 'column' in aGenerated
- && aOriginal && 'line' in aOriginal && 'column' in aOriginal
- && aGenerated.line > 0 && aGenerated.column >= 0
- && aOriginal.line > 0 && aOriginal.column >= 0
- && aSource) {
- // Cases 2 and 3.
- return;
- }
- else {
- throw new Error('Invalid mapping: ' + JSON.stringify({
- generated: aGenerated,
- source: aSource,
- original: aOriginal,
- name: aName
- }));
- }
- };
- /**
- * Serialize the accumulated mappings in to the stream of base 64 VLQs
- * specified by the source map format.
- */
- SourceMapGenerator.prototype._serializeMappings =
- function SourceMapGenerator_serializeMappings() {
- var previousGeneratedColumn = 0;
- var previousGeneratedLine = 1;
- var previousOriginalColumn = 0;
- var previousOriginalLine = 0;
- var previousName = 0;
- var previousSource = 0;
- var result = '';
- var next;
- var mapping;
- var nameIdx;
- var sourceIdx;
- var mappings = this._mappings.toArray();
- for (var i = 0, len = mappings.length; i < len; i++) {
- mapping = mappings[i];
- next = ''
- if (mapping.generatedLine !== previousGeneratedLine) {
- previousGeneratedColumn = 0;
- while (mapping.generatedLine !== previousGeneratedLine) {
- next += ';';
- previousGeneratedLine++;
- }
- }
- else {
- if (i > 0) {
- if (!util.compareByGeneratedPositionsInflated(mapping, mappings[i - 1])) {
- continue;
- }
- next += ',';
- }
- }
- next += base64VLQ.encode(mapping.generatedColumn
- - previousGeneratedColumn);
- previousGeneratedColumn = mapping.generatedColumn;
- if (mapping.source != null) {
- sourceIdx = this._sources.indexOf(mapping.source);
- next += base64VLQ.encode(sourceIdx - previousSource);
- previousSource = sourceIdx;
- // lines are stored 0-based in SourceMap spec version 3
- next += base64VLQ.encode(mapping.originalLine - 1
- - previousOriginalLine);
- previousOriginalLine = mapping.originalLine - 1;
- next += base64VLQ.encode(mapping.originalColumn
- - previousOriginalColumn);
- previousOriginalColumn = mapping.originalColumn;
- if (mapping.name != null) {
- nameIdx = this._names.indexOf(mapping.name);
- next += base64VLQ.encode(nameIdx - previousName);
- previousName = nameIdx;
- }
- }
- result += next;
- }
- return result;
- };
- SourceMapGenerator.prototype._generateSourcesContent =
- function SourceMapGenerator_generateSourcesContent(aSources, aSourceRoot) {
- return aSources.map(function (source) {
- if (!this._sourcesContents) {
- return null;
- }
- if (aSourceRoot != null) {
- source = util.relative(aSourceRoot, source);
- }
- var key = util.toSetString(source);
- return Object.prototype.hasOwnProperty.call(this._sourcesContents, key)
- ? this._sourcesContents[key]
- : null;
- }, this);
- };
- /**
- * Externalize the source map.
- */
- SourceMapGenerator.prototype.toJSON =
- function SourceMapGenerator_toJSON() {
- var map = {
- version: this._version,
- sources: this._sources.toArray(),
- names: this._names.toArray(),
- mappings: this._serializeMappings()
- };
- if (this._file != null) {
- map.file = this._file;
- }
- if (this._sourceRoot != null) {
- map.sourceRoot = this._sourceRoot;
- }
- if (this._sourcesContents) {
- map.sourcesContent = this._generateSourcesContent(map.sources, map.sourceRoot);
- }
- return map;
- };
- /**
- * Render the source map being generated to a string.
- */
- SourceMapGenerator.prototype.toString =
- function SourceMapGenerator_toString() {
- return JSON.stringify(this.toJSON());
- };
- exports.SourceMapGenerator = SourceMapGenerator;
- /***/ }),
- /* 6 */
- /***/ (function(module, exports, __webpack_require__) {
- /* -*- Mode: js; js-indent-level: 2; -*- */
- /*
- * Copyright 2011 Mozilla Foundation and contributors
- * Licensed under the New BSD license. See LICENSE or:
- * http://opensource.org/licenses/BSD-3-Clause
- *
- * Based on the Base 64 VLQ implementation in Closure Compiler:
- * https://code.google.com/p/closure-compiler/source/browse/trunk/src/com/google/debugging/sourcemap/Base64VLQ.java
- *
- * Copyright 2011 The Closure Compiler Authors. All rights reserved.
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are
- * met:
- *
- * * Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * * Redistributions in binary form must reproduce the above
- * copyright notice, this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided
- * with the distribution.
- * * Neither the name of Google Inc. nor the names of its
- * contributors may be used to endorse or promote products derived
- * from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
- var base64 = __webpack_require__(22);
- // A single base 64 digit can contain 6 bits of data. For the base 64 variable
- // length quantities we use in the source map spec, the first bit is the sign,
- // the next four bits are the actual value, and the 6th bit is the
- // continuation bit. The continuation bit tells us whether there are more
- // digits in this value following this digit.
- //
- // Continuation
- // | Sign
- // | |
- // V V
- // 101011
- var VLQ_BASE_SHIFT = 5;
- // binary: 100000
- var VLQ_BASE = 1 << VLQ_BASE_SHIFT;
- // binary: 011111
- var VLQ_BASE_MASK = VLQ_BASE - 1;
- // binary: 100000
- var VLQ_CONTINUATION_BIT = VLQ_BASE;
- /**
- * Converts from a two-complement value to a value where the sign bit is
- * placed in the least significant bit. For example, as decimals:
- * 1 becomes 2 (10 binary), -1 becomes 3 (11 binary)
- * 2 becomes 4 (100 binary), -2 becomes 5 (101 binary)
- */
- function toVLQSigned(aValue) {
- return aValue < 0
- ? ((-aValue) << 1) + 1
- : (aValue << 1) + 0;
- }
- /**
- * Converts to a two-complement value from a value where the sign bit is
- * placed in the least significant bit. For example, as decimals:
- * 2 (10 binary) becomes 1, 3 (11 binary) becomes -1
- * 4 (100 binary) becomes 2, 5 (101 binary) becomes -2
- */
- function fromVLQSigned(aValue) {
- var isNegative = (aValue & 1) === 1;
- var shifted = aValue >> 1;
- return isNegative
- ? -shifted
- : shifted;
- }
- /**
- * Returns the base 64 VLQ encoded value.
- */
- exports.encode = function base64VLQ_encode(aValue) {
- var encoded = "";
- var digit;
- var vlq = toVLQSigned(aValue);
- do {
- digit = vlq & VLQ_BASE_MASK;
- vlq >>>= VLQ_BASE_SHIFT;
- if (vlq > 0) {
- // There are still more digits in this value, so we must make sure the
- // continuation bit is marked.
- digit |= VLQ_CONTINUATION_BIT;
- }
- encoded += base64.encode(digit);
- } while (vlq > 0);
- return encoded;
- };
- /**
- * Decodes the next base 64 VLQ value from the given string and returns the
- * value and the rest of the string via the out parameter.
- */
- exports.decode = function base64VLQ_decode(aStr, aIndex, aOutParam) {
- var strLen = aStr.length;
- var result = 0;
- var shift = 0;
- var continuation, digit;
- do {
- if (aIndex >= strLen) {
- throw new Error("Expected more digits in base 64 VLQ value.");
- }
- digit = base64.decode(aStr.charCodeAt(aIndex++));
- if (digit === -1) {
- throw new Error("Invalid base64 digit: " + aStr.charAt(aIndex - 1));
- }
- continuation = !!(digit & VLQ_CONTINUATION_BIT);
- digit &= VLQ_BASE_MASK;
- result = result + (digit << shift);
- shift += VLQ_BASE_SHIFT;
- } while (continuation);
- aOutParam.value = fromVLQSigned(result);
- aOutParam.rest = aIndex;
- };
- /***/ }),
- /* 7 */
- /***/ (function(module, exports, __webpack_require__) {
- /* -*- Mode: js; js-indent-level: 2; -*- */
- /*
- * Copyright 2011 Mozilla Foundation and contributors
- * Licensed under the New BSD license. See LICENSE or:
- * http://opensource.org/licenses/BSD-3-Clause
- */
- var util = __webpack_require__(0);
- var has = Object.prototype.hasOwnProperty;
- /**
- * A data structure which is a combination of an array and a set. Adding a new
- * member is O(1), testing for membership is O(1), and finding the index of an
- * element is O(1). Removing elements from the set is not supported. Only
- * strings are supported for membership.
- */
- function ArraySet() {
- this._array = [];
- this._set = Object.create(null);
- }
- /**
- * Static method for creating ArraySet instances from an existing array.
- */
- ArraySet.fromArray = function ArraySet_fromArray(aArray, aAllowDuplicates) {
- var set = new ArraySet();
- for (var i = 0, len = aArray.length; i < len; i++) {
- set.add(aArray[i], aAllowDuplicates);
- }
- return set;
- };
- /**
- * Return how many unique items are in this ArraySet. If duplicates have been
- * added, than those do not count towards the size.
- *
- * @returns Number
- */
- ArraySet.prototype.size = function ArraySet_size() {
- return Object.getOwnPropertyNames(this._set).length;
- };
- /**
- * Add the given string to this set.
- *
- * @param String aStr
- */
- ArraySet.prototype.add = function ArraySet_add(aStr, aAllowDuplicates) {
- var sStr = util.toSetString(aStr);
- var isDuplicate = has.call(this._set, sStr);
- var idx = this._array.length;
- if (!isDuplicate || aAllowDuplicates) {
- this._array.push(aStr);
- }
- if (!isDuplicate) {
- this._set[sStr] = idx;
- }
- };
- /**
- * Is the given string a member of this set?
- *
- * @param String aStr
- */
- ArraySet.prototype.has = function ArraySet_has(aStr) {
- var sStr = util.toSetString(aStr);
- return has.call(this._set, sStr);
- };
- /**
- * What is the index of the given string in the array?
- *
- * @param String aStr
- */
- ArraySet.prototype.indexOf = function ArraySet_indexOf(aStr) {
- var sStr = util.toSetString(aStr);
- if (has.call(this._set, sStr)) {
- return this._set[sStr];
- }
- throw new Error('"' + aStr + '" is not in the set.');
- };
- /**
- * What is the element at the given index?
- *
- * @param Number aIdx
- */
- ArraySet.prototype.at = function ArraySet_at(aIdx) {
- if (aIdx >= 0 && aIdx < this._array.length) {
- return this._array[aIdx];
- }
- throw new Error('No element indexed by ' + aIdx);
- };
- /**
- * Returns the array representation of this set (which has the proper indices
- * indicated by indexOf). Note that this is a copy of the internal array used
- * for storing the members so that no one can mess with internal state.
- */
- ArraySet.prototype.toArray = function ArraySet_toArray() {
- return this._array.slice();
- };
- exports.ArraySet = ArraySet;
- /***/ }),
- /* 8 */
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
- "use strict";
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return getLinesAround; });
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__stack_frame__ = __webpack_require__(1);
- /**
- * Copyright (c) 2015-present, Facebook, Inc.
- *
- * This source code is licensed under the MIT license found in the
- * LICENSE file in the root directory of this source tree.
- */
- /**
- *
- * @param {number} line The line number to provide context around.
- * @param {number} count The number of lines you'd like for context.
- * @param {string[] | string} lines The source code.
- */
- function getLinesAround(line, count, lines) {
- if (typeof lines === 'string') {
- lines = lines.split('\n');
- }
- var result = [];
- for (var index = Math.max(0, line - 1 - count); index <= Math.min(lines.length - 1, line - 1 + count); ++index) {
- result.push(new __WEBPACK_IMPORTED_MODULE_0__stack_frame__["a" /* ScriptLine */](index + 1, lines[index], index === line - 1));
- }
- return result;
- }
- /* unused harmony default export */ var _unused_webpack_default_export = (getLinesAround);
- /***/ }),
- /* 9 */
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
- "use strict";
- Object.defineProperty(__webpack_exports__, "__esModule", { value: true });
- /* WEBPACK VAR INJECTION */(function(process) {/* harmony export (immutable) */ __webpack_exports__["setEditorHandler"] = setEditorHandler;
- /* harmony export (immutable) */ __webpack_exports__["reportBuildError"] = reportBuildError;
- /* harmony export (immutable) */ __webpack_exports__["dismissBuildError"] = dismissBuildError;
- /* harmony export (immutable) */ __webpack_exports__["startReportingRuntimeErrors"] = startReportingRuntimeErrors;
- /* harmony export (immutable) */ __webpack_exports__["stopReportingRuntimeErrors"] = stopReportingRuntimeErrors;
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__listenToRuntimeErrors__ = __webpack_require__(10);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__styles__ = __webpack_require__(31);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__utils_dom_css__ = __webpack_require__(32);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_iframeScript__ = __webpack_require__(33);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_iframeScript___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_3_iframeScript__);
- /**
- * Copyright (c) 2015-present, Facebook, Inc.
- *
- * This source code is licensed under the MIT license found in the
- * LICENSE file in the root directory of this source tree.
- */
- // Importing iframe-bundle generated in the pre build step as
- // a text using webpack raw-loader. See webpack.config.js file.
- // $FlowFixMe
- var iframe = null;
- var isLoadingIframe = false;
- var isIframeReady = false;
- var editorHandler = null;
- var currentBuildError = null;
- var currentRuntimeErrorRecords = [];
- var currentRuntimeErrorOptions = null;
- var stopListeningToRuntimeErrors = null;
- function setEditorHandler(handler) {
- editorHandler = handler;
- if (iframe) {
- update();
- }
- }
- function reportBuildError(error) {
- currentBuildError = error;
- update();
- }
- function dismissBuildError() {
- currentBuildError = null;
- update();
- }
- function startReportingRuntimeErrors(options) {
- if (stopListeningToRuntimeErrors !== null) {
- throw new Error('Already listening');
- }
- if (options.launchEditorEndpoint) {
- console.warn('Warning: `startReportingRuntimeErrors` doesn’t accept ' + '`launchEditorEndpoint` argument anymore. Use `listenToOpenInEditor` ' + 'instead with your own implementation to open errors in editor ');
- }
- currentRuntimeErrorOptions = options;
- Object(__WEBPACK_IMPORTED_MODULE_0__listenToRuntimeErrors__["a" /* listenToRuntimeErrors */])(function (errorRecord) {
- try {
- if (typeof options.onError === 'function') {
- options.onError.call(null);
- }
- } finally {
- handleRuntimeError(errorRecord);
- }
- }, options.filename);
- }
- function handleRuntimeError(errorRecord) {
- if (currentRuntimeErrorRecords.some(function (_ref) {
- var error = _ref.error;
- return error === errorRecord.error;
- })) {
- // Deduplicate identical errors.
- // This fixes https://github.com/facebookincubator/create-react-app/issues/3011.
- return;
- }
- currentRuntimeErrorRecords = currentRuntimeErrorRecords.concat([errorRecord]);
- update();
- }
- function dismissRuntimeErrors() {
- currentRuntimeErrorRecords = [];
- update();
- }
- function stopReportingRuntimeErrors() {
- if (stopListeningToRuntimeErrors === null) {
- throw new Error('Not currently listening');
- }
- currentRuntimeErrorOptions = null;
- try {
- stopListeningToRuntimeErrors();
- } finally {
- stopListeningToRuntimeErrors = null;
- }
- }
- function update() {
- // Loading iframe can be either sync or async depending on the browser.
- if (isLoadingIframe) {
- // Iframe is loading.
- // First render will happen soon--don't need to do anything.
- return;
- }
- if (isIframeReady) {
- // Iframe is ready.
- // Just update it.
- updateIframeContent();
- return;
- }
- // We need to schedule the first render.
- isLoadingIframe = true;
- var loadingIframe = window.document.createElement('iframe');
- Object(__WEBPACK_IMPORTED_MODULE_2__utils_dom_css__["a" /* applyStyles */])(loadingIframe, __WEBPACK_IMPORTED_MODULE_1__styles__["a" /* iframeStyle */]);
- loadingIframe.onload = function () {
- var iframeDocument = loadingIframe.contentDocument;
- if (iframeDocument != null && iframeDocument.body != null) {
- iframe = loadingIframe;
- var script = loadingIframe.contentWindow.document.createElement('script');
- script.type = 'text/javascript';
- script.innerHTML = __WEBPACK_IMPORTED_MODULE_3_iframeScript___default.a;
- iframeDocument.body.appendChild(script);
- }
- };
- var appDocument = window.document;
- appDocument.body.appendChild(loadingIframe);
- }
- function updateIframeContent() {
- if (!currentRuntimeErrorOptions) {
- throw new Error('Expected options to be injected.');
- }
- if (!iframe) {
- throw new Error('Iframe has not been created yet.');
- }
- var isRendered = iframe.contentWindow.updateContent({
- currentBuildError: currentBuildError,
- currentRuntimeErrorRecords: currentRuntimeErrorRecords,
- dismissRuntimeErrors: dismissRuntimeErrors,
- editorHandler: editorHandler
- });
- if (!isRendered) {
- window.document.body.removeChild(iframe);
- iframe = null;
- isIframeReady = false;
- }
- }
- window.__REACT_ERROR_OVERLAY_GLOBAL_HOOK__ = window.__REACT_ERROR_OVERLAY_GLOBAL_HOOK__ || {};
- window.__REACT_ERROR_OVERLAY_GLOBAL_HOOK__.iframeReady = function iframeReady() {
- isIframeReady = true;
- isLoadingIframe = false;
- updateIframeContent();
- };
- if (process.env.NODE_ENV === 'production') {
- console.warn('react-error-overlay is not meant for use in production. You should ' + 'ensure it is not included in your build to reduce bundle size.');
- }
- /* WEBPACK VAR INJECTION */}.call(__webpack_exports__, __webpack_require__(3)))
- /***/ }),
- /* 10 */
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
- "use strict";
- /* harmony export (immutable) */ __webpack_exports__["a"] = listenToRuntimeErrors;
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__effects_unhandledError__ = __webpack_require__(11);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__effects_unhandledRejection__ = __webpack_require__(12);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__effects_stackTraceLimit__ = __webpack_require__(13);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__effects_proxyConsole__ = __webpack_require__(14);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__utils_warnings__ = __webpack_require__(15);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__utils_getStackFrames__ = __webpack_require__(16);
- /**
- * Copyright (c) 2015-present, Facebook, Inc.
- *
- * This source code is licensed under the MIT license found in the
- * LICENSE file in the root directory of this source tree.
- */
- var CONTEXT_SIZE = 3;
- function listenToRuntimeErrors(crash) {
- var filename = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : '/static/js/bundle.js';
- function crashWithFrames(error) {
- var unhandledRejection = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
- Object(__WEBPACK_IMPORTED_MODULE_5__utils_getStackFrames__["a" /* default */])(error, unhandledRejection, CONTEXT_SIZE).then(function (stackFrames) {
- if (stackFrames == null) {
- return;
- }
- crash({
- error: error,
- unhandledRejection: unhandledRejection,
- contextSize: CONTEXT_SIZE,
- stackFrames: stackFrames
- });
- }).catch(function (e) {
- console.log('Could not get the stack frames of error:', e);
- });
- }
- Object(__WEBPACK_IMPORTED_MODULE_0__effects_unhandledError__["a" /* register */])(window, function (error) {
- return crashWithFrames(error, false);
- });
- Object(__WEBPACK_IMPORTED_MODULE_1__effects_unhandledRejection__["a" /* register */])(window, function (error) {
- return crashWithFrames(error, true);
- });
- Object(__WEBPACK_IMPORTED_MODULE_2__effects_stackTraceLimit__["a" /* register */])();
- Object(__WEBPACK_IMPORTED_MODULE_3__effects_proxyConsole__["b" /* registerReactStack */])();
- Object(__WEBPACK_IMPORTED_MODULE_3__effects_proxyConsole__["a" /* permanentRegister */])('error', function (warning, stack) {
- var data = Object(__WEBPACK_IMPORTED_MODULE_4__utils_warnings__["a" /* massage */])(warning, stack);
- crashWithFrames(
- // $FlowFixMe
- {
- message: data.message,
- stack: data.stack,
- __unmap_source: filename
- }, false);
- });
- return function stopListening() {
- Object(__WEBPACK_IMPORTED_MODULE_2__effects_stackTraceLimit__["b" /* unregister */])();
- Object(__WEBPACK_IMPORTED_MODULE_1__effects_unhandledRejection__["b" /* unregister */])(window);
- Object(__WEBPACK_IMPORTED_MODULE_0__effects_unhandledError__["b" /* unregister */])(window);
- Object(__WEBPACK_IMPORTED_MODULE_3__effects_proxyConsole__["c" /* unregisterReactStack */])();
- };
- }
- /***/ }),
- /* 11 */
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
- "use strict";
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return registerUnhandledError; });
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return unregisterUnhandledError; });
- /**
- * Copyright (c) 2015-present, Facebook, Inc.
- *
- * This source code is licensed under the MIT license found in the
- * LICENSE file in the root directory of this source tree.
- */
- var boundErrorHandler = null;
- function errorHandler(callback, e) {
- if (!e.error) {
- return;
- }
- // $FlowFixMe
- var error = e.error;
- if (error instanceof Error) {
- callback(error);
- } else {
- // A non-error was thrown, we don't have a trace. :(
- // Look in your browser's devtools for more information
- callback(new Error(error));
- }
- }
- function registerUnhandledError(target, callback) {
- if (boundErrorHandler !== null) {
- return;
- }
- boundErrorHandler = errorHandler.bind(undefined, callback);
- target.addEventListener('error', boundErrorHandler);
- }
- function unregisterUnhandledError(target) {
- if (boundErrorHandler === null) {
- return;
- }
- target.removeEventListener('error', boundErrorHandler);
- boundErrorHandler = null;
- }
- /***/ }),
- /* 12 */
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
- "use strict";
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return registerUnhandledRejection; });
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return unregisterUnhandledRejection; });
- /**
- * Copyright (c) 2015-present, Facebook, Inc.
- *
- * This source code is licensed under the MIT license found in the
- * LICENSE file in the root directory of this source tree.
- */
- var boundRejectionHandler = null;
- function rejectionHandler(callback, e) {
- if (e == null || e.reason == null) {
- return callback(new Error('Unknown'));
- }
- var reason = e.reason;
- if (reason instanceof Error) {
- return callback(reason);
- }
- // A non-error was rejected, we don't have a trace :(
- // Look in your browser's devtools for more information
- return callback(new Error(reason));
- }
- function registerUnhandledRejection(target, callback) {
- if (boundRejectionHandler !== null) {
- return;
- }
- boundRejectionHandler = rejectionHandler.bind(undefined, callback);
- // $FlowFixMe
- target.addEventListener('unhandledrejection', boundRejectionHandler);
- }
- function unregisterUnhandledRejection(target) {
- if (boundRejectionHandler === null) {
- return;
- }
- // $FlowFixMe
- target.removeEventListener('unhandledrejection', boundRejectionHandler);
- boundRejectionHandler = null;
- }
- /***/ }),
- /* 13 */
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
- "use strict";
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return registerStackTraceLimit; });
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return unregisterStackTraceLimit; });
- /**
- * Copyright (c) 2015-present, Facebook, Inc.
- *
- * This source code is licensed under the MIT license found in the
- * LICENSE file in the root directory of this source tree.
- */
- var stackTraceRegistered = false;
- // Default: https://docs.microsoft.com/en-us/scripting/javascript/reference/stacktracelimit-property-error-javascript
- var restoreStackTraceValue = 10;
- var MAX_STACK_LENGTH = 50;
- function registerStackTraceLimit() {
- var limit = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : MAX_STACK_LENGTH;
- if (stackTraceRegistered) {
- return;
- }
- try {
- restoreStackTraceValue = Error.stackTraceLimit;
- Error.stackTraceLimit = limit;
- stackTraceRegistered = true;
- } catch (e) {
- // Not all browsers support this so we don't care if it errors
- }
- }
- function unregisterStackTraceLimit() {
- if (!stackTraceRegistered) {
- return;
- }
- try {
- Error.stackTraceLimit = restoreStackTraceValue;
- stackTraceRegistered = false;
- } catch (e) {
- // Not all browsers support this so we don't care if it errors
- }
- }
- /***/ }),
- /* 14 */
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
- "use strict";
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return permanentRegister; });
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return registerReactStack; });
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "c", function() { return unregisterReactStack; });
- var reactFrameStack = []; /**
- * Copyright (c) 2015-present, Facebook, Inc.
- *
- * This source code is licensed under the MIT license found in the
- * LICENSE file in the root directory of this source tree.
- */
- // This is a stripped down barebones version of this proposal:
- // https://gist.github.com/sebmarkbage/bdefa100f19345229d526d0fdd22830f
- // We're implementing just enough to get the invalid element type warnings
- // to display the component stack in React 15.6+:
- // https://github.com/facebook/react/pull/9679
- /// TODO: a more comprehensive implementation.
- var registerReactStack = function registerReactStack() {
- if (typeof console !== 'undefined') {
- // $FlowFixMe
- console.reactStack = function (frames) {
- return reactFrameStack.push(frames);
- };
- // $FlowFixMe
- console.reactStackEnd = function (frames) {
- return reactFrameStack.pop();
- };
- }
- };
- var unregisterReactStack = function unregisterReactStack() {
- if (typeof console !== 'undefined') {
- // $FlowFixMe
- console.reactStack = undefined;
- // $FlowFixMe
- console.reactStackEnd = undefined;
- }
- };
- var permanentRegister = function proxyConsole(type, callback) {
- if (typeof console !== 'undefined') {
- var orig = console[type];
- if (typeof orig === 'function') {
- console[type] = function __stack_frame_overlay_proxy_console__() {
- try {
- var _message = arguments[0];
- if (typeof _message === 'string' && reactFrameStack.length > 0) {
- callback(_message, reactFrameStack[reactFrameStack.length - 1]);
- }
- } catch (err) {
- // Warnings must never crash. Rethrow with a clean stack.
- setTimeout(function () {
- throw err;
- });
- }
- return orig.apply(this, arguments);
- };
- }
- }
- };
- /***/ }),
- /* 15 */
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
- "use strict";
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return massage; });
- function stripInlineStacktrace(message) {
- return message.split('\n').filter(function (line) {
- return !line.match(/^\s*in/);
- }).join('\n'); // " in Foo"
- } /**
- * Copyright (c) 2015-present, Facebook, Inc.
- *
- * This source code is licensed under the MIT license found in the
- * LICENSE file in the root directory of this source tree.
- */
- function massage(warning, frames) {
- var message = stripInlineStacktrace(warning);
- // Reassemble the stack with full filenames provided by React
- var stack = '';
- var lastFilename = void 0;
- var lastLineNumber = void 0;
- for (var index = 0; index < frames.length; ++index) {
- var _frames$index = frames[index],
- fileName = _frames$index.fileName,
- lineNumber = _frames$index.lineNumber;
- if (fileName == null || lineNumber == null) {
- continue;
- }
- // TODO: instead, collapse them in the UI
- if (fileName === lastFilename && typeof lineNumber === 'number' && typeof lastLineNumber === 'number' && Math.abs(lineNumber - lastLineNumber) < 3) {
- continue;
- }
- lastFilename = fileName;
- lastLineNumber = lineNumber;
- var name = frames[index].name;
- name = name || '(anonymous function)';
- stack += 'in ' + name + ' (at ' + fileName + ':' + lineNumber + ')\n';
- }
- return { message: message, stack: stack };
- }
- /***/ }),
- /* 16 */
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
- "use strict";
- /* unused harmony export getStackFrames */
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__parser__ = __webpack_require__(17);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__mapper__ = __webpack_require__(18);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__unmapper__ = __webpack_require__(29);
- /**
- * Copyright (c) 2015-present, Facebook, Inc.
- *
- * This source code is licensed under the MIT license found in the
- * LICENSE file in the root directory of this source tree.
- */
- function getStackFrames(error) {
- var unhandledRejection = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
- var contextSize = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 3;
- var parsedFrames = Object(__WEBPACK_IMPORTED_MODULE_0__parser__["a" /* parse */])(error);
- var enhancedFramesPromise = void 0;
- if (error.__unmap_source) {
- enhancedFramesPromise = Object(__WEBPACK_IMPORTED_MODULE_2__unmapper__["a" /* unmap */])(
- // $FlowFixMe
- error.__unmap_source, parsedFrames, contextSize);
- } else {
- enhancedFramesPromise = Object(__WEBPACK_IMPORTED_MODULE_1__mapper__["a" /* map */])(parsedFrames, contextSize);
- }
- return enhancedFramesPromise.then(function (enhancedFrames) {
- if (enhancedFrames.map(function (f) {
- return f._originalFileName;
- }).filter(function (f) {
- return f != null && f.indexOf('node_modules') === -1;
- }).length === 0) {
- return null;
- }
- return enhancedFrames.filter(function (_ref) {
- var functionName = _ref.functionName;
- return functionName == null || functionName.indexOf('__stack_frame_overlay_proxy_console__') === -1;
- });
- });
- }
- /* harmony default export */ __webpack_exports__["a"] = (getStackFrames);
- /***/ }),
- /* 17 */
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
- "use strict";
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return parseError; });
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__stack_frame__ = __webpack_require__(1);
- function _toConsumableArray(arr) { if (Array.isArray(arr)) { for (var i = 0, arr2 = Array(arr.length); i < arr.length; i++) { arr2[i] = arr[i]; } return arr2; } else { return Array.from(arr); } }
- /**
- * Copyright (c) 2015-present, Facebook, Inc.
- *
- * This source code is licensed under the MIT license found in the
- * LICENSE file in the root directory of this source tree.
- */
- var regexExtractLocation = /\(?(.+?)(?::(\d+))?(?::(\d+))?\)?$/;
- function extractLocation(token) {
- return regexExtractLocation.exec(token).slice(1).map(function (v) {
- var p = Number(v);
- if (!isNaN(p)) {
- return p;
- }
- return v;
- });
- }
- var regexValidFrame_Chrome = /^\s*(at|in)\s.+(:\d+)/;
- var regexValidFrame_FireFox = /(^|@)\S+:\d+|.+line\s+\d+\s+>\s+(eval|Function).+/;
- function parseStack(stack) {
- var frames = stack.filter(function (e) {
- return regexValidFrame_Chrome.test(e) || regexValidFrame_FireFox.test(e);
- }).map(function (e) {
- if (regexValidFrame_FireFox.test(e)) {
- // Strip eval, we don't care about it
- var isEval = false;
- if (/ > (eval|Function)/.test(e)) {
- e = e.replace(/ line (\d+)(?: > eval line \d+)* > (eval|Function):\d+:\d+/g, ':$1');
- isEval = true;
- }
- var data = e.split(/[@]/g);
- var last = data.pop();
- return new (Function.prototype.bind.apply(__WEBPACK_IMPORTED_MODULE_0__stack_frame__["b" /* default */], [null].concat([data.join('@') || (isEval ? 'eval' : null)], _toConsumableArray(extractLocation(last)))))();
- } else {
- // Strip eval, we don't care about it
- if (e.indexOf('(eval ') !== -1) {
- e = e.replace(/(\(eval at [^()]*)|(\),.*$)/g, '');
- }
- if (e.indexOf('(at ') !== -1) {
- e = e.replace(/\(at /, '(');
- }
- var _data = e.trim().split(/\s+/g).slice(1);
- var _last = _data.pop();
- return new (Function.prototype.bind.apply(__WEBPACK_IMPORTED_MODULE_0__stack_frame__["b" /* default */], [null].concat([_data.join(' ') || null], _toConsumableArray(extractLocation(_last)))))();
- }
- });
- return frames;
- }
- /**
- * Turns an <code>Error</code>, or similar object, into a set of <code>StackFrame</code>s.
- * @alias parse
- */
- function parseError(error) {
- if (error == null) {
- throw new Error('You cannot pass a null object.');
- }
- if (typeof error === 'string') {
- return parseStack(error.split('\n'));
- }
- if (Array.isArray(error)) {
- return parseStack(error);
- }
- if (typeof error.stack === 'string') {
- return parseStack(error.stack.split('\n'));
- }
- throw new Error('The error you provided does not contain a stack trace.');
- }
- /* unused harmony default export */ var _unused_webpack_default_export = (parseError);
- /***/ }),
- /* 18 */
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
- "use strict";
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return map; });
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_babel_runtime_regenerator__ = __webpack_require__(2);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_babel_runtime_regenerator___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_babel_runtime_regenerator__);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__stack_frame__ = __webpack_require__(1);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__getSourceMap__ = __webpack_require__(4);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__getLinesAround__ = __webpack_require__(8);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_settle_promise__ = __webpack_require__(28);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_settle_promise___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_4_settle_promise__);
- /**
- * Enhances a set of <code>StackFrame</code>s with their original positions and code (when available).
- * @param {StackFrame[]} frames A set of <code>StackFrame</code>s which contain (generated) code positions.
- * @param {number} [contextLines=3] The number of lines to provide before and after the line specified in the <code>StackFrame</code>.
- */
- var map = function () {
- var _ref = _asyncToGenerator( /*#__PURE__*/__WEBPACK_IMPORTED_MODULE_0_babel_runtime_regenerator___default.a.mark(function _callee2(frames) {
- var _this = this;
- var contextLines = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 3;
- var cache, files;
- return __WEBPACK_IMPORTED_MODULE_0_babel_runtime_regenerator___default.a.wrap(function _callee2$(_context2) {
- while (1) {
- switch (_context2.prev = _context2.next) {
- case 0:
- cache = {};
- files = [];
- frames.forEach(function (frame) {
- var fileName = frame.fileName;
- if (fileName == null) {
- return;
- }
- if (files.indexOf(fileName) !== -1) {
- return;
- }
- files.push(fileName);
- });
- _context2.next = 5;
- return Object(__WEBPACK_IMPORTED_MODULE_4_settle_promise__["settle"])(files.map(function () {
- var _ref2 = _asyncToGenerator( /*#__PURE__*/__WEBPACK_IMPORTED_MODULE_0_babel_runtime_regenerator___default.a.mark(function _callee(fileName) {
- var fileSource, map;
- return __WEBPACK_IMPORTED_MODULE_0_babel_runtime_regenerator___default.a.wrap(function _callee$(_context) {
- while (1) {
- switch (_context.prev = _context.next) {
- case 0:
- _context.next = 2;
- return fetch(fileName).then(function (r) {
- return r.text();
- });
- case 2:
- fileSource = _context.sent;
- _context.next = 5;
- return Object(__WEBPACK_IMPORTED_MODULE_2__getSourceMap__["a" /* getSourceMap */])(fileName, fileSource);
- case 5:
- map = _context.sent;
- cache[fileName] = { fileSource: fileSource, map: map };
- case 7:
- case 'end':
- return _context.stop();
- }
- }
- }, _callee, _this);
- }));
- return function (_x3) {
- return _ref2.apply(this, arguments);
- };
- }()));
- case 5:
- return _context2.abrupt('return', frames.map(function (frame) {
- var functionName = frame.functionName,
- fileName = frame.fileName,
- lineNumber = frame.lineNumber,
- columnNumber = frame.columnNumber;
- var _ref3 = cache[fileName] || {},
- map = _ref3.map,
- fileSource = _ref3.fileSource;
- if (map == null || lineNumber == null) {
- return frame;
- }
- var _map$getOriginalPosit = map.getOriginalPosition(lineNumber, columnNumber),
- source = _map$getOriginalPosit.source,
- line = _map$getOriginalPosit.line,
- column = _map$getOriginalPosit.column;
- var originalSource = source == null ? [] : map.getSource(source);
- return new __WEBPACK_IMPORTED_MODULE_1__stack_frame__["b" /* default */](functionName, fileName, lineNumber, columnNumber, Object(__WEBPACK_IMPORTED_MODULE_3__getLinesAround__["a" /* getLinesAround */])(lineNumber, contextLines, fileSource), functionName, source, line, column, Object(__WEBPACK_IMPORTED_MODULE_3__getLinesAround__["a" /* getLinesAround */])(line, contextLines, originalSource));
- }));
- case 6:
- case 'end':
- return _context2.stop();
- }
- }
- }, _callee2, this);
- }));
- return function map(_x2) {
- return _ref.apply(this, arguments);
- };
- }();
- function _asyncToGenerator(fn) { return function () { var gen = fn.apply(this, arguments); return new Promise(function (resolve, reject) { function step(key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { return Promise.resolve(value).then(function (value) { step("next", value); }, function (err) { step("throw", err); }); } } return step("next"); }); }; }
- /**
- * Copyright (c) 2015-present, Facebook, Inc.
- *
- * This source code is licensed under the MIT license found in the
- * LICENSE file in the root directory of this source tree.
- */
- /* unused harmony default export */ var _unused_webpack_default_export = (map);
- /***/ }),
- /* 19 */
- /***/ (function(module, exports, __webpack_require__) {
- // This method of obtaining a reference to the global object needs to be
- // kept identical to the way it is obtained in runtime.js
- var g = (function() { return this })() || Function("return this")();
- // Use `getOwnPropertyNames` because not all browsers support calling
- // `hasOwnProperty` on the global `self` object in a worker. See #183.
- var hadRuntime = g.regeneratorRuntime &&
- Object.getOwnPropertyNames(g).indexOf("regeneratorRuntime") >= 0;
- // Save the old regeneratorRuntime in case it needs to be restored later.
- var oldRuntime = hadRuntime && g.regeneratorRuntime;
- // Force reevalutation of runtime.js.
- g.regeneratorRuntime = undefined;
- module.exports = __webpack_require__(20);
- if (hadRuntime) {
- // Restore the original runtime.
- g.regeneratorRuntime = oldRuntime;
- } else {
- // Remove the global property added by runtime.js.
- try {
- delete g.regeneratorRuntime;
- } catch(e) {
- g.regeneratorRuntime = undefined;
- }
- }
- /***/ }),
- /* 20 */
- /***/ (function(module, exports) {
- /**
- * Copyright (c) 2014, Facebook, Inc.
- * All rights reserved.
- *
- * This source code is licensed under the BSD-style license found in the
- * https://raw.github.com/facebook/regenerator/master/LICENSE file. An
- * additional grant of patent rights can be found in the PATENTS file in
- * the same directory.
- */
- !(function(global) {
- "use strict";
- var Op = Object.prototype;
- var hasOwn = Op.hasOwnProperty;
- var undefined; // More compressible than void 0.
- var $Symbol = typeof Symbol === "function" ? Symbol : {};
- var iteratorSymbol = $Symbol.iterator || "@@iterator";
- var asyncIteratorSymbol = $Symbol.asyncIterator || "@@asyncIterator";
- var toStringTagSymbol = $Symbol.toStringTag || "@@toStringTag";
- var inModule = typeof module === "object";
- var runtime = global.regeneratorRuntime;
- if (runtime) {
- if (inModule) {
- // If regeneratorRuntime is defined globally and we're in a module,
- // make the exports object identical to regeneratorRuntime.
- module.exports = runtime;
- }
- // Don't bother evaluating the rest of this file if the runtime was
- // already defined globally.
- return;
- }
- // Define the runtime globally (as expected by generated code) as either
- // module.exports (if we're in a module) or a new, empty object.
- runtime = global.regeneratorRuntime = inModule ? module.exports : {};
- function wrap(innerFn, outerFn, self, tryLocsList) {
- // If outerFn provided and outerFn.prototype is a Generator, then outerFn.prototype instanceof Generator.
- var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator;
- var generator = Object.create(protoGenerator.prototype);
- var context = new Context(tryLocsList || []);
- // The ._invoke method unifies the implementations of the .next,
- // .throw, and .return methods.
- generator._invoke = makeInvokeMethod(innerFn, self, context);
- return generator;
- }
- runtime.wrap = wrap;
- // Try/catch helper to minimize deoptimizations. Returns a completion
- // record like context.tryEntries[i].completion. This interface could
- // have been (and was previously) designed to take a closure to be
- // invoked without arguments, but in all the cases we care about we
- // already have an existing method we want to call, so there's no need
- // to create a new function object. We can even get away with assuming
- // the method takes exactly one argument, since that happens to be true
- // in every case, so we don't have to touch the arguments object. The
- // only additional allocation required is the completion record, which
- // has a stable shape and so hopefully should be cheap to allocate.
- function tryCatch(fn, obj, arg) {
- try {
- return { type: "normal", arg: fn.call(obj, arg) };
- } catch (err) {
- return { type: "throw", arg: err };
- }
- }
- var GenStateSuspendedStart = "suspendedStart";
- var GenStateSuspendedYield = "suspendedYield";
- var GenStateExecuting = "executing";
- var GenStateCompleted = "completed";
- // Returning this object from the innerFn has the same effect as
- // breaking out of the dispatch switch statement.
- var ContinueSentinel = {};
- // Dummy constructor functions that we use as the .constructor and
- // .constructor.prototype properties for functions that return Generator
- // objects. For full spec compliance, you may wish to configure your
- // minifier not to mangle the names of these two functions.
- function Generator() {}
- function GeneratorFunction() {}
- function GeneratorFunctionPrototype() {}
- // This is a polyfill for %IteratorPrototype% for environments that
- // don't natively support it.
- var IteratorPrototype = {};
- IteratorPrototype[iteratorSymbol] = function () {
- return this;
- };
- var getProto = Object.getPrototypeOf;
- var NativeIteratorPrototype = getProto && getProto(getProto(values([])));
- if (NativeIteratorPrototype &&
- NativeIteratorPrototype !== Op &&
- hasOwn.call(NativeIteratorPrototype, iteratorSymbol)) {
- // This environment has a native %IteratorPrototype%; use it instead
- // of the polyfill.
- IteratorPrototype = NativeIteratorPrototype;
- }
- var Gp = GeneratorFunctionPrototype.prototype =
- Generator.prototype = Object.create(IteratorPrototype);
- GeneratorFunction.prototype = Gp.constructor = GeneratorFunctionPrototype;
- GeneratorFunctionPrototype.constructor = GeneratorFunction;
- GeneratorFunctionPrototype[toStringTagSymbol] =
- GeneratorFunction.displayName = "GeneratorFunction";
- // Helper for defining the .next, .throw, and .return methods of the
- // Iterator interface in terms of a single ._invoke method.
- function defineIteratorMethods(prototype) {
- ["next", "throw", "return"].forEach(function(method) {
- prototype[method] = function(arg) {
- return this._invoke(method, arg);
- };
- });
- }
- runtime.isGeneratorFunction = function(genFun) {
- var ctor = typeof genFun === "function" && genFun.constructor;
- return ctor
- ? ctor === GeneratorFunction ||
- // For the native GeneratorFunction constructor, the best we can
- // do is to check its .name property.
- (ctor.displayName || ctor.name) === "GeneratorFunction"
- : false;
- };
- runtime.mark = function(genFun) {
- if (Object.setPrototypeOf) {
- Object.setPrototypeOf(genFun, GeneratorFunctionPrototype);
- } else {
- genFun.__proto__ = GeneratorFunctionPrototype;
- if (!(toStringTagSymbol in genFun)) {
- genFun[toStringTagSymbol] = "GeneratorFunction";
- }
- }
- genFun.prototype = Object.create(Gp);
- return genFun;
- };
- // Within the body of any async function, `await x` is transformed to
- // `yield regeneratorRuntime.awrap(x)`, so that the runtime can test
- // `hasOwn.call(value, "__await")` to determine if the yielded value is
- // meant to be awaited.
- runtime.awrap = function(arg) {
- return { __await: arg };
- };
- function AsyncIterator(generator) {
- function invoke(method, arg, resolve, reject) {
- var record = tryCatch(generator[method], generator, arg);
- if (record.type === "throw") {
- reject(record.arg);
- } else {
- var result = record.arg;
- var value = result.value;
- if (value &&
- typeof value === "object" &&
- hasOwn.call(value, "__await")) {
- return Promise.resolve(value.__await).then(function(value) {
- invoke("next", value, resolve, reject);
- }, function(err) {
- invoke("throw", err, resolve, reject);
- });
- }
- return Promise.resolve(value).then(function(unwrapped) {
- // When a yielded Promise is resolved, its final value becomes
- // the .value of the Promise<{value,done}> result for the
- // current iteration. If the Promise is rejected, however, the
- // result for this iteration will be rejected with the same
- // reason. Note that rejections of yielded Promises are not
- // thrown back into the generator function, as is the case
- // when an awaited Promise is rejected. This difference in
- // behavior between yield and await is important, because it
- // allows the consumer to decide what to do with the yielded
- // rejection (swallow it and continue, manually .throw it back
- // into the generator, abandon iteration, whatever). With
- // await, by contrast, there is no opportunity to examine the
- // rejection reason outside the generator function, so the
- // only option is to throw it from the await expression, and
- // let the generator function handle the exception.
- result.value = unwrapped;
- resolve(result);
- }, reject);
- }
- }
- var previousPromise;
- function enqueue(method, arg) {
- function callInvokeWithMethodAndArg() {
- return new Promise(function(resolve, reject) {
- invoke(method, arg, resolve, reject);
- });
- }
- return previousPromise =
- // If enqueue has been called before, then we want to wait until
- // all previous Promises have been resolved before calling invoke,
- // so that results are always delivered in the correct order. If
- // enqueue has not been called before, then it is important to
- // call invoke immediately, without waiting on a callback to fire,
- // so that the async generator function has the opportunity to do
- // any necessary setup in a predictable way. This predictability
- // is why the Promise constructor synchronously invokes its
- // executor callback, and why async functions synchronously
- // execute code before the first await. Since we implement simple
- // async functions in terms of async generators, it is especially
- // important to get this right, even though it requires care.
- previousPromise ? previousPromise.then(
- callInvokeWithMethodAndArg,
- // Avoid propagating failures to Promises returned by later
- // invocations of the iterator.
- callInvokeWithMethodAndArg
- ) : callInvokeWithMethodAndArg();
- }
- // Define the unified helper method that is used to implement .next,
- // .throw, and .return (see defineIteratorMethods).
- this._invoke = enqueue;
- }
- defineIteratorMethods(AsyncIterator.prototype);
- AsyncIterator.prototype[asyncIteratorSymbol] = function () {
- return this;
- };
- runtime.AsyncIterator = AsyncIterator;
- // Note that simple async functions are implemented on top of
- // AsyncIterator objects; they just return a Promise for the value of
- // the final result produced by the iterator.
- runtime.async = function(innerFn, outerFn, self, tryLocsList) {
- var iter = new AsyncIterator(
- wrap(innerFn, outerFn, self, tryLocsList)
- );
- return runtime.isGeneratorFunction(outerFn)
- ? iter // If outerFn is a generator, return the full iterator.
- : iter.next().then(function(result) {
- return result.done ? result.value : iter.next();
- });
- };
- function makeInvokeMethod(innerFn, self, context) {
- var state = GenStateSuspendedStart;
- return function invoke(method, arg) {
- if (state === GenStateExecuting) {
- throw new Error("Generator is already running");
- }
- if (state === GenStateCompleted) {
- if (method === "throw") {
- throw arg;
- }
- // Be forgiving, per 25.3.3.3.3 of the spec:
- // https://people.mozilla.org/~jorendorff/es6-draft.html#sec-generatorresume
- return doneResult();
- }
- context.method = method;
- context.arg = arg;
- while (true) {
- var delegate = context.delegate;
- if (delegate) {
- var delegateResult = maybeInvokeDelegate(delegate, context);
- if (delegateResult) {
- if (delegateResult === ContinueSentinel) continue;
- return delegateResult;
- }
- }
- if (context.method === "next") {
- // Setting context._sent for legacy support of Babel's
- // function.sent implementation.
- context.sent = context._sent = context.arg;
- } else if (context.method === "throw") {
- if (state === GenStateSuspendedStart) {
- state = GenStateCompleted;
- throw context.arg;
- }
- context.dispatchException(context.arg);
- } else if (context.method === "return") {
- context.abrupt("return", context.arg);
- }
- state = GenStateExecuting;
- var record = tryCatch(innerFn, self, context);
- if (record.type === "normal") {
- // If an exception is thrown from innerFn, we leave state ===
- // GenStateExecuting and loop back for another invocation.
- state = context.done
- ? GenStateCompleted
- : GenStateSuspendedYield;
- if (record.arg === ContinueSentinel) {
- continue;
- }
- return {
- value: record.arg,
- done: context.done
- };
- } else if (record.type === "throw") {
- state = GenStateCompleted;
- // Dispatch the exception by looping back around to the
- // context.dispatchException(context.arg) call above.
- context.method = "throw";
- context.arg = record.arg;
- }
- }
- };
- }
- // Call delegate.iterator[context.method](context.arg) and handle the
- // result, either by returning a { value, done } result from the
- // delegate iterator, or by modifying context.method and context.arg,
- // setting context.delegate to null, and returning the ContinueSentinel.
- function maybeInvokeDelegate(delegate, context) {
- var method = delegate.iterator[context.method];
- if (method === undefined) {
- // A .throw or .return when the delegate iterator has no .throw
- // method always terminates the yield* loop.
- context.delegate = null;
- if (context.method === "throw") {
- if (delegate.iterator.return) {
- // If the delegate iterator has a return method, give it a
- // chance to clean up.
- context.method = "return";
- context.arg = undefined;
- maybeInvokeDelegate(delegate, context);
- if (context.method === "throw") {
- // If maybeInvokeDelegate(context) changed context.method from
- // "return" to "throw", let that override the TypeError below.
- return ContinueSentinel;
- }
- }
- context.method = "throw";
- context.arg = new TypeError(
- "The iterator does not provide a 'throw' method");
- }
- return ContinueSentinel;
- }
- var record = tryCatch(method, delegate.iterator, context.arg);
- if (record.type === "throw") {
- context.method = "throw";
- context.arg = record.arg;
- context.delegate = null;
- return ContinueSentinel;
- }
- var info = record.arg;
- if (! info) {
- context.method = "throw";
- context.arg = new TypeError("iterator result is not an object");
- context.delegate = null;
- return ContinueSentinel;
- }
- if (info.done) {
- // Assign the result of the finished delegate to the temporary
- // variable specified by delegate.resultName (see delegateYield).
- context[delegate.resultName] = info.value;
- // Resume execution at the desired location (see delegateYield).
- context.next = delegate.nextLoc;
- // If context.method was "throw" but the delegate handled the
- // exception, let the outer generator proceed normally. If
- // context.method was "next", forget context.arg since it has been
- // "consumed" by the delegate iterator. If context.method was
- // "return", allow the original .return call to continue in the
- // outer generator.
- if (context.method !== "return") {
- context.method = "next";
- context.arg = undefined;
- }
- } else {
- // Re-yield the result returned by the delegate method.
- return info;
- }
- // The delegate iterator is finished, so forget it and continue with
- // the outer generator.
- context.delegate = null;
- return ContinueSentinel;
- }
- // Define Generator.prototype.{next,throw,return} in terms of the
- // unified ._invoke helper method.
- defineIteratorMethods(Gp);
- Gp[toStringTagSymbol] = "Generator";
- // A Generator should always return itself as the iterator object when the
- // @@iterator function is called on it. Some browsers' implementations of the
- // iterator prototype chain incorrectly implement this, causing the Generator
- // object to not be returned from this call. This ensures that doesn't happen.
- // See https://github.com/facebook/regenerator/issues/274 for more details.
- Gp[iteratorSymbol] = function() {
- return this;
- };
- Gp.toString = function() {
- return "[object Generator]";
- };
- function pushTryEntry(locs) {
- var entry = { tryLoc: locs[0] };
- if (1 in locs) {
- entry.catchLoc = locs[1];
- }
- if (2 in locs) {
- entry.finallyLoc = locs[2];
- entry.afterLoc = locs[3];
- }
- this.tryEntries.push(entry);
- }
- function resetTryEntry(entry) {
- var record = entry.completion || {};
- record.type = "normal";
- delete record.arg;
- entry.completion = record;
- }
- function Context(tryLocsList) {
- // The root entry object (effectively a try statement without a catch
- // or a finally block) gives us a place to store values thrown from
- // locations where there is no enclosing try statement.
- this.tryEntries = [{ tryLoc: "root" }];
- tryLocsList.forEach(pushTryEntry, this);
- this.reset(true);
- }
- runtime.keys = function(object) {
- var keys = [];
- for (var key in object) {
- keys.push(key);
- }
- keys.reverse();
- // Rather than returning an object with a next method, we keep
- // things simple and return the next function itself.
- return function next() {
- while (keys.length) {
- var key = keys.pop();
- if (key in object) {
- next.value = key;
- next.done = false;
- return next;
- }
- }
- // To avoid creating an additional object, we just hang the .value
- // and .done properties off the next function object itself. This
- // also ensures that the minifier will not anonymize the function.
- next.done = true;
- return next;
- };
- };
- function values(iterable) {
- if (iterable) {
- var iteratorMethod = iterable[iteratorSymbol];
- if (iteratorMethod) {
- return iteratorMethod.call(iterable);
- }
- if (typeof iterable.next === "function") {
- return iterable;
- }
- if (!isNaN(iterable.length)) {
- var i = -1, next = function next() {
- while (++i < iterable.length) {
- if (hasOwn.call(iterable, i)) {
- next.value = iterable[i];
- next.done = false;
- return next;
- }
- }
- next.value = undefined;
- next.done = true;
- return next;
- };
- return next.next = next;
- }
- }
- // Return an iterator with no values.
- return { next: doneResult };
- }
- runtime.values = values;
- function doneResult() {
- return { value: undefined, done: true };
- }
- Context.prototype = {
- constructor: Context,
- reset: function(skipTempReset) {
- this.prev = 0;
- this.next = 0;
- // Resetting context._sent for legacy support of Babel's
- // function.sent implementation.
- this.sent = this._sent = undefined;
- this.done = false;
- this.delegate = null;
- this.method = "next";
- this.arg = undefined;
- this.tryEntries.forEach(resetTryEntry);
- if (!skipTempReset) {
- for (var name in this) {
- // Not sure about the optimal order of these conditions:
- if (name.charAt(0) === "t" &&
- hasOwn.call(this, name) &&
- !isNaN(+name.slice(1))) {
- this[name] = undefined;
- }
- }
- }
- },
- stop: function() {
- this.done = true;
- var rootEntry = this.tryEntries[0];
- var rootRecord = rootEntry.completion;
- if (rootRecord.type === "throw") {
- throw rootRecord.arg;
- }
- return this.rval;
- },
- dispatchException: function(exception) {
- if (this.done) {
- throw exception;
- }
- var context = this;
- function handle(loc, caught) {
- record.type = "throw";
- record.arg = exception;
- context.next = loc;
- if (caught) {
- // If the dispatched exception was caught by a catch block,
- // then let that catch block handle the exception normally.
- context.method = "next";
- context.arg = undefined;
- }
- return !! caught;
- }
- for (var i = this.tryEntries.length - 1; i >= 0; --i) {
- var entry = this.tryEntries[i];
- var record = entry.completion;
- if (entry.tryLoc === "root") {
- // Exception thrown outside of any try block that could handle
- // it, so set the completion value of the entire function to
- // throw the exception.
- return handle("end");
- }
- if (entry.tryLoc <= this.prev) {
- var hasCatch = hasOwn.call(entry, "catchLoc");
- var hasFinally = hasOwn.call(entry, "finallyLoc");
- if (hasCatch && hasFinally) {
- if (this.prev < entry.catchLoc) {
- return handle(entry.catchLoc, true);
- } else if (this.prev < entry.finallyLoc) {
- return handle(entry.finallyLoc);
- }
- } else if (hasCatch) {
- if (this.prev < entry.catchLoc) {
- return handle(entry.catchLoc, true);
- }
- } else if (hasFinally) {
- if (this.prev < entry.finallyLoc) {
- return handle(entry.finallyLoc);
- }
- } else {
- throw new Error("try statement without catch or finally");
- }
- }
- }
- },
- abrupt: function(type, arg) {
- for (var i = this.tryEntries.length - 1; i >= 0; --i) {
- var entry = this.tryEntries[i];
- if (entry.tryLoc <= this.prev &&
- hasOwn.call(entry, "finallyLoc") &&
- this.prev < entry.finallyLoc) {
- var finallyEntry = entry;
- break;
- }
- }
- if (finallyEntry &&
- (type === "break" ||
- type === "continue") &&
- finallyEntry.tryLoc <= arg &&
- arg <= finallyEntry.finallyLoc) {
- // Ignore the finally entry if control is not jumping to a
- // location outside the try/catch block.
- finallyEntry = null;
- }
- var record = finallyEntry ? finallyEntry.completion : {};
- record.type = type;
- record.arg = arg;
- if (finallyEntry) {
- this.method = "next";
- this.next = finallyEntry.finallyLoc;
- return ContinueSentinel;
- }
- return this.complete(record);
- },
- complete: function(record, afterLoc) {
- if (record.type === "throw") {
- throw record.arg;
- }
- if (record.type === "break" ||
- record.type === "continue") {
- this.next = record.arg;
- } else if (record.type === "return") {
- this.rval = this.arg = record.arg;
- this.method = "return";
- this.next = "end";
- } else if (record.type === "normal" && afterLoc) {
- this.next = afterLoc;
- }
- return ContinueSentinel;
- },
- finish: function(finallyLoc) {
- for (var i = this.tryEntries.length - 1; i >= 0; --i) {
- var entry = this.tryEntries[i];
- if (entry.finallyLoc === finallyLoc) {
- this.complete(entry.completion, entry.afterLoc);
- resetTryEntry(entry);
- return ContinueSentinel;
- }
- }
- },
- "catch": function(tryLoc) {
- for (var i = this.tryEntries.length - 1; i >= 0; --i) {
- var entry = this.tryEntries[i];
- if (entry.tryLoc === tryLoc) {
- var record = entry.completion;
- if (record.type === "throw") {
- var thrown = record.arg;
- resetTryEntry(entry);
- }
- return thrown;
- }
- }
- // The context.catch method must only be called with a location
- // argument that corresponds to a known catch block.
- throw new Error("illegal catch attempt");
- },
- delegateYield: function(iterable, resultName, nextLoc) {
- this.delegate = {
- iterator: values(iterable),
- resultName: resultName,
- nextLoc: nextLoc
- };
- if (this.method === "next") {
- // Deliberately forget the last sent value so that we don't
- // accidentally pass it on to the delegate.
- this.arg = undefined;
- }
- return ContinueSentinel;
- }
- };
- })(
- // In sloppy mode, unbound `this` refers to the global object, fallback to
- // Function constructor if we're in global strict mode. That is sadly a form
- // of indirect eval which violates Content Security Policy.
- (function() { return this })() || Function("return this")()
- );
- /***/ }),
- /* 21 */
- /***/ (function(module, exports, __webpack_require__) {
- /*
- * Copyright 2009-2011 Mozilla Foundation and contributors
- * Licensed under the New BSD license. See LICENSE.txt or:
- * http://opensource.org/licenses/BSD-3-Clause
- */
- exports.SourceMapGenerator = __webpack_require__(5).SourceMapGenerator;
- exports.SourceMapConsumer = __webpack_require__(24).SourceMapConsumer;
- exports.SourceNode = __webpack_require__(27).SourceNode;
- /***/ }),
- /* 22 */
- /***/ (function(module, exports) {
- /* -*- Mode: js; js-indent-level: 2; -*- */
- /*
- * Copyright 2011 Mozilla Foundation and contributors
- * Licensed under the New BSD license. See LICENSE or:
- * http://opensource.org/licenses/BSD-3-Clause
- */
- var intToCharMap = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'.split('');
- /**
- * Encode an integer in the range of 0 to 63 to a single base 64 digit.
- */
- exports.encode = function (number) {
- if (0 <= number && number < intToCharMap.length) {
- return intToCharMap[number];
- }
- throw new TypeError("Must be between 0 and 63: " + number);
- };
- /**
- * Decode a single base 64 character code digit to an integer. Returns -1 on
- * failure.
- */
- exports.decode = function (charCode) {
- var bigA = 65; // 'A'
- var bigZ = 90; // 'Z'
- var littleA = 97; // 'a'
- var littleZ = 122; // 'z'
- var zero = 48; // '0'
- var nine = 57; // '9'
- var plus = 43; // '+'
- var slash = 47; // '/'
- var littleOffset = 26;
- var numberOffset = 52;
- // 0 - 25: ABCDEFGHIJKLMNOPQRSTUVWXYZ
- if (bigA <= charCode && charCode <= bigZ) {
- return (charCode - bigA);
- }
- // 26 - 51: abcdefghijklmnopqrstuvwxyz
- if (littleA <= charCode && charCode <= littleZ) {
- return (charCode - littleA + littleOffset);
- }
- // 52 - 61: 0123456789
- if (zero <= charCode && charCode <= nine) {
- return (charCode - zero + numberOffset);
- }
- // 62: +
- if (charCode == plus) {
- return 62;
- }
- // 63: /
- if (charCode == slash) {
- return 63;
- }
- // Invalid base64 digit.
- return -1;
- };
- /***/ }),
- /* 23 */
- /***/ (function(module, exports, __webpack_require__) {
- /* -*- Mode: js; js-indent-level: 2; -*- */
- /*
- * Copyright 2014 Mozilla Foundation and contributors
- * Licensed under the New BSD license. See LICENSE or:
- * http://opensource.org/licenses/BSD-3-Clause
- */
- var util = __webpack_require__(0);
- /**
- * Determine whether mappingB is after mappingA with respect to generated
- * position.
- */
- function generatedPositionAfter(mappingA, mappingB) {
- // Optimized for most common case
- var lineA = mappingA.generatedLine;
- var lineB = mappingB.generatedLine;
- var columnA = mappingA.generatedColumn;
- var columnB = mappingB.generatedColumn;
- return lineB > lineA || lineB == lineA && columnB >= columnA ||
- util.compareByGeneratedPositionsInflated(mappingA, mappingB) <= 0;
- }
- /**
- * A data structure to provide a sorted view of accumulated mappings in a
- * performance conscious manner. It trades a neglibable overhead in general
- * case for a large speedup in case of mappings being added in order.
- */
- function MappingList() {
- this._array = [];
- this._sorted = true;
- // Serves as infimum
- this._last = {generatedLine: -1, generatedColumn: 0};
- }
- /**
- * Iterate through internal items. This method takes the same arguments that
- * `Array.prototype.forEach` takes.
- *
- * NOTE: The order of the mappings is NOT guaranteed.
- */
- MappingList.prototype.unsortedForEach =
- function MappingList_forEach(aCallback, aThisArg) {
- this._array.forEach(aCallback, aThisArg);
- };
- /**
- * Add the given source mapping.
- *
- * @param Object aMapping
- */
- MappingList.prototype.add = function MappingList_add(aMapping) {
- if (generatedPositionAfter(this._last, aMapping)) {
- this._last = aMapping;
- this._array.push(aMapping);
- } else {
- this._sorted = false;
- this._array.push(aMapping);
- }
- };
- /**
- * Returns the flat, sorted array of mappings. The mappings are sorted by
- * generated position.
- *
- * WARNING: This method returns internal data without copying, for
- * performance. The return value must NOT be mutated, and should be treated as
- * an immutable borrow. If you want to take ownership, you must make your own
- * copy.
- */
- MappingList.prototype.toArray = function MappingList_toArray() {
- if (!this._sorted) {
- this._array.sort(util.compareByGeneratedPositionsInflated);
- this._sorted = true;
- }
- return this._array;
- };
- exports.MappingList = MappingList;
- /***/ }),
- /* 24 */
- /***/ (function(module, exports, __webpack_require__) {
- /* -*- Mode: js; js-indent-level: 2; -*- */
- /*
- * Copyright 2011 Mozilla Foundation and contributors
- * Licensed under the New BSD license. See LICENSE or:
- * http://opensource.org/licenses/BSD-3-Clause
- */
- var util = __webpack_require__(0);
- var binarySearch = __webpack_require__(25);
- var ArraySet = __webpack_require__(7).ArraySet;
- var base64VLQ = __webpack_require__(6);
- var quickSort = __webpack_require__(26).quickSort;
- function SourceMapConsumer(aSourceMap) {
- var sourceMap = aSourceMap;
- if (typeof aSourceMap === 'string') {
- sourceMap = JSON.parse(aSourceMap.replace(/^\)\]\}'/, ''));
- }
- return sourceMap.sections != null
- ? new IndexedSourceMapConsumer(sourceMap)
- : new BasicSourceMapConsumer(sourceMap);
- }
- SourceMapConsumer.fromSourceMap = function(aSourceMap) {
- return BasicSourceMapConsumer.fromSourceMap(aSourceMap);
- }
- /**
- * The version of the source mapping spec that we are consuming.
- */
- SourceMapConsumer.prototype._version = 3;
- // `__generatedMappings` and `__originalMappings` are arrays that hold the
- // parsed mapping coordinates from the source map's "mappings" attribute. They
- // are lazily instantiated, accessed via the `_generatedMappings` and
- // `_originalMappings` getters respectively, and we only parse the mappings
- // and create these arrays once queried for a source location. We jump through
- // these hoops because there can be many thousands of mappings, and parsing
- // them is expensive, so we only want to do it if we must.
- //
- // Each object in the arrays is of the form:
- //
- // {
- // generatedLine: The line number in the generated code,
- // generatedColumn: The column number in the generated code,
- // source: The path to the original source file that generated this
- // chunk of code,
- // originalLine: The line number in the original source that
- // corresponds to this chunk of generated code,
- // originalColumn: The column number in the original source that
- // corresponds to this chunk of generated code,
- // name: The name of the original symbol which generated this chunk of
- // code.
- // }
- //
- // All properties except for `generatedLine` and `generatedColumn` can be
- // `null`.
- //
- // `_generatedMappings` is ordered by the generated positions.
- //
- // `_originalMappings` is ordered by the original positions.
- SourceMapConsumer.prototype.__generatedMappings = null;
- Object.defineProperty(SourceMapConsumer.prototype, '_generatedMappings', {
- get: function () {
- if (!this.__generatedMappings) {
- this._parseMappings(this._mappings, this.sourceRoot);
- }
- return this.__generatedMappings;
- }
- });
- SourceMapConsumer.prototype.__originalMappings = null;
- Object.defineProperty(SourceMapConsumer.prototype, '_originalMappings', {
- get: function () {
- if (!this.__originalMappings) {
- this._parseMappings(this._mappings, this.sourceRoot);
- }
- return this.__originalMappings;
- }
- });
- SourceMapConsumer.prototype._charIsMappingSeparator =
- function SourceMapConsumer_charIsMappingSeparator(aStr, index) {
- var c = aStr.charAt(index);
- return c === ";" || c === ",";
- };
- /**
- * Parse the mappings in a string in to a data structure which we can easily
- * query (the ordered arrays in the `this.__generatedMappings` and
- * `this.__originalMappings` properties).
- */
- SourceMapConsumer.prototype._parseMappings =
- function SourceMapConsumer_parseMappings(aStr, aSourceRoot) {
- throw new Error("Subclasses must implement _parseMappings");
- };
- SourceMapConsumer.GENERATED_ORDER = 1;
- SourceMapConsumer.ORIGINAL_ORDER = 2;
- SourceMapConsumer.GREATEST_LOWER_BOUND = 1;
- SourceMapConsumer.LEAST_UPPER_BOUND = 2;
- /**
- * Iterate over each mapping between an original source/line/column and a
- * generated line/column in this source map.
- *
- * @param Function aCallback
- * The function that is called with each mapping.
- * @param Object aContext
- * Optional. If specified, this object will be the value of `this` every
- * time that `aCallback` is called.
- * @param aOrder
- * Either `SourceMapConsumer.GENERATED_ORDER` or
- * `SourceMapConsumer.ORIGINAL_ORDER`. Specifies whether you want to
- * iterate over the mappings sorted by the generated file's line/column
- * order or the original's source/line/column order, respectively. Defaults to
- * `SourceMapConsumer.GENERATED_ORDER`.
- */
- SourceMapConsumer.prototype.eachMapping =
- function SourceMapConsumer_eachMapping(aCallback, aContext, aOrder) {
- var context = aContext || null;
- var order = aOrder || SourceMapConsumer.GENERATED_ORDER;
- var mappings;
- switch (order) {
- case SourceMapConsumer.GENERATED_ORDER:
- mappings = this._generatedMappings;
- break;
- case SourceMapConsumer.ORIGINAL_ORDER:
- mappings = this._originalMappings;
- break;
- default:
- throw new Error("Unknown order of iteration.");
- }
- var sourceRoot = this.sourceRoot;
- mappings.map(function (mapping) {
- var source = mapping.source === null ? null : this._sources.at(mapping.source);
- if (source != null && sourceRoot != null) {
- source = util.join(sourceRoot, source);
- }
- return {
- source: source,
- generatedLine: mapping.generatedLine,
- generatedColumn: mapping.generatedColumn,
- originalLine: mapping.originalLine,
- originalColumn: mapping.originalColumn,
- name: mapping.name === null ? null : this._names.at(mapping.name)
- };
- }, this).forEach(aCallback, context);
- };
- /**
- * Returns all generated line and column information for the original source,
- * line, and column provided. If no column is provided, returns all mappings
- * corresponding to a either the line we are searching for or the next
- * closest line that has any mappings. Otherwise, returns all mappings
- * corresponding to the given line and either the column we are searching for
- * or the next closest column that has any offsets.
- *
- * The only argument is an object with the following properties:
- *
- * - source: The filename of the original source.
- * - line: The line number in the original source.
- * - column: Optional. the column number in the original source.
- *
- * and an array of objects is returned, each with the following properties:
- *
- * - line: The line number in the generated source, or null.
- * - column: The column number in the generated source, or null.
- */
- SourceMapConsumer.prototype.allGeneratedPositionsFor =
- function SourceMapConsumer_allGeneratedPositionsFor(aArgs) {
- var line = util.getArg(aArgs, 'line');
- // When there is no exact match, BasicSourceMapConsumer.prototype._findMapping
- // returns the index of the closest mapping less than the needle. By
- // setting needle.originalColumn to 0, we thus find the last mapping for
- // the given line, provided such a mapping exists.
- var needle = {
- source: util.getArg(aArgs, 'source'),
- originalLine: line,
- originalColumn: util.getArg(aArgs, 'column', 0)
- };
- if (this.sourceRoot != null) {
- needle.source = util.relative(this.sourceRoot, needle.source);
- }
- if (!this._sources.has(needle.source)) {
- return [];
- }
- needle.source = this._sources.indexOf(needle.source);
- var mappings = [];
- var index = this._findMapping(needle,
- this._originalMappings,
- "originalLine",
- "originalColumn",
- util.compareByOriginalPositions,
- binarySearch.LEAST_UPPER_BOUND);
- if (index >= 0) {
- var mapping = this._originalMappings[index];
- if (aArgs.column === undefined) {
- var originalLine = mapping.originalLine;
- // Iterate until either we run out of mappings, or we run into
- // a mapping for a different line than the one we found. Since
- // mappings are sorted, this is guaranteed to find all mappings for
- // the line we found.
- while (mapping && mapping.originalLine === originalLine) {
- mappings.push({
- line: util.getArg(mapping, 'generatedLine', null),
- column: util.getArg(mapping, 'generatedColumn', null),
- lastColumn: util.getArg(mapping, 'lastGeneratedColumn', null)
- });
- mapping = this._originalMappings[++index];
- }
- } else {
- var originalColumn = mapping.originalColumn;
- // Iterate until either we run out of mappings, or we run into
- // a mapping for a different line than the one we were searching for.
- // Since mappings are sorted, this is guaranteed to find all mappings for
- // the line we are searching for.
- while (mapping &&
- mapping.originalLine === line &&
- mapping.originalColumn == originalColumn) {
- mappings.push({
- line: util.getArg(mapping, 'generatedLine', null),
- column: util.getArg(mapping, 'generatedColumn', null),
- lastColumn: util.getArg(mapping, 'lastGeneratedColumn', null)
- });
- mapping = this._originalMappings[++index];
- }
- }
- }
- return mappings;
- };
- exports.SourceMapConsumer = SourceMapConsumer;
- /**
- * A BasicSourceMapConsumer instance represents a parsed source map which we can
- * query for information about the original file positions by giving it a file
- * position in the generated source.
- *
- * The only parameter is the raw source map (either as a JSON string, or
- * already parsed to an object). According to the spec, source maps have the
- * following attributes:
- *
- * - version: Which version of the source map spec this map is following.
- * - sources: An array of URLs to the original source files.
- * - names: An array of identifiers which can be referrenced by individual mappings.
- * - sourceRoot: Optional. The URL root from which all sources are relative.
- * - sourcesContent: Optional. An array of contents of the original source files.
- * - mappings: A string of base64 VLQs which contain the actual mappings.
- * - file: Optional. The generated file this source map is associated with.
- *
- * Here is an example source map, taken from the source map spec[0]:
- *
- * {
- * version : 3,
- * file: "out.js",
- * sourceRoot : "",
- * sources: ["foo.js", "bar.js"],
- * names: ["src", "maps", "are", "fun"],
- * mappings: "AA,AB;;ABCDE;"
- * }
- *
- * [0]: https://docs.google.com/document/d/1U1RGAehQwRypUTovF1KRlpiOFze0b-_2gc6fAH0KY0k/edit?pli=1#
- */
- function BasicSourceMapConsumer(aSourceMap) {
- var sourceMap = aSourceMap;
- if (typeof aSourceMap === 'string') {
- sourceMap = JSON.parse(aSourceMap.replace(/^\)\]\}'/, ''));
- }
- var version = util.getArg(sourceMap, 'version');
- var sources = util.getArg(sourceMap, 'sources');
- // Sass 3.3 leaves out the 'names' array, so we deviate from the spec (which
- // requires the array) to play nice here.
- var names = util.getArg(sourceMap, 'names', []);
- var sourceRoot = util.getArg(sourceMap, 'sourceRoot', null);
- var sourcesContent = util.getArg(sourceMap, 'sourcesContent', null);
- var mappings = util.getArg(sourceMap, 'mappings');
- var file = util.getArg(sourceMap, 'file', null);
- // Once again, Sass deviates from the spec and supplies the version as a
- // string rather than a number, so we use loose equality checking here.
- if (version != this._version) {
- throw new Error('Unsupported version: ' + version);
- }
- sources = sources
- .map(String)
- // Some source maps produce relative source paths like "./foo.js" instead of
- // "foo.js". Normalize these first so that future comparisons will succeed.
- // See bugzil.la/1090768.
- .map(util.normalize)
- // Always ensure that absolute sources are internally stored relative to
- // the source root, if the source root is absolute. Not doing this would
- // be particularly problematic when the source root is a prefix of the
- // source (valid, but why??). See github issue #199 and bugzil.la/1188982.
- .map(function (source) {
- return sourceRoot && util.isAbsolute(sourceRoot) && util.isAbsolute(source)
- ? util.relative(sourceRoot, source)
- : source;
- });
- // Pass `true` below to allow duplicate names and sources. While source maps
- // are intended to be compressed and deduplicated, the TypeScript compiler
- // sometimes generates source maps with duplicates in them. See Github issue
- // #72 and bugzil.la/889492.
- this._names = ArraySet.fromArray(names.map(String), true);
- this._sources = ArraySet.fromArray(sources, true);
- this.sourceRoot = sourceRoot;
- this.sourcesContent = sourcesContent;
- this._mappings = mappings;
- this.file = file;
- }
- BasicSourceMapConsumer.prototype = Object.create(SourceMapConsumer.prototype);
- BasicSourceMapConsumer.prototype.consumer = SourceMapConsumer;
- /**
- * Create a BasicSourceMapConsumer from a SourceMapGenerator.
- *
- * @param SourceMapGenerator aSourceMap
- * The source map that will be consumed.
- * @returns BasicSourceMapConsumer
- */
- BasicSourceMapConsumer.fromSourceMap =
- function SourceMapConsumer_fromSourceMap(aSourceMap) {
- var smc = Object.create(BasicSourceMapConsumer.prototype);
- var names = smc._names = ArraySet.fromArray(aSourceMap._names.toArray(), true);
- var sources = smc._sources = ArraySet.fromArray(aSourceMap._sources.toArray(), true);
- smc.sourceRoot = aSourceMap._sourceRoot;
- smc.sourcesContent = aSourceMap._generateSourcesContent(smc._sources.toArray(),
- smc.sourceRoot);
- smc.file = aSourceMap._file;
- // Because we are modifying the entries (by converting string sources and
- // names to indices into the sources and names ArraySets), we have to make
- // a copy of the entry or else bad things happen. Shared mutable state
- // strikes again! See github issue #191.
- var generatedMappings = aSourceMap._mappings.toArray().slice();
- var destGeneratedMappings = smc.__generatedMappings = [];
- var destOriginalMappings = smc.__originalMappings = [];
- for (var i = 0, length = generatedMappings.length; i < length; i++) {
- var srcMapping = generatedMappings[i];
- var destMapping = new Mapping;
- destMapping.generatedLine = srcMapping.generatedLine;
- destMapping.generatedColumn = srcMapping.generatedColumn;
- if (srcMapping.source) {
- destMapping.source = sources.indexOf(srcMapping.source);
- destMapping.originalLine = srcMapping.originalLine;
- destMapping.originalColumn = srcMapping.originalColumn;
- if (srcMapping.name) {
- destMapping.name = names.indexOf(srcMapping.name);
- }
- destOriginalMappings.push(destMapping);
- }
- destGeneratedMappings.push(destMapping);
- }
- quickSort(smc.__originalMappings, util.compareByOriginalPositions);
- return smc;
- };
- /**
- * The version of the source mapping spec that we are consuming.
- */
- BasicSourceMapConsumer.prototype._version = 3;
- /**
- * The list of original sources.
- */
- Object.defineProperty(BasicSourceMapConsumer.prototype, 'sources', {
- get: function () {
- return this._sources.toArray().map(function (s) {
- return this.sourceRoot != null ? util.join(this.sourceRoot, s) : s;
- }, this);
- }
- });
- /**
- * Provide the JIT with a nice shape / hidden class.
- */
- function Mapping() {
- this.generatedLine = 0;
- this.generatedColumn = 0;
- this.source = null;
- this.originalLine = null;
- this.originalColumn = null;
- this.name = null;
- }
- /**
- * Parse the mappings in a string in to a data structure which we can easily
- * query (the ordered arrays in the `this.__generatedMappings` and
- * `this.__originalMappings` properties).
- */
- BasicSourceMapConsumer.prototype._parseMappings =
- function SourceMapConsumer_parseMappings(aStr, aSourceRoot) {
- var generatedLine = 1;
- var previousGeneratedColumn = 0;
- var previousOriginalLine = 0;
- var previousOriginalColumn = 0;
- var previousSource = 0;
- var previousName = 0;
- var length = aStr.length;
- var index = 0;
- var cachedSegments = {};
- var temp = {};
- var originalMappings = [];
- var generatedMappings = [];
- var mapping, str, segment, end, value;
- while (index < length) {
- if (aStr.charAt(index) === ';') {
- generatedLine++;
- index++;
- previousGeneratedColumn = 0;
- }
- else if (aStr.charAt(index) === ',') {
- index++;
- }
- else {
- mapping = new Mapping();
- mapping.generatedLine = generatedLine;
- // Because each offset is encoded relative to the previous one,
- // many segments often have the same encoding. We can exploit this
- // fact by caching the parsed variable length fields of each segment,
- // allowing us to avoid a second parse if we encounter the same
- // segment again.
- for (end = index; end < length; end++) {
- if (this._charIsMappingSeparator(aStr, end)) {
- break;
- }
- }
- str = aStr.slice(index, end);
- segment = cachedSegments[str];
- if (segment) {
- index += str.length;
- } else {
- segment = [];
- while (index < end) {
- base64VLQ.decode(aStr, index, temp);
- value = temp.value;
- index = temp.rest;
- segment.push(value);
- }
- if (segment.length === 2) {
- throw new Error('Found a source, but no line and column');
- }
- if (segment.length === 3) {
- throw new Error('Found a source and line, but no column');
- }
- cachedSegments[str] = segment;
- }
- // Generated column.
- mapping.generatedColumn = previousGeneratedColumn + segment[0];
- previousGeneratedColumn = mapping.generatedColumn;
- if (segment.length > 1) {
- // Original source.
- mapping.source = previousSource + segment[1];
- previousSource += segment[1];
- // Original line.
- mapping.originalLine = previousOriginalLine + segment[2];
- previousOriginalLine = mapping.originalLine;
- // Lines are stored 0-based
- mapping.originalLine += 1;
- // Original column.
- mapping.originalColumn = previousOriginalColumn + segment[3];
- previousOriginalColumn = mapping.originalColumn;
- if (segment.length > 4) {
- // Original name.
- mapping.name = previousName + segment[4];
- previousName += segment[4];
- }
- }
- generatedMappings.push(mapping);
- if (typeof mapping.originalLine === 'number') {
- originalMappings.push(mapping);
- }
- }
- }
- quickSort(generatedMappings, util.compareByGeneratedPositionsDeflated);
- this.__generatedMappings = generatedMappings;
- quickSort(originalMappings, util.compareByOriginalPositions);
- this.__originalMappings = originalMappings;
- };
- /**
- * Find the mapping that best matches the hypothetical "needle" mapping that
- * we are searching for in the given "haystack" of mappings.
- */
- BasicSourceMapConsumer.prototype._findMapping =
- function SourceMapConsumer_findMapping(aNeedle, aMappings, aLineName,
- aColumnName, aComparator, aBias) {
- // To return the position we are searching for, we must first find the
- // mapping for the given position and then return the opposite position it
- // points to. Because the mappings are sorted, we can use binary search to
- // find the best mapping.
- if (aNeedle[aLineName] <= 0) {
- throw new TypeError('Line must be greater than or equal to 1, got '
- + aNeedle[aLineName]);
- }
- if (aNeedle[aColumnName] < 0) {
- throw new TypeError('Column must be greater than or equal to 0, got '
- + aNeedle[aColumnName]);
- }
- return binarySearch.search(aNeedle, aMappings, aComparator, aBias);
- };
- /**
- * Compute the last column for each generated mapping. The last column is
- * inclusive.
- */
- BasicSourceMapConsumer.prototype.computeColumnSpans =
- function SourceMapConsumer_computeColumnSpans() {
- for (var index = 0; index < this._generatedMappings.length; ++index) {
- var mapping = this._generatedMappings[index];
- // Mappings do not contain a field for the last generated columnt. We
- // can come up with an optimistic estimate, however, by assuming that
- // mappings are contiguous (i.e. given two consecutive mappings, the
- // first mapping ends where the second one starts).
- if (index + 1 < this._generatedMappings.length) {
- var nextMapping = this._generatedMappings[index + 1];
- if (mapping.generatedLine === nextMapping.generatedLine) {
- mapping.lastGeneratedColumn = nextMapping.generatedColumn - 1;
- continue;
- }
- }
- // The last mapping for each line spans the entire line.
- mapping.lastGeneratedColumn = Infinity;
- }
- };
- /**
- * Returns the original source, line, and column information for the generated
- * source's line and column positions provided. The only argument is an object
- * with the following properties:
- *
- * - line: The line number in the generated source.
- * - column: The column number in the generated source.
- * - bias: Either 'SourceMapConsumer.GREATEST_LOWER_BOUND' or
- * 'SourceMapConsumer.LEAST_UPPER_BOUND'. Specifies whether to return the
- * closest element that is smaller than or greater than the one we are
- * searching for, respectively, if the exact element cannot be found.
- * Defaults to 'SourceMapConsumer.GREATEST_LOWER_BOUND'.
- *
- * and an object is returned with the following properties:
- *
- * - source: The original source file, or null.
- * - line: The line number in the original source, or null.
- * - column: The column number in the original source, or null.
- * - name: The original identifier, or null.
- */
- BasicSourceMapConsumer.prototype.originalPositionFor =
- function SourceMapConsumer_originalPositionFor(aArgs) {
- var needle = {
- generatedLine: util.getArg(aArgs, 'line'),
- generatedColumn: util.getArg(aArgs, 'column')
- };
- var index = this._findMapping(
- needle,
- this._generatedMappings,
- "generatedLine",
- "generatedColumn",
- util.compareByGeneratedPositionsDeflated,
- util.getArg(aArgs, 'bias', SourceMapConsumer.GREATEST_LOWER_BOUND)
- );
- if (index >= 0) {
- var mapping = this._generatedMappings[index];
- if (mapping.generatedLine === needle.generatedLine) {
- var source = util.getArg(mapping, 'source', null);
- if (source !== null) {
- source = this._sources.at(source);
- if (this.sourceRoot != null) {
- source = util.join(this.sourceRoot, source);
- }
- }
- var name = util.getArg(mapping, 'name', null);
- if (name !== null) {
- name = this._names.at(name);
- }
- return {
- source: source,
- line: util.getArg(mapping, 'originalLine', null),
- column: util.getArg(mapping, 'originalColumn', null),
- name: name
- };
- }
- }
- return {
- source: null,
- line: null,
- column: null,
- name: null
- };
- };
- /**
- * Return true if we have the source content for every source in the source
- * map, false otherwise.
- */
- BasicSourceMapConsumer.prototype.hasContentsOfAllSources =
- function BasicSourceMapConsumer_hasContentsOfAllSources() {
- if (!this.sourcesContent) {
- return false;
- }
- return this.sourcesContent.length >= this._sources.size() &&
- !this.sourcesContent.some(function (sc) { return sc == null; });
- };
- /**
- * Returns the original source content. The only argument is the url of the
- * original source file. Returns null if no original source content is
- * available.
- */
- BasicSourceMapConsumer.prototype.sourceContentFor =
- function SourceMapConsumer_sourceContentFor(aSource, nullOnMissing) {
- if (!this.sourcesContent) {
- return null;
- }
- if (this.sourceRoot != null) {
- aSource = util.relative(this.sourceRoot, aSource);
- }
- if (this._sources.has(aSource)) {
- return this.sourcesContent[this._sources.indexOf(aSource)];
- }
- var url;
- if (this.sourceRoot != null
- && (url = util.urlParse(this.sourceRoot))) {
- // XXX: file:// URIs and absolute paths lead to unexpected behavior for
- // many users. We can help them out when they expect file:// URIs to
- // behave like it would if they were running a local HTTP server. See
- // https://bugzilla.mozilla.org/show_bug.cgi?id=885597.
- var fileUriAbsPath = aSource.replace(/^file:\/\//, "");
- if (url.scheme == "file"
- && this._sources.has(fileUriAbsPath)) {
- return this.sourcesContent[this._sources.indexOf(fileUriAbsPath)]
- }
- if ((!url.path || url.path == "/")
- && this._sources.has("/" + aSource)) {
- return this.sourcesContent[this._sources.indexOf("/" + aSource)];
- }
- }
- // This function is used recursively from
- // IndexedSourceMapConsumer.prototype.sourceContentFor. In that case, we
- // don't want to throw if we can't find the source - we just want to
- // return null, so we provide a flag to exit gracefully.
- if (nullOnMissing) {
- return null;
- }
- else {
- throw new Error('"' + aSource + '" is not in the SourceMap.');
- }
- };
- /**
- * Returns the generated line and column information for the original source,
- * line, and column positions provided. The only argument is an object with
- * the following properties:
- *
- * - source: The filename of the original source.
- * - line: The line number in the original source.
- * - column: The column number in the original source.
- * - bias: Either 'SourceMapConsumer.GREATEST_LOWER_BOUND' or
- * 'SourceMapConsumer.LEAST_UPPER_BOUND'. Specifies whether to return the
- * closest element that is smaller than or greater than the one we are
- * searching for, respectively, if the exact element cannot be found.
- * Defaults to 'SourceMapConsumer.GREATEST_LOWER_BOUND'.
- *
- * and an object is returned with the following properties:
- *
- * - line: The line number in the generated source, or null.
- * - column: The column number in the generated source, or null.
- */
- BasicSourceMapConsumer.prototype.generatedPositionFor =
- function SourceMapConsumer_generatedPositionFor(aArgs) {
- var source = util.getArg(aArgs, 'source');
- if (this.sourceRoot != null) {
- source = util.relative(this.sourceRoot, source);
- }
- if (!this._sources.has(source)) {
- return {
- line: null,
- column: null,
- lastColumn: null
- };
- }
- source = this._sources.indexOf(source);
- var needle = {
- source: source,
- originalLine: util.getArg(aArgs, 'line'),
- originalColumn: util.getArg(aArgs, 'column')
- };
- var index = this._findMapping(
- needle,
- this._originalMappings,
- "originalLine",
- "originalColumn",
- util.compareByOriginalPositions,
- util.getArg(aArgs, 'bias', SourceMapConsumer.GREATEST_LOWER_BOUND)
- );
- if (index >= 0) {
- var mapping = this._originalMappings[index];
- if (mapping.source === needle.source) {
- return {
- line: util.getArg(mapping, 'generatedLine', null),
- column: util.getArg(mapping, 'generatedColumn', null),
- lastColumn: util.getArg(mapping, 'lastGeneratedColumn', null)
- };
- }
- }
- return {
- line: null,
- column: null,
- lastColumn: null
- };
- };
- exports.BasicSourceMapConsumer = BasicSourceMapConsumer;
- /**
- * An IndexedSourceMapConsumer instance represents a parsed source map which
- * we can query for information. It differs from BasicSourceMapConsumer in
- * that it takes "indexed" source maps (i.e. ones with a "sections" field) as
- * input.
- *
- * The only parameter is a raw source map (either as a JSON string, or already
- * parsed to an object). According to the spec for indexed source maps, they
- * have the following attributes:
- *
- * - version: Which version of the source map spec this map is following.
- * - file: Optional. The generated file this source map is associated with.
- * - sections: A list of section definitions.
- *
- * Each value under the "sections" field has two fields:
- * - offset: The offset into the original specified at which this section
- * begins to apply, defined as an object with a "line" and "column"
- * field.
- * - map: A source map definition. This source map could also be indexed,
- * but doesn't have to be.
- *
- * Instead of the "map" field, it's also possible to have a "url" field
- * specifying a URL to retrieve a source map from, but that's currently
- * unsupported.
- *
- * Here's an example source map, taken from the source map spec[0], but
- * modified to omit a section which uses the "url" field.
- *
- * {
- * version : 3,
- * file: "app.js",
- * sections: [{
- * offset: {line:100, column:10},
- * map: {
- * version : 3,
- * file: "section.js",
- * sources: ["foo.js", "bar.js"],
- * names: ["src", "maps", "are", "fun"],
- * mappings: "AAAA,E;;ABCDE;"
- * }
- * }],
- * }
- *
- * [0]: https://docs.google.com/document/d/1U1RGAehQwRypUTovF1KRlpiOFze0b-_2gc6fAH0KY0k/edit#heading=h.535es3xeprgt
- */
- function IndexedSourceMapConsumer(aSourceMap) {
- var sourceMap = aSourceMap;
- if (typeof aSourceMap === 'string') {
- sourceMap = JSON.parse(aSourceMap.replace(/^\)\]\}'/, ''));
- }
- var version = util.getArg(sourceMap, 'version');
- var sections = util.getArg(sourceMap, 'sections');
- if (version != this._version) {
- throw new Error('Unsupported version: ' + version);
- }
- this._sources = new ArraySet();
- this._names = new ArraySet();
- var lastOffset = {
- line: -1,
- column: 0
- };
- this._sections = sections.map(function (s) {
- if (s.url) {
- // The url field will require support for asynchronicity.
- // See https://github.com/mozilla/source-map/issues/16
- throw new Error('Support for url field in sections not implemented.');
- }
- var offset = util.getArg(s, 'offset');
- var offsetLine = util.getArg(offset, 'line');
- var offsetColumn = util.getArg(offset, 'column');
- if (offsetLine < lastOffset.line ||
- (offsetLine === lastOffset.line && offsetColumn < lastOffset.column)) {
- throw new Error('Section offsets must be ordered and non-overlapping.');
- }
- lastOffset = offset;
- return {
- generatedOffset: {
- // The offset fields are 0-based, but we use 1-based indices when
- // encoding/decoding from VLQ.
- generatedLine: offsetLine + 1,
- generatedColumn: offsetColumn + 1
- },
- consumer: new SourceMapConsumer(util.getArg(s, 'map'))
- }
- });
- }
- IndexedSourceMapConsumer.prototype = Object.create(SourceMapConsumer.prototype);
- IndexedSourceMapConsumer.prototype.constructor = SourceMapConsumer;
- /**
- * The version of the source mapping spec that we are consuming.
- */
- IndexedSourceMapConsumer.prototype._version = 3;
- /**
- * The list of original sources.
- */
- Object.defineProperty(IndexedSourceMapConsumer.prototype, 'sources', {
- get: function () {
- var sources = [];
- for (var i = 0; i < this._sections.length; i++) {
- for (var j = 0; j < this._sections[i].consumer.sources.length; j++) {
- sources.push(this._sections[i].consumer.sources[j]);
- }
- }
- return sources;
- }
- });
- /**
- * Returns the original source, line, and column information for the generated
- * source's line and column positions provided. The only argument is an object
- * with the following properties:
- *
- * - line: The line number in the generated source.
- * - column: The column number in the generated source.
- *
- * and an object is returned with the following properties:
- *
- * - source: The original source file, or null.
- * - line: The line number in the original source, or null.
- * - column: The column number in the original source, or null.
- * - name: The original identifier, or null.
- */
- IndexedSourceMapConsumer.prototype.originalPositionFor =
- function IndexedSourceMapConsumer_originalPositionFor(aArgs) {
- var needle = {
- generatedLine: util.getArg(aArgs, 'line'),
- generatedColumn: util.getArg(aArgs, 'column')
- };
- // Find the section containing the generated position we're trying to map
- // to an original position.
- var sectionIndex = binarySearch.search(needle, this._sections,
- function(needle, section) {
- var cmp = needle.generatedLine - section.generatedOffset.generatedLine;
- if (cmp) {
- return cmp;
- }
- return (needle.generatedColumn -
- section.generatedOffset.generatedColumn);
- });
- var section = this._sections[sectionIndex];
- if (!section) {
- return {
- source: null,
- line: null,
- column: null,
- name: null
- };
- }
- return section.consumer.originalPositionFor({
- line: needle.generatedLine -
- (section.generatedOffset.generatedLine - 1),
- column: needle.generatedColumn -
- (section.generatedOffset.generatedLine === needle.generatedLine
- ? section.generatedOffset.generatedColumn - 1
- : 0),
- bias: aArgs.bias
- });
- };
- /**
- * Return true if we have the source content for every source in the source
- * map, false otherwise.
- */
- IndexedSourceMapConsumer.prototype.hasContentsOfAllSources =
- function IndexedSourceMapConsumer_hasContentsOfAllSources() {
- return this._sections.every(function (s) {
- return s.consumer.hasContentsOfAllSources();
- });
- };
- /**
- * Returns the original source content. The only argument is the url of the
- * original source file. Returns null if no original source content is
- * available.
- */
- IndexedSourceMapConsumer.prototype.sourceContentFor =
- function IndexedSourceMapConsumer_sourceContentFor(aSource, nullOnMissing) {
- for (var i = 0; i < this._sections.length; i++) {
- var section = this._sections[i];
- var content = section.consumer.sourceContentFor(aSource, true);
- if (content) {
- return content;
- }
- }
- if (nullOnMissing) {
- return null;
- }
- else {
- throw new Error('"' + aSource + '" is not in the SourceMap.');
- }
- };
- /**
- * Returns the generated line and column information for the original source,
- * line, and column positions provided. The only argument is an object with
- * the following properties:
- *
- * - source: The filename of the original source.
- * - line: The line number in the original source.
- * - column: The column number in the original source.
- *
- * and an object is returned with the following properties:
- *
- * - line: The line number in the generated source, or null.
- * - column: The column number in the generated source, or null.
- */
- IndexedSourceMapConsumer.prototype.generatedPositionFor =
- function IndexedSourceMapConsumer_generatedPositionFor(aArgs) {
- for (var i = 0; i < this._sections.length; i++) {
- var section = this._sections[i];
- // Only consider this section if the requested source is in the list of
- // sources of the consumer.
- if (section.consumer.sources.indexOf(util.getArg(aArgs, 'source')) === -1) {
- continue;
- }
- var generatedPosition = section.consumer.generatedPositionFor(aArgs);
- if (generatedPosition) {
- var ret = {
- line: generatedPosition.line +
- (section.generatedOffset.generatedLine - 1),
- column: generatedPosition.column +
- (section.generatedOffset.generatedLine === generatedPosition.line
- ? section.generatedOffset.generatedColumn - 1
- : 0)
- };
- return ret;
- }
- }
- return {
- line: null,
- column: null
- };
- };
- /**
- * Parse the mappings in a string in to a data structure which we can easily
- * query (the ordered arrays in the `this.__generatedMappings` and
- * `this.__originalMappings` properties).
- */
- IndexedSourceMapConsumer.prototype._parseMappings =
- function IndexedSourceMapConsumer_parseMappings(aStr, aSourceRoot) {
- this.__generatedMappings = [];
- this.__originalMappings = [];
- for (var i = 0; i < this._sections.length; i++) {
- var section = this._sections[i];
- var sectionMappings = section.consumer._generatedMappings;
- for (var j = 0; j < sectionMappings.length; j++) {
- var mapping = sectionMappings[j];
- var source = section.consumer._sources.at(mapping.source);
- if (section.consumer.sourceRoot !== null) {
- source = util.join(section.consumer.sourceRoot, source);
- }
- this._sources.add(source);
- source = this._sources.indexOf(source);
- var name = section.consumer._names.at(mapping.name);
- this._names.add(name);
- name = this._names.indexOf(name);
- // The mappings coming from the consumer for the section have
- // generated positions relative to the start of the section, so we
- // need to offset them to be relative to the start of the concatenated
- // generated file.
- var adjustedMapping = {
- source: source,
- generatedLine: mapping.generatedLine +
- (section.generatedOffset.generatedLine - 1),
- generatedColumn: mapping.generatedColumn +
- (section.generatedOffset.generatedLine === mapping.generatedLine
- ? section.generatedOffset.generatedColumn - 1
- : 0),
- originalLine: mapping.originalLine,
- originalColumn: mapping.originalColumn,
- name: name
- };
- this.__generatedMappings.push(adjustedMapping);
- if (typeof adjustedMapping.originalLine === 'number') {
- this.__originalMappings.push(adjustedMapping);
- }
- }
- }
- quickSort(this.__generatedMappings, util.compareByGeneratedPositionsDeflated);
- quickSort(this.__originalMappings, util.compareByOriginalPositions);
- };
- exports.IndexedSourceMapConsumer = IndexedSourceMapConsumer;
- /***/ }),
- /* 25 */
- /***/ (function(module, exports) {
- /* -*- Mode: js; js-indent-level: 2; -*- */
- /*
- * Copyright 2011 Mozilla Foundation and contributors
- * Licensed under the New BSD license. See LICENSE or:
- * http://opensource.org/licenses/BSD-3-Clause
- */
- exports.GREATEST_LOWER_BOUND = 1;
- exports.LEAST_UPPER_BOUND = 2;
- /**
- * Recursive implementation of binary search.
- *
- * @param aLow Indices here and lower do not contain the needle.
- * @param aHigh Indices here and higher do not contain the needle.
- * @param aNeedle The element being searched for.
- * @param aHaystack The non-empty array being searched.
- * @param aCompare Function which takes two elements and returns -1, 0, or 1.
- * @param aBias Either 'binarySearch.GREATEST_LOWER_BOUND' or
- * 'binarySearch.LEAST_UPPER_BOUND'. Specifies whether to return the
- * closest element that is smaller than or greater than the one we are
- * searching for, respectively, if the exact element cannot be found.
- */
- function recursiveSearch(aLow, aHigh, aNeedle, aHaystack, aCompare, aBias) {
- // This function terminates when one of the following is true:
- //
- // 1. We find the exact element we are looking for.
- //
- // 2. We did not find the exact element, but we can return the index of
- // the next-closest element.
- //
- // 3. We did not find the exact element, and there is no next-closest
- // element than the one we are searching for, so we return -1.
- var mid = Math.floor((aHigh - aLow) / 2) + aLow;
- var cmp = aCompare(aNeedle, aHaystack[mid], true);
- if (cmp === 0) {
- // Found the element we are looking for.
- return mid;
- }
- else if (cmp > 0) {
- // Our needle is greater than aHaystack[mid].
- if (aHigh - mid > 1) {
- // The element is in the upper half.
- return recursiveSearch(mid, aHigh, aNeedle, aHaystack, aCompare, aBias);
- }
- // The exact needle element was not found in this haystack. Determine if
- // we are in termination case (3) or (2) and return the appropriate thing.
- if (aBias == exports.LEAST_UPPER_BOUND) {
- return aHigh < aHaystack.length ? aHigh : -1;
- } else {
- return mid;
- }
- }
- else {
- // Our needle is less than aHaystack[mid].
- if (mid - aLow > 1) {
- // The element is in the lower half.
- return recursiveSearch(aLow, mid, aNeedle, aHaystack, aCompare, aBias);
- }
- // we are in termination case (3) or (2) and return the appropriate thing.
- if (aBias == exports.LEAST_UPPER_BOUND) {
- return mid;
- } else {
- return aLow < 0 ? -1 : aLow;
- }
- }
- }
- /**
- * This is an implementation of binary search which will always try and return
- * the index of the closest element if there is no exact hit. This is because
- * mappings between original and generated line/col pairs are single points,
- * and there is an implicit region between each of them, so a miss just means
- * that you aren't on the very start of a region.
- *
- * @param aNeedle The element you are looking for.
- * @param aHaystack The array that is being searched.
- * @param aCompare A function which takes the needle and an element in the
- * array and returns -1, 0, or 1 depending on whether the needle is less
- * than, equal to, or greater than the element, respectively.
- * @param aBias Either 'binarySearch.GREATEST_LOWER_BOUND' or
- * 'binarySearch.LEAST_UPPER_BOUND'. Specifies whether to return the
- * closest element that is smaller than or greater than the one we are
- * searching for, respectively, if the exact element cannot be found.
- * Defaults to 'binarySearch.GREATEST_LOWER_BOUND'.
- */
- exports.search = function search(aNeedle, aHaystack, aCompare, aBias) {
- if (aHaystack.length === 0) {
- return -1;
- }
- var index = recursiveSearch(-1, aHaystack.length, aNeedle, aHaystack,
- aCompare, aBias || exports.GREATEST_LOWER_BOUND);
- if (index < 0) {
- return -1;
- }
- // We have found either the exact element, or the next-closest element than
- // the one we are searching for. However, there may be more than one such
- // element. Make sure we always return the smallest of these.
- while (index - 1 >= 0) {
- if (aCompare(aHaystack[index], aHaystack[index - 1], true) !== 0) {
- break;
- }
- --index;
- }
- return index;
- };
- /***/ }),
- /* 26 */
- /***/ (function(module, exports) {
- /* -*- Mode: js; js-indent-level: 2; -*- */
- /*
- * Copyright 2011 Mozilla Foundation and contributors
- * Licensed under the New BSD license. See LICENSE or:
- * http://opensource.org/licenses/BSD-3-Clause
- */
- // It turns out that some (most?) JavaScript engines don't self-host
- // `Array.prototype.sort`. This makes sense because C++ will likely remain
- // faster than JS when doing raw CPU-intensive sorting. However, when using a
- // custom comparator function, calling back and forth between the VM's C++ and
- // JIT'd JS is rather slow *and* loses JIT type information, resulting in
- // worse generated code for the comparator function than would be optimal. In
- // fact, when sorting with a comparator, these costs outweigh the benefits of
- // sorting in C++. By using our own JS-implemented Quick Sort (below), we get
- // a ~3500ms mean speed-up in `bench/bench.html`.
- /**
- * Swap the elements indexed by `x` and `y` in the array `ary`.
- *
- * @param {Array} ary
- * The array.
- * @param {Number} x
- * The index of the first item.
- * @param {Number} y
- * The index of the second item.
- */
- function swap(ary, x, y) {
- var temp = ary[x];
- ary[x] = ary[y];
- ary[y] = temp;
- }
- /**
- * Returns a random integer within the range `low .. high` inclusive.
- *
- * @param {Number} low
- * The lower bound on the range.
- * @param {Number} high
- * The upper bound on the range.
- */
- function randomIntInRange(low, high) {
- return Math.round(low + (Math.random() * (high - low)));
- }
- /**
- * The Quick Sort algorithm.
- *
- * @param {Array} ary
- * An array to sort.
- * @param {function} comparator
- * Function to use to compare two items.
- * @param {Number} p
- * Start index of the array
- * @param {Number} r
- * End index of the array
- */
- function doQuickSort(ary, comparator, p, r) {
- // If our lower bound is less than our upper bound, we (1) partition the
- // array into two pieces and (2) recurse on each half. If it is not, this is
- // the empty array and our base case.
- if (p < r) {
- // (1) Partitioning.
- //
- // The partitioning chooses a pivot between `p` and `r` and moves all
- // elements that are less than or equal to the pivot to the before it, and
- // all the elements that are greater than it after it. The effect is that
- // once partition is done, the pivot is in the exact place it will be when
- // the array is put in sorted order, and it will not need to be moved
- // again. This runs in O(n) time.
- // Always choose a random pivot so that an input array which is reverse
- // sorted does not cause O(n^2) running time.
- var pivotIndex = randomIntInRange(p, r);
- var i = p - 1;
- swap(ary, pivotIndex, r);
- var pivot = ary[r];
- // Immediately after `j` is incremented in this loop, the following hold
- // true:
- //
- // * Every element in `ary[p .. i]` is less than or equal to the pivot.
- //
- // * Every element in `ary[i+1 .. j-1]` is greater than the pivot.
- for (var j = p; j < r; j++) {
- if (comparator(ary[j], pivot) <= 0) {
- i += 1;
- swap(ary, i, j);
- }
- }
- swap(ary, i + 1, j);
- var q = i + 1;
- // (2) Recurse on each half.
- doQuickSort(ary, comparator, p, q - 1);
- doQuickSort(ary, comparator, q + 1, r);
- }
- }
- /**
- * Sort the given array in-place with the given comparator function.
- *
- * @param {Array} ary
- * An array to sort.
- * @param {function} comparator
- * Function to use to compare two items.
- */
- exports.quickSort = function (ary, comparator) {
- doQuickSort(ary, comparator, 0, ary.length - 1);
- };
- /***/ }),
- /* 27 */
- /***/ (function(module, exports, __webpack_require__) {
- /* -*- Mode: js; js-indent-level: 2; -*- */
- /*
- * Copyright 2011 Mozilla Foundation and contributors
- * Licensed under the New BSD license. See LICENSE or:
- * http://opensource.org/licenses/BSD-3-Clause
- */
- var SourceMapGenerator = __webpack_require__(5).SourceMapGenerator;
- var util = __webpack_require__(0);
- // Matches a Windows-style `\r\n` newline or a `\n` newline used by all other
- // operating systems these days (capturing the result).
- var REGEX_NEWLINE = /(\r?\n)/;
- // Newline character code for charCodeAt() comparisons
- var NEWLINE_CODE = 10;
- // Private symbol for identifying `SourceNode`s when multiple versions of
- // the source-map library are loaded. This MUST NOT CHANGE across
- // versions!
- var isSourceNode = "$$$isSourceNode$$$";
- /**
- * SourceNodes provide a way to abstract over interpolating/concatenating
- * snippets of generated JavaScript source code while maintaining the line and
- * column information associated with the original source code.
- *
- * @param aLine The original line number.
- * @param aColumn The original column number.
- * @param aSource The original source's filename.
- * @param aChunks Optional. An array of strings which are snippets of
- * generated JS, or other SourceNodes.
- * @param aName The original identifier.
- */
- function SourceNode(aLine, aColumn, aSource, aChunks, aName) {
- this.children = [];
- this.sourceContents = {};
- this.line = aLine == null ? null : aLine;
- this.column = aColumn == null ? null : aColumn;
- this.source = aSource == null ? null : aSource;
- this.name = aName == null ? null : aName;
- this[isSourceNode] = true;
- if (aChunks != null) this.add(aChunks);
- }
- /**
- * Creates a SourceNode from generated code and a SourceMapConsumer.
- *
- * @param aGeneratedCode The generated code
- * @param aSourceMapConsumer The SourceMap for the generated code
- * @param aRelativePath Optional. The path that relative sources in the
- * SourceMapConsumer should be relative to.
- */
- SourceNode.fromStringWithSourceMap =
- function SourceNode_fromStringWithSourceMap(aGeneratedCode, aSourceMapConsumer, aRelativePath) {
- // The SourceNode we want to fill with the generated code
- // and the SourceMap
- var node = new SourceNode();
- // All even indices of this array are one line of the generated code,
- // while all odd indices are the newlines between two adjacent lines
- // (since `REGEX_NEWLINE` captures its match).
- // Processed fragments are removed from this array, by calling `shiftNextLine`.
- var remainingLines = aGeneratedCode.split(REGEX_NEWLINE);
- var shiftNextLine = function() {
- var lineContents = remainingLines.shift();
- // The last line of a file might not have a newline.
- var newLine = remainingLines.shift() || "";
- return lineContents + newLine;
- };
- // We need to remember the position of "remainingLines"
- var lastGeneratedLine = 1, lastGeneratedColumn = 0;
- // The generate SourceNodes we need a code range.
- // To extract it current and last mapping is used.
- // Here we store the last mapping.
- var lastMapping = null;
- aSourceMapConsumer.eachMapping(function (mapping) {
- if (lastMapping !== null) {
- // We add the code from "lastMapping" to "mapping":
- // First check if there is a new line in between.
- if (lastGeneratedLine < mapping.generatedLine) {
- // Associate first line with "lastMapping"
- addMappingWithCode(lastMapping, shiftNextLine());
- lastGeneratedLine++;
- lastGeneratedColumn = 0;
- // The remaining code is added without mapping
- } else {
- // There is no new line in between.
- // Associate the code between "lastGeneratedColumn" and
- // "mapping.generatedColumn" with "lastMapping"
- var nextLine = remainingLines[0];
- var code = nextLine.substr(0, mapping.generatedColumn -
- lastGeneratedColumn);
- remainingLines[0] = nextLine.substr(mapping.generatedColumn -
- lastGeneratedColumn);
- lastGeneratedColumn = mapping.generatedColumn;
- addMappingWithCode(lastMapping, code);
- // No more remaining code, continue
- lastMapping = mapping;
- return;
- }
- }
- // We add the generated code until the first mapping
- // to the SourceNode without any mapping.
- // Each line is added as separate string.
- while (lastGeneratedLine < mapping.generatedLine) {
- node.add(shiftNextLine());
- lastGeneratedLine++;
- }
- if (lastGeneratedColumn < mapping.generatedColumn) {
- var nextLine = remainingLines[0];
- node.add(nextLine.substr(0, mapping.generatedColumn));
- remainingLines[0] = nextLine.substr(mapping.generatedColumn);
- lastGeneratedColumn = mapping.generatedColumn;
- }
- lastMapping = mapping;
- }, this);
- // We have processed all mappings.
- if (remainingLines.length > 0) {
- if (lastMapping) {
- // Associate the remaining code in the current line with "lastMapping"
- addMappingWithCode(lastMapping, shiftNextLine());
- }
- // and add the remaining lines without any mapping
- node.add(remainingLines.join(""));
- }
- // Copy sourcesContent into SourceNode
- aSourceMapConsumer.sources.forEach(function (sourceFile) {
- var content = aSourceMapConsumer.sourceContentFor(sourceFile);
- if (content != null) {
- if (aRelativePath != null) {
- sourceFile = util.join(aRelativePath, sourceFile);
- }
- node.setSourceContent(sourceFile, content);
- }
- });
- return node;
- function addMappingWithCode(mapping, code) {
- if (mapping === null || mapping.source === undefined) {
- node.add(code);
- } else {
- var source = aRelativePath
- ? util.join(aRelativePath, mapping.source)
- : mapping.source;
- node.add(new SourceNode(mapping.originalLine,
- mapping.originalColumn,
- source,
- code,
- mapping.name));
- }
- }
- };
- /**
- * Add a chunk of generated JS to this source node.
- *
- * @param aChunk A string snippet of generated JS code, another instance of
- * SourceNode, or an array where each member is one of those things.
- */
- SourceNode.prototype.add = function SourceNode_add(aChunk) {
- if (Array.isArray(aChunk)) {
- aChunk.forEach(function (chunk) {
- this.add(chunk);
- }, this);
- }
- else if (aChunk[isSourceNode] || typeof aChunk === "string") {
- if (aChunk) {
- this.children.push(aChunk);
- }
- }
- else {
- throw new TypeError(
- "Expected a SourceNode, string, or an array of SourceNodes and strings. Got " + aChunk
- );
- }
- return this;
- };
- /**
- * Add a chunk of generated JS to the beginning of this source node.
- *
- * @param aChunk A string snippet of generated JS code, another instance of
- * SourceNode, or an array where each member is one of those things.
- */
- SourceNode.prototype.prepend = function SourceNode_prepend(aChunk) {
- if (Array.isArray(aChunk)) {
- for (var i = aChunk.length-1; i >= 0; i--) {
- this.prepend(aChunk[i]);
- }
- }
- else if (aChunk[isSourceNode] || typeof aChunk === "string") {
- this.children.unshift(aChunk);
- }
- else {
- throw new TypeError(
- "Expected a SourceNode, string, or an array of SourceNodes and strings. Got " + aChunk
- );
- }
- return this;
- };
- /**
- * Walk over the tree of JS snippets in this node and its children. The
- * walking function is called once for each snippet of JS and is passed that
- * snippet and the its original associated source's line/column location.
- *
- * @param aFn The traversal function.
- */
- SourceNode.prototype.walk = function SourceNode_walk(aFn) {
- var chunk;
- for (var i = 0, len = this.children.length; i < len; i++) {
- chunk = this.children[i];
- if (chunk[isSourceNode]) {
- chunk.walk(aFn);
- }
- else {
- if (chunk !== '') {
- aFn(chunk, { source: this.source,
- line: this.line,
- column: this.column,
- name: this.name });
- }
- }
- }
- };
- /**
- * Like `String.prototype.join` except for SourceNodes. Inserts `aStr` between
- * each of `this.children`.
- *
- * @param aSep The separator.
- */
- SourceNode.prototype.join = function SourceNode_join(aSep) {
- var newChildren;
- var i;
- var len = this.children.length;
- if (len > 0) {
- newChildren = [];
- for (i = 0; i < len-1; i++) {
- newChildren.push(this.children[i]);
- newChildren.push(aSep);
- }
- newChildren.push(this.children[i]);
- this.children = newChildren;
- }
- return this;
- };
- /**
- * Call String.prototype.replace on the very right-most source snippet. Useful
- * for trimming whitespace from the end of a source node, etc.
- *
- * @param aPattern The pattern to replace.
- * @param aReplacement The thing to replace the pattern with.
- */
- SourceNode.prototype.replaceRight = function SourceNode_replaceRight(aPattern, aReplacement) {
- var lastChild = this.children[this.children.length - 1];
- if (lastChild[isSourceNode]) {
- lastChild.replaceRight(aPattern, aReplacement);
- }
- else if (typeof lastChild === 'string') {
- this.children[this.children.length - 1] = lastChild.replace(aPattern, aReplacement);
- }
- else {
- this.children.push(''.replace(aPattern, aReplacement));
- }
- return this;
- };
- /**
- * Set the source content for a source file. This will be added to the SourceMapGenerator
- * in the sourcesContent field.
- *
- * @param aSourceFile The filename of the source file
- * @param aSourceContent The content of the source file
- */
- SourceNode.prototype.setSourceContent =
- function SourceNode_setSourceContent(aSourceFile, aSourceContent) {
- this.sourceContents[util.toSetString(aSourceFile)] = aSourceContent;
- };
- /**
- * Walk over the tree of SourceNodes. The walking function is called for each
- * source file content and is passed the filename and source content.
- *
- * @param aFn The traversal function.
- */
- SourceNode.prototype.walkSourceContents =
- function SourceNode_walkSourceContents(aFn) {
- for (var i = 0, len = this.children.length; i < len; i++) {
- if (this.children[i][isSourceNode]) {
- this.children[i].walkSourceContents(aFn);
- }
- }
- var sources = Object.keys(this.sourceContents);
- for (var i = 0, len = sources.length; i < len; i++) {
- aFn(util.fromSetString(sources[i]), this.sourceContents[sources[i]]);
- }
- };
- /**
- * Return the string representation of this source node. Walks over the tree
- * and concatenates all the various snippets together to one string.
- */
- SourceNode.prototype.toString = function SourceNode_toString() {
- var str = "";
- this.walk(function (chunk) {
- str += chunk;
- });
- return str;
- };
- /**
- * Returns the string representation of this source node along with a source
- * map.
- */
- SourceNode.prototype.toStringWithSourceMap = function SourceNode_toStringWithSourceMap(aArgs) {
- var generated = {
- code: "",
- line: 1,
- column: 0
- };
- var map = new SourceMapGenerator(aArgs);
- var sourceMappingActive = false;
- var lastOriginalSource = null;
- var lastOriginalLine = null;
- var lastOriginalColumn = null;
- var lastOriginalName = null;
- this.walk(function (chunk, original) {
- generated.code += chunk;
- if (original.source !== null
- && original.line !== null
- && original.column !== null) {
- if(lastOriginalSource !== original.source
- || lastOriginalLine !== original.line
- || lastOriginalColumn !== original.column
- || lastOriginalName !== original.name) {
- map.addMapping({
- source: original.source,
- original: {
- line: original.line,
- column: original.column
- },
- generated: {
- line: generated.line,
- column: generated.column
- },
- name: original.name
- });
- }
- lastOriginalSource = original.source;
- lastOriginalLine = original.line;
- lastOriginalColumn = original.column;
- lastOriginalName = original.name;
- sourceMappingActive = true;
- } else if (sourceMappingActive) {
- map.addMapping({
- generated: {
- line: generated.line,
- column: generated.column
- }
- });
- lastOriginalSource = null;
- sourceMappingActive = false;
- }
- for (var idx = 0, length = chunk.length; idx < length; idx++) {
- if (chunk.charCodeAt(idx) === NEWLINE_CODE) {
- generated.line++;
- generated.column = 0;
- // Mappings end at eol
- if (idx + 1 === length) {
- lastOriginalSource = null;
- sourceMappingActive = false;
- } else if (sourceMappingActive) {
- map.addMapping({
- source: original.source,
- original: {
- line: original.line,
- column: original.column
- },
- generated: {
- line: generated.line,
- column: generated.column
- },
- name: original.name
- });
- }
- } else {
- generated.column++;
- }
- }
- });
- this.walkSourceContents(function (sourceFile, sourceContent) {
- map.setSourceContent(sourceFile, sourceContent);
- });
- return { code: generated.code, map: map };
- };
- exports.SourceNode = SourceNode;
- /***/ }),
- /* 28 */
- /***/ (function(module, exports, __webpack_require__) {
- "use strict";
- Object.defineProperty(exports, "__esModule", {
- value: true
- });
- function settle(val) {
- if (!Array.isArray(val)) val = [val];
- return Promise.all(val.map(function (p) {
- return p.then(function (value) {
- return {
- isFulfilled: true,
- isRejected: false,
- value: value
- };
- }).catch(function (reason) {
- return {
- isFulfilled: false,
- isRejected: true,
- reason: reason
- };
- });
- }));
- }
- exports.settle = settle;
- exports.default = settle;
- /***/ }),
- /* 29 */
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
- "use strict";
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return unmap; });
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_babel_runtime_regenerator__ = __webpack_require__(2);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_babel_runtime_regenerator___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_babel_runtime_regenerator__);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__stack_frame__ = __webpack_require__(1);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__getSourceMap__ = __webpack_require__(4);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__getLinesAround__ = __webpack_require__(8);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_path__ = __webpack_require__(30);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_path___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_4_path__);
- var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; };
- /**
- * Turns a set of mapped <code>StackFrame</code>s back into their generated code position and enhances them with code.
- * @param {string} fileUri The URI of the <code>bundle.js</code> file.
- * @param {StackFrame[]} frames A set of <code>StackFrame</code>s which are already mapped and missing their generated positions.
- * @param {number} [fileContents=3] The number of lines to provide before and after the line specified in the <code>StackFrame</code>.
- */
- var unmap = function () {
- var _ref = _asyncToGenerator( /*#__PURE__*/__WEBPACK_IMPORTED_MODULE_0_babel_runtime_regenerator___default.a.mark(function _callee(_fileUri, frames) {
- var contextLines = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 3;
- var fileContents, fileUri, map;
- return __WEBPACK_IMPORTED_MODULE_0_babel_runtime_regenerator___default.a.wrap(function _callee$(_context) {
- while (1) {
- switch (_context.prev = _context.next) {
- case 0:
- fileContents = (typeof _fileUri === 'undefined' ? 'undefined' : _typeof(_fileUri)) === 'object' ? _fileUri.contents : null;
- fileUri = (typeof _fileUri === 'undefined' ? 'undefined' : _typeof(_fileUri)) === 'object' ? _fileUri.uri : _fileUri;
- if (!(fileContents == null)) {
- _context.next = 6;
- break;
- }
- _context.next = 5;
- return fetch(fileUri).then(function (res) {
- return res.text();
- });
- case 5:
- fileContents = _context.sent;
- case 6:
- _context.next = 8;
- return Object(__WEBPACK_IMPORTED_MODULE_2__getSourceMap__["a" /* getSourceMap */])(fileUri, fileContents);
- case 8:
- map = _context.sent;
- return _context.abrupt('return', frames.map(function (frame) {
- var functionName = frame.functionName,
- lineNumber = frame.lineNumber,
- columnNumber = frame.columnNumber,
- _originalLineNumber = frame._originalLineNumber;
- if (_originalLineNumber != null) {
- return frame;
- }
- var fileName = frame.fileName;
- if (fileName) {
- // The web version of this module only provides POSIX support, so Windows
- // paths like C:\foo\\baz\..\\bar\ cannot be normalized.
- // A simple solution to this is to replace all `\` with `/`, then
- // normalize afterwards.
- fileName = __WEBPACK_IMPORTED_MODULE_4_path___default.a.normalize(fileName.replace(/[\\]+/g, '/'));
- }
- if (fileName == null) {
- return frame;
- }
- var fN = fileName;
- var source = map.getSources()
- // Prepare path for normalization; see comment above for reasoning.
- .map(function (s) {
- return s.replace(/[\\]+/g, '/');
- }).filter(function (p) {
- p = __WEBPACK_IMPORTED_MODULE_4_path___default.a.normalize(p);
- var i = p.lastIndexOf(fN);
- return i !== -1 && i === p.length - fN.length;
- }).map(function (p) {
- return {
- token: p,
- seps: count(__WEBPACK_IMPORTED_MODULE_4_path___default.a.sep, __WEBPACK_IMPORTED_MODULE_4_path___default.a.normalize(p)),
- penalties: count('node_modules', p) + count('~', p)
- };
- }).sort(function (a, b) {
- var s = Math.sign(a.seps - b.seps);
- if (s !== 0) {
- return s;
- }
- return Math.sign(a.penalties - b.penalties);
- });
- if (source.length < 1 || lineNumber == null) {
- return new __WEBPACK_IMPORTED_MODULE_1__stack_frame__["b" /* default */](null, null, null, null, null, functionName, fN, lineNumber, columnNumber, null);
- }
- var sourceT = source[0].token;
- var _map$getGeneratedPosi = map.getGeneratedPosition(sourceT, lineNumber,
- // $FlowFixMe
- columnNumber),
- line = _map$getGeneratedPosi.line,
- column = _map$getGeneratedPosi.column;
- var originalSource = map.getSource(sourceT);
- return new __WEBPACK_IMPORTED_MODULE_1__stack_frame__["b" /* default */](functionName, fileUri, line, column || null, Object(__WEBPACK_IMPORTED_MODULE_3__getLinesAround__["a" /* getLinesAround */])(line, contextLines, fileContents || []), functionName, fN, lineNumber, columnNumber, Object(__WEBPACK_IMPORTED_MODULE_3__getLinesAround__["a" /* getLinesAround */])(lineNumber, contextLines, originalSource));
- }));
- case 10:
- case 'end':
- return _context.stop();
- }
- }
- }, _callee, this);
- }));
- return function unmap(_x2, _x3) {
- return _ref.apply(this, arguments);
- };
- }();
- function _asyncToGenerator(fn) { return function () { var gen = fn.apply(this, arguments); return new Promise(function (resolve, reject) { function step(key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { return Promise.resolve(value).then(function (value) { step("next", value); }, function (err) { step("throw", err); }); } } return step("next"); }); }; }
- /**
- * Copyright (c) 2015-present, Facebook, Inc.
- *
- * This source code is licensed under the MIT license found in the
- * LICENSE file in the root directory of this source tree.
- */
- function count(search, string) {
- // Count starts at -1 becuse a do-while loop always runs at least once
- var count = -1,
- index = -1;
- do {
- // First call or the while case evaluated true, meaning we have to make
- // count 0 or we found a character
- ++count;
- // Find the index of our search string, starting after the previous index
- index = string.indexOf(search, index + 1);
- } while (index !== -1);
- return count;
- }
- /* unused harmony default export */ var _unused_webpack_default_export = (unmap);
- /***/ }),
- /* 30 */
- /***/ (function(module, exports, __webpack_require__) {
- /* WEBPACK VAR INJECTION */(function(process) {// Copyright Joyent, Inc. and other Node contributors.
- //
- // Permission is hereby granted, free of charge, to any person obtaining a
- // copy of this software and associated documentation files (the
- // "Software"), to deal in the Software without restriction, including
- // without limitation the rights to use, copy, modify, merge, publish,
- // distribute, sublicense, and/or sell copies of the Software, and to permit
- // persons to whom the Software is furnished to do so, subject to the
- // following conditions:
- //
- // The above copyright notice and this permission notice shall be included
- // in all copies or substantial portions of the Software.
- //
- // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
- // OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
- // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
- // NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
- // DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
- // OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
- // USE OR OTHER DEALINGS IN THE SOFTWARE.
- // resolves . and .. elements in a path array with directory names there
- // must be no slashes, empty elements, or device names (c:\) in the array
- // (so also no leading and trailing slashes - it does not distinguish
- // relative and absolute paths)
- function normalizeArray(parts, allowAboveRoot) {
- // if the path tries to go above the root, `up` ends up > 0
- var up = 0;
- for (var i = parts.length - 1; i >= 0; i--) {
- var last = parts[i];
- if (last === '.') {
- parts.splice(i, 1);
- } else if (last === '..') {
- parts.splice(i, 1);
- up++;
- } else if (up) {
- parts.splice(i, 1);
- up--;
- }
- }
- // if the path is allowed to go above the root, restore leading ..s
- if (allowAboveRoot) {
- for (; up--; up) {
- parts.unshift('..');
- }
- }
- return parts;
- }
- // Split a filename into [root, dir, basename, ext], unix version
- // 'root' is just a slash, or nothing.
- var splitPathRe =
- /^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/;
- var splitPath = function(filename) {
- return splitPathRe.exec(filename).slice(1);
- };
- // path.resolve([from ...], to)
- // posix version
- exports.resolve = function() {
- var resolvedPath = '',
- resolvedAbsolute = false;
- for (var i = arguments.length - 1; i >= -1 && !resolvedAbsolute; i--) {
- var path = (i >= 0) ? arguments[i] : process.cwd();
- // Skip empty and invalid entries
- if (typeof path !== 'string') {
- throw new TypeError('Arguments to path.resolve must be strings');
- } else if (!path) {
- continue;
- }
- resolvedPath = path + '/' + resolvedPath;
- resolvedAbsolute = path.charAt(0) === '/';
- }
- // At this point the path should be resolved to a full absolute path, but
- // handle relative paths to be safe (might happen when process.cwd() fails)
- // Normalize the path
- resolvedPath = normalizeArray(filter(resolvedPath.split('/'), function(p) {
- return !!p;
- }), !resolvedAbsolute).join('/');
- return ((resolvedAbsolute ? '/' : '') + resolvedPath) || '.';
- };
- // path.normalize(path)
- // posix version
- exports.normalize = function(path) {
- var isAbsolute = exports.isAbsolute(path),
- trailingSlash = substr(path, -1) === '/';
- // Normalize the path
- path = normalizeArray(filter(path.split('/'), function(p) {
- return !!p;
- }), !isAbsolute).join('/');
- if (!path && !isAbsolute) {
- path = '.';
- }
- if (path && trailingSlash) {
- path += '/';
- }
- return (isAbsolute ? '/' : '') + path;
- };
- // posix version
- exports.isAbsolute = function(path) {
- return path.charAt(0) === '/';
- };
- // posix version
- exports.join = function() {
- var paths = Array.prototype.slice.call(arguments, 0);
- return exports.normalize(filter(paths, function(p, index) {
- if (typeof p !== 'string') {
- throw new TypeError('Arguments to path.join must be strings');
- }
- return p;
- }).join('/'));
- };
- // path.relative(from, to)
- // posix version
- exports.relative = function(from, to) {
- from = exports.resolve(from).substr(1);
- to = exports.resolve(to).substr(1);
- function trim(arr) {
- var start = 0;
- for (; start < arr.length; start++) {
- if (arr[start] !== '') break;
- }
- var end = arr.length - 1;
- for (; end >= 0; end--) {
- if (arr[end] !== '') break;
- }
- if (start > end) return [];
- return arr.slice(start, end - start + 1);
- }
- var fromParts = trim(from.split('/'));
- var toParts = trim(to.split('/'));
- var length = Math.min(fromParts.length, toParts.length);
- var samePartsLength = length;
- for (var i = 0; i < length; i++) {
- if (fromParts[i] !== toParts[i]) {
- samePartsLength = i;
- break;
- }
- }
- var outputParts = [];
- for (var i = samePartsLength; i < fromParts.length; i++) {
- outputParts.push('..');
- }
- outputParts = outputParts.concat(toParts.slice(samePartsLength));
- return outputParts.join('/');
- };
- exports.sep = '/';
- exports.delimiter = ':';
- exports.dirname = function(path) {
- var result = splitPath(path),
- root = result[0],
- dir = result[1];
- if (!root && !dir) {
- // No dirname whatsoever
- return '.';
- }
- if (dir) {
- // It has a dirname, strip trailing slash
- dir = dir.substr(0, dir.length - 1);
- }
- return root + dir;
- };
- exports.basename = function(path, ext) {
- var f = splitPath(path)[2];
- // TODO: make this comparison case-insensitive on windows?
- if (ext && f.substr(-1 * ext.length) === ext) {
- f = f.substr(0, f.length - ext.length);
- }
- return f;
- };
- exports.extname = function(path) {
- return splitPath(path)[3];
- };
- function filter (xs, f) {
- if (xs.filter) return xs.filter(f);
- var res = [];
- for (var i = 0; i < xs.length; i++) {
- if (f(xs[i], i, xs)) res.push(xs[i]);
- }
- return res;
- }
- // String.prototype.substr - negative index don't work in IE8
- var substr = 'ab'.substr(-1) === 'b'
- ? function (str, start, len) { return str.substr(start, len) }
- : function (str, start, len) {
- if (start < 0) start = str.length + start;
- return str.substr(start, len);
- }
- ;
- /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(3)))
- /***/ }),
- /* 31 */
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
- "use strict";
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return iframeStyle; });
- /* unused harmony export overlayStyle */
- /* unused harmony export primaryErrorStyle */
- /* unused harmony export secondaryErrorStyle */
- /* unused harmony export black */
- /* unused harmony export darkGray */
- /* unused harmony export red */
- /* unused harmony export redTransparent */
- /* unused harmony export yellowTransparent */
- /**
- * Copyright (c) 2015-present, Facebook, Inc.
- *
- * This source code is licensed under the MIT license found in the
- * LICENSE file in the root directory of this source tree.
- */
- var black = '#293238',
- darkGray = '#878e91',
- red = '#ce1126',
- redTransparent = 'rgba(206, 17, 38, 0.05)',
- lightRed = '#fccfcf',
- yellow = '#fbf5b4',
- yellowTransparent = 'rgba(251, 245, 180, 0.3)',
- white = '#ffffff';
- var iframeStyle = {
- position: 'fixed',
- top: '0',
- left: '0',
- width: '100%',
- height: '100%',
- border: 'none',
- 'z-index': 2147483647
- };
- var overlayStyle = {
- width: '100%',
- height: '100%',
- 'box-sizing': 'border-box',
- 'text-align': 'center',
- 'background-color': white
- };
- var primaryErrorStyle = {
- 'background-color': lightRed
- };
- var secondaryErrorStyle = {
- 'background-color': yellow
- };
- /***/ }),
- /* 32 */
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
- "use strict";
- /* unused harmony export getHead */
- /* unused harmony export injectCss */
- /* unused harmony export removeCss */
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return applyStyles; });
- /**
- * Copyright (c) 2015-present, Facebook, Inc.
- *
- * This source code is licensed under the MIT license found in the
- * LICENSE file in the root directory of this source tree.
- */
- var injectedCount = 0;
- var injectedCache = {};
- function getHead(document) {
- return document.head || document.getElementsByTagName('head')[0];
- }
- function injectCss(document, css) {
- var head = getHead(document);
- var style = document.createElement('style');
- style.type = 'text/css';
- style.appendChild(document.createTextNode(css));
- head.appendChild(style);
- injectedCache[++injectedCount] = style;
- return injectedCount;
- }
- function removeCss(document, ref) {
- if (injectedCache[ref] == null) {
- return;
- }
- var head = getHead(document);
- head.removeChild(injectedCache[ref]);
- delete injectedCache[ref];
- }
- function applyStyles(element, styles) {
- element.setAttribute('style', '');
- for (var key in styles) {
- if (!styles.hasOwnProperty(key)) {
- continue;
- }
- // $FlowFixMe
- element.style[key] = styles[key];
- }
- }
- /***/ }),
- /* 33 */
- /***/ (function(module, exports) {
- module.exports = "!function(e){function t(r){if(n[r])return n[r].exports;var u=n[r]={i:r,l:!1,exports:{}};return e[r].call(u.exports,u,u.exports,t),u.l=!0,u.exports}var n={};t.m=e,t.c=n,t.d=function(e,n,r){t.o(e,n)||Object.defineProperty(e,n,{configurable:!1,enumerable:!0,get:r})},t.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(n,\"a\",n),n},t.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t.p=\"\",t(t.s=18)}([function(e,t,n){\"use strict\";e.exports=n(24)},function(e,t,n){\"use strict\";n.d(t,\"c\",function(){return l}),n.d(t,\"d\",function(){return s}),n.d(t,\"g\",function(){return c}),n.d(t,\"a\",function(){return r}),n.d(t,\"b\",function(){return u}),n.d(t,\"e\",function(){return o}),n.d(t,\"f\",function(){return a}),n.d(t,\"h\",function(){return i});var r=\"#293238\",u=\"#878e91\",o=\"#ce1126\",a=\"rgba(206, 17, 38, 0.05)\",i=\"rgba(251, 245, 180, 0.3)\",l={width:\"100%\",height:\"100%\",\"box-sizing\":\"border-box\",\"text-align\":\"center\",\"background-color\":\"#ffffff\"},s={\"background-color\":\"#fccfcf\"},c={\"background-color\":\"#fbf5b4\"}},function(e,t,n){\"use strict\";function r(e){if(null===e||void 0===e)throw new TypeError(\"Object.assign cannot be called with null or undefined\");return Object(e)}var u=Object.getOwnPropertySymbols,o=Object.prototype.hasOwnProperty,a=Object.prototype.propertyIsEnumerable;e.exports=function(){try{if(!Object.assign)return!1;var e=new String(\"abc\");if(e[5]=\"de\",\"5\"===Object.getOwnPropertyNames(e)[0])return!1;for(var t={},n=0;n<10;n++)t[\"_\"+String.fromCharCode(n)]=n;if(\"0123456789\"!==Object.getOwnPropertyNames(t).map(function(e){return t[e]}).join(\"\"))return!1;var r={};return\"abcdefghijklmnopqrst\".split(\"\").forEach(function(e){r[e]=e}),\"abcdefghijklmnopqrst\"===Object.keys(Object.assign({},r)).join(\"\")}catch(e){return!1}}()?Object.assign:function(e,t){for(var n,i,l=r(e),s=1;s<arguments.length;s++){n=Object(arguments[s]);for(var c in n)o.call(n,c)&&(l[c]=n[c]);if(u){i=u(n);for(var p=0;p<i.length;p++)a.call(n,i[p])&&(l[i[p]]=n[i[p]])}}return l}},function(e,t,n){\"use strict\";function r(e){return function(){return e}}var u=function(){};u.thatReturns=r,u.thatReturnsFalse=r(!1),u.thatReturnsTrue=r(!0),u.thatReturnsNull=r(null),u.thatReturnsThis=function(){return this},u.thatReturnsArgument=function(e){return e},e.exports=u},function(e,t,n){\"use strict\";function r(){}function u(e){try{return e.then}catch(e){return m=e,C}}function o(e,t){try{return e(t)}catch(e){return m=e,C}}function a(e,t,n){try{e(t,n)}catch(e){return m=e,C}}function i(e){if(\"object\"!==typeof this)throw new TypeError(\"Promises must be constructed via new\");if(\"function\"!==typeof e)throw new TypeError(\"Promise constructor's argument is not a function\");this._75=0,this._83=0,this._18=null,this._38=null,e!==r&&h(e,this)}function l(e,t,n){return new e.constructor(function(u,o){var a=new i(r);a.then(u,o),s(e,new D(t,n,a))})}function s(e,t){for(;3===e._83;)e=e._18;if(i._47&&i._47(e),0===e._83)return 0===e._75?(e._75=1,void(e._38=t)):1===e._75?(e._75=2,void(e._38=[e._38,t])):void e._38.push(t);c(e,t)}function c(e,t){g(function(){var n=1===e._83?t.onFulfilled:t.onRejected;if(null===n)return void(1===e._83?p(t.promise,e._18):f(t.promise,e._18));var r=o(n,e._18);r===C?f(t.promise,m):p(t.promise,r)})}function p(e,t){if(t===e)return f(e,new TypeError(\"A promise cannot be resolved with itself.\"));if(t&&(\"object\"===typeof t||\"function\"===typeof t)){var n=u(t);if(n===C)return f(e,m);if(n===e.then&&t instanceof i)return e._83=3,e._18=t,void d(e);if(\"function\"===typeof n)return void h(n.bind(t),e)}e._83=1,e._18=t,d(e)}function f(e,t){e._83=2,e._18=t,i._71&&i._71(e,t),d(e)}function d(e){if(1===e._75&&(s(e,e._38),e._38=null),2===e._75){for(var t=0;t<e._38.length;t++)s(e,e._38[t]);e._38=null}}function D(e,t,n){this.onFulfilled=\"function\"===typeof e?e:null,this.onRejected=\"function\"===typeof t?t:null,this.promise=n}function h(e,t){var n=!1,r=a(e,function(e){n||(n=!0,p(t,e))},function(e){n||(n=!0,f(t,e))});n||r!==C||(n=!0,f(t,m))}var g=n(21),m=null,C={};e.exports=i,i._47=null,i._71=null,i._44=r,i.prototype.then=function(e,t){if(this.constructor!==i)return l(this,e,t);var n=new i(r);return s(this,new D(e,t,n)),n}},function(e,t,n){\"use strict\";var r={};e.exports=r},function(e,t,n){\"use strict\";function r(e,t,n,r,o,a,i,l){if(u(t),!e){var s;if(void 0===t)s=new Error(\"Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.\");else{var c=[n,r,o,a,i,l],p=0;s=new Error(t.replace(/%s/g,function(){return c[p++]})),s.name=\"Invariant Violation\"}throw s.framesToPop=1,s}}var u=function(e){};e.exports=r},function(e,t,n){\"use strict\";function r(e,t){if(!(e instanceof t))throw new TypeError(\"Cannot call a class as a function\")}function u(e,t){if(!e)throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");return!t||\"object\"!==typeof t&&\"function\"!==typeof t?e:t}function o(e,t){if(\"function\"!==typeof t&&null!==t)throw new TypeError(\"Super expression must either be null or a function, not \"+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var a=n(0),i=n.n(a),l=n(1),s=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,\"value\"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),c={position:\"relative\",display:\"inline-flex\",flexDirection:\"column\",height:\"100%\",width:\"1024px\",maxWidth:\"100%\",overflowX:\"hidden\",overflowY:\"auto\",padding:\"0.5rem\",boxSizing:\"border-box\",textAlign:\"left\",fontFamily:\"Consolas, Menlo, monospace\",fontSize:\"11px\",whiteSpace:\"pre-wrap\",wordBreak:\"break-word\",lineHeight:1.5,color:l.a},p=function(e){function t(){var e,n,o,a;r(this,t);for(var i=arguments.length,l=Array(i),s=0;s<i;s++)l[s]=arguments[s];return n=o=u(this,(e=t.__proto__||Object.getPrototypeOf(t)).call.apply(e,[this].concat(l))),o.iframeWindow=null,o.getIframeWindow=function(e){if(e){var t=e.ownerDocument;o.iframeWindow=t.defaultView}},o.onKeyDown=function(e){var t=o.props.shortcutHandler;t&&t(e.key)},a=n,u(o,a)}return o(t,e),s(t,[{key:\"componentDidMount\",value:function(){window.addEventListener(\"keydown\",this.onKeyDown),this.iframeWindow&&this.iframeWindow.addEventListener(\"keydown\",this.onKeyDown)}},{key:\"componentWillUnmount\",value:function(){window.removeEventListener(\"keydown\",this.onKeyDown),this.iframeWindow&&this.iframeWindow.removeEventListener(\"keydown\",this.onKeyDown)}},{key:\"render\",value:function(){return i.a.createElement(\"div\",{style:c,ref:this.getIframeWindow},this.props.children)}}]),t}(a.Component);t.a=p},function(e,t,n){\"use strict\";function r(e){return o.a.createElement(\"div\",{style:i},e.line1,o.a.createElement(\"br\",null),e.line2)}var u=n(0),o=n.n(u),a=n(1),i={fontFamily:\"sans-serif\",color:a.b,marginTop:\"0.5rem\",flex:\"0 0 auto\"};t.a=r},function(e,t,n){\"use strict\";function r(e){return o.a.createElement(\"div\",{style:i},e.headerText)}var u=n(0),o=n.n(u),a=n(1),i={fontSize:\"2em\",fontFamily:\"sans-serif\",color:a.e,whiteSpace:\"pre-wrap\",margin:\"0 2rem 0.75rem 0\",flex:\"0 0 auto\",maxHeight:\"50%\",overflow:\"auto\"};t.a=r},function(e,t,n){\"use strict\";function r(e){var t=e.main?l:s,n={__html:e.codeHTML};return o.a.createElement(\"pre\",{style:t},o.a.createElement(\"code\",{style:c,dangerouslySetInnerHTML:n}))}var u=n(0),o=n.n(u),a=n(1),i={display:\"block\",padding:\"0.5em\",marginTop:\"0.5em\",marginBottom:\"0.5em\",overflowX:\"auto\",whiteSpace:\"pre-wrap\",borderRadius:\"0.25rem\"},l=Object.assign({},i,{backgroundColor:a.f}),s=Object.assign({},i,{backgroundColor:a.h}),c={fontFamily:\"Consolas, Menlo, monospace\"};t.a=r},function(e,t,n){\"use strict\";function r(e){for(var t=(new o.a).ansiToJson(i.encode(e),{use_classes:!0}),n=\"\",r=!1,u=0;u<t.length;++u)for(var a=t[u],c=a.content,p=a.fg,f=c.split(\"\\n\"),d=0;d<f.length;++d){r||(n+='<span data-ansi-line=\"true\">',r=!0);var D=f[d].replace(\"\\r\",\"\"),h=l[s[p]];null!=h?n+='<span style=\"color: #'+h+';\">'+D+\"</span>\":(null!=p&&console.log(\"Missing color mapping: \",p),n+=\"<span>\"+D+\"</span>\"),d<f.length-1&&(n+=\"</span>\",r=!1,n+=\"<br/>\")}return r&&(n+=\"</span>\",r=!1),n}var u=n(12),o=n.n(u),a=n(36),i=(n.n(a),new a.AllHtmlEntities),l={reset:[\"333333\",\"transparent\"],black:\"333333\",red:\"881280\",green:\"1155cc\",yellow:\"881280\",blue:\"994500\",magenta:\"994500\",cyan:\"c80000\",gray:\"6e6e6e\",lightgrey:\"f5f5f5\",darkgrey:\"6e6e6e\"},s={\"ansi-bright-black\":\"black\",\"ansi-bright-yellow\":\"yellow\",\"ansi-yellow\":\"yellow\",\"ansi-bright-green\":\"green\",\"ansi-green\":\"green\",\"ansi-bright-cyan\":\"cyan\",\"ansi-cyan\":\"cyan\",\"ansi-bright-red\":\"red\",\"ansi-red\":\"red\",\"ansi-bright-magenta\":\"magenta\",\"ansi-magenta\":\"magenta\",\"ansi-white\":\"darkgrey\"};t.a=r},function(e,t,n){\"use strict\";function r(e,t){if(!(e instanceof t))throw new TypeError(\"Cannot call a class as a function\")}var u=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,\"value\"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),o=[[{color:\"0, 0, 0\",class:\"ansi-black\"},{color:\"187, 0, 0\",class:\"ansi-red\"},{color:\"0, 187, 0\",class:\"ansi-green\"},{color:\"187, 187, 0\",class:\"ansi-yellow\"},{color:\"0, 0, 187\",class:\"ansi-blue\"},{color:\"187, 0, 187\",class:\"ansi-magenta\"},{color:\"0, 187, 187\",class:\"ansi-cyan\"},{color:\"255,255,255\",class:\"ansi-white\"}],[{color:\"85, 85, 85\",class:\"ansi-bright-black\"},{color:\"255, 85, 85\",class:\"ansi-bright-red\"},{color:\"0, 255, 0\",class:\"ansi-bright-green\"},{color:\"255, 255, 85\",class:\"ansi-bright-yellow\"},{color:\"85, 85, 255\",class:\"ansi-bright-blue\"},{color:\"255, 85, 255\",class:\"ansi-bright-magenta\"},{color:\"85, 255, 255\",class:\"ansi-bright-cyan\"},{color:\"255, 255, 255\",class:\"ansi-bright-white\"}]],a=function(){function e(){r(this,e),this.fg=this.bg=this.fg_truecolor=this.bg_truecolor=null,this.bright=0}return u(e,null,[{key:\"escapeForHtml\",value:function(t){return(new e).escapeForHtml(t)}},{key:\"linkify\",value:function(t){return(new e).linkify(t)}},{key:\"ansiToHtml\",value:function(t,n){return(new e).ansiToHtml(t,n)}},{key:\"ansiToJson\",value:function(t,n){return(new e).ansiToJson(t,n)}},{key:\"ansiToText\",value:function(t){return(new e).ansiToText(t)}}]),u(e,[{key:\"setupPalette\",value:function(){this.PALETTE_COLORS=[];for(var e=0;e<2;++e)for(var t=0;t<8;++t)this.PALETTE_COLORS.push(o[e][t].color);for(var n=[0,95,135,175,215,255],r=function(e,t,r){return n[e]+\", \"+n[t]+\", \"+n[r]},u=0;u<6;++u)for(var a=0;a<6;++a)for(var i=0;i<6;++i)this.PALETTE_COLORS.push(r(u,a,i));for(var l=8,s=0;s<24;++s,l+=10)this.PALETTE_COLORS.push(r(l,l,l))}},{key:\"escapeForHtml\",value:function(e){return e.replace(/[&<>]/gm,function(e){return\"&\"==e?\"&\":\"<\"==e?\"<\":\">\"==e?\">\":\"\"})}},{key:\"linkify\",value:function(e){return e.replace(/(https?:\\/\\/[^\\s]+)/gm,function(e){return'<a href=\"'+e+'\">'+e+\"</a>\"})}},{key:\"ansiToHtml\",value:function(e,t){return this.process(e,t,!0)}},{key:\"ansiToJson\",value:function(e,t){return t=t||{},t.json=!0,t.clearLine=!1,this.process(e,t,!0)}},{key:\"ansiToText\",value:function(e){return this.process(e,{},!1)}},{key:\"process\",value:function(e,t,n){var r=this,u=this,o=e.split(/\\033\\[/),a=o.shift();void 0!==t&&null!==t||(t={}),t.clearLine=/\\r/.test(e);var i=o.map(function(e){return r.processChunk(e,t,n)});if(t&&t.json){var l=u.processChunkJson(\"\");return l.content=a,l.clearLine=t.clearLine,i.unshift(l),t.remove_empty&&(i=i.filter(function(e){return!e.isEmpty()})),i}return i.unshift(a),i.join(\"\")}},{key:\"processChunkJson\",value:function(e,t,n){t=\"undefined\"==typeof t?{}:t;var r=t.use_classes=\"undefined\"!=typeof t.use_classes&&t.use_classes,u=t.key=r?\"class\":\"color\",a={content:e,fg:null,bg:null,fg_truecolor:null,bg_truecolor:null,clearLine:t.clearLine,decoration:null,was_processed:!1,isEmpty:function(){return!a.content}},i=e.match(/^([!\\x3c-\\x3f]*)([\\d;]*)([\\x20-\\x2c]*[\\x40-\\x7e])([\\s\\S]*)/m);if(!i)return a;var l=(a.content=i[4],i[2].split(\";\"));if(\"\"!==i[1]||\"m\"!==i[3])return a;if(!n)return a;var s=this;for(s.decoration=null;l.length>0;){var c=l.shift(),p=parseInt(c);if(isNaN(p)||0===p)s.fg=s.bg=s.decoration=null;else if(1===p)s.decoration=\"bold\";else if(2===p)s.decoration=\"dim\";else if(3==p)s.decoration=\"italic\";else if(4==p)s.decoration=\"underline\";else if(5==p)s.decoration=\"blink\";else if(7===p)s.decoration=\"reverse\";else if(8===p)s.decoration=\"hidden\";else if(9===p)s.decoration=\"strikethrough\";else if(39==p)s.fg=null;else if(49==p)s.bg=null;else if(p>=30&&p<38)s.fg=o[0][p%10][u];else if(p>=90&&p<98)s.fg=o[1][p%10][u];else if(p>=40&&p<48)s.bg=o[0][p%10][u];else if(p>=100&&p<108)s.bg=o[1][p%10][u];else if(38===p||48===p){var f=38===p;if(l.length>=1){var d=l.shift();if(\"5\"===d&&l.length>=1){var D=parseInt(l.shift());if(D>=0&&D<=255)if(r){var h=D>=16?\"ansi-palette-\"+D:o[D>7?1:0][D%8].class;f?s.fg=h:s.bg=h}else this.PALETTE_COLORS||s.setupPalette(),f?s.fg=this.PALETTE_COLORS[D]:s.bg=this.PALETTE_COLORS[D]}else if(\"2\"===d&&l.length>=3){var g=parseInt(l.shift()),m=parseInt(l.shift()),C=parseInt(l.shift());if(g>=0&&g<=255&&m>=0&&m<=255&&C>=0&&C<=255){var E=g+\", \"+m+\", \"+C;r?f?(s.fg=\"ansi-truecolor\",s.fg_truecolor=E):(s.bg=\"ansi-truecolor\",s.bg_truecolor=E):f?s.fg=E:s.bg=E}}}}}if(null===s.fg&&null===s.bg&&null===s.decoration)return a;return a.fg=s.fg,a.bg=s.bg,a.fg_truecolor=s.fg_truecolor,a.bg_truecolor=s.bg_truecolor,a.decoration=s.decoration,a.was_processed=!0,a}},{key:\"processChunk\",value:function(e,t,n){var r=this;t=t||{};var u=this.processChunkJson(e,t,n);if(t.json)return u;if(u.isEmpty())return\"\";if(!u.was_processed)return u.content;var o=t.use_classes,a=[],i=[],l={},s=function(e){var t=[],n=void 0;for(n in e)e.hasOwnProperty(n)&&t.push(\"data-\"+n+'=\"'+r.escapeForHtml(e[n])+'\"');return t.length>0?\" \"+t.join(\" \"):\"\"};return u.fg&&(o?(i.push(u.fg+\"-fg\"),null!==u.fg_truecolor&&(l[\"ansi-truecolor-fg\"]=u.fg_truecolor,u.fg_truecolor=null)):a.push(\"color:rgb(\"+u.fg+\")\")),u.bg&&(o?(i.push(u.bg+\"-bg\"),null!==u.bg_truecolor&&(l[\"ansi-truecolor-bg\"]=u.bg_truecolor,u.bg_truecolor=null)):a.push(\"background-color:rgb(\"+u.bg+\")\")),u.decoration&&(o?i.push(\"ansi-\"+u.decoration):\"bold\"===u.decoration?a.push(\"font-weight:bold\"):\"dim\"===u.decoration?a.push(\"opacity:0.5\"):\"italic\"===u.decoration?a.push(\"font-style:italic\"):\"reverse\"===u.decoration?a.push(\"filter:invert(100%)\"):\"hidden\"===u.decoration?a.push(\"visibility:hidden\"):\"strikethrough\"===u.decoration?a.push(\"text-decoration:line-through\"):a.push(\"text-decoration:\"+u.decoration)),o?'<span class=\"'+i.join(\" \")+'\"'+s(l)+\">\"+u.content+\"</span>\":'<span style=\"'+a.join(\";\")+'\"'+s(l)+\">\"+u.content+\"</span>\"}}]),e}();e.exports=a},function(e,t){function n(){}var r=[[\"Aacute\",[193]],[\"aacute\",[225]],[\"Abreve\",[258]],[\"abreve\",[259]],[\"ac\",[8766]],[\"acd\",[8767]],[\"acE\",[8766,819]],[\"Acirc\",[194]],[\"acirc\",[226]],[\"acute\",[180]],[\"Acy\",[1040]],[\"acy\",[1072]],[\"AElig\",[198]],[\"aelig\",[230]],[\"af\",[8289]],[\"Afr\",[120068]],[\"afr\",[120094]],[\"Agrave\",[192]],[\"agrave\",[224]],[\"alefsym\",[8501]],[\"aleph\",[8501]],[\"Alpha\",[913]],[\"alpha\",[945]],[\"Amacr\",[256]],[\"amacr\",[257]],[\"amalg\",[10815]],[\"amp\",[38]],[\"AMP\",[38]],[\"andand\",[10837]],[\"And\",[10835]],[\"and\",[8743]],[\"andd\",[10844]],[\"andslope\",[10840]],[\"andv\",[10842]],[\"ang\",[8736]],[\"ange\",[10660]],[\"angle\",[8736]],[\"angmsdaa\",[10664]],[\"angmsdab\",[10665]],[\"angmsdac\",[10666]],[\"angmsdad\",[10667]],[\"angmsdae\",[10668]],[\"angmsdaf\",[10669]],[\"angmsdag\",[10670]],[\"angmsdah\",[10671]],[\"angmsd\",[8737]],[\"angrt\",[8735]],[\"angrtvb\",[8894]],[\"angrtvbd\",[10653]],[\"angsph\",[8738]],[\"angst\",[197]],[\"angzarr\",[9084]],[\"Aogon\",[260]],[\"aogon\",[261]],[\"Aopf\",[120120]],[\"aopf\",[120146]],[\"apacir\",[10863]],[\"ap\",[8776]],[\"apE\",[10864]],[\"ape\",[8778]],[\"apid\",[8779]],[\"apos\",[39]],[\"ApplyFunction\",[8289]],[\"approx\",[8776]],[\"approxeq\",[8778]],[\"Aring\",[197]],[\"aring\",[229]],[\"Ascr\",[119964]],[\"ascr\",[119990]],[\"Assign\",[8788]],[\"ast\",[42]],[\"asymp\",[8776]],[\"asympeq\",[8781]],[\"Atilde\",[195]],[\"atilde\",[227]],[\"Auml\",[196]],[\"auml\",[228]],[\"awconint\",[8755]],[\"awint\",[10769]],[\"backcong\",[8780]],[\"backepsilon\",[1014]],[\"backprime\",[8245]],[\"backsim\",[8765]],[\"backsimeq\",[8909]],[\"Backslash\",[8726]],[\"Barv\",[10983]],[\"barvee\",[8893]],[\"barwed\",[8965]],[\"Barwed\",[8966]],[\"barwedge\",[8965]],[\"bbrk\",[9141]],[\"bbrktbrk\",[9142]],[\"bcong\",[8780]],[\"Bcy\",[1041]],[\"bcy\",[1073]],[\"bdquo\",[8222]],[\"becaus\",[8757]],[\"because\",[8757]],[\"Because\",[8757]],[\"bemptyv\",[10672]],[\"bepsi\",[1014]],[\"bernou\",[8492]],[\"Bernoullis\",[8492]],[\"Beta\",[914]],[\"beta\",[946]],[\"beth\",[8502]],[\"between\",[8812]],[\"Bfr\",[120069]],[\"bfr\",[120095]],[\"bigcap\",[8898]],[\"bigcirc\",[9711]],[\"bigcup\",[8899]],[\"bigodot\",[10752]],[\"bigoplus\",[10753]],[\"bigotimes\",[10754]],[\"bigsqcup\",[10758]],[\"bigstar\",[9733]],[\"bigtriangledown\",[9661]],[\"bigtriangleup\",[9651]],[\"biguplus\",[10756]],[\"bigvee\",[8897]],[\"bigwedge\",[8896]],[\"bkarow\",[10509]],[\"blacklozenge\",[10731]],[\"blacksquare\",[9642]],[\"blacktriangle\",[9652]],[\"blacktriangledown\",[9662]],[\"blacktriangleleft\",[9666]],[\"blacktriangleright\",[9656]],[\"blank\",[9251]],[\"blk12\",[9618]],[\"blk14\",[9617]],[\"blk34\",[9619]],[\"block\",[9608]],[\"bne\",[61,8421]],[\"bnequiv\",[8801,8421]],[\"bNot\",[10989]],[\"bnot\",[8976]],[\"Bopf\",[120121]],[\"bopf\",[120147]],[\"bot\",[8869]],[\"bottom\",[8869]],[\"bowtie\",[8904]],[\"boxbox\",[10697]],[\"boxdl\",[9488]],[\"boxdL\",[9557]],[\"boxDl\",[9558]],[\"boxDL\",[9559]],[\"boxdr\",[9484]],[\"boxdR\",[9554]],[\"boxDr\",[9555]],[\"boxDR\",[9556]],[\"boxh\",[9472]],[\"boxH\",[9552]],[\"boxhd\",[9516]],[\"boxHd\",[9572]],[\"boxhD\",[9573]],[\"boxHD\",[9574]],[\"boxhu\",[9524]],[\"boxHu\",[9575]],[\"boxhU\",[9576]],[\"boxHU\",[9577]],[\"boxminus\",[8863]],[\"boxplus\",[8862]],[\"boxtimes\",[8864]],[\"boxul\",[9496]],[\"boxuL\",[9563]],[\"boxUl\",[9564]],[\"boxUL\",[9565]],[\"boxur\",[9492]],[\"boxuR\",[9560]],[\"boxUr\",[9561]],[\"boxUR\",[9562]],[\"boxv\",[9474]],[\"boxV\",[9553]],[\"boxvh\",[9532]],[\"boxvH\",[9578]],[\"boxVh\",[9579]],[\"boxVH\",[9580]],[\"boxvl\",[9508]],[\"boxvL\",[9569]],[\"boxVl\",[9570]],[\"boxVL\",[9571]],[\"boxvr\",[9500]],[\"boxvR\",[9566]],[\"boxVr\",[9567]],[\"boxVR\",[9568]],[\"bprime\",[8245]],[\"breve\",[728]],[\"Breve\",[728]],[\"brvbar\",[166]],[\"bscr\",[119991]],[\"Bscr\",[8492]],[\"bsemi\",[8271]],[\"bsim\",[8765]],[\"bsime\",[8909]],[\"bsolb\",[10693]],[\"bsol\",[92]],[\"bsolhsub\",[10184]],[\"bull\",[8226]],[\"bullet\",[8226]],[\"bump\",[8782]],[\"bumpE\",[10926]],[\"bumpe\",[8783]],[\"Bumpeq\",[8782]],[\"bumpeq\",[8783]],[\"Cacute\",[262]],[\"cacute\",[263]],[\"capand\",[10820]],[\"capbrcup\",[10825]],[\"capcap\",[10827]],[\"cap\",[8745]],[\"Cap\",[8914]],[\"capcup\",[10823]],[\"capdot\",[10816]],[\"CapitalDifferentialD\",[8517]],[\"caps\",[8745,65024]],[\"caret\",[8257]],[\"caron\",[711]],[\"Cayleys\",[8493]],[\"ccaps\",[10829]],[\"Ccaron\",[268]],[\"ccaron\",[269]],[\"Ccedil\",[199]],[\"ccedil\",[231]],[\"Ccirc\",[264]],[\"ccirc\",[265]],[\"Cconint\",[8752]],[\"ccups\",[10828]],[\"ccupssm\",[10832]],[\"Cdot\",[266]],[\"cdot\",[267]],[\"cedil\",[184]],[\"Cedilla\",[184]],[\"cemptyv\",[10674]],[\"cent\",[162]],[\"centerdot\",[183]],[\"CenterDot\",[183]],[\"cfr\",[120096]],[\"Cfr\",[8493]],[\"CHcy\",[1063]],[\"chcy\",[1095]],[\"check\",[10003]],[\"checkmark\",[10003]],[\"Chi\",[935]],[\"chi\",[967]],[\"circ\",[710]],[\"circeq\",[8791]],[\"circlearrowleft\",[8634]],[\"circlearrowright\",[8635]],[\"circledast\",[8859]],[\"circledcirc\",[8858]],[\"circleddash\",[8861]],[\"CircleDot\",[8857]],[\"circledR\",[174]],[\"circledS\",[9416]],[\"CircleMinus\",[8854]],[\"CirclePlus\",[8853]],[\"CircleTimes\",[8855]],[\"cir\",[9675]],[\"cirE\",[10691]],[\"cire\",[8791]],[\"cirfnint\",[10768]],[\"cirmid\",[10991]],[\"cirscir\",[10690]],[\"ClockwiseContourIntegral\",[8754]],[\"clubs\",[9827]],[\"clubsuit\",[9827]],[\"colon\",[58]],[\"Colon\",[8759]],[\"Colone\",[10868]],[\"colone\",[8788]],[\"coloneq\",[8788]],[\"comma\",[44]],[\"commat\",[64]],[\"comp\",[8705]],[\"compfn\",[8728]],[\"complement\",[8705]],[\"complexes\",[8450]],[\"cong\",[8773]],[\"congdot\",[10861]],[\"Congruent\",[8801]],[\"conint\",[8750]],[\"Conint\",[8751]],[\"ContourIntegral\",[8750]],[\"copf\",[120148]],[\"Copf\",[8450]],[\"coprod\",[8720]],[\"Coproduct\",[8720]],[\"copy\",[169]],[\"COPY\",[169]],[\"copysr\",[8471]],[\"CounterClockwiseContourIntegral\",[8755]],[\"crarr\",[8629]],[\"cross\",[10007]],[\"Cross\",[10799]],[\"Cscr\",[119966]],[\"cscr\",[119992]],[\"csub\",[10959]],[\"csube\",[10961]],[\"csup\",[10960]],[\"csupe\",[10962]],[\"ctdot\",[8943]],[\"cudarrl\",[10552]],[\"cudarrr\",[10549]],[\"cuepr\",[8926]],[\"cuesc\",[8927]],[\"cularr\",[8630]],[\"cularrp\",[10557]],[\"cupbrcap\",[10824]],[\"cupcap\",[10822]],[\"CupCap\",[8781]],[\"cup\",[8746]],[\"Cup\",[8915]],[\"cupcup\",[10826]],[\"cupdot\",[8845]],[\"cupor\",[10821]],[\"cups\",[8746,65024]],[\"curarr\",[8631]],[\"curarrm\",[10556]],[\"curlyeqprec\",[8926]],[\"curlyeqsucc\",[8927]],[\"curlyvee\",[8910]],[\"curlywedge\",[8911]],[\"curren\",[164]],[\"curvearrowleft\",[8630]],[\"curvearrowright\",[8631]],[\"cuvee\",[8910]],[\"cuwed\",[8911]],[\"cwconint\",[8754]],[\"cwint\",[8753]],[\"cylcty\",[9005]],[\"dagger\",[8224]],[\"Dagger\",[8225]],[\"daleth\",[8504]],[\"darr\",[8595]],[\"Darr\",[8609]],[\"dArr\",[8659]],[\"dash\",[8208]],[\"Dashv\",[10980]],[\"dashv\",[8867]],[\"dbkarow\",[10511]],[\"dblac\",[733]],[\"Dcaron\",[270]],[\"dcaron\",[271]],[\"Dcy\",[1044]],[\"dcy\",[1076]],[\"ddagger\",[8225]],[\"ddarr\",[8650]],[\"DD\",[8517]],[\"dd\",[8518]],[\"DDotrahd\",[10513]],[\"ddotseq\",[10871]],[\"deg\",[176]],[\"Del\",[8711]],[\"Delta\",[916]],[\"delta\",[948]],[\"demptyv\",[10673]],[\"dfisht\",[10623]],[\"Dfr\",[120071]],[\"dfr\",[120097]],[\"dHar\",[10597]],[\"dharl\",[8643]],[\"dharr\",[8642]],[\"DiacriticalAcute\",[180]],[\"DiacriticalDot\",[729]],[\"DiacriticalDoubleAcute\",[733]],[\"DiacriticalGrave\",[96]],[\"DiacriticalTilde\",[732]],[\"diam\",[8900]],[\"diamond\",[8900]],[\"Diamond\",[8900]],[\"diamondsuit\",[9830]],[\"diams\",[9830]],[\"die\",[168]],[\"DifferentialD\",[8518]],[\"digamma\",[989]],[\"disin\",[8946]],[\"div\",[247]],[\"divide\",[247]],[\"divideontimes\",[8903]],[\"divonx\",[8903]],[\"DJcy\",[1026]],[\"djcy\",[1106]],[\"dlcorn\",[8990]],[\"dlcrop\",[8973]],[\"dollar\",[36]],[\"Dopf\",[120123]],[\"dopf\",[120149]],[\"Dot\",[168]],[\"dot\",[729]],[\"DotDot\",[8412]],[\"doteq\",[8784]],[\"doteqdot\",[8785]],[\"DotEqual\",[8784]],[\"dotminus\",[8760]],[\"dotplus\",[8724]],[\"dotsquare\",[8865]],[\"doublebarwedge\",[8966]],[\"DoubleContourIntegral\",[8751]],[\"DoubleDot\",[168]],[\"DoubleDownArrow\",[8659]],[\"DoubleLeftArrow\",[8656]],[\"DoubleLeftRightArrow\",[8660]],[\"DoubleLeftTee\",[10980]],[\"DoubleLongLeftArrow\",[10232]],[\"DoubleLongLeftRightArrow\",[10234]],[\"DoubleLongRightArrow\",[10233]],[\"DoubleRightArrow\",[8658]],[\"DoubleRightTee\",[8872]],[\"DoubleUpArrow\",[8657]],[\"DoubleUpDownArrow\",[8661]],[\"DoubleVerticalBar\",[8741]],[\"DownArrowBar\",[10515]],[\"downarrow\",[8595]],[\"DownArrow\",[8595]],[\"Downarrow\",[8659]],[\"DownArrowUpArrow\",[8693]],[\"DownBreve\",[785]],[\"downdownarrows\",[8650]],[\"downharpoonleft\",[8643]],[\"downharpoonright\",[8642]],[\"DownLeftRightVector\",[10576]],[\"DownLeftTeeVector\",[10590]],[\"DownLeftVectorBar\",[10582]],[\"DownLeftVector\",[8637]],[\"DownRightTeeVector\",[10591]],[\"DownRightVectorBar\",[10583]],[\"DownRightVector\",[8641]],[\"DownTeeArrow\",[8615]],[\"DownTee\",[8868]],[\"drbkarow\",[10512]],[\"drcorn\",[8991]],[\"drcrop\",[8972]],[\"Dscr\",[119967]],[\"dscr\",[119993]],[\"DScy\",[1029]],[\"dscy\",[1109]],[\"dsol\",[10742]],[\"Dstrok\",[272]],[\"dstrok\",[273]],[\"dtdot\",[8945]],[\"dtri\",[9663]],[\"dtrif\",[9662]],[\"duarr\",[8693]],[\"duhar\",[10607]],[\"dwangle\",[10662]],[\"DZcy\",[1039]],[\"dzcy\",[1119]],[\"dzigrarr\",[10239]],[\"Eacute\",[201]],[\"eacute\",[233]],[\"easter\",[10862]],[\"Ecaron\",[282]],[\"ecaron\",[283]],[\"Ecirc\",[202]],[\"ecirc\",[234]],[\"ecir\",[8790]],[\"ecolon\",[8789]],[\"Ecy\",[1069]],[\"ecy\",[1101]],[\"eDDot\",[10871]],[\"Edot\",[278]],[\"edot\",[279]],[\"eDot\",[8785]],[\"ee\",[8519]],[\"efDot\",[8786]],[\"Efr\",[120072]],[\"efr\",[120098]],[\"eg\",[10906]],[\"Egrave\",[200]],[\"egrave\",[232]],[\"egs\",[10902]],[\"egsdot\",[10904]],[\"el\",[10905]],[\"Element\",[8712]],[\"elinters\",[9191]],[\"ell\",[8467]],[\"els\",[10901]],[\"elsdot\",[10903]],[\"Emacr\",[274]],[\"emacr\",[275]],[\"empty\",[8709]],[\"emptyset\",[8709]],[\"EmptySmallSquare\",[9723]],[\"emptyv\",[8709]],[\"EmptyVerySmallSquare\",[9643]],[\"emsp13\",[8196]],[\"emsp14\",[8197]],[\"emsp\",[8195]],[\"ENG\",[330]],[\"eng\",[331]],[\"ensp\",[8194]],[\"Eogon\",[280]],[\"eogon\",[281]],[\"Eopf\",[120124]],[\"eopf\",[120150]],[\"epar\",[8917]],[\"eparsl\",[10723]],[\"eplus\",[10865]],[\"epsi\",[949]],[\"Epsilon\",[917]],[\"epsilon\",[949]],[\"epsiv\",[1013]],[\"eqcirc\",[8790]],[\"eqcolon\",[8789]],[\"eqsim\",[8770]],[\"eqslantgtr\",[10902]],[\"eqslantless\",[10901]],[\"Equal\",[10869]],[\"equals\",[61]],[\"EqualTilde\",[8770]],[\"equest\",[8799]],[\"Equilibrium\",[8652]],[\"equiv\",[8801]],[\"equivDD\",[10872]],[\"eqvparsl\",[10725]],[\"erarr\",[10609]],[\"erDot\",[8787]],[\"escr\",[8495]],[\"Escr\",[8496]],[\"esdot\",[8784]],[\"Esim\",[10867]],[\"esim\",[8770]],[\"Eta\",[919]],[\"eta\",[951]],[\"ETH\",[208]],[\"eth\",[240]],[\"Euml\",[203]],[\"euml\",[235]],[\"euro\",[8364]],[\"excl\",[33]],[\"exist\",[8707]],[\"Exists\",[8707]],[\"expectation\",[8496]],[\"exponentiale\",[8519]],[\"ExponentialE\",[8519]],[\"fallingdotseq\",[8786]],[\"Fcy\",[1060]],[\"fcy\",[1092]],[\"female\",[9792]],[\"ffilig\",[64259]],[\"fflig\",[64256]],[\"ffllig\",[64260]],[\"Ffr\",[120073]],[\"ffr\",[120099]],[\"filig\",[64257]],[\"FilledSmallSquare\",[9724]],[\"FilledVerySmallSquare\",[9642]],[\"fjlig\",[102,106]],[\"flat\",[9837]],[\"fllig\",[64258]],[\"fltns\",[9649]],[\"fnof\",[402]],[\"Fopf\",[120125]],[\"fopf\",[120151]],[\"forall\",[8704]],[\"ForAll\",[8704]],[\"fork\",[8916]],[\"forkv\",[10969]],[\"Fouriertrf\",[8497]],[\"fpartint\",[10765]],[\"frac12\",[189]],[\"frac13\",[8531]],[\"frac14\",[188]],[\"frac15\",[8533]],[\"frac16\",[8537]],[\"frac18\",[8539]],[\"frac23\",[8532]],[\"frac25\",[8534]],[\"frac34\",[190]],[\"frac35\",[8535]],[\"frac38\",[8540]],[\"frac45\",[8536]],[\"frac56\",[8538]],[\"frac58\",[8541]],[\"frac78\",[8542]],[\"frasl\",[8260]],[\"frown\",[8994]],[\"fscr\",[119995]],[\"Fscr\",[8497]],[\"gacute\",[501]],[\"Gamma\",[915]],[\"gamma\",[947]],[\"Gammad\",[988]],[\"gammad\",[989]],[\"gap\",[10886]],[\"Gbreve\",[286]],[\"gbreve\",[287]],[\"Gcedil\",[290]],[\"Gcirc\",[284]],[\"gcirc\",[285]],[\"Gcy\",[1043]],[\"gcy\",[1075]],[\"Gdot\",[288]],[\"gdot\",[289]],[\"ge\",[8805]],[\"gE\",[8807]],[\"gEl\",[10892]],[\"gel\",[8923]],[\"geq\",[8805]],[\"geqq\",[8807]],[\"geqslant\",[10878]],[\"gescc\",[10921]],[\"ges\",[10878]],[\"gesdot\",[10880]],[\"gesdoto\",[10882]],[\"gesdotol\",[10884]],[\"gesl\",[8923,65024]],[\"gesles\",[10900]],[\"Gfr\",[120074]],[\"gfr\",[120100]],[\"gg\",[8811]],[\"Gg\",[8921]],[\"ggg\",[8921]],[\"gimel\",[8503]],[\"GJcy\",[1027]],[\"gjcy\",[1107]],[\"gla\",[10917]],[\"gl\",[8823]],[\"glE\",[10898]],[\"glj\",[10916]],[\"gnap\",[10890]],[\"gnapprox\",[10890]],[\"gne\",[10888]],[\"gnE\",[8809]],[\"gneq\",[10888]],[\"gneqq\",[8809]],[\"gnsim\",[8935]],[\"Gopf\",[120126]],[\"gopf\",[120152]],[\"grave\",[96]],[\"GreaterEqual\",[8805]],[\"GreaterEqualLess\",[8923]],[\"GreaterFullEqual\",[8807]],[\"GreaterGreater\",[10914]],[\"GreaterLess\",[8823]],[\"GreaterSlantEqual\",[10878]],[\"GreaterTilde\",[8819]],[\"Gscr\",[119970]],[\"gscr\",[8458]],[\"gsim\",[8819]],[\"gsime\",[10894]],[\"gsiml\",[10896]],[\"gtcc\",[10919]],[\"gtcir\",[10874]],[\"gt\",[62]],[\"GT\",[62]],[\"Gt\",[8811]],[\"gtdot\",[8919]],[\"gtlPar\",[10645]],[\"gtquest\",[10876]],[\"gtrapprox\",[10886]],[\"gtrarr\",[10616]],[\"gtrdot\",[8919]],[\"gtreqless\",[8923]],[\"gtreqqless\",[10892]],[\"gtrless\",[8823]],[\"gtrsim\",[8819]],[\"gvertneqq\",[8809,65024]],[\"gvnE\",[8809,65024]],[\"Hacek\",[711]],[\"hairsp\",[8202]],[\"half\",[189]],[\"hamilt\",[8459]],[\"HARDcy\",[1066]],[\"hardcy\",[1098]],[\"harrcir\",[10568]],[\"harr\",[8596]],[\"hArr\",[8660]],[\"harrw\",[8621]],[\"Hat\",[94]],[\"hbar\",[8463]],[\"Hcirc\",[292]],[\"hcirc\",[293]],[\"hearts\",[9829]],[\"heartsuit\",[9829]],[\"hellip\",[8230]],[\"hercon\",[8889]],[\"hfr\",[120101]],[\"Hfr\",[8460]],[\"HilbertSpace\",[8459]],[\"hksearow\",[10533]],[\"hkswarow\",[10534]],[\"hoarr\",[8703]],[\"homtht\",[8763]],[\"hookleftarrow\",[8617]],[\"hookrightarrow\",[8618]],[\"hopf\",[120153]],[\"Hopf\",[8461]],[\"horbar\",[8213]],[\"HorizontalLine\",[9472]],[\"hscr\",[119997]],[\"Hscr\",[8459]],[\"hslash\",[8463]],[\"Hstrok\",[294]],[\"hstrok\",[295]],[\"HumpDownHump\",[8782]],[\"HumpEqual\",[8783]],[\"hybull\",[8259]],[\"hyphen\",[8208]],[\"Iacute\",[205]],[\"iacute\",[237]],[\"ic\",[8291]],[\"Icirc\",[206]],[\"icirc\",[238]],[\"Icy\",[1048]],[\"icy\",[1080]],[\"Idot\",[304]],[\"IEcy\",[1045]],[\"iecy\",[1077]],[\"iexcl\",[161]],[\"iff\",[8660]],[\"ifr\",[120102]],[\"Ifr\",[8465]],[\"Igrave\",[204]],[\"igrave\",[236]],[\"ii\",[8520]],[\"iiiint\",[10764]],[\"iiint\",[8749]],[\"iinfin\",[10716]],[\"iiota\",[8489]],[\"IJlig\",[306]],[\"ijlig\",[307]],[\"Imacr\",[298]],[\"imacr\",[299]],[\"image\",[8465]],[\"ImaginaryI\",[8520]],[\"imagline\",[8464]],[\"imagpart\",[8465]],[\"imath\",[305]],[\"Im\",[8465]],[\"imof\",[8887]],[\"imped\",[437]],[\"Implies\",[8658]],[\"incare\",[8453]],[\"in\",[8712]],[\"infin\",[8734]],[\"infintie\",[10717]],[\"inodot\",[305]],[\"intcal\",[8890]],[\"int\",[8747]],[\"Int\",[8748]],[\"integers\",[8484]],[\"Integral\",[8747]],[\"intercal\",[8890]],[\"Intersection\",[8898]],[\"intlarhk\",[10775]],[\"intprod\",[10812]],[\"InvisibleComma\",[8291]],[\"InvisibleTimes\",[8290]],[\"IOcy\",[1025]],[\"iocy\",[1105]],[\"Iogon\",[302]],[\"iogon\",[303]],[\"Iopf\",[120128]],[\"iopf\",[120154]],[\"Iota\",[921]],[\"iota\",[953]],[\"iprod\",[10812]],[\"iquest\",[191]],[\"iscr\",[119998]],[\"Iscr\",[8464]],[\"isin\",[8712]],[\"isindot\",[8949]],[\"isinE\",[8953]],[\"isins\",[8948]],[\"isinsv\",[8947]],[\"isinv\",[8712]],[\"it\",[8290]],[\"Itilde\",[296]],[\"itilde\",[297]],[\"Iukcy\",[1030]],[\"iukcy\",[1110]],[\"Iuml\",[207]],[\"iuml\",[239]],[\"Jcirc\",[308]],[\"jcirc\",[309]],[\"Jcy\",[1049]],[\"jcy\",[1081]],[\"Jfr\",[120077]],[\"jfr\",[120103]],[\"jmath\",[567]],[\"Jopf\",[120129]],[\"jopf\",[120155]],[\"Jscr\",[119973]],[\"jscr\",[119999]],[\"Jsercy\",[1032]],[\"jsercy\",[1112]],[\"Jukcy\",[1028]],[\"jukcy\",[1108]],[\"Kappa\",[922]],[\"kappa\",[954]],[\"kappav\",[1008]],[\"Kcedil\",[310]],[\"kcedil\",[311]],[\"Kcy\",[1050]],[\"kcy\",[1082]],[\"Kfr\",[120078]],[\"kfr\",[120104]],[\"kgreen\",[312]],[\"KHcy\",[1061]],[\"khcy\",[1093]],[\"KJcy\",[1036]],[\"kjcy\",[1116]],[\"Kopf\",[120130]],[\"kopf\",[120156]],[\"Kscr\",[119974]],[\"kscr\",[12e4]],[\"lAarr\",[8666]],[\"Lacute\",[313]],[\"lacute\",[314]],[\"laemptyv\",[10676]],[\"lagran\",[8466]],[\"Lambda\",[923]],[\"lambda\",[955]],[\"lang\",[10216]],[\"Lang\",[10218]],[\"langd\",[10641]],[\"langle\",[10216]],[\"lap\",[10885]],[\"Laplacetrf\",[8466]],[\"laquo\",[171]],[\"larrb\",[8676]],[\"larrbfs\",[10527]],[\"larr\",[8592]],[\"Larr\",[8606]],[\"lArr\",[8656]],[\"larrfs\",[10525]],[\"larrhk\",[8617]],[\"larrlp\",[8619]],[\"larrpl\",[10553]],[\"larrsim\",[10611]],[\"larrtl\",[8610]],[\"latail\",[10521]],[\"lAtail\",[10523]],[\"lat\",[10923]],[\"late\",[10925]],[\"lates\",[10925,65024]],[\"lbarr\",[10508]],[\"lBarr\",[10510]],[\"lbbrk\",[10098]],[\"lbrace\",[123]],[\"lbrack\",[91]],[\"lbrke\",[10635]],[\"lbrksld\",[10639]],[\"lbrkslu\",[10637]],[\"Lcaron\",[317]],[\"lcaron\",[318]],[\"Lcedil\",[315]],[\"lcedil\",[316]],[\"lceil\",[8968]],[\"lcub\",[123]],[\"Lcy\",[1051]],[\"lcy\",[1083]],[\"ldca\",[10550]],[\"ldquo\",[8220]],[\"ldquor\",[8222]],[\"ldrdhar\",[10599]],[\"ldrushar\",[10571]],[\"ldsh\",[8626]],[\"le\",[8804]],[\"lE\",[8806]],[\"LeftAngleBracket\",[10216]],[\"LeftArrowBar\",[8676]],[\"leftarrow\",[8592]],[\"LeftArrow\",[8592]],[\"Leftarrow\",[8656]],[\"LeftArrowRightArrow\",[8646]],[\"leftarrowtail\",[8610]],[\"LeftCeiling\",[8968]],[\"LeftDoubleBracket\",[10214]],[\"LeftDownTeeVector\",[10593]],[\"LeftDownVectorBar\",[10585]],[\"LeftDownVector\",[8643]],[\"LeftFloor\",[8970]],[\"leftharpoondown\",[8637]],[\"leftharpoonup\",[8636]],[\"leftleftarrows\",[8647]],[\"leftrightarrow\",[8596]],[\"LeftRightArrow\",[8596]],[\"Leftrightarrow\",[8660]],[\"leftrightarrows\",[8646]],[\"leftrightharpoons\",[8651]],[\"leftrightsquigarrow\",[8621]],[\"LeftRightVector\",[10574]],[\"LeftTeeArrow\",[8612]],[\"LeftTee\",[8867]],[\"LeftTeeVector\",[10586]],[\"leftthreetimes\",[8907]],[\"LeftTriangleBar\",[10703]],[\"LeftTriangle\",[8882]],[\"LeftTriangleEqual\",[8884]],[\"LeftUpDownVector\",[10577]],[\"LeftUpTeeVector\",[10592]],[\"LeftUpVectorBar\",[10584]],[\"LeftUpVector\",[8639]],[\"LeftVectorBar\",[10578]],[\"LeftVector\",[8636]],[\"lEg\",[10891]],[\"leg\",[8922]],[\"leq\",[8804]],[\"leqq\",[8806]],[\"leqslant\",[10877]],[\"lescc\",[10920]],[\"les\",[10877]],[\"lesdot\",[10879]],[\"lesdoto\",[10881]],[\"lesdotor\",[10883]],[\"lesg\",[8922,65024]],[\"lesges\",[10899]],[\"lessapprox\",[10885]],[\"lessdot\",[8918]],[\"lesseqgtr\",[8922]],[\"lesseqqgtr\",[10891]],[\"LessEqualGreater\",[8922]],[\"LessFullEqual\",[8806]],[\"LessGreater\",[8822]],[\"lessgtr\",[8822]],[\"LessLess\",[10913]],[\"lesssim\",[8818]],[\"LessSlantEqual\",[10877]],[\"LessTilde\",[8818]],[\"lfisht\",[10620]],[\"lfloor\",[8970]],[\"Lfr\",[120079]],[\"lfr\",[120105]],[\"lg\",[8822]],[\"lgE\",[10897]],[\"lHar\",[10594]],[\"lhard\",[8637]],[\"lharu\",[8636]],[\"lharul\",[10602]],[\"lhblk\",[9604]],[\"LJcy\",[1033]],[\"ljcy\",[1113]],[\"llarr\",[8647]],[\"ll\",[8810]],[\"Ll\",[8920]],[\"llcorner\",[8990]],[\"Lleftarrow\",[8666]],[\"llhard\",[10603]],[\"lltri\",[9722]],[\"Lmidot\",[319]],[\"lmidot\",[320]],[\"lmoustache\",[9136]],[\"lmoust\",[9136]],[\"lnap\",[10889]],[\"lnapprox\",[10889]],[\"lne\",[10887]],[\"lnE\",[8808]],[\"lneq\",[10887]],[\"lneqq\",[8808]],[\"lnsim\",[8934]],[\"loang\",[10220]],[\"loarr\",[8701]],[\"lobrk\",[10214]],[\"longleftarrow\",[10229]],[\"LongLeftArrow\",[10229]],[\"Longleftarrow\",[10232]],[\"longleftrightarrow\",[10231]],[\"LongLeftRightArrow\",[10231]],[\"Longleftrightarrow\",[10234]],[\"longmapsto\",[10236]],[\"longrightarrow\",[10230]],[\"LongRightArrow\",[10230]],[\"Longrightarrow\",[10233]],[\"looparrowleft\",[8619]],[\"looparrowright\",[8620]],[\"lopar\",[10629]],[\"Lopf\",[120131]],[\"lopf\",[120157]],[\"loplus\",[10797]],[\"lotimes\",[10804]],[\"lowast\",[8727]],[\"lowbar\",[95]],[\"LowerLeftArrow\",[8601]],[\"LowerRightArrow\",[8600]],[\"loz\",[9674]],[\"lozenge\",[9674]],[\"lozf\",[10731]],[\"lpar\",[40]],[\"lparlt\",[10643]],[\"lrarr\",[8646]],[\"lrcorner\",[8991]],[\"lrhar\",[8651]],[\"lrhard\",[10605]],[\"lrm\",[8206]],[\"lrtri\",[8895]],[\"lsaquo\",[8249]],[\"lscr\",[120001]],[\"Lscr\",[8466]],[\"lsh\",[8624]],[\"Lsh\",[8624]],[\"lsim\",[8818]],[\"lsime\",[10893]],[\"lsimg\",[10895]],[\"lsqb\",[91]],[\"lsquo\",[8216]],[\"lsquor\",[8218]],[\"Lstrok\",[321]],[\"lstrok\",[322]],[\"ltcc\",[10918]],[\"ltcir\",[10873]],[\"lt\",[60]],[\"LT\",[60]],[\"Lt\",[8810]],[\"ltdot\",[8918]],[\"lthree\",[8907]],[\"ltimes\",[8905]],[\"ltlarr\",[10614]],[\"ltquest\",[10875]],[\"ltri\",[9667]],[\"ltrie\",[8884]],[\"ltrif\",[9666]],[\"ltrPar\",[10646]],[\"lurdshar\",[10570]],[\"luruhar\",[10598]],[\"lvertneqq\",[8808,65024]],[\"lvnE\",[8808,65024]],[\"macr\",[175]],[\"male\",[9794]],[\"malt\",[10016]],[\"maltese\",[10016]],[\"Map\",[10501]],[\"map\",[8614]],[\"mapsto\",[8614]],[\"mapstodown\",[8615]],[\"mapstoleft\",[8612]],[\"mapstoup\",[8613]],[\"marker\",[9646]],[\"mcomma\",[10793]],[\"Mcy\",[1052]],[\"mcy\",[1084]],[\"mdash\",[8212]],[\"mDDot\",[8762]],[\"measuredangle\",[8737]],[\"MediumSpace\",[8287]],[\"Mellintrf\",[8499]],[\"Mfr\",[120080]],[\"mfr\",[120106]],[\"mho\",[8487]],[\"micro\",[181]],[\"midast\",[42]],[\"midcir\",[10992]],[\"mid\",[8739]],[\"middot\",[183]],[\"minusb\",[8863]],[\"minus\",[8722]],[\"minusd\",[8760]],[\"minusdu\",[10794]],[\"MinusPlus\",[8723]],[\"mlcp\",[10971]],[\"mldr\",[8230]],[\"mnplus\",[8723]],[\"models\",[8871]],[\"Mopf\",[120132]],[\"mopf\",[120158]],[\"mp\",[8723]],[\"mscr\",[120002]],[\"Mscr\",[8499]],[\"mstpos\",[8766]],[\"Mu\",[924]],[\"mu\",[956]],[\"multimap\",[8888]],[\"mumap\",[8888]],[\"nabla\",[8711]],[\"Nacute\",[323]],[\"nacute\",[324]],[\"nang\",[8736,8402]],[\"nap\",[8777]],[\"napE\",[10864,824]],[\"napid\",[8779,824]],[\"napos\",[329]],[\"napprox\",[8777]],[\"natural\",[9838]],[\"naturals\",[8469]],[\"natur\",[9838]],[\"nbsp\",[160]],[\"nbump\",[8782,824]],[\"nbumpe\",[8783,824]],[\"ncap\",[10819]],[\"Ncaron\",[327]],[\"ncaron\",[328]],[\"Ncedil\",[325]],[\"ncedil\",[326]],[\"ncong\",[8775]],[\"ncongdot\",[10861,824]],[\"ncup\",[10818]],[\"Ncy\",[1053]],[\"ncy\",[1085]],[\"ndash\",[8211]],[\"nearhk\",[10532]],[\"nearr\",[8599]],[\"neArr\",[8663]],[\"nearrow\",[8599]],[\"ne\",[8800]],[\"nedot\",[8784,824]],[\"NegativeMediumSpace\",[8203]],[\"NegativeThickSpace\",[8203]],[\"NegativeThinSpace\",[8203]],[\"NegativeVeryThinSpace\",[8203]],[\"nequiv\",[8802]],[\"nesear\",[10536]],[\"nesim\",[8770,824]],[\"NestedGreaterGreater\",[8811]],[\"NestedLessLess\",[8810]],[\"nexist\",[8708]],[\"nexists\",[8708]],[\"Nfr\",[120081]],[\"nfr\",[120107]],[\"ngE\",[8807,824]],[\"nge\",[8817]],[\"ngeq\",[8817]],[\"ngeqq\",[8807,824]],[\"ngeqslant\",[10878,824]],[\"nges\",[10878,824]],[\"nGg\",[8921,824]],[\"ngsim\",[8821]],[\"nGt\",[8811,8402]],[\"ngt\",[8815]],[\"ngtr\",[8815]],[\"nGtv\",[8811,824]],[\"nharr\",[8622]],[\"nhArr\",[8654]],[\"nhpar\",[10994]],[\"ni\",[8715]],[\"nis\",[8956]],[\"nisd\",[8954]],[\"niv\",[8715]],[\"NJcy\",[1034]],[\"njcy\",[1114]],[\"nlarr\",[8602]],[\"nlArr\",[8653]],[\"nldr\",[8229]],[\"nlE\",[8806,824]],[\"nle\",[8816]],[\"nleftarrow\",[8602]],[\"nLeftarrow\",[8653]],[\"nleftrightarrow\",[8622]],[\"nLeftrightarrow\",[8654]],[\"nleq\",[8816]],[\"nleqq\",[8806,824]],[\"nleqslant\",[10877,824]],[\"nles\",[10877,824]],[\"nless\",[8814]],[\"nLl\",[8920,824]],[\"nlsim\",[8820]],[\"nLt\",[8810,8402]],[\"nlt\",[8814]],[\"nltri\",[8938]],[\"nltrie\",[8940]],[\"nLtv\",[8810,824]],[\"nmid\",[8740]],[\"NoBreak\",[8288]],[\"NonBreakingSpace\",[160]],[\"nopf\",[120159]],[\"Nopf\",[8469]],[\"Not\",[10988]],[\"not\",[172]],[\"NotCongruent\",[8802]],[\"NotCupCap\",[8813]],[\"NotDoubleVerticalBar\",[8742]],[\"NotElement\",[8713]],[\"NotEqual\",[8800]],[\"NotEqualTilde\",[8770,824]],[\"NotExists\",[8708]],[\"NotGreater\",[8815]],[\"NotGreaterEqual\",[8817]],[\"NotGreaterFullEqual\",[8807,824]],[\"NotGreaterGreater\",[8811,824]],[\"NotGreaterLess\",[8825]],[\"NotGreaterSlantEqual\",[10878,824]],[\"NotGreaterTilde\",[8821]],[\"NotHumpDownHump\",[8782,824]],[\"NotHumpEqual\",[8783,824]],[\"notin\",[8713]],[\"notindot\",[8949,824]],[\"notinE\",[8953,824]],[\"notinva\",[8713]],[\"notinvb\",[8951]],[\"notinvc\",[8950]],[\"NotLeftTriangleBar\",[10703,824]],[\"NotLeftTriangle\",[8938]],[\"NotLeftTriangleEqual\",[8940]],[\"NotLess\",[8814]],[\"NotLessEqual\",[8816]],[\"NotLessGreater\",[8824]],[\"NotLessLess\",[8810,824]],[\"NotLessSlantEqual\",[10877,824]],[\"NotLessTilde\",[8820]],[\"NotNestedGreaterGreater\",[10914,824]],[\"NotNestedLessLess\",[10913,824]],[\"notni\",[8716]],[\"notniva\",[8716]],[\"notnivb\",[8958]],[\"notnivc\",[8957]],[\"NotPrecedes\",[8832]],[\"NotPrecedesEqual\",[10927,824]],[\"NotPrecedesSlantEqual\",[8928]],[\"NotReverseElement\",[8716]],[\"NotRightTriangleBar\",[10704,824]],[\"NotRightTriangle\",[8939]],[\"NotRightTriangleEqual\",[8941]],[\"NotSquareSubset\",[8847,824]],[\"NotSquareSubsetEqual\",[8930]],[\"NotSquareSuperset\",[8848,824]],[\"NotSquareSupersetEqual\",[8931]],[\"NotSubset\",[8834,8402]],[\"NotSubsetEqual\",[8840]],[\"NotSucceeds\",[8833]],[\"NotSucceedsEqual\",[10928,824]],[\"NotSucceedsSlantEqual\",[8929]],[\"NotSucceedsTilde\",[8831,824]],[\"NotSuperset\",[8835,8402]],[\"NotSupersetEqual\",[8841]],[\"NotTilde\",[8769]],[\"NotTildeEqual\",[8772]],[\"NotTildeFullEqual\",[8775]],[\"NotTildeTilde\",[8777]],[\"NotVerticalBar\",[8740]],[\"nparallel\",[8742]],[\"npar\",[8742]],[\"nparsl\",[11005,8421]],[\"npart\",[8706,824]],[\"npolint\",[10772]],[\"npr\",[8832]],[\"nprcue\",[8928]],[\"nprec\",[8832]],[\"npreceq\",[10927,824]],[\"npre\",[10927,824]],[\"nrarrc\",[10547,824]],[\"nrarr\",[8603]],[\"nrArr\",[8655]],[\"nrarrw\",[8605,824]],[\"nrightarrow\",[8603]],[\"nRightarrow\",[8655]],[\"nrtri\",[8939]],[\"nrtrie\",[8941]],[\"nsc\",[8833]],[\"nsccue\",[8929]],[\"nsce\",[10928,824]],[\"Nscr\",[119977]],[\"nscr\",[120003]],[\"nshortmid\",[8740]],[\"nshortparallel\",[8742]],[\"nsim\",[8769]],[\"nsime\",[8772]],[\"nsimeq\",[8772]],[\"nsmid\",[8740]],[\"nspar\",[8742]],[\"nsqsube\",[8930]],[\"nsqsupe\",[8931]],[\"nsub\",[8836]],[\"nsubE\",[10949,824]],[\"nsube\",[8840]],[\"nsubset\",[8834,8402]],[\"nsubseteq\",[8840]],[\"nsubseteqq\",[10949,824]],[\"nsucc\",[8833]],[\"nsucceq\",[10928,824]],[\"nsup\",[8837]],[\"nsupE\",[10950,824]],[\"nsupe\",[8841]],[\"nsupset\",[8835,8402]],[\"nsupseteq\",[8841]],[\"nsupseteqq\",[10950,824]],[\"ntgl\",[8825]],[\"Ntilde\",[209]],[\"ntilde\",[241]],[\"ntlg\",[8824]],[\"ntriangleleft\",[8938]],[\"ntrianglelefteq\",[8940]],[\"ntriangleright\",[8939]],[\"ntrianglerighteq\",[8941]],[\"Nu\",[925]],[\"nu\",[957]],[\"num\",[35]],[\"numero\",[8470]],[\"numsp\",[8199]],[\"nvap\",[8781,8402]],[\"nvdash\",[8876]],[\"nvDash\",[8877]],[\"nVdash\",[8878]],[\"nVDash\",[8879]],[\"nvge\",[8805,8402]],[\"nvgt\",[62,8402]],[\"nvHarr\",[10500]],[\"nvinfin\",[10718]],[\"nvlArr\",[10498]],[\"nvle\",[8804,8402]],[\"nvlt\",[60,8402]],[\"nvltrie\",[8884,8402]],[\"nvrArr\",[10499]],[\"nvrtrie\",[8885,8402]],[\"nvsim\",[8764,8402]],[\"nwarhk\",[10531]],[\"nwarr\",[8598]],[\"nwArr\",[8662]],[\"nwarrow\",[8598]],[\"nwnear\",[10535]],[\"Oacute\",[211]],[\"oacute\",[243]],[\"oast\",[8859]],[\"Ocirc\",[212]],[\"ocirc\",[244]],[\"ocir\",[8858]],[\"Ocy\",[1054]],[\"ocy\",[1086]],[\"odash\",[8861]],[\"Odblac\",[336]],[\"odblac\",[337]],[\"odiv\",[10808]],[\"odot\",[8857]],[\"odsold\",[10684]],[\"OElig\",[338]],[\"oelig\",[339]],[\"ofcir\",[10687]],[\"Ofr\",[120082]],[\"ofr\",[120108]],[\"ogon\",[731]],[\"Ograve\",[210]],[\"ograve\",[242]],[\"ogt\",[10689]],[\"ohbar\",[10677]],[\"ohm\",[937]],[\"oint\",[8750]],[\"olarr\",[8634]],[\"olcir\",[10686]],[\"olcross\",[10683]],[\"oline\",[8254]],[\"olt\",[10688]],[\"Omacr\",[332]],[\"omacr\",[333]],[\"Omega\",[937]],[\"omega\",[969]],[\"Omicron\",[927]],[\"omicron\",[959]],[\"omid\",[10678]],[\"ominus\",[8854]],[\"Oopf\",[120134]],[\"oopf\",[120160]],[\"opar\",[10679]],[\"OpenCurlyDoubleQuote\",[8220]],[\"OpenCurlyQuote\",[8216]],[\"operp\",[10681]],[\"oplus\",[8853]],[\"orarr\",[8635]],[\"Or\",[10836]],[\"or\",[8744]],[\"ord\",[10845]],[\"order\",[8500]],[\"orderof\",[8500]],[\"ordf\",[170]],[\"ordm\",[186]],[\"origof\",[8886]],[\"oror\",[10838]],[\"orslope\",[10839]],[\"orv\",[10843]],[\"oS\",[9416]],[\"Oscr\",[119978]],[\"oscr\",[8500]],[\"Oslash\",[216]],[\"oslash\",[248]],[\"osol\",[8856]],[\"Otilde\",[213]],[\"otilde\",[245]],[\"otimesas\",[10806]],[\"Otimes\",[10807]],[\"otimes\",[8855]],[\"Ouml\",[214]],[\"ouml\",[246]],[\"ovbar\",[9021]],[\"OverBar\",[8254]],[\"OverBrace\",[9182]],[\"OverBracket\",[9140]],[\"OverParenthesis\",[9180]],[\"para\",[182]],[\"parallel\",[8741]],[\"par\",[8741]],[\"parsim\",[10995]],[\"parsl\",[11005]],[\"part\",[8706]],[\"PartialD\",[8706]],[\"Pcy\",[1055]],[\"pcy\",[1087]],[\"percnt\",[37]],[\"period\",[46]],[\"permil\",[8240]],[\"perp\",[8869]],[\"pertenk\",[8241]],[\"Pfr\",[120083]],[\"pfr\",[120109]],[\"Phi\",[934]],[\"phi\",[966]],[\"phiv\",[981]],[\"phmmat\",[8499]],[\"phone\",[9742]],[\"Pi\",[928]],[\"pi\",[960]],[\"pitchfork\",[8916]],[\"piv\",[982]],[\"planck\",[8463]],[\"planckh\",[8462]],[\"plankv\",[8463]],[\"plusacir\",[10787]],[\"plusb\",[8862]],[\"pluscir\",[10786]],[\"plus\",[43]],[\"plusdo\",[8724]],[\"plusdu\",[10789]],[\"pluse\",[10866]],[\"PlusMinus\",[177]],[\"plusmn\",[177]],[\"plussim\",[10790]],[\"plustwo\",[10791]],[\"pm\",[177]],[\"Poincareplane\",[8460]],[\"pointint\",[10773]],[\"popf\",[120161]],[\"Popf\",[8473]],[\"pound\",[163]],[\"prap\",[10935]],[\"Pr\",[10939]],[\"pr\",[8826]],[\"prcue\",[8828]],[\"precapprox\",[10935]],[\"prec\",[8826]],[\"preccurlyeq\",[8828]],[\"Precedes\",[8826]],[\"PrecedesEqual\",[10927]],[\"PrecedesSlantEqual\",[8828]],[\"PrecedesTilde\",[8830]],[\"preceq\",[10927]],[\"precnapprox\",[10937]],[\"precneqq\",[10933]],[\"precnsim\",[8936]],[\"pre\",[10927]],[\"prE\",[10931]],[\"precsim\",[8830]],[\"prime\",[8242]],[\"Prime\",[8243]],[\"primes\",[8473]],[\"prnap\",[10937]],[\"prnE\",[10933]],[\"prnsim\",[8936]],[\"prod\",[8719]],[\"Product\",[8719]],[\"profalar\",[9006]],[\"profline\",[8978]],[\"profsurf\",[8979]],[\"prop\",[8733]],[\"Proportional\",[8733]],[\"Proportion\",[8759]],[\"propto\",[8733]],[\"prsim\",[8830]],[\"prurel\",[8880]],[\"Pscr\",[119979]],[\"pscr\",[120005]],[\"Psi\",[936]],[\"psi\",[968]],[\"puncsp\",[8200]],[\"Qfr\",[120084]],[\"qfr\",[120110]],[\"qint\",[10764]],[\"qopf\",[120162]],[\"Qopf\",[8474]],[\"qprime\",[8279]],[\"Qscr\",[119980]],[\"qscr\",[120006]],[\"quaternions\",[8461]],[\"quatint\",[10774]],[\"quest\",[63]],[\"questeq\",[8799]],[\"quot\",[34]],[\"QUOT\",[34]],[\"rAarr\",[8667]],[\"race\",[8765,817]],[\"Racute\",[340]],[\"racute\",[341]],[\"radic\",[8730]],[\"raemptyv\",[10675]],[\"rang\",[10217]],[\"Rang\",[10219]],[\"rangd\",[10642]],[\"range\",[10661]],[\"rangle\",[10217]],[\"raquo\",[187]],[\"rarrap\",[10613]],[\"rarrb\",[8677]],[\"rarrbfs\",[10528]],[\"rarrc\",[10547]],[\"rarr\",[8594]],[\"Rarr\",[8608]],[\"rArr\",[8658]],[\"rarrfs\",[10526]],[\"rarrhk\",[8618]],[\"rarrlp\",[8620]],[\"rarrpl\",[10565]],[\"rarrsim\",[10612]],[\"Rarrtl\",[10518]],[\"rarrtl\",[8611]],[\"rarrw\",[8605]],[\"ratail\",[10522]],[\"rAtail\",[10524]],[\"ratio\",[8758]],[\"rationals\",[8474]],[\"rbarr\",[10509]],[\"rBarr\",[10511]],[\"RBarr\",[10512]],[\"rbbrk\",[10099]],[\"rbrace\",[125]],[\"rbrack\",[93]],[\"rbrke\",[10636]],[\"rbrksld\",[10638]],[\"rbrkslu\",[10640]],[\"Rcaron\",[344]],[\"rcaron\",[345]],[\"Rcedil\",[342]],[\"rcedil\",[343]],[\"rceil\",[8969]],[\"rcub\",[125]],[\"Rcy\",[1056]],[\"rcy\",[1088]],[\"rdca\",[10551]],[\"rdldhar\",[10601]],[\"rdquo\",[8221]],[\"rdquor\",[8221]],[\"CloseCurlyDoubleQuote\",[8221]],[\"rdsh\",[8627]],[\"real\",[8476]],[\"realine\",[8475]],[\"realpart\",[8476]],[\"reals\",[8477]],[\"Re\",[8476]],[\"rect\",[9645]],[\"reg\",[174]],[\"REG\",[174]],[\"ReverseElement\",[8715]],[\"ReverseEquilibrium\",[8651]],[\"ReverseUpEquilibrium\",[10607]],[\"rfisht\",[10621]],[\"rfloor\",[8971]],[\"rfr\",[120111]],[\"Rfr\",[8476]],[\"rHar\",[10596]],[\"rhard\",[8641]],[\"rharu\",[8640]],[\"rharul\",[10604]],[\"Rho\",[929]],[\"rho\",[961]],[\"rhov\",[1009]],[\"RightAngleBracket\",[10217]],[\"RightArrowBar\",[8677]],[\"rightarrow\",[8594]],[\"RightArrow\",[8594]],[\"Rightarrow\",[8658]],[\"RightArrowLeftArrow\",[8644]],[\"rightarrowtail\",[8611]],[\"RightCeiling\",[8969]],[\"RightDoubleBracket\",[10215]],[\"RightDownTeeVector\",[10589]],[\"RightDownVectorBar\",[10581]],[\"RightDownVector\",[8642]],[\"RightFloor\",[8971]],[\"rightharpoondown\",[8641]],[\"rightharpoonup\",[8640]],[\"rightleftarrows\",[8644]],[\"rightleftharpoons\",[8652]],[\"rightrightarrows\",[8649]],[\"rightsquigarrow\",[8605]],[\"RightTeeArrow\",[8614]],[\"RightTee\",[8866]],[\"RightTeeVector\",[10587]],[\"rightthreetimes\",[8908]],[\"RightTriangleBar\",[10704]],[\"RightTriangle\",[8883]],[\"RightTriangleEqual\",[8885]],[\"RightUpDownVector\",[10575]],[\"RightUpTeeVector\",[10588]],[\"RightUpVectorBar\",[10580]],[\"RightUpVector\",[8638]],[\"RightVectorBar\",[10579]],[\"RightVector\",[8640]],[\"ring\",[730]],[\"risingdotseq\",[8787]],[\"rlarr\",[8644]],[\"rlhar\",[8652]],[\"rlm\",[8207]],[\"rmoustache\",[9137]],[\"rmoust\",[9137]],[\"rnmid\",[10990]],[\"roang\",[10221]],[\"roarr\",[8702]],[\"robrk\",[10215]],[\"ropar\",[10630]],[\"ropf\",[120163]],[\"Ropf\",[8477]],[\"roplus\",[10798]],[\"rotimes\",[10805]],[\"RoundImplies\",[10608]],[\"rpar\",[41]],[\"rpargt\",[10644]],[\"rppolint\",[10770]],[\"rrarr\",[8649]],[\"Rrightarrow\",[8667]],[\"rsaquo\",[8250]],[\"rscr\",[120007]],[\"Rscr\",[8475]],[\"rsh\",[8625]],[\"Rsh\",[8625]],[\"rsqb\",[93]],[\"rsquo\",[8217]],[\"rsquor\",[8217]],[\"CloseCurlyQuote\",[8217]],[\"rthree\",[8908]],[\"rtimes\",[8906]],[\"rtri\",[9657]],[\"rtrie\",[8885]],[\"rtrif\",[9656]],[\"rtriltri\",[10702]],[\"RuleDelayed\",[10740]],[\"ruluhar\",[10600]],[\"rx\",[8478]],[\"Sacute\",[346]],[\"sacute\",[347]],[\"sbquo\",[8218]],[\"scap\",[10936]],[\"Scaron\",[352]],[\"scaron\",[353]],[\"Sc\",[10940]],[\"sc\",[8827]],[\"sccue\",[8829]],[\"sce\",[10928]],[\"scE\",[10932]],[\"Scedil\",[350]],[\"scedil\",[351]],[\"Scirc\",[348]],[\"scirc\",[349]],[\"scnap\",[10938]],[\"scnE\",[10934]],[\"scnsim\",[8937]],[\"scpolint\",[10771]],[\"scsim\",[8831]],[\"Scy\",[1057]],[\"scy\",[1089]],[\"sdotb\",[8865]],[\"sdot\",[8901]],[\"sdote\",[10854]],[\"searhk\",[10533]],[\"searr\",[8600]],[\"seArr\",[8664]],[\"searrow\",[8600]],[\"sect\",[167]],[\"semi\",[59]],[\"seswar\",[10537]],[\"setminus\",[8726]],[\"setmn\",[8726]],[\"sext\",[10038]],[\"Sfr\",[120086]],[\"sfr\",[120112]],[\"sfrown\",[8994]],[\"sharp\",[9839]],[\"SHCHcy\",[1065]],[\"shchcy\",[1097]],[\"SHcy\",[1064]],[\"shcy\",[1096]],[\"ShortDownArrow\",[8595]],[\"ShortLeftArrow\",[8592]],[\"shortmid\",[8739]],[\"shortparallel\",[8741]],[\"ShortRightArrow\",[8594]],[\"ShortUpArrow\",[8593]],[\"shy\",[173]],[\"Sigma\",[931]],[\"sigma\",[963]],[\"sigmaf\",[962]],[\"sigmav\",[962]],[\"sim\",[8764]],[\"simdot\",[10858]],[\"sime\",[8771]],[\"simeq\",[8771]],[\"simg\",[10910]],[\"simgE\",[10912]],[\"siml\",[10909]],[\"simlE\",[10911]],[\"simne\",[8774]],[\"simplus\",[10788]],[\"simrarr\",[10610]],[\"slarr\",[8592]],[\"SmallCircle\",[8728]],[\"smallsetminus\",[8726]],[\"smashp\",[10803]],[\"smeparsl\",[10724]],[\"smid\",[8739]],[\"smile\",[8995]],[\"smt\",[10922]],[\"smte\",[10924]],[\"smtes\",[10924,65024]],[\"SOFTcy\",[1068]],[\"softcy\",[1100]],[\"solbar\",[9023]],[\"solb\",[10692]],[\"sol\",[47]],[\"Sopf\",[120138]],[\"sopf\",[120164]],[\"spades\",[9824]],[\"spadesuit\",[9824]],[\"spar\",[8741]],[\"sqcap\",[8851]],[\"sqcaps\",[8851,65024]],[\"sqcup\",[8852]],[\"sqcups\",[8852,65024]],[\"Sqrt\",[8730]],[\"sqsub\",[8847]],[\"sqsube\",[8849]],[\"sqsubset\",[8847]],[\"sqsubseteq\",[8849]],[\"sqsup\",[8848]],[\"sqsupe\",[8850]],[\"sqsupset\",[8848]],[\"sqsupseteq\",[8850]],[\"square\",[9633]],[\"Square\",[9633]],[\"SquareIntersection\",[8851]],[\"SquareSubset\",[8847]],[\"SquareSubsetEqual\",[8849]],[\"SquareSuperset\",[8848]],[\"SquareSupersetEqual\",[8850]],[\"SquareUnion\",[8852]],[\"squarf\",[9642]],[\"squ\",[9633]],[\"squf\",[9642]],[\"srarr\",[8594]],[\"Sscr\",[119982]],[\"sscr\",[120008]],[\"ssetmn\",[8726]],[\"ssmile\",[8995]],[\"sstarf\",[8902]],[\"Star\",[8902]],[\"star\",[9734]],[\"starf\",[9733]],[\"straightepsilon\",[1013]],[\"straightphi\",[981]],[\"strns\",[175]],[\"sub\",[8834]],[\"Sub\",[8912]],[\"subdot\",[10941]],[\"subE\",[10949]],[\"sube\",[8838]],[\"subedot\",[10947]],[\"submult\",[10945]],[\"subnE\",[10955]],[\"subne\",[8842]],[\"subplus\",[10943]],[\"subrarr\",[10617]],[\"subset\",[8834]],[\"Subset\",[8912]],[\"subseteq\",[8838]],[\"subseteqq\",[10949]],[\"SubsetEqual\",[8838]],[\"subsetneq\",[8842]],[\"subsetneqq\",[10955]],[\"subsim\",[10951]],[\"subsub\",[10965]],[\"subsup\",[10963]],[\"succapprox\",[10936]],[\"succ\",[8827]],[\"succcurlyeq\",[8829]],[\"Succeeds\",[8827]],[\"SucceedsEqual\",[10928]],[\"SucceedsSlantEqual\",[8829]],[\"SucceedsTilde\",[8831]],[\"succeq\",[10928]],[\"succnapprox\",[10938]],[\"succneqq\",[10934]],[\"succnsim\",[8937]],[\"succsim\",[8831]],[\"SuchThat\",[8715]],[\"sum\",[8721]],[\"Sum\",[8721]],[\"sung\",[9834]],[\"sup1\",[185]],[\"sup2\",[178]],[\"sup3\",[179]],[\"sup\",[8835]],[\"Sup\",[8913]],[\"supdot\",[10942]],[\"supdsub\",[10968]],[\"supE\",[10950]],[\"supe\",[8839]],[\"supedot\",[10948]],[\"Superset\",[8835]],[\"SupersetEqual\",[8839]],[\"suphsol\",[10185]],[\"suphsub\",[10967]],[\"suplarr\",[10619]],[\"supmult\",[10946]],[\"supnE\",[10956]],[\"supne\",[8843]],[\"supplus\",[10944]],[\"supset\",[8835]],[\"Supset\",[8913]],[\"supseteq\",[8839]],[\"supseteqq\",[10950]],[\"supsetneq\",[8843]],[\"supsetneqq\",[10956]],[\"supsim\",[10952]],[\"supsub\",[10964]],[\"supsup\",[10966]],[\"swarhk\",[10534]],[\"swarr\",[8601]],[\"swArr\",[8665]],[\"swarrow\",[8601]],[\"swnwar\",[10538]],[\"szlig\",[223]],[\"Tab\",[9]],[\"target\",[8982]],[\"Tau\",[932]],[\"tau\",[964]],[\"tbrk\",[9140]],[\"Tcaron\",[356]],[\"tcaron\",[357]],[\"Tcedil\",[354]],[\"tcedil\",[355]],[\"Tcy\",[1058]],[\"tcy\",[1090]],[\"tdot\",[8411]],[\"telrec\",[8981]],[\"Tfr\",[120087]],[\"tfr\",[120113]],[\"there4\",[8756]],[\"therefore\",[8756]],[\"Therefore\",[8756]],[\"Theta\",[920]],[\"theta\",[952]],[\"thetasym\",[977]],[\"thetav\",[977]],[\"thickapprox\",[8776]],[\"thicksim\",[8764]],[\"ThickSpace\",[8287,8202]],[\"ThinSpace\",[8201]],[\"thinsp\",[8201]],[\"thkap\",[8776]],[\"thksim\",[8764]],[\"THORN\",[222]],[\"thorn\",[254]],[\"tilde\",[732]],[\"Tilde\",[8764]],[\"TildeEqual\",[8771]],[\"TildeFullEqual\",[8773]],[\"TildeTilde\",[8776]],[\"timesbar\",[10801]],[\"timesb\",[8864]],[\"times\",[215]],[\"timesd\",[10800]],[\"tint\",[8749]],[\"toea\",[10536]],[\"topbot\",[9014]],[\"topcir\",[10993]],[\"top\",[8868]],[\"Topf\",[120139]],[\"topf\",[120165]],[\"topfork\",[10970]],[\"tosa\",[10537]],[\"tprime\",[8244]],[\"trade\",[8482]],[\"TRADE\",[8482]],[\"triangle\",[9653]],[\"triangledown\",[9663]],[\"triangleleft\",[9667]],[\"trianglelefteq\",[8884]],[\"triangleq\",[8796]],[\"triangleright\",[9657]],[\"trianglerighteq\",[8885]],[\"tridot\",[9708]],[\"trie\",[8796]],[\"triminus\",[10810]],[\"TripleDot\",[8411]],[\"triplus\",[10809]],[\"trisb\",[10701]],[\"tritime\",[10811]],[\"trpezium\",[9186]],[\"Tscr\",[119983]],[\"tscr\",[120009]],[\"TScy\",[1062]],[\"tscy\",[1094]],[\"TSHcy\",[1035]],[\"tshcy\",[1115]],[\"Tstrok\",[358]],[\"tstrok\",[359]],[\"twixt\",[8812]],[\"twoheadleftarrow\",[8606]],[\"twoheadrightarrow\",[8608]],[\"Uacute\",[218]],[\"uacute\",[250]],[\"uarr\",[8593]],[\"Uarr\",[8607]],[\"uArr\",[8657]],[\"Uarrocir\",[10569]],[\"Ubrcy\",[1038]],[\"ubrcy\",[1118]],[\"Ubreve\",[364]],[\"ubreve\",[365]],[\"Ucirc\",[219]],[\"ucirc\",[251]],[\"Ucy\",[1059]],[\"ucy\",[1091]],[\"udarr\",[8645]],[\"Udblac\",[368]],[\"udblac\",[369]],[\"udhar\",[10606]],[\"ufisht\",[10622]],[\"Ufr\",[120088]],[\"ufr\",[120114]],[\"Ugrave\",[217]],[\"ugrave\",[249]],[\"uHar\",[10595]],[\"uharl\",[8639]],[\"uharr\",[8638]],[\"uhblk\",[9600]],[\"ulcorn\",[8988]],[\"ulcorner\",[8988]],[\"ulcrop\",[8975]],[\"ultri\",[9720]],[\"Umacr\",[362]],[\"umacr\",[363]],[\"uml\",[168]],[\"UnderBar\",[95]],[\"UnderBrace\",[9183]],[\"UnderBracket\",[9141]],[\"UnderParenthesis\",[9181]],[\"Union\",[8899]],[\"UnionPlus\",[8846]],[\"Uogon\",[370]],[\"uogon\",[371]],[\"Uopf\",[120140]],[\"uopf\",[120166]],[\"UpArrowBar\",[10514]],[\"uparrow\",[8593]],[\"UpArrow\",[8593]],[\"Uparrow\",[8657]],[\"UpArrowDownArrow\",[8645]],[\"updownarrow\",[8597]],[\"UpDownArrow\",[8597]],[\"Updownarrow\",[8661]],[\"UpEquilibrium\",[10606]],[\"upharpoonleft\",[8639]],[\"upharpoonright\",[8638]],[\"uplus\",[8846]],[\"UpperLeftArrow\",[8598]],[\"UpperRightArrow\",[8599]],[\"upsi\",[965]],[\"Upsi\",[978]],[\"upsih\",[978]],[\"Upsilon\",[933]],[\"upsilon\",[965]],[\"UpTeeArrow\",[8613]],[\"UpTee\",[8869]],[\"upuparrows\",[8648]],[\"urcorn\",[8989]],[\"urcorner\",[8989]],[\"urcrop\",[8974]],[\"Uring\",[366]],[\"uring\",[367]],[\"urtri\",[9721]],[\"Uscr\",[119984]],[\"uscr\",[120010]],[\"utdot\",[8944]],[\"Utilde\",[360]],[\"utilde\",[361]],[\"utri\",[9653]],[\"utrif\",[9652]],[\"uuarr\",[8648]],[\"Uuml\",[220]],[\"uuml\",[252]],[\"uwangle\",[10663]],[\"vangrt\",[10652]],[\"varepsilon\",[1013]],[\"varkappa\",[1008]],[\"varnothing\",[8709]],[\"varphi\",[981]],[\"varpi\",[982]],[\"varpropto\",[8733]],[\"varr\",[8597]],[\"vArr\",[8661]],[\"varrho\",[1009]],[\"varsigma\",[962]],[\"varsubsetneq\",[8842,65024]],[\"varsubsetneqq\",[10955,65024]],[\"varsupsetneq\",[8843,65024]],[\"varsupsetneqq\",[10956,65024]],[\"vartheta\",[977]],[\"vartriangleleft\",[8882]],[\"vartriangleright\",[8883]],[\"vBar\",[10984]],[\"Vbar\",[10987]],[\"vBarv\",[10985]],[\"Vcy\",[1042]],[\"vcy\",[1074]],[\"vdash\",[8866]],[\"vDash\",[8872]],[\"Vdash\",[8873]],[\"VDash\",[8875]],[\"Vdashl\",[10982]],[\"veebar\",[8891]],[\"vee\",[8744]],[\"Vee\",[8897]],[\"veeeq\",[8794]],[\"vellip\",[8942]],[\"verbar\",[124]],[\"Verbar\",[8214]],[\"vert\",[124]],[\"Vert\",[8214]],[\"VerticalBar\",[8739]],[\"VerticalLine\",[124]],[\"VerticalSeparator\",[10072]],[\"VerticalTilde\",[8768]],[\"VeryThinSpace\",[8202]],[\"Vfr\",[120089]],[\"vfr\",[120115]],[\"vltri\",[8882]],[\"vnsub\",[8834,8402]],[\"vnsup\",[8835,8402]],[\"Vopf\",[120141]],[\"vopf\",[120167]],[\"vprop\",[8733]],[\"vrtri\",[8883]],[\"Vscr\",[119985]],[\"vscr\",[120011]],[\"vsubnE\",[10955,65024]],[\"vsubne\",[8842,65024]],[\"vsupnE\",[10956,65024]],[\"vsupne\",[8843,65024]],[\"Vvdash\",[8874]],[\"vzigzag\",[10650]],[\"Wcirc\",[372]],[\"wcirc\",[373]],[\"wedbar\",[10847]],[\"wedge\",[8743]],[\"Wedge\",[8896]],[\"wedgeq\",[8793]],[\"weierp\",[8472]],[\"Wfr\",[120090]],[\"wfr\",[120116]],[\"Wopf\",[120142]],[\"wopf\",[120168]],[\"wp\",[8472]],[\"wr\",[8768]],[\"wreath\",[8768]],[\"Wscr\",[119986]],[\"wscr\",[120012]],[\"xcap\",[8898]],[\"xcirc\",[9711]],[\"xcup\",[8899]],[\"xdtri\",[9661]],[\"Xfr\",[120091]],[\"xfr\",[120117]],[\"xharr\",[10231]],[\"xhArr\",[10234]],[\"Xi\",[926]],[\"xi\",[958]],[\"xlarr\",[10229]],[\"xlArr\",[10232]],[\"xmap\",[10236]],[\"xnis\",[8955]],[\"xodot\",[10752]],[\"Xopf\",[120143]],[\"xopf\",[120169]],[\"xoplus\",[10753]],[\"xotime\",[10754]],[\"xrarr\",[10230]],[\"xrArr\",[10233]],[\"Xscr\",[119987]],[\"xscr\",[120013]],[\"xsqcup\",[10758]],[\"xuplus\",[10756]],[\"xutri\",[9651]],[\"xvee\",[8897]],[\"xwedge\",[8896]],[\"Yacute\",[221]],[\"yacute\",[253]],[\"YAcy\",[1071]],[\"yacy\",[1103]],[\"Ycirc\",[374]],[\"ycirc\",[375]],[\"Ycy\",[1067]],[\"ycy\",[1099]],[\"yen\",[165]],[\"Yfr\",[120092]],[\"yfr\",[120118]],[\"YIcy\",[1031]],[\"yicy\",[1111]],[\"Yopf\",[120144]],[\"yopf\",[120170]],[\"Yscr\",[119988]],[\"yscr\",[120014]],[\"YUcy\",[1070]],[\"yucy\",[1102]],[\"yuml\",[255]],[\"Yuml\",[376]],[\"Zacute\",[377]],[\"zacute\",[378]],[\"Zcaron\",[381]],[\"zcaron\",[382]],[\"Zcy\",[1047]],[\"zcy\",[1079]],[\"Zdot\",[379]],[\"zdot\",[380]],[\"zeetrf\",[8488]],[\"ZeroWidthSpace\",[8203]],[\"Zeta\",[918]],[\"zeta\",[950]],[\"zfr\",[120119]],[\"Zfr\",[8488]],[\"ZHcy\",[1046]],[\"zhcy\",[1078]],[\"zigrarr\",[8669]],[\"zopf\",[120171]],[\"Zopf\",[8484]],[\"Zscr\",[119989]],[\"zscr\",[120015]],[\"zwj\",[8205]],[\"zwnj\",[8204]]],u={},o={};!function(e,t){for(var n=r.length,u=[];n--;){var o,a=r[n],i=a[0],l=a[1],s=l[0],c=s<32||s>126||62===s||60===s||38===s||34===s||39===s;if(c&&(o=t[s]=t[s]||{}),l[1]){var p=l[1];e[i]=String.fromCharCode(s)+String.fromCharCode(p),u.push(c&&(o[p]=i))}else e[i]=String.fromCharCode(s),u.push(c&&(o[\"\"]=i))}}(u,o),n.prototype.decode=function(e){return e&&e.length?e.replace(/&(#?[\\w\\d]+);?/g,function(e,t){var n;if(\"#\"===t.charAt(0)){var r=\"x\"===t.charAt(1)?parseInt(t.substr(2).toLowerCase(),16):parseInt(t.substr(1));isNaN(r)||r<-32768||r>65535||(n=String.fromCharCode(r))}else n=u[t];return n||e}):\"\"},n.decode=function(e){return(new n).decode(e)},n.prototype.encode=function(e){if(!e||!e.length)return\"\";for(var t=e.length,n=\"\",r=0;r<t;){var u=o[e.charCodeAt(r)];if(u){var a=u[e.charCodeAt(r+1)];if(a?r++:a=u[\"\"],a){n+=\"&\"+a+\";\",r++;continue}}n+=e.charAt(r),r++}return n},n.encode=function(e){return(new n).encode(e)},n.prototype.encodeNonUTF=function(e){if(!e||!e.length)return\"\";for(var t=e.length,n=\"\",r=0;r<t;){var u=e.charCodeAt(r),a=o[u];if(a){var i=a[e.charCodeAt(r+1)];if(i?r++:i=a[\"\"],i){n+=\"&\"+i+\";\",r++;continue}}n+=u<32||u>126?\"&#\"+u+\";\":e.charAt(r),r++}return n},n.encodeNonUTF=function(e){return(new n).encodeNonUTF(e)},n.prototype.encodeNonASCII=function(e){if(!e||!e.length)return\"\";for(var t=e.length,n=\"\",r=0;r<t;){var u=e.charCodeAt(r);u<=255?n+=e[r++]:(n+=\"&#\"+u+\";\",r++)}return n},n.encodeNonASCII=function(e){return(new n).encodeNonASCII(e)},e.exports=n},function(e,t,n){\"use strict\";function r(e,t){e.setAttribute(\"style\",\"\");for(var n in t)t.hasOwnProperty(n)&&(e.style[n]=t[n])}n.d(t,\"a\",function(){return r})},function(e,t){!function(){\"use strict\";function t(e){return 48<=e&&e<=57}function n(e){return 48<=e&&e<=57||97<=e&&e<=102||65<=e&&e<=70}function r(e){return e>=48&&e<=55}function u(e){return 32===e||9===e||11===e||12===e||160===e||e>=5760&&d.indexOf(e)>=0}function o(e){return 10===e||13===e||8232===e||8233===e}function a(e){return e<=65535?String.fromCharCode(e):String.fromCharCode(Math.floor((e-65536)/1024)+55296)+String.fromCharCode((e-65536)%1024+56320)}function i(e){return e<128?D[e]:f.NonAsciiIdentifierStart.test(a(e))}function l(e){return e<128?h[e]:f.NonAsciiIdentifierPart.test(a(e))}function s(e){return e<128?D[e]:p.NonAsciiIdentifierStart.test(a(e))}function c(e){return e<128?h[e]:p.NonAsciiIdentifierPart.test(a(e))}var p,f,d,D,h,g;for(f={NonAsciiIdentifierStart:/[\\xAA\\xB5\\xBA\\xC0-\\xD6\\xD8-\\xF6\\xF8-\\u02C1\\u02C6-\\u02D1\\u02E0-\\u02E4\\u02EC\\u02EE\\u0370-\\u0374\\u0376\\u0377\\u037A-\\u037D\\u037F\\u0386\\u0388-\\u038A\\u038C\\u038E-\\u03A1\\u03A3-\\u03F5\\u03F7-\\u0481\\u048A-\\u052F\\u0531-\\u0556\\u0559\\u0561-\\u0587\\u05D0-\\u05EA\\u05F0-\\u05F2\\u0620-\\u064A\\u066E\\u066F\\u0671-\\u06D3\\u06D5\\u06E5\\u06E6\\u06EE\\u06EF\\u06FA-\\u06FC\\u06FF\\u0710\\u0712-\\u072F\\u074D-\\u07A5\\u07B1\\u07CA-\\u07EA\\u07F4\\u07F5\\u07FA\\u0800-\\u0815\\u081A\\u0824\\u0828\\u0840-\\u0858\\u08A0-\\u08B2\\u0904-\\u0939\\u093D\\u0950\\u0958-\\u0961\\u0971-\\u0980\\u0985-\\u098C\\u098F\\u0990\\u0993-\\u09A8\\u09AA-\\u09B0\\u09B2\\u09B6-\\u09B9\\u09BD\\u09CE\\u09DC\\u09DD\\u09DF-\\u09E1\\u09F0\\u09F1\\u0A05-\\u0A0A\\u0A0F\\u0A10\\u0A13-\\u0A28\\u0A2A-\\u0A30\\u0A32\\u0A33\\u0A35\\u0A36\\u0A38\\u0A39\\u0A59-\\u0A5C\\u0A5E\\u0A72-\\u0A74\\u0A85-\\u0A8D\\u0A8F-\\u0A91\\u0A93-\\u0AA8\\u0AAA-\\u0AB0\\u0AB2\\u0AB3\\u0AB5-\\u0AB9\\u0ABD\\u0AD0\\u0AE0\\u0AE1\\u0B05-\\u0B0C\\u0B0F\\u0B10\\u0B13-\\u0B28\\u0B2A-\\u0B30\\u0B32\\u0B33\\u0B35-\\u0B39\\u0B3D\\u0B5C\\u0B5D\\u0B5F-\\u0B61\\u0B71\\u0B83\\u0B85-\\u0B8A\\u0B8E-\\u0B90\\u0B92-\\u0B95\\u0B99\\u0B9A\\u0B9C\\u0B9E\\u0B9F\\u0BA3\\u0BA4\\u0BA8-\\u0BAA\\u0BAE-\\u0BB9\\u0BD0\\u0C05-\\u0C0C\\u0C0E-\\u0C10\\u0C12-\\u0C28\\u0C2A-\\u0C39\\u0C3D\\u0C58\\u0C59\\u0C60\\u0C61\\u0C85-\\u0C8C\\u0C8E-\\u0C90\\u0C92-\\u0CA8\\u0CAA-\\u0CB3\\u0CB5-\\u0CB9\\u0CBD\\u0CDE\\u0CE0\\u0CE1\\u0CF1\\u0CF2\\u0D05-\\u0D0C\\u0D0E-\\u0D10\\u0D12-\\u0D3A\\u0D3D\\u0D4E\\u0D60\\u0D61\\u0D7A-\\u0D7F\\u0D85-\\u0D96\\u0D9A-\\u0DB1\\u0DB3-\\u0DBB\\u0DBD\\u0DC0-\\u0DC6\\u0E01-\\u0E30\\u0E32\\u0E33\\u0E40-\\u0E46\\u0E81\\u0E82\\u0E84\\u0E87\\u0E88\\u0E8A\\u0E8D\\u0E94-\\u0E97\\u0E99-\\u0E9F\\u0EA1-\\u0EA3\\u0EA5\\u0EA7\\u0EAA\\u0EAB\\u0EAD-\\u0EB0\\u0EB2\\u0EB3\\u0EBD\\u0EC0-\\u0EC4\\u0EC6\\u0EDC-\\u0EDF\\u0F00\\u0F40-\\u0F47\\u0F49-\\u0F6C\\u0F88-\\u0F8C\\u1000-\\u102A\\u103F\\u1050-\\u1055\\u105A-\\u105D\\u1061\\u1065\\u1066\\u106E-\\u1070\\u1075-\\u1081\\u108E\\u10A0-\\u10C5\\u10C7\\u10CD\\u10D0-\\u10FA\\u10FC-\\u1248\\u124A-\\u124D\\u1250-\\u1256\\u1258\\u125A-\\u125D\\u1260-\\u1288\\u128A-\\u128D\\u1290-\\u12B0\\u12B2-\\u12B5\\u12B8-\\u12BE\\u12C0\\u12C2-\\u12C5\\u12C8-\\u12D6\\u12D8-\\u1310\\u1312-\\u1315\\u1318-\\u135A\\u1380-\\u138F\\u13A0-\\u13F4\\u1401-\\u166C\\u166F-\\u167F\\u1681-\\u169A\\u16A0-\\u16EA\\u16EE-\\u16F8\\u1700-\\u170C\\u170E-\\u1711\\u1720-\\u1731\\u1740-\\u1751\\u1760-\\u176C\\u176E-\\u1770\\u1780-\\u17B3\\u17D7\\u17DC\\u1820-\\u1877\\u1880-\\u18A8\\u18AA\\u18B0-\\u18F5\\u1900-\\u191E\\u1950-\\u196D\\u1970-\\u1974\\u1980-\\u19AB\\u19C1-\\u19C7\\u1A00-\\u1A16\\u1A20-\\u1A54\\u1AA7\\u1B05-\\u1B33\\u1B45-\\u1B4B\\u1B83-\\u1BA0\\u1BAE\\u1BAF\\u1BBA-\\u1BE5\\u1C00-\\u1C23\\u1C4D-\\u1C4F\\u1C5A-\\u1C7D\\u1CE9-\\u1CEC\\u1CEE-\\u1CF1\\u1CF5\\u1CF6\\u1D00-\\u1DBF\\u1E00-\\u1F15\\u1F18-\\u1F1D\\u1F20-\\u1F45\\u1F48-\\u1F4D\\u1F50-\\u1F57\\u1F59\\u1F5B\\u1F5D\\u1F5F-\\u1F7D\\u1F80-\\u1FB4\\u1FB6-\\u1FBC\\u1FBE\\u1FC2-\\u1FC4\\u1FC6-\\u1FCC\\u1FD0-\\u1FD3\\u1FD6-\\u1FDB\\u1FE0-\\u1FEC\\u1FF2-\\u1FF4\\u1FF6-\\u1FFC\\u2071\\u207F\\u2090-\\u209C\\u2102\\u2107\\u210A-\\u2113\\u2115\\u2119-\\u211D\\u2124\\u2126\\u2128\\u212A-\\u212D\\u212F-\\u2139\\u213C-\\u213F\\u2145-\\u2149\\u214E\\u2160-\\u2188\\u2C00-\\u2C2E\\u2C30-\\u2C5E\\u2C60-\\u2CE4\\u2CEB-\\u2CEE\\u2CF2\\u2CF3\\u2D00-\\u2D25\\u2D27\\u2D2D\\u2D30-\\u2D67\\u2D6F\\u2D80-\\u2D96\\u2DA0-\\u2DA6\\u2DA8-\\u2DAE\\u2DB0-\\u2DB6\\u2DB8-\\u2DBE\\u2DC0-\\u2DC6\\u2DC8-\\u2DCE\\u2DD0-\\u2DD6\\u2DD8-\\u2DDE\\u2E2F\\u3005-\\u3007\\u3021-\\u3029\\u3031-\\u3035\\u3038-\\u303C\\u3041-\\u3096\\u309D-\\u309F\\u30A1-\\u30FA\\u30FC-\\u30FF\\u3105-\\u312D\\u3131-\\u318E\\u31A0-\\u31BA\\u31F0-\\u31FF\\u3400-\\u4DB5\\u4E00-\\u9FCC\\uA000-\\uA48C\\uA4D0-\\uA4FD\\uA500-\\uA60C\\uA610-\\uA61F\\uA62A\\uA62B\\uA640-\\uA66E\\uA67F-\\uA69D\\uA6A0-\\uA6EF\\uA717-\\uA71F\\uA722-\\uA788\\uA78B-\\uA78E\\uA790-\\uA7AD\\uA7B0\\uA7B1\\uA7F7-\\uA801\\uA803-\\uA805\\uA807-\\uA80A\\uA80C-\\uA822\\uA840-\\uA873\\uA882-\\uA8B3\\uA8F2-\\uA8F7\\uA8FB\\uA90A-\\uA925\\uA930-\\uA946\\uA960-\\uA97C\\uA984-\\uA9B2\\uA9CF\\uA9E0-\\uA9E4\\uA9E6-\\uA9EF\\uA9FA-\\uA9FE\\uAA00-\\uAA28\\uAA40-\\uAA42\\uAA44-\\uAA4B\\uAA60-\\uAA76\\uAA7A\\uAA7E-\\uAAAF\\uAAB1\\uAAB5\\uAAB6\\uAAB9-\\uAABD\\uAAC0\\uAAC2\\uAADB-\\uAADD\\uAAE0-\\uAAEA\\uAAF2-\\uAAF4\\uAB01-\\uAB06\\uAB09-\\uAB0E\\uAB11-\\uAB16\\uAB20-\\uAB26\\uAB28-\\uAB2E\\uAB30-\\uAB5A\\uAB5C-\\uAB5F\\uAB64\\uAB65\\uABC0-\\uABE2\\uAC00-\\uD7A3\\uD7B0-\\uD7C6\\uD7CB-\\uD7FB\\uF900-\\uFA6D\\uFA70-\\uFAD9\\uFB00-\\uFB06\\uFB13-\\uFB17\\uFB1D\\uFB1F-\\uFB28\\uFB2A-\\uFB36\\uFB38-\\uFB3C\\uFB3E\\uFB40\\uFB41\\uFB43\\uFB44\\uFB46-\\uFBB1\\uFBD3-\\uFD3D\\uFD50-\\uFD8F\\uFD92-\\uFDC7\\uFDF0-\\uFDFB\\uFE70-\\uFE74\\uFE76-\\uFEFC\\uFF21-\\uFF3A\\uFF41-\\uFF5A\\uFF66-\\uFFBE\\uFFC2-\\uFFC7\\uFFCA-\\uFFCF\\uFFD2-\\uFFD7\\uFFDA-\\uFFDC]/,NonAsciiIdentifierPart:/[\\xAA\\xB5\\xBA\\xC0-\\xD6\\xD8-\\xF6\\xF8-\\u02C1\\u02C6-\\u02D1\\u02E0-\\u02E4\\u02EC\\u02EE\\u0300-\\u0374\\u0376\\u0377\\u037A-\\u037D\\u037F\\u0386\\u0388-\\u038A\\u038C\\u038E-\\u03A1\\u03A3-\\u03F5\\u03F7-\\u0481\\u0483-\\u0487\\u048A-\\u052F\\u0531-\\u0556\\u0559\\u0561-\\u0587\\u0591-\\u05BD\\u05BF\\u05C1\\u05C2\\u05C4\\u05C5\\u05C7\\u05D0-\\u05EA\\u05F0-\\u05F2\\u0610-\\u061A\\u0620-\\u0669\\u066E-\\u06D3\\u06D5-\\u06DC\\u06DF-\\u06E8\\u06EA-\\u06FC\\u06FF\\u0710-\\u074A\\u074D-\\u07B1\\u07C0-\\u07F5\\u07FA\\u0800-\\u082D\\u0840-\\u085B\\u08A0-\\u08B2\\u08E4-\\u0963\\u0966-\\u096F\\u0971-\\u0983\\u0985-\\u098C\\u098F\\u0990\\u0993-\\u09A8\\u09AA-\\u09B0\\u09B2\\u09B6-\\u09B9\\u09BC-\\u09C4\\u09C7\\u09C8\\u09CB-\\u09CE\\u09D7\\u09DC\\u09DD\\u09DF-\\u09E3\\u09E6-\\u09F1\\u0A01-\\u0A03\\u0A05-\\u0A0A\\u0A0F\\u0A10\\u0A13-\\u0A28\\u0A2A-\\u0A30\\u0A32\\u0A33\\u0A35\\u0A36\\u0A38\\u0A39\\u0A3C\\u0A3E-\\u0A42\\u0A47\\u0A48\\u0A4B-\\u0A4D\\u0A51\\u0A59-\\u0A5C\\u0A5E\\u0A66-\\u0A75\\u0A81-\\u0A83\\u0A85-\\u0A8D\\u0A8F-\\u0A91\\u0A93-\\u0AA8\\u0AAA-\\u0AB0\\u0AB2\\u0AB3\\u0AB5-\\u0AB9\\u0ABC-\\u0AC5\\u0AC7-\\u0AC9\\u0ACB-\\u0ACD\\u0AD0\\u0AE0-\\u0AE3\\u0AE6-\\u0AEF\\u0B01-\\u0B03\\u0B05-\\u0B0C\\u0B0F\\u0B10\\u0B13-\\u0B28\\u0B2A-\\u0B30\\u0B32\\u0B33\\u0B35-\\u0B39\\u0B3C-\\u0B44\\u0B47\\u0B48\\u0B4B-\\u0B4D\\u0B56\\u0B57\\u0B5C\\u0B5D\\u0B5F-\\u0B63\\u0B66-\\u0B6F\\u0B71\\u0B82\\u0B83\\u0B85-\\u0B8A\\u0B8E-\\u0B90\\u0B92-\\u0B95\\u0B99\\u0B9A\\u0B9C\\u0B9E\\u0B9F\\u0BA3\\u0BA4\\u0BA8-\\u0BAA\\u0BAE-\\u0BB9\\u0BBE-\\u0BC2\\u0BC6-\\u0BC8\\u0BCA-\\u0BCD\\u0BD0\\u0BD7\\u0BE6-\\u0BEF\\u0C00-\\u0C03\\u0C05-\\u0C0C\\u0C0E-\\u0C10\\u0C12-\\u0C28\\u0C2A-\\u0C39\\u0C3D-\\u0C44\\u0C46-\\u0C48\\u0C4A-\\u0C4D\\u0C55\\u0C56\\u0C58\\u0C59\\u0C60-\\u0C63\\u0C66-\\u0C6F\\u0C81-\\u0C83\\u0C85-\\u0C8C\\u0C8E-\\u0C90\\u0C92-\\u0CA8\\u0CAA-\\u0CB3\\u0CB5-\\u0CB9\\u0CBC-\\u0CC4\\u0CC6-\\u0CC8\\u0CCA-\\u0CCD\\u0CD5\\u0CD6\\u0CDE\\u0CE0-\\u0CE3\\u0CE6-\\u0CEF\\u0CF1\\u0CF2\\u0D01-\\u0D03\\u0D05-\\u0D0C\\u0D0E-\\u0D10\\u0D12-\\u0D3A\\u0D3D-\\u0D44\\u0D46-\\u0D48\\u0D4A-\\u0D4E\\u0D57\\u0D60-\\u0D63\\u0D66-\\u0D6F\\u0D7A-\\u0D7F\\u0D82\\u0D83\\u0D85-\\u0D96\\u0D9A-\\u0DB1\\u0DB3-\\u0DBB\\u0DBD\\u0DC0-\\u0DC6\\u0DCA\\u0DCF-\\u0DD4\\u0DD6\\u0DD8-\\u0DDF\\u0DE6-\\u0DEF\\u0DF2\\u0DF3\\u0E01-\\u0E3A\\u0E40-\\u0E4E\\u0E50-\\u0E59\\u0E81\\u0E82\\u0E84\\u0E87\\u0E88\\u0E8A\\u0E8D\\u0E94-\\u0E97\\u0E99-\\u0E9F\\u0EA1-\\u0EA3\\u0EA5\\u0EA7\\u0EAA\\u0EAB\\u0EAD-\\u0EB9\\u0EBB-\\u0EBD\\u0EC0-\\u0EC4\\u0EC6\\u0EC8-\\u0ECD\\u0ED0-\\u0ED9\\u0EDC-\\u0EDF\\u0F00\\u0F18\\u0F19\\u0F20-\\u0F29\\u0F35\\u0F37\\u0F39\\u0F3E-\\u0F47\\u0F49-\\u0F6C\\u0F71-\\u0F84\\u0F86-\\u0F97\\u0F99-\\u0FBC\\u0FC6\\u1000-\\u1049\\u1050-\\u109D\\u10A0-\\u10C5\\u10C7\\u10CD\\u10D0-\\u10FA\\u10FC-\\u1248\\u124A-\\u124D\\u1250-\\u1256\\u1258\\u125A-\\u125D\\u1260-\\u1288\\u128A-\\u128D\\u1290-\\u12B0\\u12B2-\\u12B5\\u12B8-\\u12BE\\u12C0\\u12C2-\\u12C5\\u12C8-\\u12D6\\u12D8-\\u1310\\u1312-\\u1315\\u1318-\\u135A\\u135D-\\u135F\\u1380-\\u138F\\u13A0-\\u13F4\\u1401-\\u166C\\u166F-\\u167F\\u1681-\\u169A\\u16A0-\\u16EA\\u16EE-\\u16F8\\u1700-\\u170C\\u170E-\\u1714\\u1720-\\u1734\\u1740-\\u1753\\u1760-\\u176C\\u176E-\\u1770\\u1772\\u1773\\u1780-\\u17D3\\u17D7\\u17DC\\u17DD\\u17E0-\\u17E9\\u180B-\\u180D\\u1810-\\u1819\\u1820-\\u1877\\u1880-\\u18AA\\u18B0-\\u18F5\\u1900-\\u191E\\u1920-\\u192B\\u1930-\\u193B\\u1946-\\u196D\\u1970-\\u1974\\u1980-\\u19AB\\u19B0-\\u19C9\\u19D0-\\u19D9\\u1A00-\\u1A1B\\u1A20-\\u1A5E\\u1A60-\\u1A7C\\u1A7F-\\u1A89\\u1A90-\\u1A99\\u1AA7\\u1AB0-\\u1ABD\\u1B00-\\u1B4B\\u1B50-\\u1B59\\u1B6B-\\u1B73\\u1B80-\\u1BF3\\u1C00-\\u1C37\\u1C40-\\u1C49\\u1C4D-\\u1C7D\\u1CD0-\\u1CD2\\u1CD4-\\u1CF6\\u1CF8\\u1CF9\\u1D00-\\u1DF5\\u1DFC-\\u1F15\\u1F18-\\u1F1D\\u1F20-\\u1F45\\u1F48-\\u1F4D\\u1F50-\\u1F57\\u1F59\\u1F5B\\u1F5D\\u1F5F-\\u1F7D\\u1F80-\\u1FB4\\u1FB6-\\u1FBC\\u1FBE\\u1FC2-\\u1FC4\\u1FC6-\\u1FCC\\u1FD0-\\u1FD3\\u1FD6-\\u1FDB\\u1FE0-\\u1FEC\\u1FF2-\\u1FF4\\u1FF6-\\u1FFC\\u200C\\u200D\\u203F\\u2040\\u2054\\u2071\\u207F\\u2090-\\u209C\\u20D0-\\u20DC\\u20E1\\u20E5-\\u20F0\\u2102\\u2107\\u210A-\\u2113\\u2115\\u2119-\\u211D\\u2124\\u2126\\u2128\\u212A-\\u212D\\u212F-\\u2139\\u213C-\\u213F\\u2145-\\u2149\\u214E\\u2160-\\u2188\\u2C00-\\u2C2E\\u2C30-\\u2C5E\\u2C60-\\u2CE4\\u2CEB-\\u2CF3\\u2D00-\\u2D25\\u2D27\\u2D2D\\u2D30-\\u2D67\\u2D6F\\u2D7F-\\u2D96\\u2DA0-\\u2DA6\\u2DA8-\\u2DAE\\u2DB0-\\u2DB6\\u2DB8-\\u2DBE\\u2DC0-\\u2DC6\\u2DC8-\\u2DCE\\u2DD0-\\u2DD6\\u2DD8-\\u2DDE\\u2DE0-\\u2DFF\\u2E2F\\u3005-\\u3007\\u3021-\\u302F\\u3031-\\u3035\\u3038-\\u303C\\u3041-\\u3096\\u3099\\u309A\\u309D-\\u309F\\u30A1-\\u30FA\\u30FC-\\u30FF\\u3105-\\u312D\\u3131-\\u318E\\u31A0-\\u31BA\\u31F0-\\u31FF\\u3400-\\u4DB5\\u4E00-\\u9FCC\\uA000-\\uA48C\\uA4D0-\\uA4FD\\uA500-\\uA60C\\uA610-\\uA62B\\uA640-\\uA66F\\uA674-\\uA67D\\uA67F-\\uA69D\\uA69F-\\uA6F1\\uA717-\\uA71F\\uA722-\\uA788\\uA78B-\\uA78E\\uA790-\\uA7AD\\uA7B0\\uA7B1\\uA7F7-\\uA827\\uA840-\\uA873\\uA880-\\uA8C4\\uA8D0-\\uA8D9\\uA8E0-\\uA8F7\\uA8FB\\uA900-\\uA92D\\uA930-\\uA953\\uA960-\\uA97C\\uA980-\\uA9C0\\uA9CF-\\uA9D9\\uA9E0-\\uA9FE\\uAA00-\\uAA36\\uAA40-\\uAA4D\\uAA50-\\uAA59\\uAA60-\\uAA76\\uAA7A-\\uAAC2\\uAADB-\\uAADD\\uAAE0-\\uAAEF\\uAAF2-\\uAAF6\\uAB01-\\uAB06\\uAB09-\\uAB0E\\uAB11-\\uAB16\\uAB20-\\uAB26\\uAB28-\\uAB2E\\uAB30-\\uAB5A\\uAB5C-\\uAB5F\\uAB64\\uAB65\\uABC0-\\uABEA\\uABEC\\uABED\\uABF0-\\uABF9\\uAC00-\\uD7A3\\uD7B0-\\uD7C6\\uD7CB-\\uD7FB\\uF900-\\uFA6D\\uFA70-\\uFAD9\\uFB00-\\uFB06\\uFB13-\\uFB17\\uFB1D-\\uFB28\\uFB2A-\\uFB36\\uFB38-\\uFB3C\\uFB3E\\uFB40\\uFB41\\uFB43\\uFB44\\uFB46-\\uFBB1\\uFBD3-\\uFD3D\\uFD50-\\uFD8F\\uFD92-\\uFDC7\\uFDF0-\\uFDFB\\uFE00-\\uFE0F\\uFE20-\\uFE2D\\uFE33\\uFE34\\uFE4D-\\uFE4F\\uFE70-\\uFE74\\uFE76-\\uFEFC\\uFF10-\\uFF19\\uFF21-\\uFF3A\\uFF3F\\uFF41-\\uFF5A\\uFF66-\\uFFBE\\uFFC2-\\uFFC7\\uFFCA-\\uFFCF\\uFFD2-\\uFFD7\\uFFDA-\\uFFDC]/},p={NonAsciiIdentifierStart:/[\\xAA\\xB5\\xBA\\xC0-\\xD6\\xD8-\\xF6\\xF8-\\u02C1\\u02C6-\\u02D1\\u02E0-\\u02E4\\u02EC\\u02EE\\u0370-\\u0374\\u0376\\u0377\\u037A-\\u037D\\u037F\\u0386\\u0388-\\u038A\\u038C\\u038E-\\u03A1\\u03A3-\\u03F5\\u03F7-\\u0481\\u048A-\\u052F\\u0531-\\u0556\\u0559\\u0561-\\u0587\\u05D0-\\u05EA\\u05F0-\\u05F2\\u0620-\\u064A\\u066E\\u066F\\u0671-\\u06D3\\u06D5\\u06E5\\u06E6\\u06EE\\u06EF\\u06FA-\\u06FC\\u06FF\\u0710\\u0712-\\u072F\\u074D-\\u07A5\\u07B1\\u07CA-\\u07EA\\u07F4\\u07F5\\u07FA\\u0800-\\u0815\\u081A\\u0824\\u0828\\u0840-\\u0858\\u08A0-\\u08B2\\u0904-\\u0939\\u093D\\u0950\\u0958-\\u0961\\u0971-\\u0980\\u0985-\\u098C\\u098F\\u0990\\u0993-\\u09A8\\u09AA-\\u09B0\\u09B2\\u09B6-\\u09B9\\u09BD\\u09CE\\u09DC\\u09DD\\u09DF-\\u09E1\\u09F0\\u09F1\\u0A05-\\u0A0A\\u0A0F\\u0A10\\u0A13-\\u0A28\\u0A2A-\\u0A30\\u0A32\\u0A33\\u0A35\\u0A36\\u0A38\\u0A39\\u0A59-\\u0A5C\\u0A5E\\u0A72-\\u0A74\\u0A85-\\u0A8D\\u0A8F-\\u0A91\\u0A93-\\u0AA8\\u0AAA-\\u0AB0\\u0AB2\\u0AB3\\u0AB5-\\u0AB9\\u0ABD\\u0AD0\\u0AE0\\u0AE1\\u0B05-\\u0B0C\\u0B0F\\u0B10\\u0B13-\\u0B28\\u0B2A-\\u0B30\\u0B32\\u0B33\\u0B35-\\u0B39\\u0B3D\\u0B5C\\u0B5D\\u0B5F-\\u0B61\\u0B71\\u0B83\\u0B85-\\u0B8A\\u0B8E-\\u0B90\\u0B92-\\u0B95\\u0B99\\u0B9A\\u0B9C\\u0B9E\\u0B9F\\u0BA3\\u0BA4\\u0BA8-\\u0BAA\\u0BAE-\\u0BB9\\u0BD0\\u0C05-\\u0C0C\\u0C0E-\\u0C10\\u0C12-\\u0C28\\u0C2A-\\u0C39\\u0C3D\\u0C58\\u0C59\\u0C60\\u0C61\\u0C85-\\u0C8C\\u0C8E-\\u0C90\\u0C92-\\u0CA8\\u0CAA-\\u0CB3\\u0CB5-\\u0CB9\\u0CBD\\u0CDE\\u0CE0\\u0CE1\\u0CF1\\u0CF2\\u0D05-\\u0D0C\\u0D0E-\\u0D10\\u0D12-\\u0D3A\\u0D3D\\u0D4E\\u0D60\\u0D61\\u0D7A-\\u0D7F\\u0D85-\\u0D96\\u0D9A-\\u0DB1\\u0DB3-\\u0DBB\\u0DBD\\u0DC0-\\u0DC6\\u0E01-\\u0E30\\u0E32\\u0E33\\u0E40-\\u0E46\\u0E81\\u0E82\\u0E84\\u0E87\\u0E88\\u0E8A\\u0E8D\\u0E94-\\u0E97\\u0E99-\\u0E9F\\u0EA1-\\u0EA3\\u0EA5\\u0EA7\\u0EAA\\u0EAB\\u0EAD-\\u0EB0\\u0EB2\\u0EB3\\u0EBD\\u0EC0-\\u0EC4\\u0EC6\\u0EDC-\\u0EDF\\u0F00\\u0F40-\\u0F47\\u0F49-\\u0F6C\\u0F88-\\u0F8C\\u1000-\\u102A\\u103F\\u1050-\\u1055\\u105A-\\u105D\\u1061\\u1065\\u1066\\u106E-\\u1070\\u1075-\\u1081\\u108E\\u10A0-\\u10C5\\u10C7\\u10CD\\u10D0-\\u10FA\\u10FC-\\u1248\\u124A-\\u124D\\u1250-\\u1256\\u1258\\u125A-\\u125D\\u1260-\\u1288\\u128A-\\u128D\\u1290-\\u12B0\\u12B2-\\u12B5\\u12B8-\\u12BE\\u12C0\\u12C2-\\u12C5\\u12C8-\\u12D6\\u12D8-\\u1310\\u1312-\\u1315\\u1318-\\u135A\\u1380-\\u138F\\u13A0-\\u13F4\\u1401-\\u166C\\u166F-\\u167F\\u1681-\\u169A\\u16A0-\\u16EA\\u16EE-\\u16F8\\u1700-\\u170C\\u170E-\\u1711\\u1720-\\u1731\\u1740-\\u1751\\u1760-\\u176C\\u176E-\\u1770\\u1780-\\u17B3\\u17D7\\u17DC\\u1820-\\u1877\\u1880-\\u18A8\\u18AA\\u18B0-\\u18F5\\u1900-\\u191E\\u1950-\\u196D\\u1970-\\u1974\\u1980-\\u19AB\\u19C1-\\u19C7\\u1A00-\\u1A16\\u1A20-\\u1A54\\u1AA7\\u1B05-\\u1B33\\u1B45-\\u1B4B\\u1B83-\\u1BA0\\u1BAE\\u1BAF\\u1BBA-\\u1BE5\\u1C00-\\u1C23\\u1C4D-\\u1C4F\\u1C5A-\\u1C7D\\u1CE9-\\u1CEC\\u1CEE-\\u1CF1\\u1CF5\\u1CF6\\u1D00-\\u1DBF\\u1E00-\\u1F15\\u1F18-\\u1F1D\\u1F20-\\u1F45\\u1F48-\\u1F4D\\u1F50-\\u1F57\\u1F59\\u1F5B\\u1F5D\\u1F5F-\\u1F7D\\u1F80-\\u1FB4\\u1FB6-\\u1FBC\\u1FBE\\u1FC2-\\u1FC4\\u1FC6-\\u1FCC\\u1FD0-\\u1FD3\\u1FD6-\\u1FDB\\u1FE0-\\u1FEC\\u1FF2-\\u1FF4\\u1FF6-\\u1FFC\\u2071\\u207F\\u2090-\\u209C\\u2102\\u2107\\u210A-\\u2113\\u2115\\u2118-\\u211D\\u2124\\u2126\\u2128\\u212A-\\u2139\\u213C-\\u213F\\u2145-\\u2149\\u214E\\u2160-\\u2188\\u2C00-\\u2C2E\\u2C30-\\u2C5E\\u2C60-\\u2CE4\\u2CEB-\\u2CEE\\u2CF2\\u2CF3\\u2D00-\\u2D25\\u2D27\\u2D2D\\u2D30-\\u2D67\\u2D6F\\u2D80-\\u2D96\\u2DA0-\\u2DA6\\u2DA8-\\u2DAE\\u2DB0-\\u2DB6\\u2DB8-\\u2DBE\\u2DC0-\\u2DC6\\u2DC8-\\u2DCE\\u2DD0-\\u2DD6\\u2DD8-\\u2DDE\\u3005-\\u3007\\u3021-\\u3029\\u3031-\\u3035\\u3038-\\u303C\\u3041-\\u3096\\u309B-\\u309F\\u30A1-\\u30FA\\u30FC-\\u30FF\\u3105-\\u312D\\u3131-\\u318E\\u31A0-\\u31BA\\u31F0-\\u31FF\\u3400-\\u4DB5\\u4E00-\\u9FCC\\uA000-\\uA48C\\uA4D0-\\uA4FD\\uA500-\\uA60C\\uA610-\\uA61F\\uA62A\\uA62B\\uA640-\\uA66E\\uA67F-\\uA69D\\uA6A0-\\uA6EF\\uA717-\\uA71F\\uA722-\\uA788\\uA78B-\\uA78E\\uA790-\\uA7AD\\uA7B0\\uA7B1\\uA7F7-\\uA801\\uA803-\\uA805\\uA807-\\uA80A\\uA80C-\\uA822\\uA840-\\uA873\\uA882-\\uA8B3\\uA8F2-\\uA8F7\\uA8FB\\uA90A-\\uA925\\uA930-\\uA946\\uA960-\\uA97C\\uA984-\\uA9B2\\uA9CF\\uA9E0-\\uA9E4\\uA9E6-\\uA9EF\\uA9FA-\\uA9FE\\uAA00-\\uAA28\\uAA40-\\uAA42\\uAA44-\\uAA4B\\uAA60-\\uAA76\\uAA7A\\uAA7E-\\uAAAF\\uAAB1\\uAAB5\\uAAB6\\uAAB9-\\uAABD\\uAAC0\\uAAC2\\uAADB-\\uAADD\\uAAE0-\\uAAEA\\uAAF2-\\uAAF4\\uAB01-\\uAB06\\uAB09-\\uAB0E\\uAB11-\\uAB16\\uAB20-\\uAB26\\uAB28-\\uAB2E\\uAB30-\\uAB5A\\uAB5C-\\uAB5F\\uAB64\\uAB65\\uABC0-\\uABE2\\uAC00-\\uD7A3\\uD7B0-\\uD7C6\\uD7CB-\\uD7FB\\uF900-\\uFA6D\\uFA70-\\uFAD9\\uFB00-\\uFB06\\uFB13-\\uFB17\\uFB1D\\uFB1F-\\uFB28\\uFB2A-\\uFB36\\uFB38-\\uFB3C\\uFB3E\\uFB40\\uFB41\\uFB43\\uFB44\\uFB46-\\uFBB1\\uFBD3-\\uFD3D\\uFD50-\\uFD8F\\uFD92-\\uFDC7\\uFDF0-\\uFDFB\\uFE70-\\uFE74\\uFE76-\\uFEFC\\uFF21-\\uFF3A\\uFF41-\\uFF5A\\uFF66-\\uFFBE\\uFFC2-\\uFFC7\\uFFCA-\\uFFCF\\uFFD2-\\uFFD7\\uFFDA-\\uFFDC]|\\uD800[\\uDC00-\\uDC0B\\uDC0D-\\uDC26\\uDC28-\\uDC3A\\uDC3C\\uDC3D\\uDC3F-\\uDC4D\\uDC50-\\uDC5D\\uDC80-\\uDCFA\\uDD40-\\uDD74\\uDE80-\\uDE9C\\uDEA0-\\uDED0\\uDF00-\\uDF1F\\uDF30-\\uDF4A\\uDF50-\\uDF75\\uDF80-\\uDF9D\\uDFA0-\\uDFC3\\uDFC8-\\uDFCF\\uDFD1-\\uDFD5]|\\uD801[\\uDC00-\\uDC9D\\uDD00-\\uDD27\\uDD30-\\uDD63\\uDE00-\\uDF36\\uDF40-\\uDF55\\uDF60-\\uDF67]|\\uD802[\\uDC00-\\uDC05\\uDC08\\uDC0A-\\uDC35\\uDC37\\uDC38\\uDC3C\\uDC3F-\\uDC55\\uDC60-\\uDC76\\uDC80-\\uDC9E\\uDD00-\\uDD15\\uDD20-\\uDD39\\uDD80-\\uDDB7\\uDDBE\\uDDBF\\uDE00\\uDE10-\\uDE13\\uDE15-\\uDE17\\uDE19-\\uDE33\\uDE60-\\uDE7C\\uDE80-\\uDE9C\\uDEC0-\\uDEC7\\uDEC9-\\uDEE4\\uDF00-\\uDF35\\uDF40-\\uDF55\\uDF60-\\uDF72\\uDF80-\\uDF91]|\\uD803[\\uDC00-\\uDC48]|\\uD804[\\uDC03-\\uDC37\\uDC83-\\uDCAF\\uDCD0-\\uDCE8\\uDD03-\\uDD26\\uDD50-\\uDD72\\uDD76\\uDD83-\\uDDB2\\uDDC1-\\uDDC4\\uDDDA\\uDE00-\\uDE11\\uDE13-\\uDE2B\\uDEB0-\\uDEDE\\uDF05-\\uDF0C\\uDF0F\\uDF10\\uDF13-\\uDF28\\uDF2A-\\uDF30\\uDF32\\uDF33\\uDF35-\\uDF39\\uDF3D\\uDF5D-\\uDF61]|\\uD805[\\uDC80-\\uDCAF\\uDCC4\\uDCC5\\uDCC7\\uDD80-\\uDDAE\\uDE00-\\uDE2F\\uDE44\\uDE80-\\uDEAA]|\\uD806[\\uDCA0-\\uDCDF\\uDCFF\\uDEC0-\\uDEF8]|\\uD808[\\uDC00-\\uDF98]|\\uD809[\\uDC00-\\uDC6E]|[\\uD80C\\uD840-\\uD868\\uD86A-\\uD86C][\\uDC00-\\uDFFF]|\\uD80D[\\uDC00-\\uDC2E]|\\uD81A[\\uDC00-\\uDE38\\uDE40-\\uDE5E\\uDED0-\\uDEED\\uDF00-\\uDF2F\\uDF40-\\uDF43\\uDF63-\\uDF77\\uDF7D-\\uDF8F]|\\uD81B[\\uDF00-\\uDF44\\uDF50\\uDF93-\\uDF9F]|\\uD82C[\\uDC00\\uDC01]|\\uD82F[\\uDC00-\\uDC6A\\uDC70-\\uDC7C\\uDC80-\\uDC88\\uDC90-\\uDC99]|\\uD835[\\uDC00-\\uDC54\\uDC56-\\uDC9C\\uDC9E\\uDC9F\\uDCA2\\uDCA5\\uDCA6\\uDCA9-\\uDCAC\\uDCAE-\\uDCB9\\uDCBB\\uDCBD-\\uDCC3\\uDCC5-\\uDD05\\uDD07-\\uDD0A\\uDD0D-\\uDD14\\uDD16-\\uDD1C\\uDD1E-\\uDD39\\uDD3B-\\uDD3E\\uDD40-\\uDD44\\uDD46\\uDD4A-\\uDD50\\uDD52-\\uDEA5\\uDEA8-\\uDEC0\\uDEC2-\\uDEDA\\uDEDC-\\uDEFA\\uDEFC-\\uDF14\\uDF16-\\uDF34\\uDF36-\\uDF4E\\uDF50-\\uDF6E\\uDF70-\\uDF88\\uDF8A-\\uDFA8\\uDFAA-\\uDFC2\\uDFC4-\\uDFCB]|\\uD83A[\\uDC00-\\uDCC4]|\\uD83B[\\uDE00-\\uDE03\\uDE05-\\uDE1F\\uDE21\\uDE22\\uDE24\\uDE27\\uDE29-\\uDE32\\uDE34-\\uDE37\\uDE39\\uDE3B\\uDE42\\uDE47\\uDE49\\uDE4B\\uDE4D-\\uDE4F\\uDE51\\uDE52\\uDE54\\uDE57\\uDE59\\uDE5B\\uDE5D\\uDE5F\\uDE61\\uDE62\\uDE64\\uDE67-\\uDE6A\\uDE6C-\\uDE72\\uDE74-\\uDE77\\uDE79-\\uDE7C\\uDE7E\\uDE80-\\uDE89\\uDE8B-\\uDE9B\\uDEA1-\\uDEA3\\uDEA5-\\uDEA9\\uDEAB-\\uDEBB]|\\uD869[\\uDC00-\\uDED6\\uDF00-\\uDFFF]|\\uD86D[\\uDC00-\\uDF34\\uDF40-\\uDFFF]|\\uD86E[\\uDC00-\\uDC1D]|\\uD87E[\\uDC00-\\uDE1D]/,NonAsciiIdentifierPart:/[\\xAA\\xB5\\xB7\\xBA\\xC0-\\xD6\\xD8-\\xF6\\xF8-\\u02C1\\u02C6-\\u02D1\\u02E0-\\u02E4\\u02EC\\u02EE\\u0300-\\u0374\\u0376\\u0377\\u037A-\\u037D\\u037F\\u0386-\\u038A\\u038C\\u038E-\\u03A1\\u03A3-\\u03F5\\u03F7-\\u0481\\u0483-\\u0487\\u048A-\\u052F\\u0531-\\u0556\\u0559\\u0561-\\u0587\\u0591-\\u05BD\\u05BF\\u05C1\\u05C2\\u05C4\\u05C5\\u05C7\\u05D0-\\u05EA\\u05F0-\\u05F2\\u0610-\\u061A\\u0620-\\u0669\\u066E-\\u06D3\\u06D5-\\u06DC\\u06DF-\\u06E8\\u06EA-\\u06FC\\u06FF\\u0710-\\u074A\\u074D-\\u07B1\\u07C0-\\u07F5\\u07FA\\u0800-\\u082D\\u0840-\\u085B\\u08A0-\\u08B2\\u08E4-\\u0963\\u0966-\\u096F\\u0971-\\u0983\\u0985-\\u098C\\u098F\\u0990\\u0993-\\u09A8\\u09AA-\\u09B0\\u09B2\\u09B6-\\u09B9\\u09BC-\\u09C4\\u09C7\\u09C8\\u09CB-\\u09CE\\u09D7\\u09DC\\u09DD\\u09DF-\\u09E3\\u09E6-\\u09F1\\u0A01-\\u0A03\\u0A05-\\u0A0A\\u0A0F\\u0A10\\u0A13-\\u0A28\\u0A2A-\\u0A30\\u0A32\\u0A33\\u0A35\\u0A36\\u0A38\\u0A39\\u0A3C\\u0A3E-\\u0A42\\u0A47\\u0A48\\u0A4B-\\u0A4D\\u0A51\\u0A59-\\u0A5C\\u0A5E\\u0A66-\\u0A75\\u0A81-\\u0A83\\u0A85-\\u0A8D\\u0A8F-\\u0A91\\u0A93-\\u0AA8\\u0AAA-\\u0AB0\\u0AB2\\u0AB3\\u0AB5-\\u0AB9\\u0ABC-\\u0AC5\\u0AC7-\\u0AC9\\u0ACB-\\u0ACD\\u0AD0\\u0AE0-\\u0AE3\\u0AE6-\\u0AEF\\u0B01-\\u0B03\\u0B05-\\u0B0C\\u0B0F\\u0B10\\u0B13-\\u0B28\\u0B2A-\\u0B30\\u0B32\\u0B33\\u0B35-\\u0B39\\u0B3C-\\u0B44\\u0B47\\u0B48\\u0B4B-\\u0B4D\\u0B56\\u0B57\\u0B5C\\u0B5D\\u0B5F-\\u0B63\\u0B66-\\u0B6F\\u0B71\\u0B82\\u0B83\\u0B85-\\u0B8A\\u0B8E-\\u0B90\\u0B92-\\u0B95\\u0B99\\u0B9A\\u0B9C\\u0B9E\\u0B9F\\u0BA3\\u0BA4\\u0BA8-\\u0BAA\\u0BAE-\\u0BB9\\u0BBE-\\u0BC2\\u0BC6-\\u0BC8\\u0BCA-\\u0BCD\\u0BD0\\u0BD7\\u0BE6-\\u0BEF\\u0C00-\\u0C03\\u0C05-\\u0C0C\\u0C0E-\\u0C10\\u0C12-\\u0C28\\u0C2A-\\u0C39\\u0C3D-\\u0C44\\u0C46-\\u0C48\\u0C4A-\\u0C4D\\u0C55\\u0C56\\u0C58\\u0C59\\u0C60-\\u0C63\\u0C66-\\u0C6F\\u0C81-\\u0C83\\u0C85-\\u0C8C\\u0C8E-\\u0C90\\u0C92-\\u0CA8\\u0CAA-\\u0CB3\\u0CB5-\\u0CB9\\u0CBC-\\u0CC4\\u0CC6-\\u0CC8\\u0CCA-\\u0CCD\\u0CD5\\u0CD6\\u0CDE\\u0CE0-\\u0CE3\\u0CE6-\\u0CEF\\u0CF1\\u0CF2\\u0D01-\\u0D03\\u0D05-\\u0D0C\\u0D0E-\\u0D10\\u0D12-\\u0D3A\\u0D3D-\\u0D44\\u0D46-\\u0D48\\u0D4A-\\u0D4E\\u0D57\\u0D60-\\u0D63\\u0D66-\\u0D6F\\u0D7A-\\u0D7F\\u0D82\\u0D83\\u0D85-\\u0D96\\u0D9A-\\u0DB1\\u0DB3-\\u0DBB\\u0DBD\\u0DC0-\\u0DC6\\u0DCA\\u0DCF-\\u0DD4\\u0DD6\\u0DD8-\\u0DDF\\u0DE6-\\u0DEF\\u0DF2\\u0DF3\\u0E01-\\u0E3A\\u0E40-\\u0E4E\\u0E50-\\u0E59\\u0E81\\u0E82\\u0E84\\u0E87\\u0E88\\u0E8A\\u0E8D\\u0E94-\\u0E97\\u0E99-\\u0E9F\\u0EA1-\\u0EA3\\u0EA5\\u0EA7\\u0EAA\\u0EAB\\u0EAD-\\u0EB9\\u0EBB-\\u0EBD\\u0EC0-\\u0EC4\\u0EC6\\u0EC8-\\u0ECD\\u0ED0-\\u0ED9\\u0EDC-\\u0EDF\\u0F00\\u0F18\\u0F19\\u0F20-\\u0F29\\u0F35\\u0F37\\u0F39\\u0F3E-\\u0F47\\u0F49-\\u0F6C\\u0F71-\\u0F84\\u0F86-\\u0F97\\u0F99-\\u0FBC\\u0FC6\\u1000-\\u1049\\u1050-\\u109D\\u10A0-\\u10C5\\u10C7\\u10CD\\u10D0-\\u10FA\\u10FC-\\u1248\\u124A-\\u124D\\u1250-\\u1256\\u1258\\u125A-\\u125D\\u1260-\\u1288\\u128A-\\u128D\\u1290-\\u12B0\\u12B2-\\u12B5\\u12B8-\\u12BE\\u12C0\\u12C2-\\u12C5\\u12C8-\\u12D6\\u12D8-\\u1310\\u1312-\\u1315\\u1318-\\u135A\\u135D-\\u135F\\u1369-\\u1371\\u1380-\\u138F\\u13A0-\\u13F4\\u1401-\\u166C\\u166F-\\u167F\\u1681-\\u169A\\u16A0-\\u16EA\\u16EE-\\u16F8\\u1700-\\u170C\\u170E-\\u1714\\u1720-\\u1734\\u1740-\\u1753\\u1760-\\u176C\\u176E-\\u1770\\u1772\\u1773\\u1780-\\u17D3\\u17D7\\u17DC\\u17DD\\u17E0-\\u17E9\\u180B-\\u180D\\u1810-\\u1819\\u1820-\\u1877\\u1880-\\u18AA\\u18B0-\\u18F5\\u1900-\\u191E\\u1920-\\u192B\\u1930-\\u193B\\u1946-\\u196D\\u1970-\\u1974\\u1980-\\u19AB\\u19B0-\\u19C9\\u19D0-\\u19DA\\u1A00-\\u1A1B\\u1A20-\\u1A5E\\u1A60-\\u1A7C\\u1A7F-\\u1A89\\u1A90-\\u1A99\\u1AA7\\u1AB0-\\u1ABD\\u1B00-\\u1B4B\\u1B50-\\u1B59\\u1B6B-\\u1B73\\u1B80-\\u1BF3\\u1C00-\\u1C37\\u1C40-\\u1C49\\u1C4D-\\u1C7D\\u1CD0-\\u1CD2\\u1CD4-\\u1CF6\\u1CF8\\u1CF9\\u1D00-\\u1DF5\\u1DFC-\\u1F15\\u1F18-\\u1F1D\\u1F20-\\u1F45\\u1F48-\\u1F4D\\u1F50-\\u1F57\\u1F59\\u1F5B\\u1F5D\\u1F5F-\\u1F7D\\u1F80-\\u1FB4\\u1FB6-\\u1FBC\\u1FBE\\u1FC2-\\u1FC4\\u1FC6-\\u1FCC\\u1FD0-\\u1FD3\\u1FD6-\\u1FDB\\u1FE0-\\u1FEC\\u1FF2-\\u1FF4\\u1FF6-\\u1FFC\\u200C\\u200D\\u203F\\u2040\\u2054\\u2071\\u207F\\u2090-\\u209C\\u20D0-\\u20DC\\u20E1\\u20E5-\\u20F0\\u2102\\u2107\\u210A-\\u2113\\u2115\\u2118-\\u211D\\u2124\\u2126\\u2128\\u212A-\\u2139\\u213C-\\u213F\\u2145-\\u2149\\u214E\\u2160-\\u2188\\u2C00-\\u2C2E\\u2C30-\\u2C5E\\u2C60-\\u2CE4\\u2CEB-\\u2CF3\\u2D00-\\u2D25\\u2D27\\u2D2D\\u2D30-\\u2D67\\u2D6F\\u2D7F-\\u2D96\\u2DA0-\\u2DA6\\u2DA8-\\u2DAE\\u2DB0-\\u2DB6\\u2DB8-\\u2DBE\\u2DC0-\\u2DC6\\u2DC8-\\u2DCE\\u2DD0-\\u2DD6\\u2DD8-\\u2DDE\\u2DE0-\\u2DFF\\u3005-\\u3007\\u3021-\\u302F\\u3031-\\u3035\\u3038-\\u303C\\u3041-\\u3096\\u3099-\\u309F\\u30A1-\\u30FA\\u30FC-\\u30FF\\u3105-\\u312D\\u3131-\\u318E\\u31A0-\\u31BA\\u31F0-\\u31FF\\u3400-\\u4DB5\\u4E00-\\u9FCC\\uA000-\\uA48C\\uA4D0-\\uA4FD\\uA500-\\uA60C\\uA610-\\uA62B\\uA640-\\uA66F\\uA674-\\uA67D\\uA67F-\\uA69D\\uA69F-\\uA6F1\\uA717-\\uA71F\\uA722-\\uA788\\uA78B-\\uA78E\\uA790-\\uA7AD\\uA7B0\\uA7B1\\uA7F7-\\uA827\\uA840-\\uA873\\uA880-\\uA8C4\\uA8D0-\\uA8D9\\uA8E0-\\uA8F7\\uA8FB\\uA900-\\uA92D\\uA930-\\uA953\\uA960-\\uA97C\\uA980-\\uA9C0\\uA9CF-\\uA9D9\\uA9E0-\\uA9FE\\uAA00-\\uAA36\\uAA40-\\uAA4D\\uAA50-\\uAA59\\uAA60-\\uAA76\\uAA7A-\\uAAC2\\uAADB-\\uAADD\\uAAE0-\\uAAEF\\uAAF2-\\uAAF6\\uAB01-\\uAB06\\uAB09-\\uAB0E\\uAB11-\\uAB16\\uAB20-\\uAB26\\uAB28-\\uAB2E\\uAB30-\\uAB5A\\uAB5C-\\uAB5F\\uAB64\\uAB65\\uABC0-\\uABEA\\uABEC\\uABED\\uABF0-\\uABF9\\uAC00-\\uD7A3\\uD7B0-\\uD7C6\\uD7CB-\\uD7FB\\uF900-\\uFA6D\\uFA70-\\uFAD9\\uFB00-\\uFB06\\uFB13-\\uFB17\\uFB1D-\\uFB28\\uFB2A-\\uFB36\\uFB38-\\uFB3C\\uFB3E\\uFB40\\uFB41\\uFB43\\uFB44\\uFB46-\\uFBB1\\uFBD3-\\uFD3D\\uFD50-\\uFD8F\\uFD92-\\uFDC7\\uFDF0-\\uFDFB\\uFE00-\\uFE0F\\uFE20-\\uFE2D\\uFE33\\uFE34\\uFE4D-\\uFE4F\\uFE70-\\uFE74\\uFE76-\\uFEFC\\uFF10-\\uFF19\\uFF21-\\uFF3A\\uFF3F\\uFF41-\\uFF5A\\uFF66-\\uFFBE\\uFFC2-\\uFFC7\\uFFCA-\\uFFCF\\uFFD2-\\uFFD7\\uFFDA-\\uFFDC]|\\uD800[\\uDC00-\\uDC0B\\uDC0D-\\uDC26\\uDC28-\\uDC3A\\uDC3C\\uDC3D\\uDC3F-\\uDC4D\\uDC50-\\uDC5D\\uDC80-\\uDCFA\\uDD40-\\uDD74\\uDDFD\\uDE80-\\uDE9C\\uDEA0-\\uDED0\\uDEE0\\uDF00-\\uDF1F\\uDF30-\\uDF4A\\uDF50-\\uDF7A\\uDF80-\\uDF9D\\uDFA0-\\uDFC3\\uDFC8-\\uDFCF\\uDFD1-\\uDFD5]|\\uD801[\\uDC00-\\uDC9D\\uDCA0-\\uDCA9\\uDD00-\\uDD27\\uDD30-\\uDD63\\uDE00-\\uDF36\\uDF40-\\uDF55\\uDF60-\\uDF67]|\\uD802[\\uDC00-\\uDC05\\uDC08\\uDC0A-\\uDC35\\uDC37\\uDC38\\uDC3C\\uDC3F-\\uDC55\\uDC60-\\uDC76\\uDC80-\\uDC9E\\uDD00-\\uDD15\\uDD20-\\uDD39\\uDD80-\\uDDB7\\uDDBE\\uDDBF\\uDE00-\\uDE03\\uDE05\\uDE06\\uDE0C-\\uDE13\\uDE15-\\uDE17\\uDE19-\\uDE33\\uDE38-\\uDE3A\\uDE3F\\uDE60-\\uDE7C\\uDE80-\\uDE9C\\uDEC0-\\uDEC7\\uDEC9-\\uDEE6\\uDF00-\\uDF35\\uDF40-\\uDF55\\uDF60-\\uDF72\\uDF80-\\uDF91]|\\uD803[\\uDC00-\\uDC48]|\\uD804[\\uDC00-\\uDC46\\uDC66-\\uDC6F\\uDC7F-\\uDCBA\\uDCD0-\\uDCE8\\uDCF0-\\uDCF9\\uDD00-\\uDD34\\uDD36-\\uDD3F\\uDD50-\\uDD73\\uDD76\\uDD80-\\uDDC4\\uDDD0-\\uDDDA\\uDE00-\\uDE11\\uDE13-\\uDE37\\uDEB0-\\uDEEA\\uDEF0-\\uDEF9\\uDF01-\\uDF03\\uDF05-\\uDF0C\\uDF0F\\uDF10\\uDF13-\\uDF28\\uDF2A-\\uDF30\\uDF32\\uDF33\\uDF35-\\uDF39\\uDF3C-\\uDF44\\uDF47\\uDF48\\uDF4B-\\uDF4D\\uDF57\\uDF5D-\\uDF63\\uDF66-\\uDF6C\\uDF70-\\uDF74]|\\uD805[\\uDC80-\\uDCC5\\uDCC7\\uDCD0-\\uDCD9\\uDD80-\\uDDB5\\uDDB8-\\uDDC0\\uDE00-\\uDE40\\uDE44\\uDE50-\\uDE59\\uDE80-\\uDEB7\\uDEC0-\\uDEC9]|\\uD806[\\uDCA0-\\uDCE9\\uDCFF\\uDEC0-\\uDEF8]|\\uD808[\\uDC00-\\uDF98]|\\uD809[\\uDC00-\\uDC6E]|[\\uD80C\\uD840-\\uD868\\uD86A-\\uD86C][\\uDC00-\\uDFFF]|\\uD80D[\\uDC00-\\uDC2E]|\\uD81A[\\uDC00-\\uDE38\\uDE40-\\uDE5E\\uDE60-\\uDE69\\uDED0-\\uDEED\\uDEF0-\\uDEF4\\uDF00-\\uDF36\\uDF40-\\uDF43\\uDF50-\\uDF59\\uDF63-\\uDF77\\uDF7D-\\uDF8F]|\\uD81B[\\uDF00-\\uDF44\\uDF50-\\uDF7E\\uDF8F-\\uDF9F]|\\uD82C[\\uDC00\\uDC01]|\\uD82F[\\uDC00-\\uDC6A\\uDC70-\\uDC7C\\uDC80-\\uDC88\\uDC90-\\uDC99\\uDC9D\\uDC9E]|\\uD834[\\uDD65-\\uDD69\\uDD6D-\\uDD72\\uDD7B-\\uDD82\\uDD85-\\uDD8B\\uDDAA-\\uDDAD\\uDE42-\\uDE44]|\\uD835[\\uDC00-\\uDC54\\uDC56-\\uDC9C\\uDC9E\\uDC9F\\uDCA2\\uDCA5\\uDCA6\\uDCA9-\\uDCAC\\uDCAE-\\uDCB9\\uDCBB\\uDCBD-\\uDCC3\\uDCC5-\\uDD05\\uDD07-\\uDD0A\\uDD0D-\\uDD14\\uDD16-\\uDD1C\\uDD1E-\\uDD39\\uDD3B-\\uDD3E\\uDD40-\\uDD44\\uDD46\\uDD4A-\\uDD50\\uDD52-\\uDEA5\\uDEA8-\\uDEC0\\uDEC2-\\uDEDA\\uDEDC-\\uDEFA\\uDEFC-\\uDF14\\uDF16-\\uDF34\\uDF36-\\uDF4E\\uDF50-\\uDF6E\\uDF70-\\uDF88\\uDF8A-\\uDFA8\\uDFAA-\\uDFC2\\uDFC4-\\uDFCB\\uDFCE-\\uDFFF]|\\uD83A[\\uDC00-\\uDCC4\\uDCD0-\\uDCD6]|\\uD83B[\\uDE00-\\uDE03\\uDE05-\\uDE1F\\uDE21\\uDE22\\uDE24\\uDE27\\uDE29-\\uDE32\\uDE34-\\uDE37\\uDE39\\uDE3B\\uDE42\\uDE47\\uDE49\\uDE4B\\uDE4D-\\uDE4F\\uDE51\\uDE52\\uDE54\\uDE57\\uDE59\\uDE5B\\uDE5D\\uDE5F\\uDE61\\uDE62\\uDE64\\uDE67-\\uDE6A\\uDE6C-\\uDE72\\uDE74-\\uDE77\\uDE79-\\uDE7C\\uDE7E\\uDE80-\\uDE89\\uDE8B-\\uDE9B\\uDEA1-\\uDEA3\\uDEA5-\\uDEA9\\uDEAB-\\uDEBB]|\\uD869[\\uDC00-\\uDED6\\uDF00-\\uDFFF]|\\uD86D[\\uDC00-\\uDF34\\uDF40-\\uDFFF]|\\uD86E[\\uDC00-\\uDC1D]|\\uD87E[\\uDC00-\\uDE1D]|\\uDB40[\\uDD00-\\uDDEF]/},d=[5760,6158,8192,8193,8194,8195,8196,8197,8198,8199,8200,8201,8202,8239,8287,12288,65279],D=new Array(128),g=0;g<128;++g)D[g]=g>=97&&g<=122||g>=65&&g<=90||36===g||95===g;for(h=new Array(128),g=0;g<128;++g)h[g]=g>=97&&g<=122||g>=65&&g<=90||g>=48&&g<=57||36===g||95===g;e.exports={isDecimalDigit:t,isHexDigit:n,isOctalDigit:r,isWhiteSpace:u,isLineTerminator:o,isIdentifierStartES5:i,isIdentifierPartES5:l,isIdentifierStartES6:s,isIdentifierPartES6:c}}()},function(e,t){function n(){throw new Error(\"setTimeout has not been defined\")}function r(){throw new Error(\"clearTimeout has not been defined\")}function u(e){if(c===setTimeout)return setTimeout(e,0);if((c===n||!c)&&setTimeout)return c=setTimeout,setTimeout(e,0);try{return c(e,0)}catch(t){try{return c.call(null,e,0)}catch(t){return c.call(this,e,0)}}}function o(e){if(p===clearTimeout)return clearTimeout(e);if((p===r||!p)&&clearTimeout)return p=clearTimeout,clearTimeout(e);try{return p(e)}catch(t){try{return p.call(null,e)}catch(t){return p.call(this,e)}}}function a(){h&&d&&(h=!1,d.length?D=d.concat(D):g=-1,D.length&&i())}function i(){if(!h){var e=u(a);h=!0;for(var t=D.length;t;){for(d=D,D=[];++g<t;)d&&d[g].run();g=-1,t=D.length}d=null,h=!1,o(e)}}function l(e,t){this.fun=e,this.array=t}function s(){}var c,p,f=e.exports={};!function(){try{c=\"function\"===typeof setTimeout?setTimeout:n}catch(e){c=n}try{p=\"function\"===typeof clearTimeout?clearTimeout:r}catch(e){p=r}}();var d,D=[],h=!1,g=-1;f.nextTick=function(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)t[n-1]=arguments[n];D.push(new l(e,t)),1!==D.length||h||u(i)},l.prototype.run=function(){this.fun.apply(null,this.array)},f.title=\"browser\",f.browser=!0,f.env={},f.argv=[],f.version=\"\",f.versions={},f.on=s,f.addListener=s,f.once=s,f.off=s,f.removeListener=s,f.removeAllListeners=s,f.emit=s,f.prependListener=s,f.prependOnceListener=s,f.listeners=function(e){return[]},f.binding=function(e){throw new Error(\"process.binding is not supported\")},f.cwd=function(){return\"/\"},f.chdir=function(e){throw new Error(\"process.chdir is not supported\")},f.umask=function(){return 0}},function(e,t,n){\"use strict\";e.exports=function(){return/[\\u001b\\u009b][[()#;?]*(?:[0-9]{1,4}(?:;[0-9]{0,4})*)?[0-9A-PRZcf-nqry=><]/g}},function(e,t,n){\"use strict\";function r(e){var t=e.currentBuildError,n=e.currentRuntimeErrorRecords,r=e.dismissRuntimeErrors,u=e.editorHandler;return t?a.a.createElement(s.a,{error:t,editorHandler:u}):n.length>0?a.a.createElement(c.a,{errorRecords:n,close:r,editorHandler:u}):null}Object.defineProperty(t,\"__esModule\",{value:!0});var u=n(19),o=(n.n(u),n(0)),a=n.n(o),i=n(25),l=n.n(i),s=n(35),c=n(40),p=n(1),f=n(14),d=null;window.updateContent=function(e){var t=r(e);return null===t?(l.a.unmountComponentAtNode(d),!1):(l.a.render(t,d),!0)},document.body.style.margin=\"0\",document.body.style[\"max-width\"]=\"100vw\",d=document.createElement(\"div\"),Object(f.a)(d,p.c),document.body.appendChild(d),window.parent.__REACT_ERROR_OVERLAY_GLOBAL_HOOK__.iframeReady()},function(e,t,n){\"undefined\"===typeof Promise&&(n(20).enable(),window.Promise=n(23)),Object.assign=n(2)},function(e,t,n){\"use strict\";function r(){s=!1,i._47=null,i._71=null}function u(e){function t(t){(e.allRejections||a(p[t].error,e.whitelist||l))&&(p[t].displayId=c++,e.onUnhandled?(p[t].logged=!0,e.onUnhandled(p[t].displayId,p[t].error)):(p[t].logged=!0,o(p[t].displayId,p[t].error)))}function n(t){p[t].logged&&(e.onHandled?e.onHandled(p[t].displayId,p[t].error):p[t].onUnhandled||(console.warn(\"Promise Rejection Handled (id: \"+p[t].displayId+\"):\"),console.warn(' This means you can ignore any previous messages of the form \"Possible Unhandled Promise Rejection\" with id '+p[t].displayId+\".\")))}e=e||{},s&&r(),s=!0;var u=0,c=0,p={};i._47=function(e){2===e._83&&p[e._56]&&(p[e._56].logged?n(e._56):clearTimeout(p[e._56].timeout),delete p[e._56])},i._71=function(e,n){0===e._75&&(e._56=u++,p[e._56]={displayId:null,error:n,timeout:setTimeout(t.bind(null,e._56),a(n,l)?100:2e3),logged:!1})}}function o(e,t){console.warn(\"Possible Unhandled Promise Rejection (id: \"+e+\"):\"),((t&&(t.stack||t))+\"\").split(\"\\n\").forEach(function(e){console.warn(\" \"+e)})}function a(e,t){return t.some(function(t){return e instanceof t})}var i=n(4),l=[ReferenceError,TypeError,RangeError],s=!1;t.disable=r,t.enable=u},function(e,t,n){\"use strict\";(function(t){function n(e){a.length||(o(),i=!0),a[a.length]=e}function r(){for(;l<a.length;){var e=l;if(l+=1,a[e].call(),l>s){for(var t=0,n=a.length-l;t<n;t++)a[t]=a[t+l];a.length-=l,l=0}}a.length=0,l=0,i=!1}function u(e){return function(){function t(){clearTimeout(n),clearInterval(r),e()}var n=setTimeout(t,0),r=setInterval(t,50)}}e.exports=n;var o,a=[],i=!1,l=0,s=1024,c=\"undefined\"!==typeof t?t:self,p=c.MutationObserver||c.WebKitMutationObserver;o=\"function\"===typeof p?function(e){var t=1,n=new p(e),r=document.createTextNode(\"\");return n.observe(r,{characterData:!0}),function(){t=-t,r.data=t}}(r):u(r),n.requestFlush=o,n.makeRequestCallFromTimer=u}).call(t,n(22))},function(e,t){var n;n=function(){return this}();try{n=n||Function(\"return this\")()||(0,eval)(\"this\")}catch(e){\"object\"===typeof window&&(n=window)}e.exports=n},function(e,t,n){\"use strict\";function r(e){var t=new u(u._44);return t._83=1,t._18=e,t}var u=n(4);e.exports=u;var o=r(!0),a=r(!1),i=r(null),l=r(void 0),s=r(0),c=r(\"\");u.resolve=function(e){if(e instanceof u)return e;if(null===e)return i;if(void 0===e)return l;if(!0===e)return o;if(!1===e)return a;if(0===e)return s;if(\"\"===e)return c;if(\"object\"===typeof e||\"function\"===typeof e)try{var t=e.then;if(\"function\"===typeof t)return new u(t.bind(e))}catch(e){return new u(function(t,n){n(e)})}return r(e)},u.all=function(e){var t=Array.prototype.slice.call(e);return new u(function(e,n){function r(a,i){if(i&&(\"object\"===typeof i||\"function\"===typeof i)){if(i instanceof u&&i.then===u.prototype.then){for(;3===i._83;)i=i._18;return 1===i._83?r(a,i._18):(2===i._83&&n(i._18),void i.then(function(e){r(a,e)},n))}var l=i.then;if(\"function\"===typeof l){return void new u(l.bind(i)).then(function(e){r(a,e)},n)}}t[a]=i,0===--o&&e(t)}if(0===t.length)return e([]);for(var o=t.length,a=0;a<t.length;a++)r(a,t[a])})},u.reject=function(e){return new u(function(t,n){n(e)})},u.race=function(e){return new u(function(t,n){e.forEach(function(e){u.resolve(e).then(t,n)})})},u.prototype.catch=function(e){return this.then(null,e)}},function(e,t,n){\"use strict\";function r(e){for(var t=arguments.length-1,n=\"Minified React error #\"+e+\"; visit http://facebook.github.io/react/docs/error-decoder.html?invariant=\"+e,r=0;r<t;r++)n+=\"&args[]=\"+encodeURIComponent(arguments[r+1]);throw t=Error(n+\" for the full message or use the non-minified dev environment for full errors and additional helpful warnings.\"),t.name=\"Invariant Violation\",t.framesToPop=1,t}function u(e,t,n){this.props=e,this.context=t,this.refs=C,this.updater=n||A}function o(e,t,n){this.props=e,this.context=t,this.refs=C,this.updater=n||A}function a(){}function i(e,t,n){this.props=e,this.context=t,this.refs=C,this.updater=n||A}function l(e,t,n,r,u,o,a){return{$$typeof:w,type:e,key:t,ref:n,props:a,_owner:o}}function s(e){var t={\"=\":\"=0\",\":\":\"=2\"};return\"$\"+(\"\"+e).replace(/[=:]/g,function(e){return t[e]})}function c(e,t,n,r){if(P.length){var u=P.pop();return u.result=e,u.keyPrefix=t,u.func=n,u.context=r,u.count=0,u}return{result:e,keyPrefix:t,func:n,context:r,count:0}}function p(e){e.result=null,e.keyPrefix=null,e.func=null,e.context=null,e.count=0,10>P.length&&P.push(e)}function f(e,t,n,u){var o=typeof e;if(\"undefined\"!==o&&\"boolean\"!==o||(e=null),null===e||\"string\"===o||\"number\"===o||\"object\"===o&&e.$$typeof===T)return n(u,e,\"\"===t?\".\"+d(e,0):t),1;var a=0;if(t=\"\"===t?\".\":t+\":\",Array.isArray(e))for(var i=0;i<e.length;i++){o=e[i];var l=t+d(o,i);a+=f(o,l,n,u)}else if(\"function\"===typeof(l=x&&e[x]||e[\"@@iterator\"]))for(e=l.call(e),i=0;!(o=e.next()).done;)o=o.value,l=t+d(o,i++),a+=f(o,l,n,u);else\"object\"===o&&(n=\"\"+e,r(\"31\",\"[object Object]\"===n?\"object with keys {\"+Object.keys(e).join(\", \")+\"}\":n,\"\"));return a}function d(e,t){return\"object\"===typeof e&&null!==e&&null!=e.key?s(e.key):t.toString(36)}function D(e,t){e.func.call(e.context,t,e.count++)}function h(e,t,n){var r=e.result,u=e.keyPrefix;e=e.func.call(e.context,t,e.count++),Array.isArray(e)?g(e,r,n,E.thatReturnsArgument):null!=e&&(l.isValidElement(e)&&(e=l.cloneAndReplaceKey(e,u+(!e.key||t&&t.key===e.key?\"\":(\"\"+e.key).replace(S,\"$&/\")+\"/\")+n)),r.push(e))}function g(e,t,n,r,u){var o=\"\";null!=n&&(o=(\"\"+n).replace(S,\"$&/\")+\"/\"),t=c(t,o,r,u),null==e||f(e,\"\",h,t),p(t)}var m=n(2),C=n(5);n(6);var E=n(3),A={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}};u.prototype.isReactComponent={},u.prototype.setState=function(e,t){\"object\"!==typeof e&&\"function\"!==typeof e&&null!=e&&r(\"85\"),this.updater.enqueueSetState(this,e,t,\"setState\")},u.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,\"forceUpdate\")},a.prototype=u.prototype;var F=o.prototype=new a;F.constructor=o,m(F,u.prototype),F.isPureReactComponent=!0;var b=i.prototype=new a;b.constructor=i,m(b,u.prototype),b.unstable_isAsyncReactComponent=!0,b.render=function(){return this.props.children};var y={Component:u,PureComponent:o,AsyncComponent:i},v={current:null},B=Object.prototype.hasOwnProperty,w=\"function\"===typeof Symbol&&Symbol.for&&Symbol.for(\"react.element\")||60103,k={key:!0,ref:!0,__self:!0,__source:!0};l.createElement=function(e,t,n){var r,u={},o=null,a=null,i=null,s=null;if(null!=t)for(r in void 0!==t.ref&&(a=t.ref),void 0!==t.key&&(o=\"\"+t.key),i=void 0===t.__self?null:t.__self,s=void 0===t.__source?null:t.__source,t)B.call(t,r)&&!k.hasOwnProperty(r)&&(u[r]=t[r]);var c=arguments.length-2;if(1===c)u.children=n;else if(1<c){for(var p=Array(c),f=0;f<c;f++)p[f]=arguments[f+2];u.children=p}if(e&&e.defaultProps)for(r in c=e.defaultProps)void 0===u[r]&&(u[r]=c[r]);return l(e,o,a,i,s,v.current,u)},l.createFactory=function(e){var t=l.createElement.bind(null,e);return t.type=e,t},l.cloneAndReplaceKey=function(e,t){return l(e.type,t,e.ref,e._self,e._source,e._owner,e.props)},l.cloneElement=function(e,t,n){var r=m({},e.props),u=e.key,o=e.ref,a=e._self,i=e._source,s=e._owner;if(null!=t){if(void 0!==t.ref&&(o=t.ref,s=v.current),void 0!==t.key&&(u=\"\"+t.key),e.type&&e.type.defaultProps)var c=e.type.defaultProps;for(p in t)B.call(t,p)&&!k.hasOwnProperty(p)&&(r[p]=void 0===t[p]&&void 0!==c?c[p]:t[p])}var p=arguments.length-2;if(1===p)r.children=n;else if(1<p){c=Array(p);for(var f=0;f<p;f++)c[f]=arguments[f+2];r.children=c}return l(e.type,u,o,a,i,s,r)},l.isValidElement=function(e){return\"object\"===typeof e&&null!==e&&e.$$typeof===w};var x=\"function\"===typeof Symbol&&Symbol.iterator,T=\"function\"===typeof Symbol&&Symbol.for&&Symbol.for(\"react.element\")||60103,S=/\\/+/g,P=[],N={forEach:function(e,t,n){if(null==e)return e;t=c(null,null,t,n),null==e||f(e,\"\",D,t),p(t)},map:function(e,t,n){if(null==e)return e;var r=[];return g(e,r,null,t,n),r},count:function(e){return null==e?0:f(e,\"\",E.thatReturnsNull,null)},toArray:function(e){var t=[];return g(e,t,null,E.thatReturnsArgument),t}};e.exports={Children:{map:N.map,forEach:N.forEach,count:N.count,toArray:N.toArray,only:function(e){return l.isValidElement(e)||r(\"143\"),e}},Component:y.Component,PureComponent:y.PureComponent,unstable_AsyncComponent:y.AsyncComponent,createElement:l.createElement,cloneElement:l.cloneElement,isValidElement:l.isValidElement,createFactory:l.createFactory,version:\"16.0.0\",__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:{ReactCurrentOwner:v,assign:m}}},function(e,t,n){\"use strict\";function r(){if(\"undefined\"!==typeof{}&&\"function\"===typeof{}.checkDCE)try{({}).checkDCE(r)}catch(e){console.error(e)}}r(),e.exports=n(26)},function(e,t,n){\"use strict\";function r(e){for(var t=arguments.length-1,n=\"Minified React error #\"+e+\"; visit http://facebook.github.io/react/docs/error-decoder.html?invariant=\"+e,r=0;r<t;r++)n+=\"&args[]=\"+encodeURIComponent(arguments[r+1]);throw t=Error(n+\" for the full message or use the non-minified dev environment for full errors and additional helpful warnings.\"),t.name=\"Invariant Violation\",t.framesToPop=1,t}function u(e){switch(e){case\"svg\":return\"http://www.w3.org/2000/svg\";case\"math\":return\"http://www.w3.org/1998/Math/MathML\";default:return\"http://www.w3.org/1999/xhtml\"}}function o(){if(xt)for(var e in Tt){var t=Tt[e],n=xt.indexOf(e);if(-1<n||r(\"96\",e),!St.plugins[n]){t.extractEvents||r(\"97\",e),St.plugins[n]=t,n=t.eventTypes;for(var u in n){var o=void 0,i=n[u],l=t,s=u;St.eventNameDispatchConfigs.hasOwnProperty(s)&&r(\"99\",s),St.eventNameDispatchConfigs[s]=i;var c=i.phasedRegistrationNames;if(c){for(o in c)c.hasOwnProperty(o)&&a(c[o],l,s);o=!0}else i.registrationName?(a(i.registrationName,l,s),o=!0):o=!1;o||r(\"98\",u,e)}}}}function a(e,t,n){St.registrationNameModules[e]&&r(\"100\",e),St.registrationNameModules[e]=t,St.registrationNameDependencies[e]=t.eventTypes[n].dependencies}function i(e,t){return(e&t)===t}function l(e){for(var t;t=e._renderedComponent;)e=t;return e}function s(e,t){e=l(e),e._hostNode=t,t[zt]=e}function c(e,t){if(!(e._flags&Vt.hasCachedChildNodes)){var n=e._renderedChildren;t=t.firstChild;var u;e:for(u in n)if(n.hasOwnProperty(u)){var o=n[u],a=l(o)._domID;if(0!==a){for(;null!==t;t=t.nextSibling){var i=t,c=a;if(i.nodeType===Ht&&i.getAttribute(jt)===\"\"+c||i.nodeType===qt&&i.nodeValue===\" react-text: \"+c+\" \"||i.nodeType===qt&&i.nodeValue===\" react-empty: \"+c+\" \"){s(o,t);continue e}}r(\"32\",a)}}e._flags|=Vt.hasCachedChildNodes}}function p(e){if(e[zt])return e[zt];for(var t=[];!e[zt];){if(t.push(e),!e.parentNode)return null;e=e.parentNode}var n=e[zt];if(n.tag===Ut||n.tag===Mt)return n;for(;e&&(n=e[zt]);e=t.pop()){var r=n;t.length&&c(n,e)}return r}function f(e){if(\"function\"===typeof e.getName)return e.getName();if(\"number\"===typeof e.tag){if(\"string\"===typeof(e=e.type))return e;if(\"function\"===typeof e)return e.displayName||e.name}return null}function d(e){var t=e;if(e.alternate)for(;t.return;)t=t.return;else{if((t.effectTag&nn)!==tn)return 1;for(;t.return;)if(t=t.return,(t.effectTag&nn)!==tn)return 1}return t.tag===Jt?2:3}function D(e){2!==d(e)&&r(\"188\")}function h(e){var t=e.alternate;if(!t)return t=d(e),3===t&&r(\"188\"),1===t?null:e;for(var n=e,u=t;;){var o=n.return,a=o?o.alternate:null;if(!o||!a)break;if(o.child===a.child){for(var i=o.child;i;){if(i===n)return D(o),e;if(i===u)return D(o),t;i=i.sibling}r(\"188\")}if(n.return!==u.return)n=o,u=a;else{i=!1;for(var l=o.child;l;){if(l===n){i=!0,n=o,u=a;break}if(l===u){i=!0,u=o,n=a;break}l=l.sibling}if(!i){for(l=a.child;l;){if(l===n){i=!0,n=a,u=o;break}if(l===u){i=!0,u=a,n=o;break}l=l.sibling}i||r(\"189\")}}n.alternate!==u&&r(\"190\")}return n.tag!==Jt&&r(\"188\"),n.stateNode.current===n?e:t}function g(e,t,n,r,u,o,a,i,l){un._hasCaughtError=!1,un._caughtError=null;var s=Array.prototype.slice.call(arguments,3);try{t.apply(n,s)}catch(e){un._caughtError=e,un._hasCaughtError=!0}}function m(){if(un._hasRethrowError){var e=un._rethrowError;throw un._rethrowError=null,un._hasRethrowError=!1,e}}function C(e,t,n,r){t=e.type||\"unknown-event\",e.currentTarget=an.getNodeFromInstance(r),on.invokeGuardedCallbackAndCatchFirstError(t,n,void 0,e),e.currentTarget=null}function E(e){if(e=ln.getInstanceFromNode(e))if(\"number\"===typeof e.tag){sn&&\"function\"===typeof sn.restoreControlledState||r(\"194\");var t=ln.getFiberCurrentPropsFromNode(e.stateNode);sn.restoreControlledState(e.stateNode,e.type,t)}else\"function\"!==typeof e.restoreControlledState&&r(\"195\"),e.restoreControlledState()}function A(e,t,n,r,u,o){return e(t,n,r,u,o)}function F(e,t){return e(t)}function b(e,t){return F(e,t)}function y(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===hn?e.parentNode:e}function v(e){var t=e.targetInst;do{if(!t){e.ancestors.push(t);break}var n=t;if(\"number\"===typeof n.tag){for(;n.return;)n=n.return;n=n.tag!==gn?null:n.stateNode.containerInfo}else{for(;n._hostParent;)n=n._hostParent;n=Gt.getNodeFromInstance(n).parentNode}if(!n)break;e.ancestors.push(t),t=Gt.getClosestInstanceFromNode(n)}while(t);for(n=0;n<e.ancestors.length;n++)t=e.ancestors[n],Cn._handleTopLevel(e.topLevelType,t,e.nativeEvent,y(e.nativeEvent))}function B(e,t){return null==t&&r(\"30\"),null==e?t:Array.isArray(e)?Array.isArray(t)?(e.push.apply(e,t),e):(e.push(t),e):Array.isArray(t)?[e].concat(t):[e,t]}function w(e,t,n){Array.isArray(e)?e.forEach(t,n):e&&t.call(n,e)}function k(e,t){e&&(ln.executeDispatchesInOrder(e,t),e.isPersistent()||e.constructor.release(e))}function x(e){return k(e,!0)}function T(e){return k(e,!1)}function S(e,t,n){switch(e){case\"onClick\":case\"onClickCapture\":case\"onDoubleClick\":case\"onDoubleClickCapture\":case\"onMouseDown\":case\"onMouseDownCapture\":case\"onMouseMove\":case\"onMouseMoveCapture\":case\"onMouseUp\":case\"onMouseUpCapture\":return!(!n.disabled||\"button\"!==t&&\"input\"!==t&&\"select\"!==t&&\"textarea\"!==t);default:return!1}}function P(e,t){if(!gt.canUseDOM||t&&!(\"addEventListener\"in document))return!1;t=\"on\"+e;var n=t in document;return n||(n=document.createElement(\"div\"),n.setAttribute(t,\"return;\"),n=\"function\"===typeof n[t]),!n&&wt&&\"wheel\"===e&&(n=document.implementation.hasFeature(\"Events.wheel\",\"3.0\")),n}function N(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n[\"Webkit\"+e]=\"webkit\"+t,n[\"Moz\"+e]=\"moz\"+t,n[\"ms\"+e]=\"MS\"+t,n[\"O\"+e]=\"o\"+t.toLowerCase(),n}function _(e){if(yn[e])return yn[e];if(!bn[e])return e;var t,n=bn[e];for(t in n)if(n.hasOwnProperty(t)&&t in vn)return yn[e]=n[t];return\"\"}function O(e){return Object.prototype.hasOwnProperty.call(e,xn)||(e[xn]=kn++,wn[e[xn]]={}),wn[e[xn]]}function I(e){return!!Hn.hasOwnProperty(e)||!Mn.hasOwnProperty(e)&&(Un.test(e)?Hn[e]=!0:(Mn[e]=!0,!1))}function R(){return null}function L(e){var t=\"\";return ht.Children.forEach(e,function(e){null==e||\"string\"!==typeof e&&\"number\"!==typeof e||(t+=e)}),t}function U(e,t,n){if(e=e.options,t){t={};for(var r=0;r<n.length;r++)t[\"$\"+n[r]]=!0;for(n=0;n<e.length;n++)r=t.hasOwnProperty(\"$\"+e[n].value),e[n].selected!==r&&(e[n].selected=r)}else{for(n=\"\"+n,t=null,r=0;r<e.length;r++){if(e[r].value===n)return void(e[r].selected=!0);null!==t||e[r].disabled||(t=e[r])}null!==t&&(t.selected=!0)}}function M(e,t){t&&(Jn[e]&&(null!=t.children||null!=t.dangerouslySetInnerHTML)&&r(\"137\",e,\"\"),null!=t.dangerouslySetInnerHTML&&(null!=t.children&&r(\"60\"),\"object\"===typeof t.dangerouslySetInnerHTML&&\"__html\"in t.dangerouslySetInnerHTML||r(\"61\")),null!=t.style&&\"object\"!==typeof t.style&&r(\"62\",\"\"))}function H(e){var t=e.type;return(e=e.nodeName)&&\"input\"===e.toLowerCase()&&(\"checkbox\"===t||\"radio\"===t)}function q(e){var t=H(e)?\"checked\":\"value\",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=\"\"+e[t];if(!e.hasOwnProperty(t)&&\"function\"===typeof n.get&&\"function\"===typeof n.set)return Object.defineProperty(e,t,{enumerable:n.enumerable,configurable:!0,get:function(){return n.get.call(this)},set:function(e){r=\"\"+e,n.set.call(this,e)}}),{getValue:function(){return r},setValue:function(e){r=\"\"+e},stopTracking:function(){e._valueTracker=null,delete e[t]}}}function j(e,t){if(-1===e.indexOf(\"-\"))return\"string\"===typeof t.is;switch(e){case\"annotation-xml\":case\"color-profile\":case\"font-face\":case\"font-face-src\":case\"font-face-uri\":case\"font-face-format\":case\"font-face-name\":case\"missing-glyph\":return!1;default:return!0}}function V(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===rr)return void(n.nodeValue=t)}e.textContent=t}function W(e,t){ir(t,e.nodeType===or||e.nodeType===ar?e:e.ownerDocument)}function z(e,t){return e!==Nr&&e!==Pr||t!==Nr&&t!==Pr?e===Sr&&t!==Sr?-255:e!==Sr&&t===Sr?255:e-t:0}function K(){return{first:null,last:null,hasForceUpdate:!1,callbackList:null}}function G(e,t,n,r){null!==n?n.next=t:(t.next=e.first,e.first=t),null!==r?t.next=r:e.last=t}function Y(e,t){t=t.priorityLevel;var n=null;if(null!==e.last&&0>=z(e.last.priorityLevel,t))n=e.last;else for(e=e.first;null!==e&&0>=z(e.priorityLevel,t);)n=e,e=e.next;return n}function $(e,t){var n=e.alternate,r=e.updateQueue;null===r&&(r=e.updateQueue=K()),null!==n?null===(e=n.updateQueue)&&(e=n.updateQueue=K()):e=null,Ir=r,Rr=e!==r?e:null;var u=Ir;n=Rr;var o=Y(u,t),a=null!==o?o.next:u.first;return null===n?(G(u,t,o,a),null):(r=Y(n,t),e=null!==r?r.next:n.first,G(u,t,o,a),a===e&&null!==a||o===r&&null!==o?(null===r&&(n.first=t),null===e&&(n.last=null),null):(t={priorityLevel:t.priorityLevel,partialState:t.partialState,callback:t.callback,isReplace:t.isReplace,isForced:t.isForced,isTopLevelUnmount:t.isTopLevelUnmount,next:null},G(n,t,r,e),t))}function Q(e,t,n,r){return e=e.partialState,\"function\"===typeof e?e.call(t,n,r):e}function X(e,t,n){e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=n}function J(e){return e.tag===jr&&null!=e.type.childContextTypes}function Z(e,t){var n=e.stateNode,u=e.type.childContextTypes;if(\"function\"!==typeof n.getChildContext)return t;n=n.getChildContext();for(var o in n)o in u||r(\"108\",f(e)||\"Unknown\",o);return mt({},t,n)}function ee(e,t,n){this.tag=e,this.key=t,this.stateNode=this.type=null,this.sibling=this.child=this.return=null,this.index=0,this.memoizedState=this.updateQueue=this.memoizedProps=this.pendingProps=this.ref=null,this.internalContextTag=n,this.effectTag=su,this.lastEffect=this.firstEffect=this.nextEffect=null,this.pendingWorkPriority=iu,this.alternate=null}function te(e,t,n){var u=void 0;return\"function\"===typeof e?(u=e.prototype&&e.prototype.isReactComponent?new ee(Zr,t,n):new ee(Jr,t,n),u.type=e):\"string\"===typeof e?(u=new ee(tu,t,n),u.type=e):\"object\"===typeof e&&null!==e&&\"number\"===typeof e.tag?u=e:r(\"130\",null==e?e:typeof e,\"\"),u}function ne(e){return null===e||\"undefined\"===typeof e?null:(e=Hu&&e[Hu]||e[\"@@iterator\"],\"function\"===typeof e?e:null)}function re(e,t){var n=t.ref;if(null!==n&&\"function\"!==typeof n){if(t._owner){t=t._owner;var u=void 0;t&&(\"number\"===typeof t.tag?(t.tag!==Pu&&r(\"110\"),u=t.stateNode):u=t.getPublicInstance()),u||r(\"147\",n);var o=\"\"+n;return null!==e&&null!==e.ref&&e.ref._stringRef===o?e.ref:(e=function(e){var t=u.refs===At?u.refs={}:u.refs;null===e?delete t[o]:t[o]=e},e._stringRef=o,e)}\"string\"!==typeof n&&r(\"148\"),t._owner||r(\"149\",n)}return n}function ue(e,t){\"textarea\"!==e.type&&r(\"31\",\"[object Object]\"===Object.prototype.toString.call(t)?\"object with keys {\"+Object.keys(t).join(\", \")+\"}\":t,\"\")}function oe(e,t){function n(n,r){if(t){if(!e){if(null===r.alternate)return;r=r.alternate}var u=n.lastEffect;null!==u?(u.nextEffect=r,n.lastEffect=r):n.firstEffect=n.lastEffect=r,r.nextEffect=null,r.effectTag=Mu}}function u(e,r){if(!t)return null;for(;null!==r;)n(e,r),r=r.sibling;return null}function o(e,t){for(e=new Map;null!==t;)null!==t.key?e.set(t.key,t):e.set(t.index,t),t=t.sibling;return e}function a(t,n){return e?(t=bu(t,n),t.index=0,t.sibling=null,t):(t.pendingWorkPriority=n,t.effectTag=Lu,t.index=0,t.sibling=null,t)}function i(e,n,r){return e.index=r,t?null!==(r=e.alternate)?(r=r.index,r<n?(e.effectTag=Uu,n):r):(e.effectTag=Uu,n):n}function l(e){return t&&null===e.alternate&&(e.effectTag=Uu),e}function s(e,t,n,r){return null===t||t.tag!==Nu?(n=Bu(n,e.internalContextTag,r),n.return=e,n):(t=a(t,r),t.pendingProps=n,t.return=e,t)}function c(e,t,n,r){return null===t||t.type!==n.type?(r=yu(n,e.internalContextTag,r),r.ref=re(t,n),r.return=e,r):(r=a(t,r),r.ref=re(t,n),r.pendingProps=n.props,r.return=e,r)}function p(e,t,n,r){return null===t||t.tag!==Ou?(n=wu(n,e.internalContextTag,r),n.return=e,n):(t=a(t,r),t.pendingProps=n,t.return=e,t)}function f(e,t,n,r){return null===t||t.tag!==Iu?(t=ku(n,e.internalContextTag,r),t.type=n.value,t.return=e,t):(t=a(t,r),t.type=n.value,t.return=e,t)}function d(e,t,n,r){return null===t||t.tag!==_u||t.stateNode.containerInfo!==n.containerInfo||t.stateNode.implementation!==n.implementation?(n=xu(n,e.internalContextTag,r),n.return=e,n):(t=a(t,r),t.pendingProps=n.children||[],t.return=e,t)}function D(e,t,n,r){return null===t||t.tag!==Ru?(n=vu(n,e.internalContextTag,r),n.return=e,n):(t=a(t,r),t.pendingProps=n,t.return=e,t)}function h(e,t,n){if(\"string\"===typeof t||\"number\"===typeof t)return t=Bu(\"\"+t,e.internalContextTag,n),t.return=e,t;if(\"object\"===typeof t&&null!==t){switch(t.$$typeof){case qu:return n=yu(t,e.internalContextTag,n),n.ref=re(null,t),n.return=e,n;case Eu:return t=wu(t,e.internalContextTag,n),t.return=e,t;case Au:return n=ku(t,e.internalContextTag,n),n.type=t.value,n.return=e,n;case Fu:return t=xu(t,e.internalContextTag,n),t.return=e,t}if(Tu(t)||ne(t))return t=vu(t,e.internalContextTag,n),t.return=e,t;ue(e,t)}return null}function g(e,t,n,r){var u=null!==t?t.key:null;if(\"string\"===typeof n||\"number\"===typeof n)return null!==u?null:s(e,t,\"\"+n,r);if(\"object\"===typeof n&&null!==n){switch(n.$$typeof){case qu:return n.key===u?c(e,t,n,r):null;case Eu:return n.key===u?p(e,t,n,r):null;case Au:return null===u?f(e,t,n,r):null;case Fu:return n.key===u?d(e,t,n,r):null}if(Tu(n)||ne(n))return null!==u?null:D(e,t,n,r);ue(e,n)}return null}function m(e,t,n,r,u){if(\"string\"===typeof r||\"number\"===typeof r)return e=e.get(n)||null,s(t,e,\"\"+r,u);if(\"object\"===typeof r&&null!==r){switch(r.$$typeof){case qu:return e=e.get(null===r.key?n:r.key)||null,c(t,e,r,u);case Eu:return e=e.get(null===r.key?n:r.key)||null,p(t,e,r,u);case Au:return e=e.get(n)||null,f(t,e,r,u);case Fu:return e=e.get(null===r.key?n:r.key)||null,d(t,e,r,u)}if(Tu(r)||ne(r))return e=e.get(n)||null,D(t,e,r,u);ue(t,r)}return null}function C(e,r,a,l){for(var s=null,c=null,p=r,f=r=0,d=null;null!==p&&f<a.length;f++){p.index>f?(d=p,p=null):d=p.sibling;var D=g(e,p,a[f],l);if(null===D){null===p&&(p=d);break}t&&p&&null===D.alternate&&n(e,p),r=i(D,r,f),null===c?s=D:c.sibling=D,c=D,p=d}if(f===a.length)return u(e,p),s;if(null===p){for(;f<a.length;f++)(p=h(e,a[f],l))&&(r=i(p,r,f),null===c?s=p:c.sibling=p,c=p);return s}for(p=o(e,p);f<a.length;f++)(d=m(p,e,f,a[f],l))&&(t&&null!==d.alternate&&p.delete(null===d.key?f:d.key),r=i(d,r,f),null===c?s=d:c.sibling=d,c=d);return t&&p.forEach(function(t){return n(e,t)}),s}function E(e,a,l,s){var c=ne(l);\"function\"!==typeof c&&r(\"150\"),null==(l=c.call(l))&&r(\"151\");for(var p=c=null,f=a,d=a=0,D=null,C=l.next();null!==f&&!C.done;d++,C=l.next()){f.index>d?(D=f,f=null):D=f.sibling;var E=g(e,f,C.value,s);if(null===E){f||(f=D);break}t&&f&&null===E.alternate&&n(e,f),a=i(E,a,d),null===p?c=E:p.sibling=E,p=E,f=D}if(C.done)return u(e,f),c;if(null===f){for(;!C.done;d++,C=l.next())null!==(C=h(e,C.value,s))&&(a=i(C,a,d),null===p?c=C:p.sibling=C,p=C);return c}for(f=o(e,f);!C.done;d++,C=l.next())null!==(C=m(f,e,d,C.value,s))&&(t&&null!==C.alternate&&f.delete(null===C.key?d:C.key),a=i(C,a,d),null===p?c=C:p.sibling=C,p=C);return t&&f.forEach(function(t){return n(e,t)}),c}return function(e,t,o,i){var s=\"object\"===typeof o&&null!==o;if(s)switch(o.$$typeof){case qu:e:{var c=o.key;for(s=t;null!==s;){if(s.key===c){if(s.type===o.type){u(e,s.sibling),t=a(s,i),t.ref=re(s,o),t.pendingProps=o.props,t.return=e,e=t;break e}u(e,s);break}n(e,s),s=s.sibling}i=yu(o,e.internalContextTag,i),i.ref=re(t,o),i.return=e,e=i}return l(e);case Eu:e:{for(s=o.key;null!==t;){if(t.key===s){if(t.tag===Ou){u(e,t.sibling),t=a(t,i),t.pendingProps=o,t.return=e,e=t;break e}u(e,t);break}n(e,t),t=t.sibling}o=wu(o,e.internalContextTag,i),o.return=e,e=o}return l(e);case Au:e:{if(null!==t){if(t.tag===Iu){u(e,t.sibling),t=a(t,i),t.type=o.value,t.return=e,e=t;break e}u(e,t)}t=ku(o,e.internalContextTag,i),t.type=o.value,t.return=e,e=t}return l(e);case Fu:e:{for(s=o.key;null!==t;){if(t.key===s){if(t.tag===_u&&t.stateNode.containerInfo===o.containerInfo&&t.stateNode.implementation===o.implementation){u(e,t.sibling),t=a(t,i),t.pendingProps=o.children||[],t.return=e,e=t;break e}u(e,t);break}n(e,t),t=t.sibling}o=xu(o,e.internalContextTag,i),o.return=e,e=o}return l(e)}if(\"string\"===typeof o||\"number\"===typeof o)return o=\"\"+o,null!==t&&t.tag===Nu?(u(e,t.sibling),t=a(t,i),t.pendingProps=o,t.return=e,e=t):(u(e,t),o=Bu(o,e.internalContextTag,i),o.return=e,e=o),l(e);if(Tu(o))return C(e,t,o,i);if(ne(o))return E(e,t,o,i);if(s&&ue(e,o),\"undefined\"===typeof o)switch(e.tag){case Pu:case Su:o=e.type,r(\"152\",o.displayName||o.name||\"Component\")}return u(e,t)}}function ae(e,t,n,u){function o(e,t){t.updater=a,e.stateNode=t,Yt.set(t,e)}var a={isMounted:ro,enqueueSetState:function(n,r,u){n=Yt.get(n);var o=t(n,!1);Ju(n,r,void 0===u?null:u,o),e(n,o)},enqueueReplaceState:function(n,r,u){n=Yt.get(n);var o=t(n,!1);Zu(n,r,void 0===u?null:u,o),e(n,o)},enqueueForceUpdate:function(n,r){n=Yt.get(n);var u=t(n,!1);eo(n,void 0===r?null:r,u),e(n,u)}};return{adoptClassInstance:o,constructClassInstance:function(e,t){var n=e.type,r=Qu(e),u=Xu(e),a=u?$u(e,r):At;return t=new n(t,a),o(e,t),u&&Yu(e,r,a),t},mountClassInstance:function(e,t){var n=e.alternate,u=e.stateNode,o=u.state||null,i=e.pendingProps;i||r(\"158\");var l=Qu(e);u.props=i,u.state=o,u.refs=At,u.context=$u(e,l),kr.enableAsyncSubtreeAPI&&null!=e.type&&null!=e.type.prototype&&!0===e.type.prototype.unstable_isAsyncReactComponent&&(e.internalContextTag|=Gu),\"function\"===typeof u.componentWillMount&&(l=u.state,u.componentWillMount(),l!==u.state&&a.enqueueReplaceState(u,u.state,null),null!==(l=e.updateQueue)&&(u.state=to(n,e,l,u,o,i,t))),\"function\"===typeof u.componentDidMount&&(e.effectTag|=Ku)},updateClassInstance:function(e,t,o){var i=t.stateNode;i.props=t.memoizedProps,i.state=t.memoizedState;var l=t.memoizedProps,s=t.pendingProps;s||null==(s=l)&&r(\"159\");var c=i.context,p=Qu(t);if(p=$u(t,p),\"function\"!==typeof i.componentWillReceiveProps||l===s&&c===p||(c=i.state,i.componentWillReceiveProps(s,p),i.state!==c&&a.enqueueReplaceState(i,i.state,null)),c=t.memoizedState,o=null!==t.updateQueue?to(e,t,t.updateQueue,i,c,s,o):c,!(l!==s||c!==o||no()||null!==t.updateQueue&&t.updateQueue.hasForceUpdate))return\"function\"!==typeof i.componentDidUpdate||l===e.memoizedProps&&c===e.memoizedState||(t.effectTag|=Ku),!1;var f=s;if(null===l||null!==t.updateQueue&&t.updateQueue.hasForceUpdate)f=!0;else{var d=t.stateNode,D=t.type;f=\"function\"===typeof d.shouldComponentUpdate?d.shouldComponentUpdate(f,o,p):!D.prototype||!D.prototype.isPureReactComponent||(!Ft(l,f)||!Ft(c,o))}return f?(\"function\"===typeof i.componentWillUpdate&&i.componentWillUpdate(s,o,p),\"function\"===typeof i.componentDidUpdate&&(t.effectTag|=Ku)):(\"function\"!==typeof i.componentDidUpdate||l===e.memoizedProps&&c===e.memoizedState||(t.effectTag|=Ku),n(t,s),u(t,o)),i.props=s,i.state=o,i.context=p,f}}}function ie(e,t,n,u,o){function a(e,t,n){i(e,t,n,t.pendingWorkPriority)}function i(e,t,n,r){t.child=null===e?uo(t,t.child,n,r):e.child===t.child?oo(t,t.child,n,r):ao(t,t.child,n,r)}function l(e,t){var n=t.ref;null===n||e&&e.ref===n||(t.effectTag|=_o)}function s(e,t,n,r){if(l(e,t),!n)return r&&ho(t,!1),p(e,t);n=t.stateNode,Oo.current=t;var u=n.render();return t.effectTag|=To,a(e,t,u),t.memoizedState=n.state,t.memoizedProps=n.props,r&&ho(t,!0),t.child}function c(e){var t=e.stateNode;t.pendingContext?Do(e,t.pendingContext,t.pendingContext!==t.context):t.context&&Do(e,t.context,!1),m(e,t.containerInfo)}function p(e,t){return io(e,t),t.child}function f(e,t){switch(t.tag){case Eo:c(t);break;case Co:fo(t);break;case bo:m(t,t.stateNode.containerInfo)}return null}var d=e.shouldSetTextContent,D=e.useSyncScheduling,h=e.shouldDeprioritizeSubtree,g=t.pushHostContext,m=t.pushHostContainer,C=n.enterHydrationState,E=n.resetHydrationState,A=n.tryToClaimNextHydratableInstance;e=ae(u,o,function(e,t){e.memoizedProps=t},function(e,t){e.memoizedState=t});var F=e.adoptClassInstance,b=e.constructClassInstance,y=e.mountClassInstance,v=e.updateClassInstance;return{beginWork:function(e,t,n){if(t.pendingWorkPriority===ko||t.pendingWorkPriority>n)return f(e,t);switch(t.tag){case go:null!==e&&r(\"155\");var u=t.type,o=t.pendingProps,i=co(t);return i=so(t,i),u=u(o,i),t.effectTag|=To,\"object\"===typeof u&&null!==u&&\"function\"===typeof u.render?(t.tag=Co,o=fo(t),F(t,u),y(t,n),t=s(e,t,!0,o)):(t.tag=mo,a(e,t,u),t.memoizedProps=o,t=t.child),t;case mo:e:{if(o=t.type,n=t.pendingProps,u=t.memoizedProps,po())null===n&&(n=u);else if(null===n||u===n){t=p(e,t);break e}u=co(t),u=so(t,u),o=o(n,u),t.effectTag|=To,a(e,t,o),t.memoizedProps=n,t=t.child}return t;case Co:return o=fo(t),u=void 0,null===e?t.stateNode?r(\"153\"):(b(t,t.pendingProps),y(t,n),u=!0):u=v(e,t,n),s(e,t,u,o);case Eo:return c(t),u=t.updateQueue,null!==u?(o=t.memoizedState,u=lo(e,t,u,null,o,null,n),o===u?(E(),t=p(e,t)):(o=u.element,null!==e&&null!==e.child||!C(t)?(E(),a(e,t,o)):(t.effectTag|=So,t.child=uo(t,t.child,o,n)),t.memoizedState=u,t=t.child)):(E(),t=p(e,t)),t;case Ao:g(t),null===e&&A(t),o=t.type;var B=t.memoizedProps;return u=t.pendingProps,null===u&&null===(u=B)&&r(\"154\"),i=null!==e?e.memoizedProps:null,po()||null!==u&&B!==u?(B=u.children,d(o,u)?B=null:i&&d(o,i)&&(t.effectTag|=Po),l(e,t),n!==xo&&!D&&h(o,u)?(t.pendingWorkPriority=xo,t=null):(a(e,t,B),t.memoizedProps=u,t=t.child)):t=p(e,t),t;case Fo:return null===e&&A(t),e=t.pendingProps,null===e&&(e=t.memoizedProps),t.memoizedProps=e,null;case vo:t.tag=yo;case yo:return n=t.pendingProps,po()?null===n&&null===(n=e&&e.memoizedProps)&&r(\"154\"):null!==n&&t.memoizedProps!==n||(n=t.memoizedProps),o=n.children,u=t.pendingWorkPriority,t.stateNode=null===e?uo(t,t.stateNode,o,u):e.child===t.child?oo(t,t.stateNode,o,u):ao(t,t.stateNode,o,u),t.memoizedProps=n,t.stateNode;case Bo:return null;case bo:e:{if(m(t,t.stateNode.containerInfo),n=t.pendingWorkPriority,o=t.pendingProps,po())null===o&&null==(o=e&&e.memoizedProps)&&r(\"154\");else if(null===o||t.memoizedProps===o){t=p(e,t);break e}null===e?t.child=ao(t,t.child,o,n):a(e,t,o),t.memoizedProps=o,t=t.child}return t;case wo:e:{if(n=t.pendingProps,po())null===n&&(n=t.memoizedProps);else if(null===n||t.memoizedProps===n){t=p(e,t);break e}a(e,t,n),t.memoizedProps=n,t=t.child}return t;default:r(\"156\")}},beginFailedWork:function(e,t,n){switch(t.tag){case Co:fo(t);break;case Eo:c(t);break;default:r(\"157\")}return t.effectTag|=No,null===e?t.child=null:t.child!==e.child&&(t.child=e.child),t.pendingWorkPriority===ko||t.pendingWorkPriority>n?f(e,t):(t.firstEffect=null,t.lastEffect=null,i(e,t,null,n),t.tag===Co&&(e=t.stateNode,t.memoizedProps=e.props,t.memoizedState=e.state),t.child)}}}function le(e,t,n){var u=e.createInstance,o=e.createTextInstance,a=e.appendInitialChild,i=e.finalizeInitialChildren,l=e.prepareUpdate,s=t.getRootHostContainer,c=t.popHostContext,p=t.getHostContext,f=t.popHostContainer,d=n.prepareToHydrateHostInstance,D=n.prepareToHydrateHostTextInstance,h=n.popHydrationState;return{completeWork:function(e,t,n){var g=t.pendingProps;switch(null===g?g=t.memoizedProps:t.pendingWorkPriority===Jo&&n!==Jo||(t.pendingProps=null),t.tag){case Mo:return null;case Ho:return Ro(t),null;case qo:return f(t),Lo(t),g=t.stateNode,g.pendingContext&&(g.context=g.pendingContext,g.pendingContext=null),null!==e&&null!==e.child||(h(t),t.effectTag&=~$o),null;case jo:c(t),n=s();var m=t.type;if(null!==e&&null!=t.stateNode){var C=e.memoizedProps,E=t.stateNode,A=p();g=l(E,m,C,g,n,A),(t.updateQueue=g)&&(t.effectTag|=Xo),e.ref!==t.ref&&(t.effectTag|=Qo)}else{if(!g)return null===t.stateNode&&r(\"166\"),null;if(e=p(),h(t))d(t,n,e)&&(t.effectTag|=Xo);else{e=u(m,g,n,e,t);e:for(C=t.child;null!==C;){if(C.tag===jo||C.tag===Vo)a(e,C.stateNode);else if(C.tag!==Wo&&null!==C.child){C=C.child;continue}if(C===t)break e;for(;null===C.sibling;){if(null===C.return||C.return===t)break e;C=C.return}C=C.sibling}i(e,m,g,n)&&(t.effectTag|=Xo),t.stateNode=e}null!==t.ref&&(t.effectTag|=Qo)}return null;case Vo:if(e&&null!=t.stateNode)e.memoizedProps!==g&&(t.effectTag|=Xo);else{if(\"string\"!==typeof g)return null===t.stateNode&&r(\"166\"),null;e=s(),n=p(),h(t)?D(t)&&(t.effectTag|=Xo):t.stateNode=o(g,e,n,t)}return null;case zo:(g=t.memoizedProps)||r(\"165\"),t.tag=Ko,n=[];e:for((m=t.stateNode)&&(m.return=t);null!==m;){if(m.tag===jo||m.tag===Vo||m.tag===Wo)r(\"164\");else if(m.tag===Go)n.push(m.type);else if(null!==m.child){m.child.return=m,m=m.child;continue}for(;null===m.sibling;){if(null===m.return||m.return===t)break e;m=m.return}m.sibling.return=m.return,m=m.sibling}return m=g.handler,g=m(g.props,n),t.child=Io(t,null!==e?e.child:null,g,t.pendingWorkPriority),t.child;case Ko:return t.tag=zo,null;case Go:case Yo:return null;case Wo:return t.effectTag|=Xo,f(t),null;case Uo:r(\"167\");default:r(\"156\")}}}}function se(e){return function(t){try{return e(t)}catch(e){}}}function ce(e,t){function n(e){var n=e.ref;if(null!==n)try{n(null)}catch(n){t(e,n)}}function u(e){return e.tag===ua||e.tag===ra||e.tag===aa}function o(e){for(var t=e;;)if(i(t),null!==t.child&&t.tag!==aa)t.child.return=t,t=t.child;else{if(t===e)break;for(;null===t.sibling;){if(null===t.return||t.return===e)return;t=t.return}t.sibling.return=t.return,t=t.sibling}}function a(e){for(var t=e,n=!1,u=void 0,a=void 0;;){if(!n){n=t.return;e:for(;;){switch(null===n&&r(\"160\"),n.tag){case ua:u=n.stateNode,a=!1;break e;case ra:case aa:u=n.stateNode.containerInfo,a=!0;break e}n=n.return}n=!0}if(t.tag===ua||t.tag===oa)o(t),a?m(u,t.stateNode):g(u,t.stateNode);else if(t.tag===aa?u=t.stateNode.containerInfo:i(t),null!==t.child){t.child.return=t,t=t.child;continue}if(t===e)break;for(;null===t.sibling;){if(null===t.return||t.return===e)return;t=t.return,t.tag===aa&&(n=!1)}t.sibling.return=t.return,t=t.sibling}}function i(e){switch(\"function\"===typeof sa&&sa(e),e.tag){case na:n(e);var r=e.stateNode;if(\"function\"===typeof r.componentWillUnmount)try{r.props=e.memoizedProps,r.state=e.memoizedState,r.componentWillUnmount()}catch(n){t(e,n)}break;case ua:n(e);break;case ia:o(e.stateNode);break;case aa:a(e)}}var l=e.commitMount,s=e.commitUpdate,c=e.resetTextContent,p=e.commitTextUpdate,f=e.appendChild,d=e.appendChildToContainer,D=e.insertBefore,h=e.insertInContainerBefore,g=e.removeChild,m=e.removeChildFromContainer,C=e.getPublicInstance;return{commitPlacement:function(e){e:{for(var t=e.return;null!==t;){if(u(t)){var n=t;break e}t=t.return}r(\"160\"),n=void 0}var o=t=void 0;switch(n.tag){case ua:t=n.stateNode,o=!1;break;case ra:case aa:t=n.stateNode.containerInfo,o=!0;break;default:r(\"161\")}n.effectTag&da&&(c(t),n.effectTag&=~da);e:t:for(n=e;;){for(;null===n.sibling;){if(null===n.return||u(n.return)){n=null;break e}n=n.return}for(n.sibling.return=n.return,n=n.sibling;n.tag!==ua&&n.tag!==oa;){if(n.effectTag&ca)continue t;if(null===n.child||n.tag===aa)continue t;n.child.return=n,n=n.child}if(!(n.effectTag&ca)){n=n.stateNode;break e}}for(var a=e;;){if(a.tag===ua||a.tag===oa)n?o?h(t,a.stateNode,n):D(t,a.stateNode,n):o?d(t,a.stateNode):f(t,a.stateNode);else if(a.tag!==aa&&null!==a.child){a.child.return=a,a=a.child;continue}if(a===e)break;for(;null===a.sibling;){if(null===a.return||a.return===e)return;a=a.return}a.sibling.return=a.return,a=a.sibling}},commitDeletion:function(e){a(e),e.return=null,e.child=null,e.alternate&&(e.alternate.child=null,e.alternate.return=null)},commitWork:function(e,t){switch(t.tag){case na:break;case ua:var n=t.stateNode;if(null!=n){var u=t.memoizedProps;e=null!==e?e.memoizedProps:u;var o=t.type,a=t.updateQueue;t.updateQueue=null,null!==a&&s(n,a,o,e,u,t)}break;case oa:null===t.stateNode&&r(\"162\"),n=t.memoizedProps,p(t.stateNode,null!==e?e.memoizedProps:n,n);break;case ra:case aa:break;default:r(\"163\")}},commitLifeCycles:function(e,t){switch(t.tag){case na:var n=t.stateNode;if(t.effectTag&pa)if(null===e)n.props=t.memoizedProps,n.state=t.memoizedState,n.componentDidMount();else{var u=e.memoizedProps;e=e.memoizedState,n.props=t.memoizedProps,n.state=t.memoizedState,n.componentDidUpdate(u,e)}t.effectTag&fa&&null!==t.updateQueue&&la(t,t.updateQueue,n);break;case ra:e=t.updateQueue,null!==e&&la(t,e,t.child&&t.child.stateNode);break;case ua:n=t.stateNode,null===e&&t.effectTag&pa&&l(n,t.type,t.memoizedProps,t);break;case oa:case aa:break;default:r(\"163\")}},commitAttachRef:function(e){var t=e.ref;if(null!==t){var n=e.stateNode;switch(e.tag){case ua:t(C(n));break;default:t(n)}}},commitDetachRef:function(e){null!==(e=e.ref)&&e(null)}}}function pe(e){function t(e){return e===ma&&r(\"174\"),e}var n=e.getChildHostContext,u=e.getRootHostContext,o=Da(ma),a=Da(ma),i=Da(ma);return{getHostContext:function(){return t(o.current)},getRootHostContainer:function(){return t(i.current)},popHostContainer:function(e){ha(o,e),ha(a,e),ha(i,e)},popHostContext:function(e){a.current===e&&(ha(o,e),ha(a,e))},pushHostContainer:function(e,t){ga(i,t,e),t=u(t),ga(a,e,e),ga(o,t,e)},pushHostContext:function(e){var r=t(i.current),u=t(o.current);r=n(u,e.type,r),u!==r&&(ga(a,e,e),ga(o,r,e))},resetHostContainer:function(){o.current=ma,i.current=ma}}}function fe(e){function t(e,t){var n=ya();n.stateNode=t,n.return=e,n.effectTag=Fa,null!==e.lastEffect?(e.lastEffect.nextEffect=n,e.lastEffect=n):e.firstEffect=e.lastEffect=n}function n(e,t){switch(e.tag){case Ca:return a(t,e.type,e.pendingProps);case Ea:return i(t,e.pendingProps);default:return!1}}function u(e){for(e=e.return;null!==e&&e.tag!==Ca&&e.tag!==Aa;)e=e.return;D=e}var o=e.shouldSetTextContent,a=e.canHydrateInstance,i=e.canHydrateTextInstance,l=e.getNextHydratableSibling,s=e.getFirstHydratableChild,c=e.hydrateInstance,p=e.hydrateTextInstance,f=e.didNotHydrateInstance,d=e.didNotFindHydratableInstance;if(e=e.didNotFindHydratableTextInstance,!(a&&i&&l&&s&&c&&p&&f&&d&&e))return{enterHydrationState:function(){return!1},resetHydrationState:function(){},tryToClaimNextHydratableInstance:function(){},prepareToHydrateHostInstance:function(){r(\"175\")},prepareToHydrateHostTextInstance:function(){r(\"176\")},popHydrationState:function(){return!1}};var D=null,h=null,g=!1;return{enterHydrationState:function(e){return h=s(e.stateNode.containerInfo),D=e,g=!0},resetHydrationState:function(){h=D=null,g=!1},tryToClaimNextHydratableInstance:function(e){if(g){var r=h;if(r){if(!n(e,r)){if(!(r=l(r))||!n(e,r))return e.effectTag|=ba,g=!1,void(D=e);t(D,h)}e.stateNode=r,D=e,h=s(r)}else e.effectTag|=ba,g=!1,D=e}},prepareToHydrateHostInstance:function(e,t,n){return t=c(e.stateNode,e.type,e.memoizedProps,t,n,e),e.updateQueue=t,null!==t},prepareToHydrateHostTextInstance:function(e){return p(e.stateNode,e.memoizedProps,e)},popHydrationState:function(e){if(e!==D)return!1;if(!g)return u(e),g=!0,!1;var n=e.type;if(e.tag!==Ca||\"head\"!==n&&\"body\"!==n&&!o(n,e.memoizedProps))for(n=h;n;)t(e,n),n=l(n);return u(e),h=D?l(e.stateNode):null,!0}}}function de(e){function t(){for(;null!==K&&K.current.pendingWorkPriority===Sa;){K.isScheduled=!1;var e=K.nextScheduledRoot;if(K.nextScheduledRoot=null,K===G)return G=K=null,V=Sa,null;K=e}e=K;for(var t=null,n=Sa;null!==e;)e.current.pendingWorkPriority!==Sa&&(n===Sa||n>e.current.pendingWorkPriority)&&(n=e.current.pendingWorkPriority,t=e),e=e.nextScheduledRoot;null!==t?(V=n,Ba(),Xa(),b(),j=ka(t.current,n),t!==ue&&(re=0,ue=t)):(V=Sa,ue=j=null)}function n(n){ee=!0,z=null;var u=n.stateNode;if(u.current===n&&r(\"177\"),V!==Pa&&V!==Na||re++,wa.current=null,n.effectTag>La)if(null!==n.lastEffect){n.lastEffect.nextEffect=n;var o=n.firstEffect}else o=n;else o=n.firstEffect;for(I(),W=o;null!==W;){var a=!1,i=void 0;try{for(;null!==W;){var l=W.effectTag;if(l&ja&&e.resetTextContent(W.stateNode),l&za){var s=W.alternate;null!==s&&N(s)}switch(l&~(Va|Wa|ja|za|La)){case Ua:k(W),W.effectTag&=~Ua;break;case Ha:k(W),W.effectTag&=~Ua,T(W.alternate,W);break;case Ma:T(W.alternate,W);break;case qa:te=!0,x(W),te=!1}W=W.nextEffect}}catch(e){a=!0,i=e}a&&(null===W&&r(\"178\"),p(W,i),null!==W&&(W=W.nextEffect))}for(R(),u.current=n,W=o;null!==W;){u=!1,o=void 0;try{for(;null!==W;){var c=W.effectTag;if(c&(Ma|Va)&&S(W.alternate,W),c&za&&P(W),c&Wa)switch(a=W,i=void 0,null!==$&&(i=$.get(a),$.delete(a),null==i&&null!==a.alternate&&(a=a.alternate,i=$.get(a),$.delete(a))),null==i&&r(\"184\"),a.tag){case $a:a.stateNode.componentDidCatch(i.error,{componentStack:i.componentStack});break;case Ka:null===J&&(J=i.error);break;default:r(\"157\")}var f=W.nextEffect;W.nextEffect=null,W=f}}catch(e){u=!0,o=e}u&&(null===W&&r(\"178\"),p(W,o),null!==W&&(W=W.nextEffect))}ee=!1,\"function\"===typeof Ta&&Ta(n.stateNode),X&&(X.forEach(m),X=null),t()}function u(e){for(;;){var t=w(e.alternate,e,V),n=e.return,r=e.sibling,u=e;if(!(u.pendingWorkPriority!==Sa&&u.pendingWorkPriority>V)){for(var o=Qa(u),a=u.child;null!==a;)o=xa(o,a.pendingWorkPriority),a=a.sibling;u.pendingWorkPriority=o}if(null!==t)return t;if(null!==n&&(null===n.firstEffect&&(n.firstEffect=e.firstEffect),null!==e.lastEffect&&(null!==n.lastEffect&&(n.lastEffect.nextEffect=e.firstEffect),n.lastEffect=e.lastEffect),e.effectTag>La&&(null!==n.lastEffect?n.lastEffect.nextEffect=e:n.firstEffect=e,n.lastEffect=e)),null!==r)return r;if(null===n){z=e;break}e=n}return null}function o(e){var t=v(e.alternate,e,V);return null===t&&(t=u(e)),wa.current=null,t}function a(e){var t=B(e.alternate,e,V);return null===t&&(t=u(e)),wa.current=null,t}function i(e){c(Ia,e)}function l(){if(null!==$&&0<$.size&&V===Na)for(;null!==j;){var e=j;if(null===(j=null!==$&&($.has(e)||null!==e.alternate&&$.has(e.alternate))?a(j):o(j))&&(null===z&&r(\"179\"),L=Na,n(z),L=V,null===$||0===$.size||V!==Na))break}}function s(e,u){if(null!==z?(L=Na,n(z),l()):null===j&&t(),!(V===Sa||V>e)){L=V;e:for(;;){if(V<=Na)for(;null!==j&&!(null===(j=o(j))&&(null===z&&r(\"179\"),L=Na,n(z),L=V,l(),V===Sa||V>e||V>Na)););else if(null!==u)for(;null!==j&&!M;)if(1<u.timeRemaining()){if(null===(j=o(j)))if(null===z&&r(\"179\"),1<u.timeRemaining()){if(L=Na,n(z),L=V,l(),V===Sa||V>e||V<_a)break}else M=!0}else M=!0;switch(V){case Pa:case Na:if(V<=e)continue e;break e;case _a:case Oa:case Ia:if(null===u)break e;if(!M&&V<=e)continue e;break e;case Sa:break e;default:r(\"181\")}}}}function c(e,t){U&&r(\"182\"),U=!0;var n=L,u=!1,o=null;try{s(e,t)}catch(e){u=!0,o=e}for(;u;){if(Z){J=o;break}var l=j;if(null===l)Z=!0;else{var c=p(l,o);if(null===c&&r(\"183\"),!Z){try{u=c,o=e,c=t;for(var f=u;null!==l;){switch(l.tag){case $a:va(l);break;case Ga:F(l);break;case Ka:A(l);break;case Ya:A(l)}if(l===f||l.alternate===f)break;l=l.return}j=a(u),s(o,c)}catch(e){u=!0,o=e;continue}break}}}if(L=n,null!==t&&(Y=!1),V>Na&&!Y&&(_(i),Y=!0),e=J,Z=M=U=!1,ue=Q=$=J=null,re=0,null!==e)throw e}function p(e,t){var n=wa.current=null,r=!1,u=!1,o=null;if(e.tag===Ka)n=e,d(e)&&(Z=!0);else for(var a=e.return;null!==a&&null===n;){if(a.tag===$a?\"function\"===typeof a.stateNode.componentDidCatch&&(r=!0,o=f(a),n=a,u=!0):a.tag===Ka&&(n=a),d(a)){if(te||null!==X&&(X.has(a)||null!==a.alternate&&X.has(a.alternate)))return null;n=null,u=!1}a=a.return}if(null!==n){null===Q&&(Q=new Set),Q.add(n);var i=\"\";a=e;do{e:switch(a.tag){case fu:case du:case Du:case hu:var l=a._debugOwner,s=a._debugSource,c=f(a),p=null;l&&(p=f(l)),l=s,c=\"\\n in \"+(c||\"Unknown\")+(l?\" (at \"+l.fileName.replace(/^.*[\\\\\\/]/,\"\")+\":\"+l.lineNumber+\")\":p?\" (created by \"+p+\")\":\"\");break e;default:c=\"\"}i+=c,a=a.return}while(a);a=i,e=f(e),null===$&&($=new Map),t={componentName:e,componentStack:a,error:t,errorBoundary:r?n.stateNode:null,errorBoundaryFound:r,errorBoundaryName:o,willRetry:u},$.set(n,t);try{console.error(t.error)}catch(e){console.error(e)}return ee?(null===X&&(X=new Set),X.add(n)):m(n),n}return null===J&&(J=t),null}function d(e){return null!==Q&&(Q.has(e)||null!==e.alternate&&Q.has(e.alternate))}function D(e,t){return h(e,t,!1)}function h(e,t){re>ne&&(Z=!0,r(\"185\")),!U&&t<=V&&(j=null);for(var n=!0;null!==e&&n;){if(n=!1,(e.pendingWorkPriority===Sa||e.pendingWorkPriority>t)&&(n=!0,e.pendingWorkPriority=t),null!==e.alternate&&(e.alternate.pendingWorkPriority===Sa||e.alternate.pendingWorkPriority>t)&&(n=!0,e.alternate.pendingWorkPriority=t),null===e.return){if(e.tag!==Ka)break;var u=e.stateNode;if(t===Sa||u.isScheduled||(u.isScheduled=!0,G?G.nextScheduledRoot=u:K=u,G=u),!U)switch(t){case Pa:q?c(Pa,null):c(Na,null);break;case Na:H||r(\"186\");break;default:Y||(_(i),Y=!0)}}e=e.return}}function g(e,t){var n=L;return n===Sa&&(n=!O||e.internalContextTag&Ra||t?Oa:Pa),n===Pa&&(U||H)?Na:n}function m(e){h(e,Na,!0)}var C=pe(e),E=fe(e),A=C.popHostContainer,F=C.popHostContext,b=C.resetHostContainer,y=ie(e,C,E,D,g),v=y.beginWork,B=y.beginFailedWork,w=le(e,C,E).completeWork;C=ce(e,p);var k=C.commitPlacement,x=C.commitDeletion,T=C.commitWork,S=C.commitLifeCycles,P=C.commitAttachRef,N=C.commitDetachRef,_=e.scheduleDeferredCallback,O=e.useSyncScheduling,I=e.prepareForCommit,R=e.resetAfterCommit,L=Sa,U=!1,M=!1,H=!1,q=!1,j=null,V=Sa,W=null,z=null,K=null,G=null,Y=!1,$=null,Q=null,X=null,J=null,Z=!1,ee=!1,te=!1,ne=1e3,re=0,ue=null;return{scheduleUpdate:D,getPriorityContext:g,batchedUpdates:function(e,t){var n=H;H=!0;try{return e(t)}finally{H=n,U||H||c(Na,null)}},unbatchedUpdates:function(e){var t=q,n=H;q=H,H=!1;try{return e()}finally{H=n,q=t}},flushSync:function(e){var t=H,n=L;H=!0,L=Pa;try{return e()}finally{H=t,L=n,U&&r(\"187\"),c(Na,null)}},deferredUpdates:function(e){var t=L;L=Oa;try{return e()}finally{L=t}}}}function De(){r(\"196\")}function he(e){return e?(e=Yt.get(e),\"number\"===typeof e.tag?De(e):e._processChildContext(e._context)):At}function ge(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function me(e,t){var n=ge(e);e=0;for(var r;n;){if(n.nodeType===oi){if(r=e+n.textContent.length,e<=t&&r>=t)return{node:n,offset:t-e};e=r}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=ge(n)}}function Ce(){return!ai&>.canUseDOM&&(ai=\"textContent\"in document.documentElement?\"textContent\":\"innerText\"),ai}function Ee(){r(\"211\")}function Ae(){r(\"212\")}function Fe(e){if(null==e)return null;if(e.nodeType===pi)return e;var t=Yt.get(e);if(t)return\"number\"===typeof t.tag?Ee(t):Ae(t);\"function\"===typeof e.render?r(\"188\"):r(\"213\",Object.keys(e))}function be(e){if(void 0!==e._hostParent)return e._hostParent;if(\"number\"===typeof e.tag){do{e=e.return}while(e&&e.tag!==fi);if(e)return e}return null}function ye(e,t){for(var n=0,r=e;r;r=be(r))n++;r=0;for(var u=t;u;u=be(u))r++;for(;0<n-r;)e=be(e),n--;for(;0<r-n;)t=be(t),r--;for(;n--;){if(e===t||e===t.alternate)return e;e=be(e),t=be(t)}return null}function ve(e,t,n){(t=Di(e,n.dispatchConfig.phasedRegistrationNames[t]))&&(n._dispatchListeners=B(n._dispatchListeners,t),n._dispatchInstances=B(n._dispatchInstances,e))}function Be(e){e&&e.dispatchConfig.phasedRegistrationNames&&di.traverseTwoPhase(e._targetInst,ve,e)}function we(e){if(e&&e.dispatchConfig.phasedRegistrationNames){var t=e._targetInst;t=t?di.getParentInstance(t):null,di.traverseTwoPhase(t,ve,e)}}function ke(e,t,n){e&&n&&n.dispatchConfig.registrationName&&(t=Di(e,n.dispatchConfig.registrationName))&&(n._dispatchListeners=B(n._dispatchListeners,t),n._dispatchInstances=B(n._dispatchInstances,e))}function xe(e){e&&e.dispatchConfig.registrationName&&ke(e._targetInst,null,e)}function Te(e,t,n,r){this.dispatchConfig=e,this._targetInst=t,this.nativeEvent=n,e=this.constructor.Interface;for(var u in e)e.hasOwnProperty(u)&&((t=e[u])?this[u]=t(n):\"target\"===u?this.target=r:this[u]=n[u]);return this.isDefaultPrevented=(null!=n.defaultPrevented?n.defaultPrevented:!1===n.returnValue)?Et.thatReturnsTrue:Et.thatReturnsFalse,this.isPropagationStopped=Et.thatReturnsFalse,this}function Se(e,t,n,r){if(this.eventPool.length){var u=this.eventPool.pop();return this.call(u,e,t,n,r),u}return new this(e,t,n,r)}function Pe(e){e instanceof this||r(\"223\"),e.destructor(),10>this.eventPool.length&&this.eventPool.push(e)}function Ne(e){e.eventPool=[],e.getPooled=Se,e.release=Pe}function _e(e,t,n,r){return Te.call(this,e,t,n,r)}function Oe(e,t,n,r){return Te.call(this,e,t,n,r)}function Ie(e,t){switch(e){case\"topKeyUp\":return-1!==Fi.indexOf(t.keyCode);case\"topKeyDown\":return 229!==t.keyCode;case\"topKeyPress\":case\"topMouseDown\":case\"topBlur\":return!0;default:return!1}}function Re(e){return e=e.detail,\"object\"===typeof e&&\"data\"in e?e.data:null}function Le(e,t){switch(e){case\"topCompositionEnd\":return Re(t);case\"topKeyPress\":return 32!==t.which?null:(Si=!0,xi);case\"topTextInput\":return e=t.data,e===xi&&Si?null:e;default:return null}}function Ue(e,t){if(Pi)return\"topCompositionEnd\"===e||!bi&&Ie(e,t)?(e=Ci.getData(),Ci.reset(),Pi=!1,e):null;switch(e){case\"topPaste\":return null;case\"topKeyPress\":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1<t.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case\"topCompositionEnd\":return ki?null:t.data;default:return null}}function Me(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return\"input\"===t?!!_i[e.type]:\"textarea\"===t}function He(e,t,n){return e=Te.getPooled(Oi.change,e,t,n),e.type=\"change\",fn.enqueueStateRestore(n),hi.accumulateTwoPhaseDispatches(e),e}function qe(e){Fn.enqueueEvents(e),Fn.processEventQueue(!1)}function je(e){var t=Gt.getNodeFromInstance(e);if(Zn.updateValueIfChanged(t))return e}function Ve(e,t){if(\"topChange\"===e)return t}function We(){Ii&&(Ii.detachEvent(\"onpropertychange\",ze),Ri=Ii=null)}function ze(e){\"value\"===e.propertyName&&je(Ri)&&(e=He(Ri,e,y(e)),Dn.batchedUpdates(qe,e))}function Ke(e,t,n){\"topFocus\"===e?(We(),Ii=t,Ri=n,Ii.attachEvent(\"onpropertychange\",ze)):\"topBlur\"===e&&We()}function Ge(e){if(\"topSelectionChange\"===e||\"topKeyUp\"===e||\"topKeyDown\"===e)return je(Ri)}function Ye(e,t){if(\"topClick\"===e)return je(t)}function $e(e,t){if(\"topInput\"===e||\"topChange\"===e)return je(t)}function Qe(e,t,n,r){return Te.call(this,e,t,n,r)}function Xe(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):!!(e=Mi[e])&&!!t[e]}function Je(){return Xe}function Ze(e,t,n,r){return Te.call(this,e,t,n,r)}function et(e,t){if(Yi||null==zi||zi!==vt())return null;var n=zi;return\"selectionStart\"in n&&ci.hasSelectionCapabilities(n)?n={start:n.selectionStart,end:n.selectionEnd}:window.getSelection?(n=window.getSelection(),n={anchorNode:n.anchorNode,anchorOffset:n.anchorOffset,focusNode:n.focusNode,focusOffset:n.focusOffset}):n=void 0,Gi&&Ft(Gi,n)?null:(Gi=n,e=Te.getPooled(Wi.select,Ki,e,t),e.type=\"select\",e.target=zi,hi.accumulateTwoPhaseDispatches(e),e)}function tt(e,t,n,r){return Te.call(this,e,t,n,r)}function nt(e,t,n,r){return Te.call(this,e,t,n,r)}function rt(e,t,n,r){return Te.call(this,e,t,n,r)}function ut(e){var t=e.keyCode;return\"charCode\"in e?0===(e=e.charCode)&&13===t&&(e=13):e=t,32<=e||13===e?e:0}function ot(e,t,n,r){return Te.call(this,e,t,n,r)}function at(e,t,n,r){return Te.call(this,e,t,n,r)}function it(e,t,n,r){return Te.call(this,e,t,n,r)}function lt(e,t,n,r){return Te.call(this,e,t,n,r)}function st(e,t,n,r){return Te.call(this,e,t,n,r)}function ct(e){return e[1].toUpperCase()}function pt(e){return!(!e||e.nodeType!==dl&&e.nodeType!==gl&&e.nodeType!==ml&&(e.nodeType!==hl||\" react-mount-point-unstable \"!==e.nodeValue))}function ft(e){return!(!(e=e?e.nodeType===gl?e.documentElement:e.firstChild:null)||e.nodeType!==dl||!e.hasAttribute(Cl))}function dt(e,t,n,u,o){pt(n)||r(\"200\");var a=n._reactRootContainer;if(a)Il.updateContainer(t,a,e,o);else{if(!u&&!ft(n))for(u=void 0;u=n.lastChild;)n.removeChild(u);var i=Il.createContainer(n);a=n._reactRootContainer=i,Il.unbatchedUpdates(function(){Il.updateContainer(t,i,e,o)})}return Il.getPublicRootInstance(a)}function Dt(e,t){var n=2<arguments.length&&void 0!==arguments[2]?arguments[2]:null;return pt(t)||r(\"200\"),Cu.createPortal(e,t,null,n)}var ht=n(0);n(6);var gt=n(27),mt=n(2),Ct=n(28),Et=n(3),At=n(5),Ft=n(29),bt=n(30),yt=n(33),vt=n(34);ht||r(\"227\");var Bt,wt,kt={Namespaces:{html:\"http://www.w3.org/1999/xhtml\",mathml:\"http://www.w3.org/1998/Math/MathML\",svg:\"http://www.w3.org/2000/svg\"},getIntrinsicNamespace:u,getChildNamespace:function(e,t){return null==e||\"http://www.w3.org/1999/xhtml\"===e?u(t):\"http://www.w3.org/2000/svg\"===e&&\"foreignObject\"===t?\"http://www.w3.org/1999/xhtml\":e}},xt=null,Tt={},St={plugins:[],eventNameDispatchConfigs:{},registrationNameModules:{},registrationNameDependencies:{},possibleRegistrationNames:null,injectEventPluginOrder:function(e){xt&&r(\"101\"),xt=Array.prototype.slice.call(e),o()},injectEventPluginsByName:function(e){var t,n=!1;for(t in e)if(e.hasOwnProperty(t)){var u=e[t];Tt.hasOwnProperty(t)&&Tt[t]===u||(Tt[t]&&r(\"102\",t),Tt[t]=u,n=!0)}n&&o()}},Pt=St,Nt={children:!0,dangerouslySetInnerHTML:!0,autoFocus:!0,defaultValue:!0,defaultChecked:!0,innerHTML:!0,suppressContentEditableWarning:!0,style:!0},_t={MUST_USE_PROPERTY:1,HAS_BOOLEAN_VALUE:4,HAS_NUMERIC_VALUE:8,HAS_POSITIVE_NUMERIC_VALUE:24,HAS_OVERLOADED_BOOLEAN_VALUE:32,HAS_STRING_BOOLEAN_VALUE:64,injectDOMPropertyConfig:function(e){var t=_t,n=e.Properties||{},u=e.DOMAttributeNamespaces||{},o=e.DOMAttributeNames||{};e=e.DOMMutationMethods||{};for(var a in n){Ot.properties.hasOwnProperty(a)&&r(\"48\",a);var l=a.toLowerCase(),s=n[a];l={attributeName:l,attributeNamespace:null,propertyName:a,mutationMethod:null,mustUseProperty:i(s,t.MUST_USE_PROPERTY),hasBooleanValue:i(s,t.HAS_BOOLEAN_VALUE),hasNumericValue:i(s,t.HAS_NUMERIC_VALUE),hasPositiveNumericValue:i(s,t.HAS_POSITIVE_NUMERIC_VALUE),hasOverloadedBooleanValue:i(s,t.HAS_OVERLOADED_BOOLEAN_VALUE),hasStringBooleanValue:i(s,t.HAS_STRING_BOOLEAN_VALUE)},1>=l.hasBooleanValue+l.hasNumericValue+l.hasOverloadedBooleanValue||r(\"50\",a),o.hasOwnProperty(a)&&(l.attributeName=o[a]),u.hasOwnProperty(a)&&(l.attributeNamespace=u[a]),e.hasOwnProperty(a)&&(l.mutationMethod=e[a]),Ot.properties[a]=l}}},Ot={ID_ATTRIBUTE_NAME:\"data-reactid\",ROOT_ATTRIBUTE_NAME:\"data-reactroot\",ATTRIBUTE_NAME_START_CHAR:\":A-Z_a-z\\\\u00C0-\\\\u00D6\\\\u00D8-\\\\u00F6\\\\u00F8-\\\\u02FF\\\\u0370-\\\\u037D\\\\u037F-\\\\u1FFF\\\\u200C-\\\\u200D\\\\u2070-\\\\u218F\\\\u2C00-\\\\u2FEF\\\\u3001-\\\\uD7FF\\\\uF900-\\\\uFDCF\\\\uFDF0-\\\\uFFFD\",ATTRIBUTE_NAME_CHAR:\":A-Z_a-z\\\\u00C0-\\\\u00D6\\\\u00D8-\\\\u00F6\\\\u00F8-\\\\u02FF\\\\u0370-\\\\u037D\\\\u037F-\\\\u1FFF\\\\u200C-\\\\u200D\\\\u2070-\\\\u218F\\\\u2C00-\\\\u2FEF\\\\u3001-\\\\uD7FF\\\\uF900-\\\\uFDCF\\\\uFDF0-\\\\uFFFD\\\\-.0-9\\\\u00B7\\\\u0300-\\\\u036F\\\\u203F-\\\\u2040\",properties:{},shouldSetAttribute:function(e,t){if(Ot.isReservedProp(e)||!(\"o\"!==e[0]&&\"O\"!==e[0]||\"n\"!==e[1]&&\"N\"!==e[1]))return!1;if(null===t)return!0;switch(typeof t){case\"boolean\":return Ot.shouldAttributeAcceptBooleanValue(e);case\"undefined\":case\"number\":case\"string\":case\"object\":return!0;default:return!1}},getPropertyInfo:function(e){return Ot.properties.hasOwnProperty(e)?Ot.properties[e]:null},shouldAttributeAcceptBooleanValue:function(e){if(Ot.isReservedProp(e))return!0;var t=Ot.getPropertyInfo(e);return t?t.hasBooleanValue||t.hasStringBooleanValue||t.hasOverloadedBooleanValue:\"data-\"===(e=e.toLowerCase().slice(0,5))||\"aria-\"===e},isReservedProp:function(e){return Nt.hasOwnProperty(e)},injection:_t},It=Ot,Rt={IndeterminateComponent:0,FunctionalComponent:1,ClassComponent:2,HostRoot:3,HostPortal:4,HostComponent:5,HostText:6,CoroutineComponent:7,CoroutineHandlerPhase:8,YieldComponent:9,Fragment:10},Lt={ELEMENT_NODE:1,TEXT_NODE:3,COMMENT_NODE:8,DOCUMENT_NODE:9,DOCUMENT_FRAGMENT_NODE:11},Ut=Rt.HostComponent,Mt=Rt.HostText,Ht=Lt.ELEMENT_NODE,qt=Lt.COMMENT_NODE,jt=It.ID_ATTRIBUTE_NAME,Vt={hasCachedChildNodes:1},Wt=Math.random().toString(36).slice(2),zt=\"__reactInternalInstance$\"+Wt,Kt=\"__reactEventHandlers$\"+Wt,Gt={getClosestInstanceFromNode:p,getInstanceFromNode:function(e){var t=e[zt];return t?t.tag===Ut||t.tag===Mt?t:t._hostNode===e?t:null:(t=p(e),null!=t&&t._hostNode===e?t:null)},getNodeFromInstance:function(e){if(e.tag===Ut||e.tag===Mt)return e.stateNode;if(void 0===e._hostNode&&r(\"33\"),e._hostNode)return e._hostNode;for(var t=[];!e._hostNode;)t.push(e),e._hostParent||r(\"34\"),e=e._hostParent;for(;t.length;e=t.pop())c(e,e._hostNode);return e._hostNode},precacheChildNodes:c,precacheNode:s,uncacheNode:function(e){var t=e._hostNode;t&&(delete t[zt],e._hostNode=null)},precacheFiberNode:function(e,t){t[zt]=e},getFiberCurrentPropsFromNode:function(e){return e[Kt]||null},updateFiberProps:function(e,t){e[Kt]=t}},Yt={remove:function(e){e._reactInternalFiber=void 0},get:function(e){return e._reactInternalFiber},has:function(e){return void 0!==e._reactInternalFiber},set:function(e,t){e._reactInternalFiber=t}},$t={ReactCurrentOwner:ht.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner},Qt={NoEffect:0,PerformedWork:1,Placement:2,Update:4,PlacementAndUpdate:6,Deletion:8,ContentReset:16,Callback:32,Err:64,Ref:128},Xt=Rt.HostComponent,Jt=Rt.HostRoot,Zt=Rt.HostPortal,en=Rt.HostText,tn=Qt.NoEffect,nn=Qt.Placement,rn={isFiberMounted:function(e){return 2===d(e)},isMounted:function(e){return!!(e=Yt.get(e))&&2===d(e)},findCurrentFiberUsingSlowPath:h,findCurrentHostFiber:function(e){if(!(e=h(e)))return null;for(var t=e;;){if(t.tag===Xt||t.tag===en)return t;if(t.child)t.child.return=t,t=t.child;else{if(t===e)break;for(;!t.sibling;){if(!t.return||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}}return null},findCurrentHostFiberWithNoPortals:function(e){if(!(e=h(e)))return null;for(var t=e;;){if(t.tag===Xt||t.tag===en)return t;if(t.child&&t.tag!==Zt)t.child.return=t,t=t.child;else{if(t===e)break;for(;!t.sibling;){if(!t.return||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}}return null}},un={_caughtError:null,_hasCaughtError:!1,_rethrowError:null,_hasRethrowError:!1,injection:{injectErrorUtils:function(e){\"function\"!==typeof e.invokeGuardedCallback&&r(\"197\"),g=e.invokeGuardedCallback}},invokeGuardedCallback:function(e,t,n,r,u,o,a,i,l){g.apply(un,arguments)},invokeGuardedCallbackAndCatchFirstError:function(e,t,n,r,u,o,a,i,l){if(un.invokeGuardedCallback.apply(this,arguments),un.hasCaughtError()){var s=un.clearCaughtError();un._hasRethrowError||(un._hasRethrowError=!0,un._rethrowError=s)}},rethrowCaughtError:function(){return m.apply(un,arguments)},hasCaughtError:function(){return un._hasCaughtError},clearCaughtError:function(){if(un._hasCaughtError){var e=un._caughtError;return un._caughtError=null,un._hasCaughtError=!1,e}r(\"198\")}},on=un,an={isEndish:function(e){return\"topMouseUp\"===e||\"topTouchEnd\"===e||\"topTouchCancel\"===e},isMoveish:function(e){return\"topMouseMove\"===e||\"topTouchMove\"===e},isStartish:function(e){return\"topMouseDown\"===e||\"topTouchStart\"===e},executeDirectDispatch:function(e){var t=e._dispatchListeners,n=e._dispatchInstances;return Array.isArray(t)&&r(\"103\"),e.currentTarget=t?an.getNodeFromInstance(n):null,t=t?t(e):null,e.currentTarget=null,e._dispatchListeners=null,e._dispatchInstances=null,t},executeDispatchesInOrder:function(e,t){var n=e._dispatchListeners,r=e._dispatchInstances;if(Array.isArray(n))for(var u=0;u<n.length&&!e.isPropagationStopped();u++)C(e,t,n[u],r[u]);else n&&C(e,t,n,r);e._dispatchListeners=null,e._dispatchInstances=null},executeDispatchesInOrderStopAtTrue:function(e){e:{var t=e._dispatchListeners,n=e._dispatchInstances;if(Array.isArray(t)){for(var r=0;r<t.length&&!e.isPropagationStopped();r++)if(t[r](e,n[r])){t=n[r];break e}}else if(t&&t(e,n)){t=n;break e}t=null}return e._dispatchInstances=null,e._dispatchListeners=null,t},hasDispatches:function(e){return!!e._dispatchListeners},getFiberCurrentPropsFromNode:function(e){return Bt.getFiberCurrentPropsFromNode(e)},getInstanceFromNode:function(e){return Bt.getInstanceFromNode(e)},getNodeFromInstance:function(e){return Bt.getNodeFromInstance(e)},injection:{injectComponentTree:function(e){Bt=e}}},ln=an,sn=null,cn=null,pn=null,fn={injection:{injectFiberControlledHostComponent:function(e){sn=e}},enqueueStateRestore:function(e){cn?pn?pn.push(e):pn=[e]:cn=e},restoreStateIfNeeded:function(){if(cn){var e=cn,t=pn;if(pn=cn=null,E(e),t)for(e=0;e<t.length;e++)E(t[e])}}},dn=!1,Dn={batchedUpdates:function(e,t){if(dn)return A(b,e,t);dn=!0;try{return A(b,e,t)}finally{dn=!1,fn.restoreStateIfNeeded()}},injection:{injectStackBatchedUpdates:function(e){A=e},injectFiberBatchedUpdates:function(e){F=e}}},hn=Lt.TEXT_NODE,gn=Rt.HostRoot,mn=[],Cn={_enabled:!0,_handleTopLevel:null,setHandleTopLevel:function(e){Cn._handleTopLevel=e},setEnabled:function(e){Cn._enabled=!!e},isEnabled:function(){return Cn._enabled},trapBubbledEvent:function(e,t,n){return n?Ct.listen(n,t,Cn.dispatchEvent.bind(null,e)):null},trapCapturedEvent:function(e,t,n){return n?Ct.capture(n,t,Cn.dispatchEvent.bind(null,e)):null},dispatchEvent:function(e,t){if(Cn._enabled){var n=y(t);if(n=Gt.getClosestInstanceFromNode(n),null===n||\"number\"!==typeof n.tag||rn.isFiberMounted(n)||(n=null),mn.length){var r=mn.pop();r.topLevelType=e,r.nativeEvent=t,r.targetInst=n,e=r}else e={topLevelType:e,nativeEvent:t,targetInst:n,ancestors:[]};try{Dn.batchedUpdates(v,e)}finally{e.topLevelType=null,e.nativeEvent=null,e.targetInst=null,e.ancestors.length=0,10>mn.length&&mn.push(e)}}}},En=Cn,An=null,Fn={injection:{injectEventPluginOrder:Pt.injectEventPluginOrder,injectEventPluginsByName:Pt.injectEventPluginsByName},getListener:function(e,t){if(\"number\"===typeof e.tag){var n=e.stateNode;if(!n)return null;var u=ln.getFiberCurrentPropsFromNode(n);if(!u)return null;if(n=u[t],S(t,e.type,u))return null}else{if(\"string\"===typeof(u=e._currentElement)||\"number\"===typeof u||!e._rootNodeID)return null;if(e=u.props,n=e[t],S(t,u.type,e))return null}return n&&\"function\"!==typeof n&&r(\"231\",t,typeof n),n},extractEvents:function(e,t,n,r){for(var u,o=Pt.plugins,a=0;a<o.length;a++){var i=o[a];i&&(i=i.extractEvents(e,t,n,r))&&(u=B(u,i))}return u},enqueueEvents:function(e){e&&(An=B(An,e))},processEventQueue:function(e){var t=An;An=null,e?w(t,x):w(t,T),An&&r(\"95\"),on.rethrowCaughtError()}};gt.canUseDOM&&(wt=document.implementation&&document.implementation.hasFeature&&!0!==document.implementation.hasFeature(\"\",\"\"));var bn={animationend:N(\"Animation\",\"AnimationEnd\"),animationiteration:N(\"Animation\",\"AnimationIteration\"),animationstart:N(\"Animation\",\"AnimationStart\"),transitionend:N(\"Transition\",\"TransitionEnd\")},yn={},vn={};gt.canUseDOM&&(vn=document.createElement(\"div\").style,\"AnimationEvent\"in window||(delete bn.animationend.animation,delete bn.animationiteration.animation,delete bn.animationstart.animation),\"TransitionEvent\"in window||delete bn.transitionend.transition);var Bn={topAbort:\"abort\",topAnimationEnd:_(\"animationend\")||\"animationend\",topAnimationIteration:_(\"animationiteration\")||\"animationiteration\",topAnimationStart:_(\"animationstart\")||\"animationstart\",topBlur:\"blur\",topCancel:\"cancel\",topCanPlay:\"canplay\",topCanPlayThrough:\"canplaythrough\",topChange:\"change\",topClick:\"click\",topClose:\"close\",topCompositionEnd:\"compositionend\",topCompositionStart:\"compositionstart\",topCompositionUpdate:\"compositionupdate\",topContextMenu:\"contextmenu\",topCopy:\"copy\",topCut:\"cut\",topDoubleClick:\"dblclick\",topDrag:\"drag\",topDragEnd:\"dragend\",topDragEnter:\"dragenter\",topDragExit:\"dragexit\",topDragLeave:\"dragleave\",topDragOver:\"dragover\",topDragStart:\"dragstart\",topDrop:\"drop\",topDurationChange:\"durationchange\",topEmptied:\"emptied\",topEncrypted:\"encrypted\",topEnded:\"ended\",topError:\"error\",topFocus:\"focus\",topInput:\"input\",topKeyDown:\"keydown\",topKeyPress:\"keypress\",topKeyUp:\"keyup\",topLoadedData:\"loadeddata\",topLoad:\"load\",topLoadedMetadata:\"loadedmetadata\",topLoadStart:\"loadstart\",topMouseDown:\"mousedown\",topMouseMove:\"mousemove\",topMouseOut:\"mouseout\",topMouseOver:\"mouseover\",topMouseUp:\"mouseup\",topPaste:\"paste\",topPause:\"pause\",topPlay:\"play\",topPlaying:\"playing\",topProgress:\"progress\",topRateChange:\"ratechange\",topScroll:\"scroll\",topSeeked:\"seeked\",topSeeking:\"seeking\",topSelectionChange:\"selectionchange\",topStalled:\"stalled\",topSuspend:\"suspend\",topTextInput:\"textInput\",topTimeUpdate:\"timeupdate\",topToggle:\"toggle\",topTouchCancel:\"touchcancel\",topTouchEnd:\"touchend\",topTouchMove:\"touchmove\",topTouchStart:\"touchstart\",topTransitionEnd:_(\"transitionend\")||\"transitionend\",topVolumeChange:\"volumechange\",topWaiting:\"waiting\",topWheel:\"wheel\"},wn={},kn=0,xn=\"_reactListenersID\"+(\"\"+Math.random()).slice(2),Tn=mt({},{handleTopLevel:function(e,t,n,r){e=Fn.extractEvents(e,t,n,r),Fn.enqueueEvents(e),Fn.processEventQueue(!1)}},{setEnabled:function(e){En&&En.setEnabled(e)},isEnabled:function(){return!(!En||!En.isEnabled())},listenTo:function(e,t){var n=O(t);e=Pt.registrationNameDependencies[e];for(var r=0;r<e.length;r++){var u=e[r];n.hasOwnProperty(u)&&n[u]||(\"topWheel\"===u?P(\"wheel\")?En.trapBubbledEvent(\"topWheel\",\"wheel\",t):P(\"mousewheel\")?En.trapBubbledEvent(\"topWheel\",\"mousewheel\",t):En.trapBubbledEvent(\"topWheel\",\"DOMMouseScroll\",t):\"topScroll\"===u?En.trapCapturedEvent(\"topScroll\",\"scroll\",t):\"topFocus\"===u||\"topBlur\"===u?(En.trapCapturedEvent(\"topFocus\",\"focus\",t),En.trapCapturedEvent(\"topBlur\",\"blur\",t),n.topBlur=!0,n.topFocus=!0):\"topCancel\"===u?(P(\"cancel\",!0)&&En.trapCapturedEvent(\"topCancel\",\"cancel\",t),n.topCancel=!0):\"topClose\"===u?(P(\"close\",!0)&&En.trapCapturedEvent(\"topClose\",\"close\",t),n.topClose=!0):Bn.hasOwnProperty(u)&&En.trapBubbledEvent(u,Bn[u],t),n[u]=!0)}},isListeningToAllDependencies:function(e,t){t=O(t),e=Pt.registrationNameDependencies[e];for(var n=0;n<e.length;n++){var r=e[n];if(!t.hasOwnProperty(r)||!t[r])return!1}return!0},trapBubbledEvent:function(e,t,n){return En.trapBubbledEvent(e,t,n)},trapCapturedEvent:function(e,t,n){return En.trapCapturedEvent(e,t,n)}}),Sn={animationIterationCount:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},Pn=[\"Webkit\",\"ms\",\"Moz\",\"O\"];Object.keys(Sn).forEach(function(e){Pn.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),Sn[t]=Sn[e]})});var Nn={isUnitlessNumber:Sn,shorthandPropertyExpansions:{background:{backgroundAttachment:!0,backgroundColor:!0,backgroundImage:!0,backgroundPositionX:!0,backgroundPositionY:!0,backgroundRepeat:!0},backgroundPosition:{backgroundPositionX:!0,backgroundPositionY:!0},border:{borderWidth:!0,borderStyle:!0,borderColor:!0},borderBottom:{borderBottomWidth:!0,borderBottomStyle:!0,borderBottomColor:!0},borderLeft:{borderLeftWidth:!0,borderLeftStyle:!0,borderLeftColor:!0},borderRight:{borderRightWidth:!0,borderRightStyle:!0,borderRightColor:!0},borderTop:{borderTopWidth:!0,borderTopStyle:!0,borderTopColor:!0},font:{fontStyle:!0,fontVariant:!0,fontWeight:!0,fontSize:!0,lineHeight:!0,fontFamily:!0},outline:{outlineWidth:!0,outlineStyle:!0,outlineColor:!0}}},_n=Nn.isUnitlessNumber,On=!1;if(gt.canUseDOM){var In=document.createElement(\"div\").style;try{In.font=\"\"}catch(e){On=!0}}var Rn,Ln={createDangerousStringForStyles:function(){},setValueForStyles:function(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var r=0===n.indexOf(\"--\"),u=n,o=t[n];if(u=null==o||\"boolean\"===typeof o||\"\"===o?\"\":r||\"number\"!==typeof o||0===o||_n.hasOwnProperty(u)&&_n[u]?(\"\"+o).trim():o+\"px\",\"float\"===n&&(n=\"cssFloat\"),r)e.setProperty(n,u);else if(u)e[n]=u;else if(r=On&&Nn.shorthandPropertyExpansions[n])for(var a in r)e[a]=\"\";else e[n]=\"\"}}},Un=new RegExp(\"^[\"+It.ATTRIBUTE_NAME_START_CHAR+\"][\"+It.ATTRIBUTE_NAME_CHAR+\"]*$\"),Mn={},Hn={},qn={setAttributeForID:function(e,t){e.setAttribute(It.ID_ATTRIBUTE_NAME,t)},setAttributeForRoot:function(e){e.setAttribute(It.ROOT_ATTRIBUTE_NAME,\"\")},getValueForProperty:function(){},getValueForAttribute:function(){},setValueForProperty:function(e,t,n){var r=It.getPropertyInfo(t);if(r&&It.shouldSetAttribute(t,n)){var u=r.mutationMethod;u?u(e,n):null==n||r.hasBooleanValue&&!n||r.hasNumericValue&&isNaN(n)||r.hasPositiveNumericValue&&1>n||r.hasOverloadedBooleanValue&&!1===n?qn.deleteValueForProperty(e,t):r.mustUseProperty?e[r.propertyName]=n:(t=r.attributeName,(u=r.attributeNamespace)?e.setAttributeNS(u,t,\"\"+n):r.hasBooleanValue||r.hasOverloadedBooleanValue&&!0===n?e.setAttribute(t,\"\"):e.setAttribute(t,\"\"+n))}else qn.setValueForAttribute(e,t,It.shouldSetAttribute(t,n)?n:null)},setValueForAttribute:function(e,t,n){I(t)&&(null==n?e.removeAttribute(t):e.setAttribute(t,\"\"+n))},deleteValueForAttribute:function(e,t){e.removeAttribute(t)},deleteValueForProperty:function(e,t){var n=It.getPropertyInfo(t);n?(t=n.mutationMethod)?t(e,void 0):n.mustUseProperty?e[n.propertyName]=!n.hasBooleanValue&&\"\":e.removeAttribute(n.attributeName):e.removeAttribute(t)}},jn=qn,Vn=$t.ReactDebugCurrentFrame,Wn={current:null,phase:null,resetCurrentFiber:function(){Vn.getCurrentStack=null,Wn.current=null,Wn.phase=null},setCurrentFiber:function(e,t){Vn.getCurrentStack=R,Wn.current=e,Wn.phase=t},getCurrentFiberOwnerName:function(){return null},getCurrentFiberStackAddendum:R},zn=Wn,Kn={getHostProps:function(e,t){var n=t.value,r=t.checked;return mt({type:void 0,step:void 0,min:void 0,max:void 0},t,{defaultChecked:void 0,defaultValue:void 0,value:null!=n?n:e._wrapperState.initialValue,checked:null!=r?r:e._wrapperState.initialChecked})},initWrapperState:function(e,t){var n=t.defaultValue;e._wrapperState={initialChecked:null!=t.checked?t.checked:t.defaultChecked,initialValue:null!=t.value?t.value:n,controlled:\"checkbox\"===t.type||\"radio\"===t.type?null!=t.checked:null!=t.value}},updateWrapper:function(e,t){var n=t.checked;null!=n&&jn.setValueForProperty(e,\"checked\",n||!1),n=t.value,null!=n?0===n&&\"\"===e.value?e.value=\"0\":\"number\"===t.type?(t=parseFloat(e.value)||0,(n!=t||n==t&&e.value!=n)&&(e.value=\"\"+n)):e.value!==\"\"+n&&(e.value=\"\"+n):(null==t.value&&null!=t.defaultValue&&e.defaultValue!==\"\"+t.defaultValue&&(e.defaultValue=\"\"+t.defaultValue),null==t.checked&&null!=t.defaultChecked&&(e.defaultChecked=!!t.defaultChecked))},postMountWrapper:function(e,t){switch(t.type){case\"submit\":case\"reset\":break;case\"color\":case\"date\":case\"datetime\":case\"datetime-local\":case\"month\":case\"time\":case\"week\":e.value=\"\",e.value=e.defaultValue;break;default:e.value=e.value}t=e.name,\"\"!==t&&(e.name=\"\"),e.defaultChecked=!e.defaultChecked,e.defaultChecked=!e.defaultChecked,\"\"!==t&&(e.name=t)},restoreControlledState:function(e,t){Kn.updateWrapper(e,t);var n=t.name;if(\"radio\"===t.type&&null!=n){for(t=e;t.parentNode;)t=t.parentNode;for(n=t.querySelectorAll(\"input[name=\"+JSON.stringify(\"\"+n)+'][type=\"radio\"]'),t=0;t<n.length;t++){var u=n[t];if(u!==e&&u.form===e.form){var o=Gt.getFiberCurrentPropsFromNode(u);o||r(\"90\"),Kn.updateWrapper(u,o)}}}}},Gn=Kn,Yn={validateProps:function(){},postMountWrapper:function(e,t){null!=t.value&&e.setAttribute(\"value\",t.value)},getHostProps:function(e,t){return e=mt({children:void 0},t),(t=L(t.children))&&(e.children=t),e}},$n={getHostProps:function(e,t){return mt({},t,{value:void 0})},initWrapperState:function(e,t){var n=t.value;e._wrapperState={initialValue:null!=n?n:t.defaultValue,wasMultiple:!!t.multiple}},postMountWrapper:function(e,t){e.multiple=!!t.multiple;var n=t.value;null!=n?U(e,!!t.multiple,n):null!=t.defaultValue&&U(e,!!t.multiple,t.defaultValue)},postUpdateWrapper:function(e,t){e._wrapperState.initialValue=void 0;var n=e._wrapperState.wasMultiple;e._wrapperState.wasMultiple=!!t.multiple;var r=t.value;null!=r?U(e,!!t.multiple,r):n!==!!t.multiple&&(null!=t.defaultValue?U(e,!!t.multiple,t.defaultValue):U(e,!!t.multiple,t.multiple?[]:\"\"))},restoreControlledState:function(e,t){var n=t.value;null!=n&&U(e,!!t.multiple,n)}},Qn={getHostProps:function(e,t){return null!=t.dangerouslySetInnerHTML&&r(\"91\"),mt({},t,{value:void 0,defaultValue:void 0,children:\"\"+e._wrapperState.initialValue})},initWrapperState:function(e,t){var n=t.value,u=n;null==n&&(n=t.defaultValue,t=t.children,null!=t&&(null!=n&&r(\"92\"),Array.isArray(t)&&(1>=t.length||r(\"93\"),t=t[0]),n=\"\"+t),null==n&&(n=\"\"),u=n),e._wrapperState={initialValue:\"\"+u}},updateWrapper:function(e,t){var n=t.value;null!=n&&(n=\"\"+n,n!==e.value&&(e.value=n),null==t.defaultValue&&(e.defaultValue=n)),null!=t.defaultValue&&(e.defaultValue=t.defaultValue)},postMountWrapper:function(e){var t=e.textContent;t===e._wrapperState.initialValue&&(e.value=t)},restoreControlledState:function(e,t){Qn.updateWrapper(e,t)}},Xn=Qn,Jn=mt({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0}),Zn={_getTrackerFromNode:function(e){return e._valueTracker},track:function(e){e._valueTracker||(e._valueTracker=q(e))},updateValueIfChanged:function(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r=\"\";return e&&(r=H(e)?e.checked?\"true\":\"false\":e.value),(e=r)!==n&&(t.setValue(e),!0)},stopTracking:function(e){(e=e._valueTracker)&&e.stopTracking()}},er=kt.Namespaces,tr=function(e){return\"undefined\"!==typeof MSApp&&MSApp.execUnsafeLocalFunction?function(t,n,r,u){MSApp.execUnsafeLocalFunction(function(){return e(t,n)})}:e}(function(e,t){if(e.namespaceURI!==er.svg||\"innerHTML\"in e)e.innerHTML=t;else for(Rn=Rn||document.createElement(\"div\"),Rn.innerHTML=\"<svg>\"+t+\"</svg>\",t=Rn.firstChild;t.firstChild;)e.appendChild(t.firstChild)}),nr=/[\"'&<>]/,rr=Lt.TEXT_NODE;gt.canUseDOM&&(\"textContent\"in document.documentElement||(V=function(e,t){if(e.nodeType===rr)e.nodeValue=t;else{if(\"boolean\"===typeof t||\"number\"===typeof t)t=\"\"+t;else{t=\"\"+t;var n=nr.exec(t);if(n){var r,u=\"\",o=0;for(r=n.index;r<t.length;r++){switch(t.charCodeAt(r)){case 34:n=\""\";break;case 38:n=\"&\";break;case 39:n=\"'\";break;case 60:n=\"<\";break;case 62:n=\">\";break;default:continue}o!==r&&(u+=t.substring(o,r)),o=r+1,u+=n}t=o!==r?u+t.substring(o,r):u}}tr(e,t)}}));var ur=V,or=(zn.getCurrentFiberOwnerName,Lt.DOCUMENT_NODE),ar=Lt.DOCUMENT_FRAGMENT_NODE,ir=Tn.listenTo,lr=Pt.registrationNameModules,sr=kt.Namespaces.html,cr=kt.getIntrinsicNamespace,pr={topAbort:\"abort\",topCanPlay:\"canplay\",topCanPlayThrough:\"canplaythrough\",topDurationChange:\"durationchange\",topEmptied:\"emptied\",topEncrypted:\"encrypted\",topEnded:\"ended\",topError:\"error\",topLoadedData:\"loadeddata\",topLoadedMetadata:\"loadedmetadata\",topLoadStart:\"loadstart\",topPause:\"pause\",topPlay:\"play\",topPlaying:\"playing\",topProgress:\"progress\",topRateChange:\"ratechange\",topSeeked:\"seeked\",topSeeking:\"seeking\",topStalled:\"stalled\",topSuspend:\"suspend\",topTimeUpdate:\"timeupdate\",topVolumeChange:\"volumechange\",topWaiting:\"waiting\"},fr={createElement:function(e,t,n,r){return n=n.nodeType===or?n:n.ownerDocument,r===sr&&(r=cr(e)),r===sr?\"script\"===e?(e=n.createElement(\"div\"),e.innerHTML=\"<script><\\/script>\",e=e.removeChild(e.firstChild)):e=\"string\"===typeof t.is?n.createElement(e,{is:t.is}):n.createElement(e):e=n.createElementNS(r,e),e},createTextNode:function(e,t){return(t.nodeType===or?t:t.ownerDocument).createTextNode(e)},setInitialProperties:function(e,t,n,r){var u=j(t,n);switch(t){case\"iframe\":case\"object\":Tn.trapBubbledEvent(\"topLoad\",\"load\",e);var o=n;break;case\"video\":case\"audio\":for(o in pr)pr.hasOwnProperty(o)&&Tn.trapBubbledEvent(o,pr[o],e);o=n;break;case\"source\":Tn.trapBubbledEvent(\"topError\",\"error\",e),o=n;break;case\"img\":case\"image\":Tn.trapBubbledEvent(\"topError\",\"error\",e),Tn.trapBubbledEvent(\"topLoad\",\"load\",e),o=n;break;case\"form\":Tn.trapBubbledEvent(\"topReset\",\"reset\",e),Tn.trapBubbledEvent(\"topSubmit\",\"submit\",e),o=n;break;case\"details\":Tn.trapBubbledEvent(\"topToggle\",\"toggle\",e),o=n;break;case\"input\":Gn.initWrapperState(e,n),o=Gn.getHostProps(e,n),Tn.trapBubbledEvent(\"topInvalid\",\"invalid\",e),W(r,\"onChange\");break;case\"option\":Yn.validateProps(e,n),o=Yn.getHostProps(e,n);break;case\"select\":$n.initWrapperState(e,n),o=$n.getHostProps(e,n),Tn.trapBubbledEvent(\"topInvalid\",\"invalid\",e),W(r,\"onChange\");break;case\"textarea\":Xn.initWrapperState(e,n),o=Xn.getHostProps(e,n),Tn.trapBubbledEvent(\"topInvalid\",\"invalid\",e),W(r,\"onChange\");break;default:o=n}M(t,o);var a,i=o;for(a in i)if(i.hasOwnProperty(a)){var l=i[a];\"style\"===a?Ln.setValueForStyles(e,l):\"dangerouslySetInnerHTML\"===a?null!=(l=l?l.__html:void 0)&&tr(e,l):\"children\"===a?\"string\"===typeof l?ur(e,l):\"number\"===typeof l&&ur(e,\"\"+l):\"suppressContentEditableWarning\"!==a&&(lr.hasOwnProperty(a)?null!=l&&W(r,a):u?jn.setValueForAttribute(e,a,l):null!=l&&jn.setValueForProperty(e,a,l))}switch(t){case\"input\":Zn.track(e),Gn.postMountWrapper(e,n);break;case\"textarea\":Zn.track(e),Xn.postMountWrapper(e,n);break;case\"option\":Yn.postMountWrapper(e,n);break;case\"select\":$n.postMountWrapper(e,n);break;default:\"function\"===typeof o.onClick&&(e.onclick=Et)}},diffProperties:function(e,t,n,r,u){var o=null;switch(t){case\"input\":n=Gn.getHostProps(e,n),r=Gn.getHostProps(e,r),o=[];break;case\"option\":n=Yn.getHostProps(e,n),r=Yn.getHostProps(e,r),o=[];break;case\"select\":n=$n.getHostProps(e,n),r=$n.getHostProps(e,r),o=[];break;case\"textarea\":n=Xn.getHostProps(e,n),r=Xn.getHostProps(e,r),o=[];break;default:\"function\"!==typeof n.onClick&&\"function\"===typeof r.onClick&&(e.onclick=Et)}M(t,r);var a,i;e=null;for(a in n)if(!r.hasOwnProperty(a)&&n.hasOwnProperty(a)&&null!=n[a])if(\"style\"===a)for(i in t=n[a])t.hasOwnProperty(i)&&(e||(e={}),e[i]=\"\");else\"dangerouslySetInnerHTML\"!==a&&\"children\"!==a&&\"suppressContentEditableWarning\"!==a&&(lr.hasOwnProperty(a)?o||(o=[]):(o=o||[]).push(a,null));for(a in r){var l=r[a];if(t=null!=n?n[a]:void 0,r.hasOwnProperty(a)&&l!==t&&(null!=l||null!=t))if(\"style\"===a)if(t){for(i in t)!t.hasOwnProperty(i)||l&&l.hasOwnProperty(i)||(e||(e={}),e[i]=\"\");for(i in l)l.hasOwnProperty(i)&&t[i]!==l[i]&&(e||(e={}),e[i]=l[i])}else e||(o||(o=[]),o.push(a,e)),e=l;else\"dangerouslySetInnerHTML\"===a?(l=l?l.__html:void 0,t=t?t.__html:void 0,null!=l&&t!==l&&(o=o||[]).push(a,\"\"+l)):\"children\"===a?t===l||\"string\"!==typeof l&&\"number\"!==typeof l||(o=o||[]).push(a,\"\"+l):\"suppressContentEditableWarning\"!==a&&(lr.hasOwnProperty(a)?(null!=l&&W(u,a),o||t===l||(o=[])):(o=o||[]).push(a,l))}return e&&(o=o||[]).push(\"style\",e),o},updateProperties:function(e,t,n,r,u){j(n,r),r=j(n,u);for(var o=0;o<t.length;o+=2){var a=t[o],i=t[o+1];\"style\"===a?Ln.setValueForStyles(e,i):\"dangerouslySetInnerHTML\"===a?tr(e,i):\"children\"===a?ur(e,i):r?null!=i?jn.setValueForAttribute(e,a,i):jn.deleteValueForAttribute(e,a):null!=i?jn.setValueForProperty(e,a,i):jn.deleteValueForProperty(e,a)}switch(n){case\"input\":Gn.updateWrapper(e,u),Zn.updateValueIfChanged(e);break;case\"textarea\":Xn.updateWrapper(e,u);break;case\"select\":$n.postUpdateWrapper(e,u)}},diffHydratedProperties:function(e,t,n,r,u){switch(t){case\"iframe\":case\"object\":Tn.trapBubbledEvent(\"topLoad\",\"load\",e);break;case\"video\":case\"audio\":for(var o in pr)pr.hasOwnProperty(o)&&Tn.trapBubbledEvent(o,pr[o],e);break;case\"source\":Tn.trapBubbledEvent(\"topError\",\"error\",e);break;case\"img\":case\"image\":Tn.trapBubbledEvent(\"topError\",\"error\",e),Tn.trapBubbledEvent(\"topLoad\",\"load\",e);break;case\"form\":Tn.trapBubbledEvent(\"topReset\",\"reset\",e),Tn.trapBubbledEvent(\"topSubmit\",\"submit\",e);break;case\"details\":Tn.trapBubbledEvent(\"topToggle\",\"toggle\",e);break;case\"input\":Gn.initWrapperState(e,n),Tn.trapBubbledEvent(\"topInvalid\",\"invalid\",e),W(u,\"onChange\");break;case\"option\":Yn.validateProps(e,n);break;case\"select\":$n.initWrapperState(e,n),Tn.trapBubbledEvent(\"topInvalid\",\"invalid\",e),W(u,\"onChange\");break;case\"textarea\":Xn.initWrapperState(e,n),Tn.trapBubbledEvent(\"topInvalid\",\"invalid\",e),W(u,\"onChange\")}M(t,n),r=null;for(var a in n)n.hasOwnProperty(a)&&(o=n[a],\"children\"===a?\"string\"===typeof o?e.textContent!==o&&(r=[\"children\",o]):\"number\"===typeof o&&e.textContent!==\"\"+o&&(r=[\"children\",\"\"+o]):lr.hasOwnProperty(a)&&null!=o&&W(u,a));switch(t){case\"input\":Zn.track(e),Gn.postMountWrapper(e,n);break;case\"textarea\":Zn.track(e),Xn.postMountWrapper(e,n);break;case\"select\":case\"option\":break;default:\"function\"===typeof n.onClick&&(e.onclick=Et)}return r},diffHydratedText:function(e,t){return e.nodeValue!==t},warnForDeletedHydratableElement:function(){},warnForDeletedHydratableText:function(){},warnForInsertedHydratedElement:function(){},warnForInsertedHydratedText:function(){},restoreControlledState:function(e,t,n){switch(t){case\"input\":Gn.restoreControlledState(e,n);break;case\"textarea\":Xn.restoreControlledState(e,n);break;case\"select\":$n.restoreControlledState(e,n)}}},dr=void 0;if(gt.canUseDOM)if(\"function\"!==typeof requestIdleCallback){var Dr=null,hr=null,gr=!1,mr=!1,Cr=0,Er=33,Ar=33,Fr={timeRemaining:\"object\"===typeof performance&&\"function\"===typeof performance.now?function(){return Cr-performance.now()}:function(){return Cr-Date.now()}},br=\"__reactIdleCallback$\"+Math.random().toString(36).slice(2);window.addEventListener(\"message\",function(e){e.source===window&&e.data===br&&(gr=!1,e=hr,hr=null,null!==e&&e(Fr))},!1);var yr=function(e){mr=!1;var t=e-Cr+Ar;t<Ar&&Er<Ar?(8>t&&(t=8),Ar=t<Er?Er:t):Er=t,Cr=e+Ar,gr||(gr=!0,window.postMessage(br,\"*\")),t=Dr,Dr=null,null!==t&&t(e)};dr=function(e){return hr=e,mr||(mr=!0,requestAnimationFrame(yr)),0}}else dr=requestIdleCallback;else dr=function(e){return setTimeout(function(){e({timeRemaining:function(){return 1/0}})}),0};var vr,Br,wr={rIC:dr},kr={enableAsyncSubtreeAPI:!0},xr={NoWork:0,SynchronousPriority:1,TaskPriority:2,HighPriority:3,LowPriority:4,OffscreenPriority:5},Tr=Qt.Callback,Sr=xr.NoWork,Pr=xr.SynchronousPriority,Nr=xr.TaskPriority,_r=Rt.ClassComponent,Or=Rt.HostRoot,Ir=void 0,Rr=void 0,Lr={addUpdate:function(e,t,n,r){$(e,{priorityLevel:r,partialState:t,callback:n,isReplace:!1,isForced:!1,isTopLevelUnmount:!1,next:null})},addReplaceUpdate:function(e,t,n,r){$(e,{priorityLevel:r,partialState:t,callback:n,isReplace:!0,isForced:!1,isTopLevelUnmount:!1,next:null})},addForceUpdate:function(e,t,n){$(e,{priorityLevel:n,partialState:null,callback:t,isReplace:!1,isForced:!0,isTopLevelUnmount:!1,next:null})},getUpdatePriority:function(e){var t=e.updateQueue;return null===t||e.tag!==_r&&e.tag!==Or?Sr:null!==t.first?t.first.priorityLevel:Sr},addTopLevelUpdate:function(e,t,n,r){var u=null===t.element;t={priorityLevel:r,partialState:t,callback:n,isReplace:!1,isForced:!1,isTopLevelUnmount:u,next:null},e=$(e,t),u&&(u=Ir,n=Rr,null!==u&&null!==t.next&&(t.next=null,u.last=t),null!==n&&null!==e&&null!==e.next&&(e.next=null,n.last=t))},beginUpdateQueue:function(e,t,n,r,u,o,a){null!==e&&e.updateQueue===n&&(n=t.updateQueue={first:n.first,last:n.last,callbackList:null,hasForceUpdate:!1}),e=n.callbackList;for(var i=n.hasForceUpdate,l=!0,s=n.first;null!==s&&0>=z(s.priorityLevel,a);){n.first=s.next,null===n.first&&(n.last=null);var c;s.isReplace?(u=Q(s,r,u,o),l=!0):(c=Q(s,r,u,o))&&(u=l?mt({},u,c):mt(u,c),l=!1),s.isForced&&(i=!0),null===s.callback||s.isTopLevelUnmount&&null!==s.next||(e=null!==e?e:[],e.push(s.callback),t.effectTag|=Tr),s=s.next}return n.callbackList=e,n.hasForceUpdate=i,null!==n.first||null!==e||i||(t.updateQueue=null),u},commitCallbacks:function(e,t,n){if(null!==(e=t.callbackList))for(t.callbackList=null,t=0;t<e.length;t++){var u=e[t];\"function\"!==typeof u&&r(\"191\",u),u.call(n)}}},Ur=[],Mr=-1,Hr={createCursor:function(e){return{current:e}},isEmpty:function(){return-1===Mr},pop:function(e){0>Mr||(e.current=Ur[Mr],Ur[Mr]=null,Mr--)},push:function(e,t){Mr++,Ur[Mr]=e.current,e.current=t},reset:function(){for(;-1<Mr;)Ur[Mr]=null,Mr--}},qr=rn.isFiberMounted,jr=Rt.ClassComponent,Vr=Rt.HostRoot,Wr=Hr.createCursor,zr=Hr.pop,Kr=Hr.push,Gr=Wr(At),Yr=Wr(!1),$r=At,Qr={getUnmaskedContext:function(e){return J(e)?$r:Gr.current},cacheContext:X,getMaskedContext:function(e,t){var n=e.type.contextTypes;if(!n)return At;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var u,o={};for(u in n)o[u]=t[u];return r&&X(e,t,o),o},hasContextChanged:function(){return Yr.current},isContextConsumer:function(e){return e.tag===jr&&null!=e.type.contextTypes},isContextProvider:J,popContextProvider:function(e){J(e)&&(zr(Yr,e),zr(Gr,e))},popTopLevelContextObject:function(e){zr(Yr,e),zr(Gr,e)},pushTopLevelContextObject:function(e,t,n){null!=Gr.cursor&&r(\"168\"),Kr(Gr,t,e),Kr(Yr,n,e)},processChildContext:Z,pushContextProvider:function(e){if(!J(e))return!1;var t=e.stateNode;return t=t&&t.__reactInternalMemoizedMergedChildContext||At,$r=Gr.current,Kr(Gr,t,e),Kr(Yr,Yr.current,e),!0},invalidateContextProvider:function(e,t){var n=e.stateNode;if(n||r(\"169\"),t){var u=Z(e,$r);n.__reactInternalMemoizedMergedChildContext=u,zr(Yr,e),zr(Gr,e),Kr(Gr,u,e)}else zr(Yr,e);Kr(Yr,t,e)},resetContext:function(){$r=At,Gr.current=At,Yr.current=!1},findCurrentUnmaskedContext:function(e){for(qr(e)&&e.tag===jr?void 0:r(\"170\");e.tag!==Vr;){if(J(e))return e.stateNode.__reactInternalMemoizedMergedChildContext;(e=e.return)||r(\"171\")}return e.stateNode.context}},Xr={NoContext:0,AsyncUpdates:1},Jr=Rt.IndeterminateComponent,Zr=Rt.ClassComponent,eu=Rt.HostRoot,tu=Rt.HostComponent,nu=Rt.HostText,ru=Rt.HostPortal,uu=Rt.CoroutineComponent,ou=Rt.YieldComponent,au=Rt.Fragment,iu=xr.NoWork,lu=Xr.NoContext,su=Qt.NoEffect,cu={createWorkInProgress:function(e,t){var n=e.alternate;return null===n?(n=new ee(e.tag,e.key,e.internalContextTag),n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.effectTag=su,n.nextEffect=null,n.firstEffect=null,n.lastEffect=null),n.pendingWorkPriority=t,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n},createHostRootFiber:function(){return new ee(eu,null,lu)},createFiberFromElement:function(e,t,n){return t=te(e.type,e.key,t),t.pendingProps=e.props,t.pendingWorkPriority=n,t},createFiberFromFragment:function(e,t,n){return t=new ee(au,null,t),t.pendingProps=e,t.pendingWorkPriority=n,t},createFiberFromText:function(e,t,n){return t=new ee(nu,null,t),t.pendingProps=e,t.pendingWorkPriority=n,t},createFiberFromElementType:te,createFiberFromHostInstanceForDeletion:function(){var e=new ee(tu,null,lu);return e.type=\"DELETED\",e},createFiberFromCoroutine:function(e,t,n){return t=new ee(uu,e.key,t),t.type=e.handler,t.pendingProps=e,t.pendingWorkPriority=n,t},createFiberFromYield:function(e,t){return new ee(ou,null,t)},createFiberFromPortal:function(e,t,n){return t=new ee(ru,e.key,t),t.pendingProps=e.children||[],t.pendingWorkPriority=n,t.stateNode={containerInfo:e.containerInfo,implementation:e.implementation},t},largerPriority:function(e,t){return e!==iu&&(t===iu||t>e)?e:t}},pu=cu.createHostRootFiber,fu=Rt.IndeterminateComponent,du=Rt.FunctionalComponent,Du=Rt.ClassComponent,hu=Rt.HostComponent;\"function\"===typeof Symbol&&Symbol.for?(vr=Symbol.for(\"react.coroutine\"),Br=Symbol.for(\"react.yield\")):(vr=60104,Br=60105);var gu={createCoroutine:function(e,t,n){var r=3<arguments.length&&void 0!==arguments[3]?arguments[3]:null;return{$$typeof:vr,key:null==r?null:\"\"+r,children:e,handler:t,props:n}},createYield:function(e){return{$$typeof:Br,value:e}},isCoroutine:function(e){return\"object\"===typeof e&&null!==e&&e.$$typeof===vr},isYield:function(e){return\"object\"===typeof e&&null!==e&&e.$$typeof===Br},REACT_YIELD_TYPE:Br,REACT_COROUTINE_TYPE:vr},mu=\"function\"===typeof Symbol&&Symbol.for&&Symbol.for(\"react.portal\")||60106,Cu={createPortal:function(e,t,n){var r=3<arguments.length&&void 0!==arguments[3]?arguments[3]:null;return{$$typeof:mu,key:null==r?null:\"\"+r,children:e,containerInfo:t,implementation:n}},isPortal:function(e){return\"object\"===typeof e&&null!==e&&e.$$typeof===mu},REACT_PORTAL_TYPE:mu},Eu=gu.REACT_COROUTINE_TYPE,Au=gu.REACT_YIELD_TYPE,Fu=Cu.REACT_PORTAL_TYPE,bu=cu.createWorkInProgress,yu=cu.createFiberFromElement,vu=cu.createFiberFromFragment,Bu=cu.createFiberFromText,wu=cu.createFiberFromCoroutine,ku=cu.createFiberFromYield,xu=cu.createFiberFromPortal,Tu=Array.isArray,Su=Rt.FunctionalComponent,Pu=Rt.ClassComponent,Nu=Rt.HostText,_u=Rt.HostPortal,Ou=Rt.CoroutineComponent,Iu=Rt.YieldComponent,Ru=Rt.Fragment,Lu=Qt.NoEffect,Uu=Qt.Placement,Mu=Qt.Deletion,Hu=\"function\"===typeof Symbol&&Symbol.iterator,qu=\"function\"===typeof Symbol&&Symbol.for&&Symbol.for(\"react.element\")||60103,ju=oe(!0,!0),Vu=oe(!1,!0),Wu=oe(!1,!1),zu={reconcileChildFibers:ju,reconcileChildFibersInPlace:Vu,mountChildFibersInPlace:Wu,cloneChildFibers:function(e,t){if(null!==e&&t.child!==e.child&&r(\"153\"),null!==t.child){e=t.child;var n=bu(e,e.pendingWorkPriority);for(n.pendingProps=e.pendingProps,t.child=n,n.return=t;null!==e.sibling;)e=e.sibling,n=n.sibling=bu(e,e.pendingWorkPriority),n.pendingProps=e.pendingProps,n.return=t;n.sibling=null}}},Ku=Qt.Update,Gu=Xr.AsyncUpdates,Yu=Qr.cacheContext,$u=Qr.getMaskedContext,Qu=Qr.getUnmaskedContext,Xu=Qr.isContextConsumer,Ju=Lr.addUpdate,Zu=Lr.addReplaceUpdate,eo=Lr.addForceUpdate,to=Lr.beginUpdateQueue,no=Qr.hasContextChanged,ro=rn.isMounted,uo=zu.mountChildFibersInPlace,oo=zu.reconcileChildFibers,ao=zu.reconcileChildFibersInPlace,io=zu.cloneChildFibers,lo=Lr.beginUpdateQueue,so=Qr.getMaskedContext,co=Qr.getUnmaskedContext,po=Qr.hasContextChanged,fo=Qr.pushContextProvider,Do=Qr.pushTopLevelContextObject,ho=Qr.invalidateContextProvider,go=Rt.IndeterminateComponent,mo=Rt.FunctionalComponent,Co=Rt.ClassComponent,Eo=Rt.HostRoot,Ao=Rt.HostComponent,Fo=Rt.HostText,bo=Rt.HostPortal,yo=Rt.CoroutineComponent,vo=Rt.CoroutineHandlerPhase,Bo=Rt.YieldComponent,wo=Rt.Fragment,ko=xr.NoWork,xo=xr.OffscreenPriority,To=Qt.PerformedWork,So=Qt.Placement,Po=Qt.ContentReset,No=Qt.Err,_o=Qt.Ref,Oo=$t.ReactCurrentOwner,Io=zu.reconcileChildFibers,Ro=Qr.popContextProvider,Lo=Qr.popTopLevelContextObject,Uo=Rt.IndeterminateComponent,Mo=Rt.FunctionalComponent,Ho=Rt.ClassComponent,qo=Rt.HostRoot,jo=Rt.HostComponent,Vo=Rt.HostText,Wo=Rt.HostPortal,zo=Rt.CoroutineComponent,Ko=Rt.CoroutineHandlerPhase,Go=Rt.YieldComponent,Yo=Rt.Fragment,$o=Qt.Placement,Qo=Qt.Ref,Xo=Qt.Update,Jo=xr.OffscreenPriority,Zo=null,ea=null,ta={injectInternals:function(e){if(\"undefined\"===typeof{})return!1;var t={};if(!t.supportsFiber)return!0;try{var n=t.inject(e);Zo=se(function(e){return t.onCommitFiberRoot(n,e)}),ea=se(function(e){return t.onCommitFiberUnmount(n,e)})}catch(e){}return!0},onCommitRoot:function(e){\"function\"===typeof Zo&&Zo(e)},onCommitUnmount:function(e){\"function\"===typeof ea&&ea(e)}},na=Rt.ClassComponent,ra=Rt.HostRoot,ua=Rt.HostComponent,oa=Rt.HostText,aa=Rt.HostPortal,ia=Rt.CoroutineComponent,la=Lr.commitCallbacks,sa=ta.onCommitUnmount,ca=Qt.Placement,pa=Qt.Update,fa=Qt.Callback,da=Qt.ContentReset,Da=Hr.createCursor,ha=Hr.pop,ga=Hr.push,ma={},Ca=Rt.HostComponent,Ea=Rt.HostText,Aa=Rt.HostRoot,Fa=Qt.Deletion,ba=Qt.Placement,ya=cu.createFiberFromHostInstanceForDeletion,va=Qr.popContextProvider,Ba=Hr.reset,wa=$t.ReactCurrentOwner,ka=cu.createWorkInProgress,xa=cu.largerPriority,Ta=ta.onCommitRoot,Sa=xr.NoWork,Pa=xr.SynchronousPriority,Na=xr.TaskPriority,_a=xr.HighPriority,Oa=xr.LowPriority,Ia=xr.OffscreenPriority,Ra=Xr.AsyncUpdates,La=Qt.PerformedWork,Ua=Qt.Placement,Ma=Qt.Update,Ha=Qt.PlacementAndUpdate,qa=Qt.Deletion,ja=Qt.ContentReset,Va=Qt.Callback,Wa=Qt.Err,za=Qt.Ref,Ka=Rt.HostRoot,Ga=Rt.HostComponent,Ya=Rt.HostPortal,$a=Rt.ClassComponent,Qa=Lr.getUpdatePriority,Xa=Qr.resetContext;he._injectFiber=function(e){De=e};var Ja=Lr.addTopLevelUpdate,Za=Qr.findCurrentUnmaskedContext,ei=Qr.isContextProvider,ti=Qr.processChildContext,ni=Rt.HostComponent,ri=rn.findCurrentHostFiber,ui=rn.findCurrentHostFiberWithNoPortals;he._injectFiber(function(e){var t=Za(e);return ei(e)?ti(e,t,!1):t});var oi=Lt.TEXT_NODE,ai=null,ii={getOffsets:function(e){var t=window.getSelection&&window.getSelection();if(!t||0===t.rangeCount)return null;var n=t.anchorNode,r=t.anchorOffset,u=t.focusNode,o=t.focusOffset,a=t.getRangeAt(0);try{a.startContainer.nodeType,a.endContainer.nodeType}catch(e){return null}t=t.anchorNode===t.focusNode&&t.anchorOffset===t.focusOffset?0:a.toString().length;var i=a.cloneRange();return i.selectNodeContents(e),i.setEnd(a.startContainer,a.startOffset),e=i.startContainer===i.endContainer&&i.startOffset===i.endOffset?0:i.toString().length,a=e+t,t=document.createRange(),t.setStart(n,r),t.setEnd(u,o),n=t.collapsed,{start:n?a:e,end:n?e:a}},setOffsets:function(e,t){if(window.getSelection){var n=window.getSelection(),r=e[Ce()].length,u=Math.min(t.start,r);if(t=void 0===t.end?u:Math.min(t.end,r),!n.extend&&u>t&&(r=t,t=u,u=r),r=me(e,u),e=me(e,t),r&&e){var o=document.createRange();o.setStart(r.node,r.offset),n.removeAllRanges(),u>t?(n.addRange(o),n.extend(e.node,e.offset)):(o.setEnd(e.node,e.offset),n.addRange(o))}}}},li=Lt.ELEMENT_NODE,si={hasSelectionCapabilities:function(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(\"input\"===t&&\"text\"===e.type||\"textarea\"===t||\"true\"===e.contentEditable)},getSelectionInformation:function(){var e=vt();return{focusedElem:e,selectionRange:si.hasSelectionCapabilities(e)?si.getSelection(e):null}},restoreSelection:function(e){var t=vt(),n=e.focusedElem;if(e=e.selectionRange,t!==n&&bt(document.documentElement,n)){for(si.hasSelectionCapabilities(n)&&si.setSelection(n,e),t=[],e=n;e=e.parentNode;)e.nodeType===li&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(yt(n),n=0;n<t.length;n++)e=t[n],e.element.scrollLeft=e.left,e.element.scrollTop=e.top}},getSelection:function(e){return(\"selectionStart\"in e?{start:e.selectionStart,end:e.selectionEnd}:ii.getOffsets(e))||{start:0,end:0}},setSelection:function(e,t){var n=t.start,r=t.end;void 0===r&&(r=n),\"selectionStart\"in e?(e.selectionStart=n,e.selectionEnd=Math.min(r,e.value.length)):ii.setOffsets(e,t)}},ci=si,pi=Lt.ELEMENT_NODE;Fe._injectFiber=function(e){Ee=e},Fe._injectStack=function(e){Ae=e};var fi=Rt.HostComponent,di={isAncestor:function(e,t){for(;t;){if(e===t||e===t.alternate)return!0;t=be(t)}return!1},getLowestCommonAncestor:ye,getParentInstance:function(e){return be(e)},traverseTwoPhase:function(e,t,n){for(var r=[];e;)r.push(e),e=be(e);for(e=r.length;0<e--;)t(r[e],\"captured\",n);for(e=0;e<r.length;e++)t(r[e],\"bubbled\",n)},traverseEnterLeave:function(e,t,n,r,u){for(var o=e&&t?ye(e,t):null,a=[];e&&e!==o;)a.push(e),e=be(e);for(e=[];t&&t!==o;)e.push(t),t=be(t);for(t=0;t<a.length;t++)n(a[t],\"bubbled\",r);for(t=e.length;0<t--;)n(e[t],\"captured\",u)}},Di=Fn.getListener,hi={accumulateTwoPhaseDispatches:function(e){w(e,Be)},accumulateTwoPhaseDispatchesSkipTarget:function(e){w(e,we)},accumulateDirectDispatches:function(e){w(e,xe)},accumulateEnterLeaveDispatches:function(e,t,n,r){di.traverseEnterLeave(n,r,ke,e,t)}},gi={_root:null,_startText:null,_fallbackText:null},mi={initialize:function(e){return gi._root=e,gi._startText=mi.getText(),!0},reset:function(){gi._root=null,gi._startText=null,gi._fallbackText=null},getData:function(){if(gi._fallbackText)return gi._fallbackText;var e,t,n=gi._startText,r=n.length,u=mi.getText(),o=u.length;for(e=0;e<r&&n[e]===u[e];e++);var a=r-e;for(t=1;t<=a&&n[r-t]===u[o-t];t++);return gi._fallbackText=u.slice(e,1<t?1-t:void 0),gi._fallbackText},getText:function(){return\"value\"in gi._root?gi._root.value:gi._root[Ce()]}},Ci=mi,Ei=\"dispatchConfig _targetInst nativeEvent isDefaultPrevented isPropagationStopped _dispatchListeners _dispatchInstances\".split(\" \"),Ai={type:null,target:null,currentTarget:Et.thatReturnsNull,eventPhase:null,bubbles:null,cancelable:null,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:null,isTrusted:null};mt(Te.prototype,{preventDefault:function(){this.defaultPrevented=!0;var e=this.nativeEvent;e&&(e.preventDefault?e.preventDefault():\"unknown\"!==typeof e.returnValue&&(e.returnValue=!1),this.isDefaultPrevented=Et.thatReturnsTrue)},stopPropagation:function(){var e=this.nativeEvent;e&&(e.stopPropagation?e.stopPropagation():\"unknown\"!==typeof e.cancelBubble&&(e.cancelBubble=!0),this.isPropagationStopped=Et.thatReturnsTrue)},persist:function(){this.isPersistent=Et.thatReturnsTrue},isPersistent:Et.thatReturnsFalse,destructor:function(){var e,t=this.constructor.Interface;for(e in t)this[e]=null;for(t=0;t<Ei.length;t++)this[Ei[t]]=null}}),Te.Interface=Ai,Te.augmentClass=function(e,t){function n(){}n.prototype=this.prototype;var r=new n;mt(r,e.prototype),e.prototype=r,e.prototype.constructor=e,e.Interface=mt({},this.Interface,t),e.augmentClass=this.augmentClass,Ne(e)},Ne(Te),Te.augmentClass(_e,{data:null}),Te.augmentClass(Oe,{data:null});var Fi=[9,13,27,32],bi=gt.canUseDOM&&\"CompositionEvent\"in window,yi=null;gt.canUseDOM&&\"documentMode\"in document&&(yi=document.documentMode);var vi;if(vi=gt.canUseDOM&&\"TextEvent\"in window&&!yi){var Bi=window.opera;vi=!(\"object\"===typeof Bi&&\"function\"===typeof Bi.version&&12>=parseInt(Bi.version(),10))}var wi=vi,ki=gt.canUseDOM&&(!bi||yi&&8<yi&&11>=yi),xi=String.fromCharCode(32),Ti={beforeInput:{phasedRegistrationNames:{bubbled:\"onBeforeInput\",captured:\"onBeforeInputCapture\"},dependencies:[\"topCompositionEnd\",\"topKeyPress\",\"topTextInput\",\"topPaste\"]},compositionEnd:{phasedRegistrationNames:{bubbled:\"onCompositionEnd\",captured:\"onCompositionEndCapture\"},dependencies:\"topBlur topCompositionEnd topKeyDown topKeyPress topKeyUp topMouseDown\".split(\" \")},compositionStart:{phasedRegistrationNames:{bubbled:\"onCompositionStart\",captured:\"onCompositionStartCapture\"},dependencies:\"topBlur topCompositionStart topKeyDown topKeyPress topKeyUp topMouseDown\".split(\" \")},compositionUpdate:{phasedRegistrationNames:{bubbled:\"onCompositionUpdate\",captured:\"onCompositionUpdateCapture\"},dependencies:\"topBlur topCompositionUpdate topKeyDown topKeyPress topKeyUp topMouseDown\".split(\" \")}},Si=!1,Pi=!1,Ni={eventTypes:Ti,extractEvents:function(e,t,n,r){var u;if(bi)e:{switch(e){case\"topCompositionStart\":var o=Ti.compositionStart;break e;case\"topCompositionEnd\":o=Ti.compositionEnd;break e;case\"topCompositionUpdate\":o=Ti.compositionUpdate;break e}o=void 0}else Pi?Ie(e,n)&&(o=Ti.compositionEnd):\"topKeyDown\"===e&&229===n.keyCode&&(o=Ti.compositionStart);return o?(ki&&(Pi||o!==Ti.compositionStart?o===Ti.compositionEnd&&Pi&&(u=Ci.getData()):Pi=Ci.initialize(r)),o=_e.getPooled(o,t,n,r),u?o.data=u:null!==(u=Re(n))&&(o.data=u),hi.accumulateTwoPhaseDispatches(o),u=o):u=null,(e=wi?Le(e,n):Ue(e,n))?(t=Oe.getPooled(Ti.beforeInput,t,n,r),t.data=e,hi.accumulateTwoPhaseDispatches(t)):t=null,[u,t]}},_i={color:!0,date:!0,datetime:!0,\"datetime-local\":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0},Oi={change:{phasedRegistrationNames:{bubbled:\"onChange\",captured:\"onChangeCapture\"},dependencies:\"topBlur topChange topClick topFocus topInput topKeyDown topKeyUp topSelectionChange\".split(\" \")}},Ii=null,Ri=null,Li=!1;gt.canUseDOM&&(Li=P(\"input\")&&(!document.documentMode||9<document.documentMode));var Ui={eventTypes:Oi,_isInputEventSupported:Li,extractEvents:function(e,t,n,r){var u=t?Gt.getNodeFromInstance(t):window,o=u.nodeName&&u.nodeName.toLowerCase();if(\"select\"===o||\"input\"===o&&\"file\"===u.type)var a=Ve;else if(Me(u))if(Li)a=$e;else{a=Ge;var i=Ke}else!(o=u.nodeName)||\"input\"!==o.toLowerCase()||\"checkbox\"!==u.type&&\"radio\"!==u.type||(a=Ye);if(a&&(a=a(e,t)))return He(a,n,r);i&&i(e,u,t),\"topBlur\"===e&&null!=t&&(e=t._wrapperState||u._wrapperState)&&e.controlled&&\"number\"===u.type&&(e=\"\"+u.value,u.getAttribute(\"value\")!==e&&u.setAttribute(\"value\",e))}};Te.augmentClass(Qe,{view:function(e){return e.view?e.view:(e=y(e),e.window===e?e:(e=e.ownerDocument)?e.defaultView||e.parentWindow:window)},detail:function(e){return e.detail||0}});var Mi={Alt:\"altKey\",Control:\"ctrlKey\",Meta:\"metaKey\",Shift:\"shiftKey\"};Qe.augmentClass(Ze,{screenX:null,screenY:null,clientX:null,clientY:null,pageX:null,pageY:null,ctrlKey:null,shiftKey:null,altKey:null,metaKey:null,getModifierState:Je,button:null,buttons:null,relatedTarget:function(e){return e.relatedTarget||(e.fromElement===e.srcElement?e.toElement:e.fromElement)}});var Hi={mouseEnter:{registrationName:\"onMouseEnter\",dependencies:[\"topMouseOut\",\"topMouseOver\"]},mouseLeave:{registrationName:\"onMouseLeave\",dependencies:[\"topMouseOut\",\"topMouseOver\"]}},qi={eventTypes:Hi,extractEvents:function(e,t,n,r){if(\"topMouseOver\"===e&&(n.relatedTarget||n.fromElement)||\"topMouseOut\"!==e&&\"topMouseOver\"!==e)return null;var u=r.window===r?r:(u=r.ownerDocument)?u.defaultView||u.parentWindow:window;if(\"topMouseOut\"===e?(e=t,t=(t=n.relatedTarget||n.toElement)?Gt.getClosestInstanceFromNode(t):null):e=null,e===t)return null;var o=null==e?u:Gt.getNodeFromInstance(e);u=null==t?u:Gt.getNodeFromInstance(t);var a=Ze.getPooled(Hi.mouseLeave,e,n,r);return a.type=\"mouseleave\",a.target=o,a.relatedTarget=u,n=Ze.getPooled(Hi.mouseEnter,t,n,r),n.type=\"mouseenter\",n.target=u,n.relatedTarget=o,hi.accumulateEnterLeaveDispatches(a,n,e,t),[a,n]}},ji=Lt.DOCUMENT_NODE,Vi=gt.canUseDOM&&\"documentMode\"in document&&11>=document.documentMode,Wi={select:{phasedRegistrationNames:{bubbled:\"onSelect\",captured:\"onSelectCapture\"},dependencies:\"topBlur topContextMenu topFocus topKeyDown topKeyUp topMouseDown topMouseUp topSelectionChange\".split(\" \")}},zi=null,Ki=null,Gi=null,Yi=!1,$i=Tn.isListeningToAllDependencies,Qi={eventTypes:Wi,extractEvents:function(e,t,n,r){var u=r.window===r?r.document:r.nodeType===ji?r:r.ownerDocument;if(!u||!$i(\"onSelect\",u))return null;switch(u=t?Gt.getNodeFromInstance(t):window,e){case\"topFocus\":(Me(u)||\"true\"===u.contentEditable)&&(zi=u,Ki=t,Gi=null);break;case\"topBlur\":Gi=Ki=zi=null;break;case\"topMouseDown\":Yi=!0;break;case\"topContextMenu\":case\"topMouseUp\":return Yi=!1,et(n,r);case\"topSelectionChange\":if(Vi)break;case\"topKeyDown\":case\"topKeyUp\":return et(n,r)}return null}};Te.augmentClass(tt,{animationName:null,elapsedTime:null,pseudoElement:null}),Te.augmentClass(nt,{clipboardData:function(e){return\"clipboardData\"in e?e.clipboardData:window.clipboardData}}),Qe.augmentClass(rt,{relatedTarget:null});var Xi={Esc:\"Escape\",Spacebar:\" \",Left:\"ArrowLeft\",Up:\"ArrowUp\",Right:\"ArrowRight\",Down:\"ArrowDown\",Del:\"Delete\",Win:\"OS\",Menu:\"ContextMenu\",Apps:\"ContextMenu\",Scroll:\"ScrollLock\",MozPrintableKey:\"Unidentified\"},Ji={8:\"Backspace\",9:\"Tab\",12:\"Clear\",13:\"Enter\",16:\"Shift\",17:\"Control\",18:\"Alt\",19:\"Pause\",20:\"CapsLock\",27:\"Escape\",32:\" \",33:\"PageUp\",34:\"PageDown\",35:\"End\",36:\"Home\",37:\"ArrowLeft\",38:\"ArrowUp\",39:\"ArrowRight\",40:\"ArrowDown\",45:\"Insert\",46:\"Delete\",112:\"F1\",113:\"F2\",114:\"F3\",115:\"F4\",116:\"F5\",117:\"F6\",118:\"F7\",119:\"F8\",120:\"F9\",121:\"F10\",122:\"F11\",123:\"F12\",144:\"NumLock\",145:\"ScrollLock\",224:\"Meta\"};Qe.augmentClass(ot,{key:function(e){if(e.key){var t=Xi[e.key]||e.key;if(\"Unidentified\"!==t)return t}return\"keypress\"===e.type?(e=ut(e),13===e?\"Enter\":String.fromCharCode(e)):\"keydown\"===e.type||\"keyup\"===e.type?Ji[e.keyCode]||\"Unidentified\":\"\"},location:null,ctrlKey:null,shiftKey:null,altKey:null,metaKey:null,repeat:null,locale:null,getModifierState:Je,charCode:function(e){return\"keypress\"===e.type?ut(e):0},keyCode:function(e){return\"keydown\"===e.type||\"keyup\"===e.type?e.keyCode:0},which:function(e){return\"keypress\"===e.type?ut(e):\"keydown\"===e.type||\"keyup\"===e.type?e.keyCode:0}}),Ze.augmentClass(at,{dataTransfer:null}),Qe.augmentClass(it,{touches:null,targetTouches:null,changedTouches:null,altKey:null,metaKey:null,ctrlKey:null,shiftKey:null,getModifierState:Je}),Te.augmentClass(lt,{propertyName:null,elapsedTime:null,pseudoElement:null}),Ze.augmentClass(st,{deltaX:function(e){return\"deltaX\"in e?e.deltaX:\"wheelDeltaX\"in e?-e.wheelDeltaX:0},deltaY:function(e){return\"deltaY\"in e?e.deltaY:\"wheelDeltaY\"in e?-e.wheelDeltaY:\"wheelDelta\"in e?-e.wheelDelta:0},deltaZ:null,deltaMode:null});var Zi={},el={};\"abort animationEnd animationIteration animationStart blur cancel canPlay canPlayThrough click close contextMenu copy cut doubleClick drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error focus input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing progress rateChange reset scroll seeked seeking stalled submit suspend timeUpdate toggle touchCancel touchEnd touchMove touchStart transitionEnd volumeChange waiting wheel\".split(\" \").forEach(function(e){var t=e[0].toUpperCase()+e.slice(1),n=\"on\"+t;t=\"top\"+t,n={phasedRegistrationNames:{bubbled:n,captured:n+\"Capture\"},dependencies:[t]},Zi[e]=n,el[t]=n});var tl={eventTypes:Zi,extractEvents:function(e,t,n,u){var o=el[e];if(!o)return null;switch(e){case\"topAbort\":case\"topCancel\":case\"topCanPlay\":case\"topCanPlayThrough\":case\"topClose\":case\"topDurationChange\":case\"topEmptied\":case\"topEncrypted\":case\"topEnded\":case\"topError\":case\"topInput\":case\"topInvalid\":case\"topLoad\":case\"topLoadedData\":case\"topLoadedMetadata\":case\"topLoadStart\":case\"topPause\":case\"topPlay\":case\"topPlaying\":case\"topProgress\":case\"topRateChange\":case\"topReset\":case\"topSeeked\":case\"topSeeking\":case\"topStalled\":case\"topSubmit\":case\"topSuspend\":case\"topTimeUpdate\":case\"topToggle\":case\"topVolumeChange\":case\"topWaiting\":var a=Te;break;case\"topKeyPress\":if(0===ut(n))return null;case\"topKeyDown\":case\"topKeyUp\":a=ot;break;case\"topBlur\":case\"topFocus\":a=rt;break;case\"topClick\":if(2===n.button)return null;case\"topDoubleClick\":case\"topMouseDown\":case\"topMouseMove\":case\"topMouseUp\":case\"topMouseOut\":case\"topMouseOver\":case\"topContextMenu\":a=Ze;break;case\"topDrag\":case\"topDragEnd\":case\"topDragEnter\":case\"topDragExit\":case\"topDragLeave\":case\"topDragOver\":case\"topDragStart\":case\"topDrop\":a=at;break;case\"topTouchCancel\":case\"topTouchEnd\":case\"topTouchMove\":case\"topTouchStart\":a=it;break;case\"topAnimationEnd\":case\"topAnimationIteration\":case\"topAnimationStart\":a=tt;break;case\"topTransitionEnd\":a=lt;break;case\"topScroll\":a=Qe;break;case\"topWheel\":a=st;break;case\"topCopy\":case\"topCut\":case\"topPaste\":a=nt}return a||r(\"86\",e),e=a.getPooled(o,t,n,u),hi.accumulateTwoPhaseDispatches(e),e}};En.setHandleTopLevel(Tn.handleTopLevel),Fn.injection.injectEventPluginOrder(\"ResponderEventPlugin SimpleEventPlugin TapEventPlugin EnterLeaveEventPlugin ChangeEventPlugin SelectEventPlugin BeforeInputEventPlugin\".split(\" \")),ln.injection.injectComponentTree(Gt),Fn.injection.injectEventPluginsByName({SimpleEventPlugin:tl,EnterLeaveEventPlugin:qi,ChangeEventPlugin:Ui,SelectEventPlugin:Qi,BeforeInputEventPlugin:Ni});var nl=It.injection.MUST_USE_PROPERTY,rl=It.injection.HAS_BOOLEAN_VALUE,ul=It.injection.HAS_NUMERIC_VALUE,ol=It.injection.HAS_POSITIVE_NUMERIC_VALUE,al=It.injection.HAS_STRING_BOOLEAN_VALUE,il={Properties:{allowFullScreen:rl,allowTransparency:al,async:rl,autoPlay:rl,capture:rl,checked:nl|rl,cols:ol,contentEditable:al,controls:rl,default:rl,defer:rl,disabled:rl,download:It.injection.HAS_OVERLOADED_BOOLEAN_VALUE,draggable:al,formNoValidate:rl,hidden:rl,loop:rl,multiple:nl|rl,muted:nl|rl,noValidate:rl,open:rl,playsInline:rl,readOnly:rl,required:rl,reversed:rl,rows:ol,rowSpan:ul,scoped:rl,seamless:rl,selected:nl|rl,size:ol,start:ul,span:ol,spellCheck:al,style:0,itemScope:rl,acceptCharset:0,className:0,htmlFor:0,httpEquiv:0,value:al},DOMAttributeNames:{acceptCharset:\"accept-charset\",className:\"class\",htmlFor:\"for\",httpEquiv:\"http-equiv\"},DOMMutationMethods:{value:function(e,t){if(null==t)return e.removeAttribute(\"value\");\"number\"!==e.type||!1===e.hasAttribute(\"value\")?e.setAttribute(\"value\",\"\"+t):e.validity&&!e.validity.badInput&&e.ownerDocument.activeElement!==e&&e.setAttribute(\"value\",\"\"+t)}}},ll=It.injection.HAS_STRING_BOOLEAN_VALUE,sl={xlink:\"http://www.w3.org/1999/xlink\",xml:\"http://www.w3.org/XML/1998/namespace\"},cl={Properties:{autoReverse:ll,externalResourcesRequired:ll,preserveAlpha:ll},DOMAttributeNames:{autoReverse:\"autoReverse\",externalResourcesRequired:\"externalResourcesRequired\",preserveAlpha:\"preserveAlpha\"},DOMAttributeNamespaces:{xlinkActuate:sl.xlink,xlinkArcrole:sl.xlink,xlinkHref:sl.xlink,xlinkRole:sl.xlink,xlinkShow:sl.xlink,xlinkTitle:sl.xlink,xlinkType:sl.xlink,xmlBase:sl.xml,xmlLang:sl.xml,xmlSpace:sl.xml}},pl=/[\\-\\:]([a-z])/g;\"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode x-height xlink:actuate xlink:arcrole xlink:href xlink:role xlink:show xlink:title xlink:type xml:base xmlns:xlink xml:lang xml:space\".split(\" \").forEach(function(e){var t=e.replace(pl,ct);cl.Properties[t]=0,cl.DOMAttributeNames[t]=e}),It.injection.injectDOMPropertyConfig(il),It.injection.injectDOMPropertyConfig(cl);var fl=ta.injectInternals,dl=Lt.ELEMENT_NODE,Dl=Lt.TEXT_NODE,hl=Lt.COMMENT_NODE,gl=Lt.DOCUMENT_NODE,ml=Lt.DOCUMENT_FRAGMENT_NODE,Cl=It.ROOT_ATTRIBUTE_NAME,El=kt.getChildNamespace,Al=fr.createElement,Fl=fr.createTextNode,bl=fr.setInitialProperties,yl=fr.diffProperties,vl=fr.updateProperties,Bl=fr.diffHydratedProperties,wl=fr.diffHydratedText,kl=fr.warnForDeletedHydratableElement,xl=fr.warnForDeletedHydratableText,Tl=fr.warnForInsertedHydratedElement,Sl=fr.warnForInsertedHydratedText,Pl=Gt.precacheFiberNode,Nl=Gt.updateFiberProps;fn.injection.injectFiberControlledHostComponent(fr),Fe._injectFiber(function(e){return Il.findHostInstance(e)});var _l=null,Ol=null,Il=function(e){var t=e.getPublicInstance;e=de(e);var n=e.scheduleUpdate,r=e.getPriorityContext;return{createContainer:function(e){var t=pu();return e={current:t,containerInfo:e,isScheduled:!1,nextScheduledRoot:null,context:null,pendingContext:null},t.stateNode=e},updateContainer:function(e,t,u,o){var a=t.current;u=he(u),null===t.context?t.context=u:t.pendingContext=u,t=o,o=r(a,kr.enableAsyncSubtreeAPI&&null!=e&&null!=e.type&&null!=e.type.prototype&&!0===e.type.prototype.unstable_isAsyncReactComponent),e={element:e},Ja(a,e,void 0===t?null:t,o),n(a,o)},batchedUpdates:e.batchedUpdates,unbatchedUpdates:e.unbatchedUpdates,deferredUpdates:e.deferredUpdates,flushSync:e.flushSync,getPublicRootInstance:function(e){if(e=e.current,!e.child)return null;switch(e.child.tag){case ni:return t(e.child.stateNode);default:return e.child.stateNode}},findHostInstance:function(e){return e=ri(e),null===e?null:e.stateNode},findHostInstanceWithNoPortals:function(e){return e=ui(e),null===e?null:e.stateNode}}}({getRootHostContext:function(e){if(e.nodeType===gl)e=(e=e.documentElement)?e.namespaceURI:El(null,\"\");else{var t=e.nodeType===hl?e.parentNode:e;e=t.namespaceURI||null,t=t.tagName,e=El(e,t)}return e},getChildHostContext:function(e,t){return El(e,t)},getPublicInstance:function(e){return e},prepareForCommit:function(){_l=Tn.isEnabled(),Ol=ci.getSelectionInformation(),Tn.setEnabled(!1)},resetAfterCommit:function(){ci.restoreSelection(Ol),Ol=null,Tn.setEnabled(_l),_l=null},createInstance:function(e,t,n,r,u){return e=Al(e,t,n,r),Pl(u,e),Nl(e,t),e},appendInitialChild:function(e,t){e.appendChild(t)},finalizeInitialChildren:function(e,t,n,r){bl(e,t,n,r);e:{switch(t){case\"button\":case\"input\":case\"select\":case\"textarea\":e=!!n.autoFocus;break e}e=!1}return e},prepareUpdate:function(e,t,n,r,u){return yl(e,t,n,r,u)},commitMount:function(e){e.focus()},commitUpdate:function(e,t,n,r,u){Nl(e,u),vl(e,t,n,r,u)},shouldSetTextContent:function(e,t){return\"textarea\"===e||\"string\"===typeof t.children||\"number\"===typeof t.children||\"object\"===typeof t.dangerouslySetInnerHTML&&null!==t.dangerouslySetInnerHTML&&\"string\"===typeof t.dangerouslySetInnerHTML.__html},resetTextContent:function(e){e.textContent=\"\"},shouldDeprioritizeSubtree:function(e,t){return!!t.hidden},createTextInstance:function(e,t,n,r){return e=Fl(e,t),Pl(r,e),e},commitTextUpdate:function(e,t,n){e.nodeValue=n},appendChild:function(e,t){e.appendChild(t)},appendChildToContainer:function(e,t){e.nodeType===hl?e.parentNode.insertBefore(t,e):e.appendChild(t)},insertBefore:function(e,t,n){e.insertBefore(t,n)},insertInContainerBefore:function(e,t,n){e.nodeType===hl?e.parentNode.insertBefore(t,n):e.insertBefore(t,n)},removeChild:function(e,t){e.removeChild(t)},removeChildFromContainer:function(e,t){e.nodeType===hl?e.parentNode.removeChild(t):e.removeChild(t)},canHydrateInstance:function(e,t){return e.nodeType===dl&&t===e.nodeName.toLowerCase()},canHydrateTextInstance:function(e,t){return\"\"!==t&&e.nodeType===Dl},getNextHydratableSibling:function(e){for(e=e.nextSibling;e&&e.nodeType!==dl&&e.nodeType!==Dl;)e=e.nextSibling;return e},getFirstHydratableChild:function(e){for(e=e.firstChild;e&&e.nodeType!==dl&&e.nodeType!==Dl;)e=e.nextSibling;return e},hydrateInstance:function(e,t,n,r,u,o){return Pl(o,e),Nl(e,n),Bl(e,t,n,u,r)},hydrateTextInstance:function(e,t,n){return Pl(n,e),wl(e,t)},didNotHydrateInstance:function(e,t){1===t.nodeType?kl(e,t):xl(e,t)},didNotFindHydratableInstance:function(e,t,n){Tl(e,t,n)},didNotFindHydratableTextInstance:function(e,t){Sl(e,t)},scheduleDeferredCallback:wr.rIC,useSyncScheduling:!0});Dn.injection.injectFiberBatchedUpdates(Il.batchedUpdates);var Rl={createPortal:Dt,hydrate:function(e,t,n){return dt(null,e,t,!0,n)},render:function(e,t,n){return dt(null,e,t,!1,n)},unstable_renderSubtreeIntoContainer:function(e,t,n,u){return null!=e&&Yt.has(e)||r(\"38\"),dt(e,t,n,!1,u)},unmountComponentAtNode:function(e){return pt(e)||r(\"40\"),!!e._reactRootContainer&&(Il.unbatchedUpdates(function(){dt(null,null,e,!1,function(){e._reactRootContainer=null})}),!0)},findDOMNode:Fe,unstable_createPortal:Dt,unstable_batchedUpdates:Dn.batchedUpdates,unstable_deferredUpdates:Il.deferredUpdates,flushSync:Il.flushSync,__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:{EventPluginHub:Fn,EventPluginRegistry:Pt,EventPropagators:hi,ReactControlledComponent:fn,ReactDOMComponentTree:Gt,ReactDOMEventListener:En}};fl({findFiberByHostInstance:Gt.getClosestInstanceFromNode,findHostInstanceByFiber:Il.findHostInstance,bundleType:0,version:\"16.0.0\",rendererPackageName:\"react-dom\"}),e.exports=Rl},function(e,t,n){\"use strict\";var r=!(\"undefined\"===typeof window||!window.document||!window.document.createElement),u={canUseDOM:r,canUseWorkers:\"undefined\"!==typeof Worker,canUseEventListeners:r&&!(!window.addEventListener&&!window.attachEvent),canUseViewport:r&&!!window.screen,isInWorker:!r};e.exports=u},function(e,t,n){\"use strict\";var r=n(3),u={listen:function(e,t,n){return e.addEventListener?(e.addEventListener(t,n,!1),{remove:function(){e.removeEventListener(t,n,!1)}}):e.attachEvent?(e.attachEvent(\"on\"+t,n),{remove:function(){e.detachEvent(\"on\"+t,n)}}):void 0},capture:function(e,t,n){return e.addEventListener?(e.addEventListener(t,n,!0),{remove:function(){e.removeEventListener(t,n,!0)}}):{remove:r}},registerDefault:function(){}};e.exports=u},function(e,t,n){\"use strict\";function r(e,t){return e===t?0!==e||0!==t||1/e===1/t:e!==e&&t!==t}function u(e,t){if(r(e,t))return!0;if(\"object\"!==typeof e||null===e||\"object\"!==typeof t||null===t)return!1;var n=Object.keys(e),u=Object.keys(t);if(n.length!==u.length)return!1;for(var a=0;a<n.length;a++)if(!o.call(t,n[a])||!r(e[n[a]],t[n[a]]))return!1;return!0}var o=Object.prototype.hasOwnProperty;e.exports=u},function(e,t,n){\"use strict\";function r(e,t){return!(!e||!t)&&(e===t||!u(e)&&(u(t)?r(e,t.parentNode):\"contains\"in e?e.contains(t):!!e.compareDocumentPosition&&!!(16&e.compareDocumentPosition(t))))}var u=n(31);e.exports=r},function(e,t,n){\"use strict\";function r(e){return u(e)&&3==e.nodeType}var u=n(32);e.exports=r},function(e,t,n){\"use strict\";function r(e){var t=e?e.ownerDocument||e:document,n=t.defaultView||window;return!(!e||!(\"function\"===typeof n.Node?e instanceof n.Node:\"object\"===typeof e&&\"number\"===typeof e.nodeType&&\"string\"===typeof e.nodeName))}e.exports=r},function(e,t,n){\"use strict\";function r(e){try{e.focus()}catch(e){}}e.exports=r},function(e,t,n){\"use strict\";function r(e){if(\"undefined\"===typeof(e=e||(\"undefined\"!==typeof document?document:void 0)))return null;try{return e.activeElement||e.body}catch(t){return e.body}}e.exports=r},function(e,t,n){\"use strict\";function r(e,t){if(!(e instanceof t))throw new TypeError(\"Cannot call a class as a function\")}function u(e,t){if(!e)throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");return!t||\"object\"!==typeof t&&\"function\"!==typeof t?e:t}function o(e,t){if(\"function\"!==typeof t&&null!==t)throw new TypeError(\"Super expression must either be null or a function, not \"+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var a=n(0),i=n.n(a),l=n(7),s=n(8),c=n(9),p=n(10),f=n(11),d=n(39),D=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,\"value\"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),h={cursor:\"pointer\"},g=function(e){function t(){return r(this,t),u(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return o(t,e),D(t,[{key:\"render\",value:function(){var e=this.props,t=e.error,n=e.editorHandler,r=Object(d.a)(t),u=null!==r&&null!==n;return i.a.createElement(l.a,null,i.a.createElement(c.a,{headerText:\"Failed to compile\"}),i.a.createElement(\"a\",{onClick:u&&r?function(){return n(r)}:null,style:u?h:null},i.a.createElement(p.a,{main:!0,codeHTML:Object(f.a)(t)})),i.a.createElement(s.a,{line1:\"This error occurred during the build time and cannot be dismissed.\"}))}}]),t}(a.PureComponent);t.a=g},function(e,t,n){e.exports={XmlEntities:n(37),Html4Entities:n(38),Html5Entities:n(13),AllHtmlEntities:n(13)}},function(e,t){function n(){}var r={\"<\":\"<\",\">\":\">\",\""\":'\"',\"&apos\":\"'\",\"&\":\"&\",\"<\":\"<\",\">\":\">\",\""\":'\"',\"'\":\"'\",\"&\":\"&\"},u={60:\"lt\",62:\"gt\",34:\"quot\",39:\"apos\",38:\"amp\"},o={\"<\":\"<\",\">\":\">\",'\"':\""\",\"'\":\"'\",\"&\":\"&\"};n.prototype.encode=function(e){return e&&e.length?e.replace(/<|>|\"|'|&/g,function(e){return o[e]}):\"\"},n.encode=function(e){return(new n).encode(e)},n.prototype.decode=function(e){return e&&e.length?e.replace(/&#?[0-9a-zA-Z]+;?/g,function(e){if(\"#\"===e.charAt(1)){var t=\"x\"===e.charAt(2).toLowerCase()?parseInt(e.substr(3),16):parseInt(e.substr(2));return isNaN(t)||t<-32768||t>65535?\"\":String.fromCharCode(t)}return r[e]||e}):\"\"},n.decode=function(e){return(new n).decode(e)},n.prototype.encodeNonUTF=function(e){if(!e||!e.length)return\"\";for(var t=e.length,n=\"\",r=0;r<t;){var o=e.charCodeAt(r),a=u[o];a?(n+=\"&\"+a+\";\",r++):(n+=o<32||o>126?\"&#\"+o+\";\":e.charAt(r),r++)}return n},n.encodeNonUTF=function(e){return(new n).encodeNonUTF(e)},n.prototype.encodeNonASCII=function(e){if(!e||!e.length)return\"\";for(var t=e.length,n=\"\",r=0;r<t;){var u=e.charCodeAt(r);u<=255?n+=e[r++]:(n+=\"&#\"+u+\";\",r++)}return n},n.encodeNonASCII=function(e){return(new n).encodeNonASCII(e)},e.exports=n},function(e,t){function n(){}for(var r=[\"apos\",\"nbsp\",\"iexcl\",\"cent\",\"pound\",\"curren\",\"yen\",\"brvbar\",\"sect\",\"uml\",\"copy\",\"ordf\",\"laquo\",\"not\",\"shy\",\"reg\",\"macr\",\"deg\",\"plusmn\",\"sup2\",\"sup3\",\"acute\",\"micro\",\"para\",\"middot\",\"cedil\",\"sup1\",\"ordm\",\"raquo\",\"frac14\",\"frac12\",\"frac34\",\"iquest\",\"Agrave\",\"Aacute\",\"Acirc\",\"Atilde\",\"Auml\",\"Aring\",\"Aelig\",\"Ccedil\",\"Egrave\",\"Eacute\",\"Ecirc\",\"Euml\",\"Igrave\",\"Iacute\",\"Icirc\",\"Iuml\",\"ETH\",\"Ntilde\",\"Ograve\",\"Oacute\",\"Ocirc\",\"Otilde\",\"Ouml\",\"times\",\"Oslash\",\"Ugrave\",\"Uacute\",\"Ucirc\",\"Uuml\",\"Yacute\",\"THORN\",\"szlig\",\"agrave\",\"aacute\",\"acirc\",\"atilde\",\"auml\",\"aring\",\"aelig\",\"ccedil\",\"egrave\",\"eacute\",\"ecirc\",\"euml\",\"igrave\",\"iacute\",\"icirc\",\"iuml\",\"eth\",\"ntilde\",\"ograve\",\"oacute\",\"ocirc\",\"otilde\",\"ouml\",\"divide\",\"oslash\",\"ugrave\",\"uacute\",\"ucirc\",\"uuml\",\"yacute\",\"thorn\",\"yuml\",\"quot\",\"amp\",\"lt\",\"gt\",\"OElig\",\"oelig\",\"Scaron\",\"scaron\",\"Yuml\",\"circ\",\"tilde\",\"ensp\",\"emsp\",\"thinsp\",\"zwnj\",\"zwj\",\"lrm\",\"rlm\",\"ndash\",\"mdash\",\"lsquo\",\"rsquo\",\"sbquo\",\"ldquo\",\"rdquo\",\"bdquo\",\"dagger\",\"Dagger\",\"permil\",\"lsaquo\",\"rsaquo\",\"euro\",\"fnof\",\"Alpha\",\"Beta\",\"Gamma\",\"Delta\",\"Epsilon\",\"Zeta\",\"Eta\",\"Theta\",\"Iota\",\"Kappa\",\"Lambda\",\"Mu\",\"Nu\",\"Xi\",\"Omicron\",\"Pi\",\"Rho\",\"Sigma\",\"Tau\",\"Upsilon\",\"Phi\",\"Chi\",\"Psi\",\"Omega\",\"alpha\",\"beta\",\"gamma\",\"delta\",\"epsilon\",\"zeta\",\"eta\",\"theta\",\"iota\",\"kappa\",\"lambda\",\"mu\",\"nu\",\"xi\",\"omicron\",\"pi\",\"rho\",\"sigmaf\",\"sigma\",\"tau\",\"upsilon\",\"phi\",\"chi\",\"psi\",\"omega\",\"thetasym\",\"upsih\",\"piv\",\"bull\",\"hellip\",\"prime\",\"Prime\",\"oline\",\"frasl\",\"weierp\",\"image\",\"real\",\"trade\",\"alefsym\",\"larr\",\"uarr\",\"rarr\",\"darr\",\"harr\",\"crarr\",\"lArr\",\"uArr\",\"rArr\",\"dArr\",\"hArr\",\"forall\",\"part\",\"exist\",\"empty\",\"nabla\",\"isin\",\"notin\",\"ni\",\"prod\",\"sum\",\"minus\",\"lowast\",\"radic\",\"prop\",\"infin\",\"ang\",\"and\",\"or\",\"cap\",\"cup\",\"int\",\"there4\",\"sim\",\"cong\",\"asymp\",\"ne\",\"equiv\",\"le\",\"ge\",\"sub\",\"sup\",\"nsub\",\"sube\",\"supe\",\"oplus\",\"otimes\",\"perp\",\"sdot\",\"lceil\",\"rceil\",\"lfloor\",\"rfloor\",\"lang\",\"rang\",\"loz\",\"spades\",\"clubs\",\"hearts\",\"diams\"],u=[39,160,161,162,163,164,165,166,167,168,169,170,171,172,173,174,175,176,177,178,179,180,181,182,183,184,185,186,187,188,189,190,191,192,193,194,195,196,197,198,199,200,201,202,203,204,205,206,207,208,209,210,211,212,213,214,215,216,217,218,219,220,221,222,223,224,225,226,227,228,229,230,231,232,233,234,235,236,237,238,239,240,241,242,243,244,245,246,247,248,249,250,251,252,253,254,255,34,38,60,62,338,339,352,353,376,710,732,8194,8195,8201,8204,8205,8206,8207,8211,8212,8216,8217,8218,8220,8221,8222,8224,8225,8240,8249,8250,8364,402,913,914,915,916,917,918,919,920,921,922,923,924,925,926,927,928,929,931,932,933,934,935,936,937,945,946,947,948,949,950,951,952,953,954,955,956,957,958,959,960,961,962,963,964,965,966,967,968,969,977,978,982,8226,8230,8242,8243,8254,8260,8472,8465,8476,8482,8501,8592,8593,8594,8595,8596,8629,8656,8657,8658,8659,8660,8704,8706,8707,8709,8711,8712,8713,8715,8719,8721,8722,8727,8730,8733,8734,8736,8743,8744,8745,8746,8747,8756,8764,8773,8776,8800,8801,8804,8805,8834,8835,8836,8838,8839,8853,8855,8869,8901,8968,8969,8970,8971,9001,9002,9674,9824,9827,9829,9830],o={},a={},i=0,l=r.length;i<l;){var s=r[i],c=u[i];o[s]=String.fromCharCode(c),a[c]=s,i++}n.prototype.decode=function(e){return e&&e.length?e.replace(/&(#?[\\w\\d]+);?/g,function(e,t){var n;if(\"#\"===t.charAt(0)){var r=\"x\"===t.charAt(1).toLowerCase()?parseInt(t.substr(2),16):parseInt(t.substr(1));isNaN(r)||r<-32768||r>65535||(n=String.fromCharCode(r))}else n=o[t];return n||e}):\"\"},n.decode=function(e){return(new n).decode(e)},n.prototype.encode=function(e){if(!e||!e.length)return\"\";for(var t=e.length,n=\"\",r=0;r<t;){var u=a[e.charCodeAt(r)];n+=u?\"&\"+u+\";\":e.charAt(r),r++}return n},n.encode=function(e){return(new n).encode(e)},n.prototype.encodeNonUTF=function(e){if(!e||!e.length)return\"\";for(var t=e.length,n=\"\",r=0;r<t;){var u=e.charCodeAt(r),o=a[u];n+=o?\"&\"+o+\";\":u<32||u>126?\"&#\"+u+\";\":e.charAt(r),r++}return n},n.encodeNonUTF=function(e){return(new n).encodeNonUTF(e)},n.prototype.encodeNonASCII=function(e){if(!e||!e.length)return\"\";for(var t=e.length,n=\"\",r=0;r<t;){var u=e.charCodeAt(r);u<=255?n+=e[r++]:(n+=\"&#\"+u+\";\",r++)}return n},n.encodeNonASCII=function(e){return(new n).encodeNonASCII(e)},e.exports=n},function(e,t,n){\"use strict\";function r(e){for(var t=e.split(\"\\n\"),n=\"\",r=0,u=0;u<t.length;u++){var l=o.a.ansiToText(t[u]).trim();if(l){!n&&l.match(a)&&(n=l);for(var s=0;s<i.length;){var c=l.match(i[s]);if(c){r=parseInt(c[1],10);break}s++}if(n&&r)break}}return n&&r?{fileName:n,lineNumber:r}:null}var u=n(12),o=n.n(u),a=/^\\.(\\/[^\\/\\n ]+)+\\.[^\\/\\n ]+$/,i=[/^.*\\((\\d+):(\\d+)\\)$/,/^Line (\\d+):.+$/];t.a=r},function(e,t,n){\"use strict\";function r(e,t){if(!(e instanceof t))throw new TypeError(\"Cannot call a class as a function\")}function u(e,t){if(!e)throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");return!t||\"object\"!==typeof t&&\"function\"!==typeof t?e:t}function o(e,t){if(\"function\"!==typeof t&&null!==t)throw new TypeError(\"Super expression must either be null or a function, not \"+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var a=n(0),i=n.n(a),l=n(7),s=n(41),c=n(42),p=n(43),f=n(8),d=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,\"value\"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),D=function(e){function t(){var e,n,o,a;r(this,t);for(var i=arguments.length,l=Array(i),s=0;s<i;s++)l[s]=arguments[s];return n=o=u(this,(e=t.__proto__||Object.getPrototypeOf(t)).call.apply(e,[this].concat(l))),o.state={currentIndex:0},o.previous=function(){o.setState(function(e,t){return{currentIndex:e.currentIndex>0?e.currentIndex-1:t.errorRecords.length-1}})},o.next=function(){o.setState(function(e,t){return{currentIndex:e.currentIndex<t.errorRecords.length-1?e.currentIndex+1:0}})},o.shortcutHandler=function(e){\"Escape\"===e?o.props.close():\"ArrowLeft\"===e?o.previous():\"ArrowRight\"===e&&o.next()},a=n,u(o,a)}return o(t,e),d(t,[{key:\"render\",value:function(){var e=this.props,t=e.errorRecords,n=e.close,r=t.length;return i.a.createElement(l.a,{shortcutHandler:this.shortcutHandler},i.a.createElement(s.a,{close:n}),r>1&&i.a.createElement(c.a,{currentError:this.state.currentIndex+1,totalErrors:r,previous:this.previous,next:this.next}),i.a.createElement(p.a,{errorRecord:t[this.state.currentIndex],editorHandler:this.props.editorHandler}),i.a.createElement(f.a,{line1:\"This screen is visible only in development. It will not appear if the app crashes in production.\",line2:\"Open your browser’s developer console to further inspect this error.\"}))}}]),t}(a.PureComponent);t.a=D},function(e,t,n){\"use strict\";function r(e){var t=e.close;return o.a.createElement(\"span\",{title:\"Click or press Escape to dismiss.\",onClick:t,style:i},\"×\")}var u=n(0),o=n.n(u),a=n(1),i={color:a.a,lineHeight:\"1rem\",fontSize:\"1.5rem\",padding:\"1rem\",cursor:\"pointer\",position:\"absolute\",right:0,top:0};t.a=r},function(e,t,n){\"use strict\";function r(e){var t=e.currentError,n=e.totalErrors,r=e.previous,u=e.next;return o.a.createElement(\"div\",{style:i},o.a.createElement(\"span\",{style:l},o.a.createElement(\"button\",{onClick:r,style:c},\"←\"),o.a.createElement(\"button\",{onClick:u,style:p},\"→\")),t+\" of \"+n+\" errors on the page\")}var u=n(0),o=n.n(u),a=n(1),i={marginBottom:\"0.5rem\"},l={marginRight:\"1em\"},s={backgroundColor:a.f,color:a.e,border:\"none\",borderRadius:\"4px\",padding:\"3px 6px\",cursor:\"pointer\"},c=Object.assign({},s,{borderTopRightRadius:\"0px\",borderBottomRightRadius:\"0px\",marginRight:\"1px\"}),p=Object.assign({},s,{borderTopLeftRadius:\"0px\",borderBottomLeftRadius:\"0px\"});t.a=r},function(e,t,n){\"use strict\";function r(e){var t=e.errorRecord,n=e.editorHandler,r=t.error,u=t.unhandledRejection,s=t.contextSize,c=t.stackFrames,p=u?\"Unhandled Rejection (\"+r.name+\")\":r.name,f=r.message,d=f.match(/^\\w*:/)||!p?f:p+\": \"+f;return d=d.replace(/^Invariant Violation:\\s*/,\"\").replace(/^Warning:\\s*/,\"\").replace(\" Check the render method\",\"\\n\\nCheck the render method\").replace(\" Check your code at\",\"\\n\\nCheck your code at\"),o.a.createElement(\"div\",{style:l},o.a.createElement(a.a,{headerText:d}),o.a.createElement(i.a,{stackFrames:c,errorName:p,contextSize:s,editorHandler:n}))}var u=n(0),o=n.n(u),a=n(9),i=n(44),l={display:\"flex\",flexDirection:\"column\"};t.a=r},function(e,t,n){\"use strict\";function r(e,t){if(!(e instanceof t))throw new TypeError(\"Cannot call a class as a function\")}function u(e,t){if(!e)throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");return!t||\"object\"!==typeof t&&\"function\"!==typeof t?e:t}function o(e,t){if(\"function\"!==typeof t&&null!==t)throw new TypeError(\"Super expression must either be null or a function, not \"+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var a=n(0),i=n.n(a),l=n(45),s=n(61),c=n(62),p=n(63),f=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,\"value\"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),d={fontSize:\"1em\",flex:\"0 1 auto\",minHeight:\"0px\",overflow:\"auto\"},D=function(e){function t(){return r(this,t),u(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return o(t,e),f(t,[{key:\"renderFrames\",value:function(){var e=this.props,t=e.stackFrames,n=e.errorName,r=e.contextSize,u=e.editorHandler,o=[],a=!1,f=[],d=0;return t.forEach(function(e,D){var h=e.fileName,g=e._originalFileName,m=Object(c.a)(g,h),C=!Object(p.a)(n),E=m&&(C||a);m||(a=!0);var A=i.a.createElement(l.a,{key:\"frame-\"+D,frame:e,contextSize:r,critical:0===D,showCode:!E,editorHandler:u}),F=D===t.length-1;E&&f.push(A),E&&!F||(1===f.length?o.push(f[0]):f.length>1&&(d++,o.push(i.a.createElement(s.a,{key:\"bundle-\"+d},f))),f=[]),E||o.push(A)}),o}},{key:\"render\",value:function(){return i.a.createElement(\"div\",{style:d},this.renderFrames())}}]),t}(a.Component);t.a=D},function(e,t,n){\"use strict\";function r(e,t){if(!(e instanceof t))throw new TypeError(\"Cannot call a class as a function\")}function u(e,t){if(!e)throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");return!t||\"object\"!==typeof t&&\"function\"!==typeof t?e:t}function o(e,t){if(\"function\"!==typeof t&&null!==t)throw new TypeError(\"Super expression must either be null or a function, not \"+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var a=n(0),i=n.n(a),l=n(46),s=n(60),c=n(1),p=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,\"value\"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),f={fontSize:\"0.9em\",marginBottom:\"0.9em\"},d={textDecoration:\"none\",color:c.b,cursor:\"pointer\"},D={cursor:\"pointer\"},h={marginBottom:\"1.5em\",color:c.b,cursor:\"pointer\",border:\"none\",display:\"block\",width:\"100%\",textAlign:\"left\",background:\"#fff\",fontFamily:\"Consolas, Menlo, monospace\",fontSize:\"1em\",padding:\"0px\",lineHeight:\"1.5\"},g=function(e){function t(){var e,n,o,a;r(this,t);for(var i=arguments.length,l=Array(i),s=0;s<i;s++)l[s]=arguments[s];return n=o=u(this,(e=t.__proto__||Object.getPrototypeOf(t)).call.apply(e,[this].concat(l))),o.state={compiled:!1},o.toggleCompiled=function(){o.setState(function(e){return{compiled:!e.compiled}})},o.editorHandler=function(){var e=o.getErrorLocation();e&&o.props.editorHandler(e)},o.onKeyDown=function(e){\"Enter\"===e.key&&o.editorHandler()},a=n,u(o,a)}return o(t,e),p(t,[{key:\"getErrorLocation\",value:function(){var e=this.props.frame,t=e._originalFileName,n=e._originalLineNumber;return t?-1!==t.trim().indexOf(\" \")?null:{fileName:t,lineNumber:n||1}:null}},{key:\"render\",value:function(){var e=this.props,t=e.frame,n=e.contextSize,r=e.critical,u=e.showCode,o=t.fileName,a=t.lineNumber,c=t.columnNumber,p=t._scriptCode,g=t._originalFileName,m=t._originalLineNumber,C=t._originalColumnNumber,E=t._originalScriptCode,A=t.getFunctionName(),F=this.state.compiled,b=Object(s.a)(g,m,C,o,a,c,F),y=null;u&&(F&&p&&0!==p.length&&null!=a?y={lines:p,lineNum:a,columnNum:c,contextSize:n,main:r}:!F&&E&&0!==E.length&&null!=m&&(y={lines:E,lineNum:m,columnNum:C,contextSize:n,main:r}));var v=null!==this.getErrorLocation()&&null!==this.props.editorHandler;return i.a.createElement(\"div\",null,i.a.createElement(\"div\",null,A),i.a.createElement(\"div\",{style:f},i.a.createElement(\"a\",{style:v?d:null,onClick:v?this.editorHandler:null,onKeyDown:v?this.onKeyDown:null,tabIndex:v?\"0\":null},b)),y&&i.a.createElement(\"span\",null,i.a.createElement(\"a\",{onClick:v?this.editorHandler:null,style:v?D:null},i.a.createElement(l.a,y)),i.a.createElement(\"button\",{style:h,onClick:this.toggleCompiled},\"View \"+(F?\"source\":\"compiled\"))))}}]),t}(a.Component);t.a=g},function(e,t,n){\"use strict\";function r(e){var t=e.lines,n=e.lineNum,r=e.columnNum,u=e.contextSize,p=e.main,d=[],D=1/0;t.forEach(function(e){var t=e.content,n=t.match(/^\\s*/);\"\"!==t&&(D=n&&n[0]?Math.min(D,n[0].length):0)}),t.forEach(function(e){var t=e.content,n=e.lineNumber;isFinite(D)&&(t=t.substring(D)),d[n-1]=t});var h=f()(d.join(\"\\n\"),n,null==r?0:r-(isFinite(D)?D:0),{forceColor:!0,linesAbove:u,linesBelow:u}),g=Object(c.a)(h),m=document.createElement(\"code\");m.innerHTML=g,Object(l.a)(m);var C=m.childNodes;e:for(var E=0;E<C.length;++E)for(var A=C[E],F=A.childNodes,b=0;b<F.length;++b){var y=F[b],v=y.innerText;if(null!=v&&-1!==v.indexOf(\" \"+n+\" |\")){Object(i.a)(A,p?s.d:s.g);break e}}return o.a.createElement(a.a,{main:p,codeHTML:m.innerHTML})}var u=n(0),o=n.n(u),a=n(10),i=n(14),l=n(47),s=n(1),c=n(11),p=n(48),f=n.n(p);t.a=r},function(e,t,n){\"use strict\";function r(e,t){for(;null!=t&&\"br\"!==t.tagName.toLowerCase();)t=t.nextElementSibling;null!=t&&e.removeChild(t)}function u(e){for(var t=e.childNodes,n=0;n<t.length;++n){var u=t[n];if(\"span\"===u.tagName.toLowerCase()){var o=u.innerText;if(null!=o){\"|^\"===o.replace(/\\s/g,\"\")&&(u.style.position=\"absolute\",r(e,u))}}}}n.d(t,\"a\",function(){return u})},function(e,t,n){\"use strict\";function r(e){return e&&e.__esModule?e:{default:e}}function u(e){return{keyword:e.cyan,capitalized:e.yellow,jsx_tag:e.yellow,punctuator:e.yellow,number:e.magenta,string:e.green,regex:e.magenta,comment:e.grey,invalid:e.white.bgRed.bold,gutter:e.grey,marker:e.red.bold}}function o(e){var t=e.slice(-2),n=t[0],r=t[1],u=(0,i.matchToToken)(e);if(\"name\"===u.type){if(c.default.keyword.isReservedWordES6(u.value))return\"keyword\";if(D.test(u.value)&&(\"<\"===r[n-1]||\"</\"==r.substr(n-2,2)))return\"jsx_tag\";if(u.value[0]!==u.value[0].toLowerCase())return\"capitalized\"}return\"punctuator\"===u.type&&h.test(u.value)?\"bracket\":u.type}function a(e,t){return t.replace(l.default,function(){for(var t=arguments.length,n=Array(t),r=0;r<t;r++)n[r]=arguments[r];var u=o(n),a=e[u];return a?n[0].split(d).map(function(e){return a(e)}).join(\"\\n\"):n[0]})}t.__esModule=!0,t.default=function(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};n=Math.max(n,0);var o=r.highlightCode&&f.default.supportsColor||r.forceColor,i=f.default;r.forceColor&&(i=new f.default.constructor({enabled:!0}));var l=function(e,t){return o?e(t):t},s=u(i);o&&(e=a(s,e));var c=r.linesAbove||2,p=r.linesBelow||3,D=e.split(d),h=Math.max(t-(c+1),0),g=Math.min(D.length,t+p);t||n||(h=0,g=D.length);var m=String(g).length,C=D.slice(h,g).map(function(e,r){var u=h+1+r,o=(\" \"+u).slice(-m),a=\" \"+o+\" | \";if(u===t){var i=\"\";if(n){var c=e.slice(0,n-1).replace(/[^\\t]/g,\" \");i=[\"\\n \",l(s.gutter,a.replace(/\\d/g,\" \")),c,l(s.marker,\"^\")].join(\"\")}return[l(s.marker,\">\"),l(s.gutter,a),e,i].join(\"\")}return\" \"+l(s.gutter,a)+e}).join(\"\\n\");return o?i.reset(C):C};var i=n(49),l=r(i),s=n(50),c=r(s),p=n(53),f=r(p),d=/\\r\\n|[\\n\\r\\u2028\\u2029]/,D=/^[a-z][\\w-]*$/i,h=/^[()\\[\\]{}]$/;e.exports=t.default},function(e,t){Object.defineProperty(t,\"__esModule\",{value:!0}),t.default=/((['\"])(?:(?!\\2|\\\\).|\\\\(?:\\r\\n|[\\s\\S]))*(\\2)?|`(?:[^`\\\\$]|\\\\[\\s\\S]|\\$(?!\\{)|\\$\\{(?:[^{}]|\\{[^}]*\\}?)*\\}?)*(`)?)|(\\/\\/.*)|(\\/\\*(?:[^*]|\\*(?!\\/))*(\\*\\/)?)|(\\/(?!\\*)(?:\\[(?:(?![\\]\\\\]).|\\\\.)*\\]|(?![\\/\\]\\\\]).|\\\\.)+\\/(?:(?!\\s*(?:\\b|[\\u0080-\\uFFFF$\\\\'\"~({]|[+\\-!](?!=)|\\.?\\d))|[gmiyu]{1,5}\\b(?![\\u0080-\\uFFFF$\\\\]|\\s*(?:[+\\-*%&|^<>!=?({]|\\/(?![\\/*])))))|(0[xX][\\da-fA-F]+|0[oO][0-7]+|0[bB][01]+|(?:\\d*\\.\\d+|\\d+\\.?)(?:[eE][+-]?\\d+)?)|((?!\\d)(?:(?!\\s)[$\\w\\u0080-\\uFFFF]|\\\\u[\\da-fA-F]{4}|\\\\u\\{[\\da-fA-F]+\\})+)|(--|\\+\\+|&&|\\|\\||=>|\\.{3}|(?:[+\\-\\/%&|^]|\\*{1,2}|<{1,2}|>{1,3}|!=?|={1,2})=?|[?~.,:;[\\](){}])|(\\s+)|(^$|[\\s\\S])/g,t.matchToToken=function(e){var t={type:\"invalid\",value:e[0]};return e[1]?(t.type=\"string\",t.closed=!(!e[3]&&!e[4])):e[5]?t.type=\"comment\":e[6]?(t.type=\"comment\",t.closed=!!e[7]):e[8]?t.type=\"regex\":e[9]?t.type=\"number\":e[10]?t.type=\"name\":e[11]?t.type=\"punctuator\":e[12]&&(t.type=\"whitespace\"),t}},function(e,t,n){!function(){\"use strict\";t.ast=n(51),t.code=n(15),t.keyword=n(52)}()},function(e,t){!function(){\"use strict\";function t(e){if(null==e)return!1;switch(e.type){case\"ArrayExpression\":case\"AssignmentExpression\":case\"BinaryExpression\":case\"CallExpression\":case\"ConditionalExpression\":case\"FunctionExpression\":case\"Identifier\":case\"Literal\":case\"LogicalExpression\":case\"MemberExpression\":case\"NewExpression\":case\"ObjectExpression\":case\"SequenceExpression\":case\"ThisExpression\":case\"UnaryExpression\":case\"UpdateExpression\":return!0}return!1}function n(e){if(null==e)return!1;switch(e.type){case\"DoWhileStatement\":case\"ForInStatement\":case\"ForStatement\":case\"WhileStatement\":return!0}return!1}function r(e){if(null==e)return!1;switch(e.type){case\"BlockStatement\":case\"BreakStatement\":case\"ContinueStatement\":case\"DebuggerStatement\":case\"DoWhileStatement\":case\"EmptyStatement\":case\"ExpressionStatement\":case\"ForInStatement\":case\"ForStatement\":case\"IfStatement\":case\"LabeledStatement\":case\"ReturnStatement\":case\"SwitchStatement\":case\"ThrowStatement\":case\"TryStatement\":case\"VariableDeclaration\":case\"WhileStatement\":case\"WithStatement\":return!0}return!1}function u(e){return r(e)||null!=e&&\"FunctionDeclaration\"===e.type}function o(e){switch(e.type){case\"IfStatement\":return null!=e.alternate?e.alternate:e.consequent;case\"LabeledStatement\":case\"ForStatement\":case\"ForInStatement\":case\"WhileStatement\":case\"WithStatement\":return e.body}return null}function a(e){var t;if(\"IfStatement\"!==e.type)return!1;if(null==e.alternate)return!1;t=e.consequent;do{if(\"IfStatement\"===t.type&&null==t.alternate)return!0;t=o(t)}while(t);return!1}e.exports={isExpression:t,isStatement:r,isIterationStatement:n,isSourceElement:u,isProblematicIfStatement:a,trailingStatement:o}}()},function(e,t,n){!function(){\"use strict\";function t(e){switch(e){case\"implements\":case\"interface\":case\"package\":case\"private\":case\"protected\":case\"public\":case\"static\":case\"let\":return!0;default:return!1}}function r(e,t){return!(!t&&\"yield\"===e)&&u(e,t)}function u(e,n){if(n&&t(e))return!0;switch(e.length){case 2:return\"if\"===e||\"in\"===e||\"do\"===e;case 3:return\"var\"===e||\"for\"===e||\"new\"===e||\"try\"===e;case 4:return\"this\"===e||\"else\"===e||\"case\"===e||\"void\"===e||\"with\"===e||\"enum\"===e;case 5:return\"while\"===e||\"break\"===e||\"catch\"===e||\"throw\"===e||\"const\"===e||\"yield\"===e||\"class\"===e||\"super\"===e;case 6:return\"return\"===e||\"typeof\"===e||\"delete\"===e||\"switch\"===e||\"export\"===e||\"import\"===e;case 7:return\"default\"===e||\"finally\"===e||\"extends\"===e;case 8:return\"function\"===e||\"continue\"===e||\"debugger\"===e;case 10:return\"instanceof\"===e;default:return!1}}function o(e,t){return\"null\"===e||\"true\"===e||\"false\"===e||r(e,t)}function a(e,t){return\"null\"===e||\"true\"===e||\"false\"===e||u(e,t)}function i(e){return\"eval\"===e||\"arguments\"===e}function l(e){var t,n,r;if(0===e.length)return!1;if(r=e.charCodeAt(0),!d.isIdentifierStartES5(r))return!1;for(t=1,n=e.length;t<n;++t)if(r=e.charCodeAt(t),!d.isIdentifierPartES5(r))return!1;return!0}function s(e,t){return 1024*(e-55296)+(t-56320)+65536}function c(e){var t,n,r,u,o;if(0===e.length)return!1;for(o=d.isIdentifierStartES6,t=0,n=e.length;t<n;++t){if(55296<=(r=e.charCodeAt(t))&&r<=56319){if(++t>=n)return!1;if(!(56320<=(u=e.charCodeAt(t))&&u<=57343))return!1;r=s(r,u)}if(!o(r))return!1;o=d.isIdentifierPartES6}return!0}function p(e,t){return l(e)&&!o(e,t)}function f(e,t){return c(e)&&!a(e,t)}var d=n(15);e.exports={isKeywordES5:r,isKeywordES6:u,isReservedWordES5:o,isReservedWordES6:a,isRestrictedWord:i,isIdentifierNameES5:l,isIdentifierNameES6:c,isIdentifierES5:p,isIdentifierES6:f}}()},function(e,t,n){\"use strict\";(function(t){function r(e){this.enabled=e&&void 0!==e.enabled?e.enabled:c}function u(e){var t=function(){return o.apply(t,arguments)};return t._styles=e,t.enabled=this.enabled,t.__proto__=D,t}function o(){var e=arguments,t=e.length,n=0!==t&&String(arguments[0]);if(t>1)for(var r=1;r<t;r++)n+=\" \"+e[r];if(!this.enabled||!n)return n;var u=this._styles,o=u.length,a=i.dim.open;for(!f||-1===u.indexOf(\"gray\")&&-1===u.indexOf(\"grey\")||(i.dim.open=\"\");o--;){var l=i[u[o]];n=l.open+n.replace(l.closeRe,l.open)+l.close}return i.dim.open=a,n}var a=n(54),i=n(55),l=n(57),s=n(58),c=n(59),p=Object.defineProperties,f=\"win32\"===t.platform&&!/^xterm/i.test(Object({NODE_ENV:\"production\"}).TERM);f&&(i.blue.open=\"\u001b[94m\");var d=function(){var e={};return Object.keys(i).forEach(function(t){i[t].closeRe=new RegExp(a(i[t].close),\"g\"),e[t]={get:function(){return u.call(this,this._styles.concat(t))}}}),e}(),D=p(function(){},d);p(r.prototype,function(){var e={};return Object.keys(d).forEach(function(t){e[t]={get:function(){return u.call(this,[t])}}}),e}()),e.exports=new r,e.exports.styles=i,e.exports.hasColor=s,e.exports.stripColor=l,e.exports.supportsColor=c}).call(t,n(16))},function(e,t,n){\"use strict\";var r=/[|\\\\{}()[\\]^$+*?.]/g;e.exports=function(e){if(\"string\"!==typeof e)throw new TypeError(\"Expected a string\");return e.replace(r,\"\\\\$&\")}},function(e,t,n){\"use strict\";(function(e){function t(){var e={modifiers:{reset:[0,0],bold:[1,22],dim:[2,22],italic:[3,23],underline:[4,24],inverse:[7,27],hidden:[8,28],strikethrough:[9,29]},colors:{black:[30,39],red:[31,39],green:[32,39],yellow:[33,39],blue:[34,39],magenta:[35,39],cyan:[36,39],white:[37,39],gray:[90,39]},bgColors:{bgBlack:[40,49],bgRed:[41,49],bgGreen:[42,49],bgYellow:[43,49],bgBlue:[44,49],bgMagenta:[45,49],bgCyan:[46,49],bgWhite:[47,49]}};return e.colors.grey=e.colors.gray,Object.keys(e).forEach(function(t){var n=e[t];Object.keys(n).forEach(function(t){var r=n[t];e[t]=n[t]={open:\"\u001b[\"+r[0]+\"m\",close:\"\u001b[\"+r[1]+\"m\"}}),Object.defineProperty(e,t,{value:n,enumerable:!1})}),e}Object.defineProperty(e,\"exports\",{enumerable:!0,get:t})}).call(t,n(56)(e))},function(e,t){e.exports=function(e){return e.webpackPolyfill||(e.deprecate=function(){},e.paths=[],e.children||(e.children=[]),Object.defineProperty(e,\"loaded\",{enumerable:!0,get:function(){return e.l}}),Object.defineProperty(e,\"id\",{enumerable:!0,get:function(){return e.i}}),e.webpackPolyfill=1),e}},function(e,t,n){\"use strict\";var r=n(17)();e.exports=function(e){return\"string\"===typeof e?e.replace(r,\"\"):e}},function(e,t,n){\"use strict\";var r=n(17),u=new RegExp(r().source);e.exports=u.test.bind(u)},function(e,t,n){\"use strict\";(function(t){var n=t.argv,r=n.indexOf(\"--\"),u=function(e){e=\"--\"+e;var t=n.indexOf(e);return-1!==t&&(-1===r||t<r)};e.exports=function(){return\"FORCE_COLOR\"in Object({NODE_ENV:\"production\"})||!(u(\"no-color\")||u(\"no-colors\")||u(\"color=false\"))&&(!!(u(\"color\")||u(\"colors\")||u(\"color=true\")||u(\"color=always\"))||!(t.stdout&&!t.stdout.isTTY)&&(\"win32\"===t.platform||(\"COLORTERM\"in Object({NODE_ENV:\"production\"})||\"dumb\"!==Object({NODE_ENV:\"production\"}).TERM&&!!/^screen|^xterm|^vt100|color|ansi|cygwin|linux/i.test(Object({NODE_ENV:\"production\"}).TERM))))}()}).call(t,n(16))},function(e,t,n){\"use strict\";function r(e,t,n,r,u,o,a){var i=void 0;if(!a&&e&&\"number\"===typeof t){var l=/^[\\/|\\\\].*?[\\/|\\\\]((src|node_modules)[\\/|\\\\].*)/.exec(e);i=l&&l[1]?l[1]:e,i+=\":\"+t,n&&(i+=\":\"+n)}else r&&\"number\"===typeof u?(i=r+\":\"+u,o&&(i+=\":\"+o)):i=\"unknown\";return i.replace(\"webpack://\",\".\")}n.d(t,\"a\",function(){return r})},function(e,t,n){\"use strict\";function r(e,t){if(!(e instanceof t))throw new TypeError(\"Cannot call a class as a function\")}function u(e,t){if(!e)throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");return!t||\"object\"!==typeof t&&\"function\"!==typeof t?e:t}function o(e,t){if(\"function\"!==typeof t&&null!==t)throw new TypeError(\"Super expression must either be null or a function, not \"+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var a=n(0),i=n.n(a),l=n(1),s=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,\"value\"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),c={color:l.a,cursor:\"pointer\",border:\"none\",display:\"block\",width:\"100%\",textAlign:\"left\",background:\"#fff\",fontFamily:\"Consolas, Menlo, monospace\",fontSize:\"1em\",padding:\"0px\",lineHeight:\"1.5\"},p=Object.assign({},c,{marginBottom:\"1.5em\"}),f=Object.assign({},c,{marginBottom:\"0.6em\"}),d=function(e){function t(){var e,n,o,a;r(this,t);for(var i=arguments.length,l=Array(i),s=0;s<i;s++)l[s]=arguments[s];return n=o=u(this,(e=t.__proto__||Object.getPrototypeOf(t)).call.apply(e,[this].concat(l))),o.state={collapsed:!0},o.toggleCollaped=function(){o.setState(function(e){return{collapsed:!e.collapsed}})},a=n,u(o,a)}return o(t,e),s(t,[{key:\"render\",value:function(){var e=this.props.children.length,t=this.state.collapsed;return i.a.createElement(\"div\",null,i.a.createElement(\"button\",{onClick:this.toggleCollaped,style:t?p:f},(t?\"▶\":\"▼\")+\" \"+e+\" stack frames were \"+(t?\"collapsed.\":\"expanded.\")),i.a.createElement(\"div\",{style:{display:t?\"none\":\"block\"}},this.props.children,i.a.createElement(\"button\",{onClick:this.toggleCollaped,style:f},\"▲ \"+e+\" stack frames were expanded.\")))}}]),t}(a.Component);t.a=d},function(e,t,n){\"use strict\";function r(e,t){return null==e||\"\"===e||-1!==e.indexOf(\"/~/\")||-1!==e.indexOf(\"/node_modules/\")||-1!==e.trim().indexOf(\" \")||null==t||\"\"===t}n.d(t,\"a\",function(){return r})},function(e,t,n){\"use strict\";function r(e){switch(e){case\"EvalError\":case\"InternalError\":case\"RangeError\":case\"ReferenceError\":case\"SyntaxError\":case\"TypeError\":case\"URIError\":return!0;default:return!1}}n.d(t,\"a\",function(){return r})}]);"
- /***/ })
- /******/ ]);
- });
- /***/ }),
- /***/ "./node_modules/react-is/cjs/react-is.development.js":
- /*!***********************************************************!*\
- !*** ./node_modules/react-is/cjs/react-is.development.js ***!
- \***********************************************************/
- /*! dynamic exports provided */
- /*! all exports used */
- /***/ (function(module, exports, __webpack_require__) {
- "use strict";
- /** @license React v16.13.1
- * react-is.development.js
- *
- * Copyright (c) Facebook, Inc. and its affiliates.
- *
- * This source code is licensed under the MIT license found in the
- * LICENSE file in the root directory of this source tree.
- */
- if (true) {
- (function() {
- 'use strict';
- // The Symbol used to tag the ReactElement-like types. If there is no native Symbol
- // nor polyfill, then a plain number is used for performance.
- var hasSymbol = typeof Symbol === 'function' && Symbol.for;
- var REACT_ELEMENT_TYPE = hasSymbol ? Symbol.for('react.element') : 0xeac7;
- var REACT_PORTAL_TYPE = hasSymbol ? Symbol.for('react.portal') : 0xeaca;
- var REACT_FRAGMENT_TYPE = hasSymbol ? Symbol.for('react.fragment') : 0xeacb;
- var REACT_STRICT_MODE_TYPE = hasSymbol ? Symbol.for('react.strict_mode') : 0xeacc;
- var REACT_PROFILER_TYPE = hasSymbol ? Symbol.for('react.profiler') : 0xead2;
- var REACT_PROVIDER_TYPE = hasSymbol ? Symbol.for('react.provider') : 0xeacd;
- var REACT_CONTEXT_TYPE = hasSymbol ? Symbol.for('react.context') : 0xeace; // TODO: We don't use AsyncMode or ConcurrentMode anymore. They were temporary
- // (unstable) APIs that have been removed. Can we remove the symbols?
- var REACT_ASYNC_MODE_TYPE = hasSymbol ? Symbol.for('react.async_mode') : 0xeacf;
- var REACT_CONCURRENT_MODE_TYPE = hasSymbol ? Symbol.for('react.concurrent_mode') : 0xeacf;
- var REACT_FORWARD_REF_TYPE = hasSymbol ? Symbol.for('react.forward_ref') : 0xead0;
- var REACT_SUSPENSE_TYPE = hasSymbol ? Symbol.for('react.suspense') : 0xead1;
- var REACT_SUSPENSE_LIST_TYPE = hasSymbol ? Symbol.for('react.suspense_list') : 0xead8;
- var REACT_MEMO_TYPE = hasSymbol ? Symbol.for('react.memo') : 0xead3;
- var REACT_LAZY_TYPE = hasSymbol ? Symbol.for('react.lazy') : 0xead4;
- var REACT_BLOCK_TYPE = hasSymbol ? Symbol.for('react.block') : 0xead9;
- var REACT_FUNDAMENTAL_TYPE = hasSymbol ? Symbol.for('react.fundamental') : 0xead5;
- var REACT_RESPONDER_TYPE = hasSymbol ? Symbol.for('react.responder') : 0xead6;
- var REACT_SCOPE_TYPE = hasSymbol ? Symbol.for('react.scope') : 0xead7;
- function isValidElementType(type) {
- return typeof type === 'string' || typeof type === 'function' || // Note: its typeof might be other than 'symbol' or 'number' if it's a polyfill.
- type === REACT_FRAGMENT_TYPE || type === REACT_CONCURRENT_MODE_TYPE || type === REACT_PROFILER_TYPE || type === REACT_STRICT_MODE_TYPE || type === REACT_SUSPENSE_TYPE || type === REACT_SUSPENSE_LIST_TYPE || typeof type === 'object' && type !== null && (type.$$typeof === REACT_LAZY_TYPE || type.$$typeof === REACT_MEMO_TYPE || type.$$typeof === REACT_PROVIDER_TYPE || type.$$typeof === REACT_CONTEXT_TYPE || type.$$typeof === REACT_FORWARD_REF_TYPE || type.$$typeof === REACT_FUNDAMENTAL_TYPE || type.$$typeof === REACT_RESPONDER_TYPE || type.$$typeof === REACT_SCOPE_TYPE || type.$$typeof === REACT_BLOCK_TYPE);
- }
- function typeOf(object) {
- if (typeof object === 'object' && object !== null) {
- var $$typeof = object.$$typeof;
- switch ($$typeof) {
- case REACT_ELEMENT_TYPE:
- var type = object.type;
- switch (type) {
- case REACT_ASYNC_MODE_TYPE:
- case REACT_CONCURRENT_MODE_TYPE:
- case REACT_FRAGMENT_TYPE:
- case REACT_PROFILER_TYPE:
- case REACT_STRICT_MODE_TYPE:
- case REACT_SUSPENSE_TYPE:
- return type;
- default:
- var $$typeofType = type && type.$$typeof;
- switch ($$typeofType) {
- case REACT_CONTEXT_TYPE:
- case REACT_FORWARD_REF_TYPE:
- case REACT_LAZY_TYPE:
- case REACT_MEMO_TYPE:
- case REACT_PROVIDER_TYPE:
- return $$typeofType;
- default:
- return $$typeof;
- }
- }
- case REACT_PORTAL_TYPE:
- return $$typeof;
- }
- }
- return undefined;
- } // AsyncMode is deprecated along with isAsyncMode
- var AsyncMode = REACT_ASYNC_MODE_TYPE;
- var ConcurrentMode = REACT_CONCURRENT_MODE_TYPE;
- var ContextConsumer = REACT_CONTEXT_TYPE;
- var ContextProvider = REACT_PROVIDER_TYPE;
- var Element = REACT_ELEMENT_TYPE;
- var ForwardRef = REACT_FORWARD_REF_TYPE;
- var Fragment = REACT_FRAGMENT_TYPE;
- var Lazy = REACT_LAZY_TYPE;
- var Memo = REACT_MEMO_TYPE;
- var Portal = REACT_PORTAL_TYPE;
- var Profiler = REACT_PROFILER_TYPE;
- var StrictMode = REACT_STRICT_MODE_TYPE;
- var Suspense = REACT_SUSPENSE_TYPE;
- var hasWarnedAboutDeprecatedIsAsyncMode = false; // AsyncMode should be deprecated
- function isAsyncMode(object) {
- {
- if (!hasWarnedAboutDeprecatedIsAsyncMode) {
- hasWarnedAboutDeprecatedIsAsyncMode = true; // Using console['warn'] to evade Babel and ESLint
- console['warn']('The ReactIs.isAsyncMode() alias has been deprecated, ' + 'and will be removed in React 17+. Update your code to use ' + 'ReactIs.isConcurrentMode() instead. It has the exact same API.');
- }
- }
- return isConcurrentMode(object) || typeOf(object) === REACT_ASYNC_MODE_TYPE;
- }
- function isConcurrentMode(object) {
- return typeOf(object) === REACT_CONCURRENT_MODE_TYPE;
- }
- function isContextConsumer(object) {
- return typeOf(object) === REACT_CONTEXT_TYPE;
- }
- function isContextProvider(object) {
- return typeOf(object) === REACT_PROVIDER_TYPE;
- }
- function isElement(object) {
- return typeof object === 'object' && object !== null && object.$$typeof === REACT_ELEMENT_TYPE;
- }
- function isForwardRef(object) {
- return typeOf(object) === REACT_FORWARD_REF_TYPE;
- }
- function isFragment(object) {
- return typeOf(object) === REACT_FRAGMENT_TYPE;
- }
- function isLazy(object) {
- return typeOf(object) === REACT_LAZY_TYPE;
- }
- function isMemo(object) {
- return typeOf(object) === REACT_MEMO_TYPE;
- }
- function isPortal(object) {
- return typeOf(object) === REACT_PORTAL_TYPE;
- }
- function isProfiler(object) {
- return typeOf(object) === REACT_PROFILER_TYPE;
- }
- function isStrictMode(object) {
- return typeOf(object) === REACT_STRICT_MODE_TYPE;
- }
- function isSuspense(object) {
- return typeOf(object) === REACT_SUSPENSE_TYPE;
- }
- exports.AsyncMode = AsyncMode;
- exports.ConcurrentMode = ConcurrentMode;
- exports.ContextConsumer = ContextConsumer;
- exports.ContextProvider = ContextProvider;
- exports.Element = Element;
- exports.ForwardRef = ForwardRef;
- exports.Fragment = Fragment;
- exports.Lazy = Lazy;
- exports.Memo = Memo;
- exports.Portal = Portal;
- exports.Profiler = Profiler;
- exports.StrictMode = StrictMode;
- exports.Suspense = Suspense;
- exports.isAsyncMode = isAsyncMode;
- exports.isConcurrentMode = isConcurrentMode;
- exports.isContextConsumer = isContextConsumer;
- exports.isContextProvider = isContextProvider;
- exports.isElement = isElement;
- exports.isForwardRef = isForwardRef;
- exports.isFragment = isFragment;
- exports.isLazy = isLazy;
- exports.isMemo = isMemo;
- exports.isPortal = isPortal;
- exports.isProfiler = isProfiler;
- exports.isStrictMode = isStrictMode;
- exports.isSuspense = isSuspense;
- exports.isValidElementType = isValidElementType;
- exports.typeOf = typeOf;
- })();
- }
- /***/ }),
- /***/ "./node_modules/react-is/index.js":
- /*!****************************************!*\
- !*** ./node_modules/react-is/index.js ***!
- \****************************************/
- /*! dynamic exports provided */
- /*! all exports used */
- /***/ (function(module, exports, __webpack_require__) {
- "use strict";
- if (false) {
- module.exports = require('./cjs/react-is.production.min.js');
- } else {
- module.exports = __webpack_require__(/*! ./cjs/react-is.development.js */ "./node_modules/react-is/cjs/react-is.development.js");
- }
- /***/ }),
- /***/ "./node_modules/react-redux/es/components/Provider.js":
- /*!************************************************************!*\
- !*** ./node_modules/react-redux/es/components/Provider.js ***!
- \************************************************************/
- /*! exports provided: createProvider, default */
- /*! exports used: default */
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
- "use strict";
- /* unused harmony export createProvider */
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__babel_runtime_helpers_esm_inheritsLoose__ = __webpack_require__(/*! @babel/runtime/helpers/esm/inheritsLoose */ "./node_modules/@babel/runtime/helpers/esm/inheritsLoose.js");
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_react__ = __webpack_require__(/*! react */ "./node_modules/react/index.js");
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_react__);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_prop_types__ = __webpack_require__(/*! prop-types */ "./node_modules/prop-types/index.js");
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_prop_types___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_prop_types__);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__utils_PropTypes__ = __webpack_require__(/*! ../utils/PropTypes */ "./node_modules/react-redux/es/utils/PropTypes.js");
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__utils_warning__ = __webpack_require__(/*! ../utils/warning */ "./node_modules/react-redux/es/utils/warning.js");
- var prefixUnsafeLifecycleMethods = typeof __WEBPACK_IMPORTED_MODULE_1_react___default.a.forwardRef !== "undefined";
- var didWarnAboutReceivingStore = false;
- function warnAboutReceivingStore() {
- if (didWarnAboutReceivingStore) {
- return;
- }
- didWarnAboutReceivingStore = true;
- Object(__WEBPACK_IMPORTED_MODULE_4__utils_warning__["a" /* default */])('<Provider> does not support changing `store` on the fly. ' + 'It is most likely that you see this error because you updated to ' + 'Redux 2.x and React Redux 2.x which no longer hot reload reducers ' + 'automatically. See https://github.com/reduxjs/react-redux/releases/' + 'tag/v2.0.0 for the migration instructions.');
- }
- function createProvider(storeKey) {
- var _Provider$childContex;
- if (storeKey === void 0) {
- storeKey = 'store';
- }
- var subscriptionKey = storeKey + "Subscription";
- var Provider =
- /*#__PURE__*/
- function (_Component) {
- Object(__WEBPACK_IMPORTED_MODULE_0__babel_runtime_helpers_esm_inheritsLoose__["a" /* default */])(Provider, _Component);
- var _proto = Provider.prototype;
- _proto.getChildContext = function getChildContext() {
- var _ref;
- return _ref = {}, _ref[storeKey] = this[storeKey], _ref[subscriptionKey] = null, _ref;
- };
- function Provider(props, context) {
- var _this;
- _this = _Component.call(this, props, context) || this;
- _this[storeKey] = props.store;
- return _this;
- }
- _proto.render = function render() {
- return __WEBPACK_IMPORTED_MODULE_1_react__["Children"].only(this.props.children);
- };
- return Provider;
- }(__WEBPACK_IMPORTED_MODULE_1_react__["Component"]);
- if (true) {
- // Use UNSAFE_ event name where supported
- var eventName = prefixUnsafeLifecycleMethods ? 'UNSAFE_componentWillReceiveProps' : 'componentWillReceiveProps';
- Provider.prototype[eventName] = function (nextProps) {
- if (this[storeKey] !== nextProps.store) {
- warnAboutReceivingStore();
- }
- };
- }
- Provider.propTypes = {
- store: __WEBPACK_IMPORTED_MODULE_3__utils_PropTypes__["a" /* storeShape */].isRequired,
- children: __WEBPACK_IMPORTED_MODULE_2_prop_types___default.a.element.isRequired
- };
- Provider.childContextTypes = (_Provider$childContex = {}, _Provider$childContex[storeKey] = __WEBPACK_IMPORTED_MODULE_3__utils_PropTypes__["a" /* storeShape */].isRequired, _Provider$childContex[subscriptionKey] = __WEBPACK_IMPORTED_MODULE_3__utils_PropTypes__["b" /* subscriptionShape */], _Provider$childContex);
- return Provider;
- }
- /* harmony default export */ __webpack_exports__["a"] = (createProvider());
- /***/ }),
- /***/ "./node_modules/react-redux/es/components/connectAdvanced.js":
- /*!*******************************************************************!*\
- !*** ./node_modules/react-redux/es/components/connectAdvanced.js ***!
- \*******************************************************************/
- /*! exports provided: default */
- /*! exports used: default */
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
- "use strict";
- /* harmony export (immutable) */ __webpack_exports__["a"] = connectAdvanced;
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__babel_runtime_helpers_esm_inheritsLoose__ = __webpack_require__(/*! @babel/runtime/helpers/esm/inheritsLoose */ "./node_modules/@babel/runtime/helpers/esm/inheritsLoose.js");
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__babel_runtime_helpers_esm_assertThisInitialized__ = __webpack_require__(/*! @babel/runtime/helpers/esm/assertThisInitialized */ "./node_modules/@babel/runtime/helpers/esm/assertThisInitialized.js");
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__babel_runtime_helpers_esm_extends__ = __webpack_require__(/*! @babel/runtime/helpers/esm/extends */ "./node_modules/@babel/runtime/helpers/esm/extends.js");
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__babel_runtime_helpers_esm_objectWithoutPropertiesLoose__ = __webpack_require__(/*! @babel/runtime/helpers/esm/objectWithoutPropertiesLoose */ "./node_modules/@babel/runtime/helpers/esm/objectWithoutPropertiesLoose.js");
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_hoist_non_react_statics__ = __webpack_require__(/*! hoist-non-react-statics */ "./node_modules/hoist-non-react-statics/dist/hoist-non-react-statics.cjs.js");
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_hoist_non_react_statics___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_4_hoist_non_react_statics__);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_5_invariant__ = __webpack_require__(/*! invariant */ "./node_modules/invariant/browser.js");
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_5_invariant___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_5_invariant__);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_6_react__ = __webpack_require__(/*! react */ "./node_modules/react/index.js");
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_6_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_6_react__);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_7_react_is__ = __webpack_require__(/*! react-is */ "./node_modules/react-is/index.js");
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_7_react_is___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_7_react_is__);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_8__utils_Subscription__ = __webpack_require__(/*! ../utils/Subscription */ "./node_modules/react-redux/es/utils/Subscription.js");
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_9__utils_PropTypes__ = __webpack_require__(/*! ../utils/PropTypes */ "./node_modules/react-redux/es/utils/PropTypes.js");
- var prefixUnsafeLifecycleMethods = typeof __WEBPACK_IMPORTED_MODULE_6_react___default.a.forwardRef !== "undefined";
- var hotReloadingVersion = 0;
- var dummyState = {};
- function noop() {}
- function makeSelectorStateful(sourceSelector, store) {
- // wrap the selector in an object that tracks its results between runs.
- var selector = {
- run: function runComponentSelector(props) {
- try {
- var nextProps = sourceSelector(store.getState(), props);
- if (nextProps !== selector.props || selector.error) {
- selector.shouldComponentUpdate = true;
- selector.props = nextProps;
- selector.error = null;
- }
- } catch (error) {
- selector.shouldComponentUpdate = true;
- selector.error = error;
- }
- }
- };
- return selector;
- }
- function connectAdvanced(
- /*
- selectorFactory is a func that is responsible for returning the selector function used to
- compute new props from state, props, and dispatch. For example:
- export default connectAdvanced((dispatch, options) => (state, props) => ({
- thing: state.things[props.thingId],
- saveThing: fields => dispatch(actionCreators.saveThing(props.thingId, fields)),
- }))(YourComponent)
- Access to dispatch is provided to the factory so selectorFactories can bind actionCreators
- outside of their selector as an optimization. Options passed to connectAdvanced are passed to
- the selectorFactory, along with displayName and WrappedComponent, as the second argument.
- Note that selectorFactory is responsible for all caching/memoization of inbound and outbound
- props. Do not use connectAdvanced directly without memoizing results between calls to your
- selector, otherwise the Connect component will re-render on every state or props change.
- */
- selectorFactory, // options object:
- _ref) {
- var _contextTypes, _childContextTypes;
- if (_ref === void 0) {
- _ref = {};
- }
- var _ref2 = _ref,
- _ref2$getDisplayName = _ref2.getDisplayName,
- getDisplayName = _ref2$getDisplayName === void 0 ? function (name) {
- return "ConnectAdvanced(" + name + ")";
- } : _ref2$getDisplayName,
- _ref2$methodName = _ref2.methodName,
- methodName = _ref2$methodName === void 0 ? 'connectAdvanced' : _ref2$methodName,
- _ref2$renderCountProp = _ref2.renderCountProp,
- renderCountProp = _ref2$renderCountProp === void 0 ? undefined : _ref2$renderCountProp,
- _ref2$shouldHandleSta = _ref2.shouldHandleStateChanges,
- shouldHandleStateChanges = _ref2$shouldHandleSta === void 0 ? true : _ref2$shouldHandleSta,
- _ref2$storeKey = _ref2.storeKey,
- storeKey = _ref2$storeKey === void 0 ? 'store' : _ref2$storeKey,
- _ref2$withRef = _ref2.withRef,
- withRef = _ref2$withRef === void 0 ? false : _ref2$withRef,
- connectOptions = Object(__WEBPACK_IMPORTED_MODULE_3__babel_runtime_helpers_esm_objectWithoutPropertiesLoose__["a" /* default */])(_ref2, ["getDisplayName", "methodName", "renderCountProp", "shouldHandleStateChanges", "storeKey", "withRef"]);
- var subscriptionKey = storeKey + 'Subscription';
- var version = hotReloadingVersion++;
- var contextTypes = (_contextTypes = {}, _contextTypes[storeKey] = __WEBPACK_IMPORTED_MODULE_9__utils_PropTypes__["a" /* storeShape */], _contextTypes[subscriptionKey] = __WEBPACK_IMPORTED_MODULE_9__utils_PropTypes__["b" /* subscriptionShape */], _contextTypes);
- var childContextTypes = (_childContextTypes = {}, _childContextTypes[subscriptionKey] = __WEBPACK_IMPORTED_MODULE_9__utils_PropTypes__["b" /* subscriptionShape */], _childContextTypes);
- return function wrapWithConnect(WrappedComponent) {
- __WEBPACK_IMPORTED_MODULE_5_invariant___default()(Object(__WEBPACK_IMPORTED_MODULE_7_react_is__["isValidElementType"])(WrappedComponent), "You must pass a component to the function returned by " + (methodName + ". Instead received " + JSON.stringify(WrappedComponent)));
- var wrappedComponentName = WrappedComponent.displayName || WrappedComponent.name || 'Component';
- var displayName = getDisplayName(wrappedComponentName);
- var selectorFactoryOptions = Object(__WEBPACK_IMPORTED_MODULE_2__babel_runtime_helpers_esm_extends__["a" /* default */])({}, connectOptions, {
- getDisplayName: getDisplayName,
- methodName: methodName,
- renderCountProp: renderCountProp,
- shouldHandleStateChanges: shouldHandleStateChanges,
- storeKey: storeKey,
- withRef: withRef,
- displayName: displayName,
- wrappedComponentName: wrappedComponentName,
- WrappedComponent: WrappedComponent // TODO Actually fix our use of componentWillReceiveProps
- /* eslint-disable react/no-deprecated */
- });
- var Connect =
- /*#__PURE__*/
- function (_Component) {
- Object(__WEBPACK_IMPORTED_MODULE_0__babel_runtime_helpers_esm_inheritsLoose__["a" /* default */])(Connect, _Component);
- function Connect(props, context) {
- var _this;
- _this = _Component.call(this, props, context) || this;
- _this.version = version;
- _this.state = {};
- _this.renderCount = 0;
- _this.store = props[storeKey] || context[storeKey];
- _this.propsMode = Boolean(props[storeKey]);
- _this.setWrappedInstance = _this.setWrappedInstance.bind(Object(__WEBPACK_IMPORTED_MODULE_1__babel_runtime_helpers_esm_assertThisInitialized__["a" /* default */])(Object(__WEBPACK_IMPORTED_MODULE_1__babel_runtime_helpers_esm_assertThisInitialized__["a" /* default */])(_this)));
- __WEBPACK_IMPORTED_MODULE_5_invariant___default()(_this.store, "Could not find \"" + storeKey + "\" in either the context or props of " + ("\"" + displayName + "\". Either wrap the root component in a <Provider>, ") + ("or explicitly pass \"" + storeKey + "\" as a prop to \"" + displayName + "\"."));
- _this.initSelector();
- _this.initSubscription();
- return _this;
- }
- var _proto = Connect.prototype;
- _proto.getChildContext = function getChildContext() {
- var _ref3;
- // If this component received store from props, its subscription should be transparent
- // to any descendants receiving store+subscription from context; it passes along
- // subscription passed to it. Otherwise, it shadows the parent subscription, which allows
- // Connect to control ordering of notifications to flow top-down.
- var subscription = this.propsMode ? null : this.subscription;
- return _ref3 = {}, _ref3[subscriptionKey] = subscription || this.context[subscriptionKey], _ref3;
- };
- _proto.componentDidMount = function componentDidMount() {
- if (!shouldHandleStateChanges) return; // componentWillMount fires during server side rendering, but componentDidMount and
- // componentWillUnmount do not. Because of this, trySubscribe happens during ...didMount.
- // Otherwise, unsubscription would never take place during SSR, causing a memory leak.
- // To handle the case where a child component may have triggered a state change by
- // dispatching an action in its componentWillMount, we have to re-run the select and maybe
- // re-render.
- this.subscription.trySubscribe();
- this.selector.run(this.props);
- if (this.selector.shouldComponentUpdate) this.forceUpdate();
- }; // Note: this is renamed below to the UNSAFE_ version in React >=16.3.0
- _proto.componentWillReceiveProps = function componentWillReceiveProps(nextProps) {
- this.selector.run(nextProps);
- };
- _proto.shouldComponentUpdate = function shouldComponentUpdate() {
- return this.selector.shouldComponentUpdate;
- };
- _proto.componentWillUnmount = function componentWillUnmount() {
- if (this.subscription) this.subscription.tryUnsubscribe();
- this.subscription = null;
- this.notifyNestedSubs = noop;
- this.store = null;
- this.selector.run = noop;
- this.selector.shouldComponentUpdate = false;
- };
- _proto.getWrappedInstance = function getWrappedInstance() {
- __WEBPACK_IMPORTED_MODULE_5_invariant___default()(withRef, "To access the wrapped instance, you need to specify " + ("{ withRef: true } in the options argument of the " + methodName + "() call."));
- return this.wrappedInstance;
- };
- _proto.setWrappedInstance = function setWrappedInstance(ref) {
- this.wrappedInstance = ref;
- };
- _proto.initSelector = function initSelector() {
- var sourceSelector = selectorFactory(this.store.dispatch, selectorFactoryOptions);
- this.selector = makeSelectorStateful(sourceSelector, this.store);
- this.selector.run(this.props);
- };
- _proto.initSubscription = function initSubscription() {
- if (!shouldHandleStateChanges) return; // parentSub's source should match where store came from: props vs. context. A component
- // connected to the store via props shouldn't use subscription from context, or vice versa.
- var parentSub = (this.propsMode ? this.props : this.context)[subscriptionKey];
- this.subscription = new __WEBPACK_IMPORTED_MODULE_8__utils_Subscription__["a" /* default */](this.store, parentSub, this.onStateChange.bind(this)); // `notifyNestedSubs` is duplicated to handle the case where the component is unmounted in
- // the middle of the notification loop, where `this.subscription` will then be null. An
- // extra null check every change can be avoided by copying the method onto `this` and then
- // replacing it with a no-op on unmount. This can probably be avoided if Subscription's
- // listeners logic is changed to not call listeners that have been unsubscribed in the
- // middle of the notification loop.
- this.notifyNestedSubs = this.subscription.notifyNestedSubs.bind(this.subscription);
- };
- _proto.onStateChange = function onStateChange() {
- this.selector.run(this.props);
- if (!this.selector.shouldComponentUpdate) {
- this.notifyNestedSubs();
- } else {
- this.componentDidUpdate = this.notifyNestedSubsOnComponentDidUpdate;
- this.setState(dummyState);
- }
- };
- _proto.notifyNestedSubsOnComponentDidUpdate = function notifyNestedSubsOnComponentDidUpdate() {
- // `componentDidUpdate` is conditionally implemented when `onStateChange` determines it
- // needs to notify nested subs. Once called, it unimplements itself until further state
- // changes occur. Doing it this way vs having a permanent `componentDidUpdate` that does
- // a boolean check every time avoids an extra method call most of the time, resulting
- // in some perf boost.
- this.componentDidUpdate = undefined;
- this.notifyNestedSubs();
- };
- _proto.isSubscribed = function isSubscribed() {
- return Boolean(this.subscription) && this.subscription.isSubscribed();
- };
- _proto.addExtraProps = function addExtraProps(props) {
- if (!withRef && !renderCountProp && !(this.propsMode && this.subscription)) return props; // make a shallow copy so that fields added don't leak to the original selector.
- // this is especially important for 'ref' since that's a reference back to the component
- // instance. a singleton memoized selector would then be holding a reference to the
- // instance, preventing the instance from being garbage collected, and that would be bad
- var withExtras = Object(__WEBPACK_IMPORTED_MODULE_2__babel_runtime_helpers_esm_extends__["a" /* default */])({}, props);
- if (withRef) withExtras.ref = this.setWrappedInstance;
- if (renderCountProp) withExtras[renderCountProp] = this.renderCount++;
- if (this.propsMode && this.subscription) withExtras[subscriptionKey] = this.subscription;
- return withExtras;
- };
- _proto.render = function render() {
- var selector = this.selector;
- selector.shouldComponentUpdate = false;
- if (selector.error) {
- throw selector.error;
- } else {
- return Object(__WEBPACK_IMPORTED_MODULE_6_react__["createElement"])(WrappedComponent, this.addExtraProps(selector.props));
- }
- };
- return Connect;
- }(__WEBPACK_IMPORTED_MODULE_6_react__["Component"]);
- if (prefixUnsafeLifecycleMethods) {
- // Use UNSAFE_ event name where supported
- Connect.prototype.UNSAFE_componentWillReceiveProps = Connect.prototype.componentWillReceiveProps;
- delete Connect.prototype.componentWillReceiveProps;
- }
- /* eslint-enable react/no-deprecated */
- Connect.WrappedComponent = WrappedComponent;
- Connect.displayName = displayName;
- Connect.childContextTypes = childContextTypes;
- Connect.contextTypes = contextTypes;
- Connect.propTypes = contextTypes;
- if (true) {
- // Use UNSAFE_ event name where supported
- var eventName = prefixUnsafeLifecycleMethods ? 'UNSAFE_componentWillUpdate' : 'componentWillUpdate';
- Connect.prototype[eventName] = function componentWillUpdate() {
- var _this2 = this;
- // We are hot reloading!
- if (this.version !== version) {
- this.version = version;
- this.initSelector(); // If any connected descendants don't hot reload (and resubscribe in the process), their
- // listeners will be lost when we unsubscribe. Unfortunately, by copying over all
- // listeners, this does mean that the old versions of connected descendants will still be
- // notified of state changes; however, their onStateChange function is a no-op so this
- // isn't a huge deal.
- var oldListeners = [];
- if (this.subscription) {
- oldListeners = this.subscription.listeners.get();
- this.subscription.tryUnsubscribe();
- }
- this.initSubscription();
- if (shouldHandleStateChanges) {
- this.subscription.trySubscribe();
- oldListeners.forEach(function (listener) {
- return _this2.subscription.listeners.subscribe(listener);
- });
- }
- }
- };
- }
- return __WEBPACK_IMPORTED_MODULE_4_hoist_non_react_statics___default()(Connect, WrappedComponent);
- };
- }
- /***/ }),
- /***/ "./node_modules/react-redux/es/connect/connect.js":
- /*!********************************************************!*\
- !*** ./node_modules/react-redux/es/connect/connect.js ***!
- \********************************************************/
- /*! exports provided: createConnect, default */
- /*! exports used: default */
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
- "use strict";
- /* unused harmony export createConnect */
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__babel_runtime_helpers_esm_extends__ = __webpack_require__(/*! @babel/runtime/helpers/esm/extends */ "./node_modules/@babel/runtime/helpers/esm/extends.js");
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__babel_runtime_helpers_esm_objectWithoutPropertiesLoose__ = __webpack_require__(/*! @babel/runtime/helpers/esm/objectWithoutPropertiesLoose */ "./node_modules/@babel/runtime/helpers/esm/objectWithoutPropertiesLoose.js");
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__components_connectAdvanced__ = __webpack_require__(/*! ../components/connectAdvanced */ "./node_modules/react-redux/es/components/connectAdvanced.js");
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__utils_shallowEqual__ = __webpack_require__(/*! ../utils/shallowEqual */ "./node_modules/react-redux/es/utils/shallowEqual.js");
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__mapDispatchToProps__ = __webpack_require__(/*! ./mapDispatchToProps */ "./node_modules/react-redux/es/connect/mapDispatchToProps.js");
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__mapStateToProps__ = __webpack_require__(/*! ./mapStateToProps */ "./node_modules/react-redux/es/connect/mapStateToProps.js");
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_6__mergeProps__ = __webpack_require__(/*! ./mergeProps */ "./node_modules/react-redux/es/connect/mergeProps.js");
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_7__selectorFactory__ = __webpack_require__(/*! ./selectorFactory */ "./node_modules/react-redux/es/connect/selectorFactory.js");
- /*
- connect is a facade over connectAdvanced. It turns its args into a compatible
- selectorFactory, which has the signature:
- (dispatch, options) => (nextState, nextOwnProps) => nextFinalProps
-
- connect passes its args to connectAdvanced as options, which will in turn pass them to
- selectorFactory each time a Connect component instance is instantiated or hot reloaded.
- selectorFactory returns a final props selector from its mapStateToProps,
- mapStateToPropsFactories, mapDispatchToProps, mapDispatchToPropsFactories, mergeProps,
- mergePropsFactories, and pure args.
- The resulting final props selector is called by the Connect component instance whenever
- it receives new props or store state.
- */
- function match(arg, factories, name) {
- for (var i = factories.length - 1; i >= 0; i--) {
- var result = factories[i](arg);
- if (result) return result;
- }
- return function (dispatch, options) {
- throw new Error("Invalid value of type " + typeof arg + " for " + name + " argument when connecting component " + options.wrappedComponentName + ".");
- };
- }
- function strictEqual(a, b) {
- return a === b;
- } // createConnect with default args builds the 'official' connect behavior. Calling it with
- // different options opens up some testing and extensibility scenarios
- function createConnect(_temp) {
- var _ref = _temp === void 0 ? {} : _temp,
- _ref$connectHOC = _ref.connectHOC,
- connectHOC = _ref$connectHOC === void 0 ? __WEBPACK_IMPORTED_MODULE_2__components_connectAdvanced__["a" /* default */] : _ref$connectHOC,
- _ref$mapStateToPropsF = _ref.mapStateToPropsFactories,
- mapStateToPropsFactories = _ref$mapStateToPropsF === void 0 ? __WEBPACK_IMPORTED_MODULE_5__mapStateToProps__["a" /* default */] : _ref$mapStateToPropsF,
- _ref$mapDispatchToPro = _ref.mapDispatchToPropsFactories,
- mapDispatchToPropsFactories = _ref$mapDispatchToPro === void 0 ? __WEBPACK_IMPORTED_MODULE_4__mapDispatchToProps__["a" /* default */] : _ref$mapDispatchToPro,
- _ref$mergePropsFactor = _ref.mergePropsFactories,
- mergePropsFactories = _ref$mergePropsFactor === void 0 ? __WEBPACK_IMPORTED_MODULE_6__mergeProps__["a" /* default */] : _ref$mergePropsFactor,
- _ref$selectorFactory = _ref.selectorFactory,
- selectorFactory = _ref$selectorFactory === void 0 ? __WEBPACK_IMPORTED_MODULE_7__selectorFactory__["a" /* default */] : _ref$selectorFactory;
- return function connect(mapStateToProps, mapDispatchToProps, mergeProps, _ref2) {
- if (_ref2 === void 0) {
- _ref2 = {};
- }
- var _ref3 = _ref2,
- _ref3$pure = _ref3.pure,
- pure = _ref3$pure === void 0 ? true : _ref3$pure,
- _ref3$areStatesEqual = _ref3.areStatesEqual,
- areStatesEqual = _ref3$areStatesEqual === void 0 ? strictEqual : _ref3$areStatesEqual,
- _ref3$areOwnPropsEqua = _ref3.areOwnPropsEqual,
- areOwnPropsEqual = _ref3$areOwnPropsEqua === void 0 ? __WEBPACK_IMPORTED_MODULE_3__utils_shallowEqual__["a" /* default */] : _ref3$areOwnPropsEqua,
- _ref3$areStatePropsEq = _ref3.areStatePropsEqual,
- areStatePropsEqual = _ref3$areStatePropsEq === void 0 ? __WEBPACK_IMPORTED_MODULE_3__utils_shallowEqual__["a" /* default */] : _ref3$areStatePropsEq,
- _ref3$areMergedPropsE = _ref3.areMergedPropsEqual,
- areMergedPropsEqual = _ref3$areMergedPropsE === void 0 ? __WEBPACK_IMPORTED_MODULE_3__utils_shallowEqual__["a" /* default */] : _ref3$areMergedPropsE,
- extraOptions = Object(__WEBPACK_IMPORTED_MODULE_1__babel_runtime_helpers_esm_objectWithoutPropertiesLoose__["a" /* default */])(_ref3, ["pure", "areStatesEqual", "areOwnPropsEqual", "areStatePropsEqual", "areMergedPropsEqual"]);
- var initMapStateToProps = match(mapStateToProps, mapStateToPropsFactories, 'mapStateToProps');
- var initMapDispatchToProps = match(mapDispatchToProps, mapDispatchToPropsFactories, 'mapDispatchToProps');
- var initMergeProps = match(mergeProps, mergePropsFactories, 'mergeProps');
- return connectHOC(selectorFactory, Object(__WEBPACK_IMPORTED_MODULE_0__babel_runtime_helpers_esm_extends__["a" /* default */])({
- // used in error messages
- methodName: 'connect',
- // used to compute Connect's displayName from the wrapped component's displayName.
- getDisplayName: function getDisplayName(name) {
- return "Connect(" + name + ")";
- },
- // if mapStateToProps is falsy, the Connect component doesn't subscribe to store state changes
- shouldHandleStateChanges: Boolean(mapStateToProps),
- // passed through to selectorFactory
- initMapStateToProps: initMapStateToProps,
- initMapDispatchToProps: initMapDispatchToProps,
- initMergeProps: initMergeProps,
- pure: pure,
- areStatesEqual: areStatesEqual,
- areOwnPropsEqual: areOwnPropsEqual,
- areStatePropsEqual: areStatePropsEqual,
- areMergedPropsEqual: areMergedPropsEqual
- }, extraOptions));
- };
- }
- /* harmony default export */ __webpack_exports__["a"] = (createConnect());
- /***/ }),
- /***/ "./node_modules/react-redux/es/connect/mapDispatchToProps.js":
- /*!*******************************************************************!*\
- !*** ./node_modules/react-redux/es/connect/mapDispatchToProps.js ***!
- \*******************************************************************/
- /*! exports provided: whenMapDispatchToPropsIsFunction, whenMapDispatchToPropsIsMissing, whenMapDispatchToPropsIsObject, default */
- /*! exports used: default */
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
- "use strict";
- /* unused harmony export whenMapDispatchToPropsIsFunction */
- /* unused harmony export whenMapDispatchToPropsIsMissing */
- /* unused harmony export whenMapDispatchToPropsIsObject */
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_redux__ = __webpack_require__(/*! redux */ "./node_modules/redux/es/index.js");
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__wrapMapToProps__ = __webpack_require__(/*! ./wrapMapToProps */ "./node_modules/react-redux/es/connect/wrapMapToProps.js");
- function whenMapDispatchToPropsIsFunction(mapDispatchToProps) {
- return typeof mapDispatchToProps === 'function' ? Object(__WEBPACK_IMPORTED_MODULE_1__wrapMapToProps__["b" /* wrapMapToPropsFunc */])(mapDispatchToProps, 'mapDispatchToProps') : undefined;
- }
- function whenMapDispatchToPropsIsMissing(mapDispatchToProps) {
- return !mapDispatchToProps ? Object(__WEBPACK_IMPORTED_MODULE_1__wrapMapToProps__["a" /* wrapMapToPropsConstant */])(function (dispatch) {
- return {
- dispatch: dispatch
- };
- }) : undefined;
- }
- function whenMapDispatchToPropsIsObject(mapDispatchToProps) {
- return mapDispatchToProps && typeof mapDispatchToProps === 'object' ? Object(__WEBPACK_IMPORTED_MODULE_1__wrapMapToProps__["a" /* wrapMapToPropsConstant */])(function (dispatch) {
- return Object(__WEBPACK_IMPORTED_MODULE_0_redux__["b" /* bindActionCreators */])(mapDispatchToProps, dispatch);
- }) : undefined;
- }
- /* harmony default export */ __webpack_exports__["a"] = ([whenMapDispatchToPropsIsFunction, whenMapDispatchToPropsIsMissing, whenMapDispatchToPropsIsObject]);
- /***/ }),
- /***/ "./node_modules/react-redux/es/connect/mapStateToProps.js":
- /*!****************************************************************!*\
- !*** ./node_modules/react-redux/es/connect/mapStateToProps.js ***!
- \****************************************************************/
- /*! exports provided: whenMapStateToPropsIsFunction, whenMapStateToPropsIsMissing, default */
- /*! exports used: default */
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
- "use strict";
- /* unused harmony export whenMapStateToPropsIsFunction */
- /* unused harmony export whenMapStateToPropsIsMissing */
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__wrapMapToProps__ = __webpack_require__(/*! ./wrapMapToProps */ "./node_modules/react-redux/es/connect/wrapMapToProps.js");
- function whenMapStateToPropsIsFunction(mapStateToProps) {
- return typeof mapStateToProps === 'function' ? Object(__WEBPACK_IMPORTED_MODULE_0__wrapMapToProps__["b" /* wrapMapToPropsFunc */])(mapStateToProps, 'mapStateToProps') : undefined;
- }
- function whenMapStateToPropsIsMissing(mapStateToProps) {
- return !mapStateToProps ? Object(__WEBPACK_IMPORTED_MODULE_0__wrapMapToProps__["a" /* wrapMapToPropsConstant */])(function () {
- return {};
- }) : undefined;
- }
- /* harmony default export */ __webpack_exports__["a"] = ([whenMapStateToPropsIsFunction, whenMapStateToPropsIsMissing]);
- /***/ }),
- /***/ "./node_modules/react-redux/es/connect/mergeProps.js":
- /*!***********************************************************!*\
- !*** ./node_modules/react-redux/es/connect/mergeProps.js ***!
- \***********************************************************/
- /*! exports provided: defaultMergeProps, wrapMergePropsFunc, whenMergePropsIsFunction, whenMergePropsIsOmitted, default */
- /*! exports used: default */
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
- "use strict";
- /* unused harmony export defaultMergeProps */
- /* unused harmony export wrapMergePropsFunc */
- /* unused harmony export whenMergePropsIsFunction */
- /* unused harmony export whenMergePropsIsOmitted */
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__babel_runtime_helpers_esm_extends__ = __webpack_require__(/*! @babel/runtime/helpers/esm/extends */ "./node_modules/@babel/runtime/helpers/esm/extends.js");
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__utils_verifyPlainObject__ = __webpack_require__(/*! ../utils/verifyPlainObject */ "./node_modules/react-redux/es/utils/verifyPlainObject.js");
- function defaultMergeProps(stateProps, dispatchProps, ownProps) {
- return Object(__WEBPACK_IMPORTED_MODULE_0__babel_runtime_helpers_esm_extends__["a" /* default */])({}, ownProps, stateProps, dispatchProps);
- }
- function wrapMergePropsFunc(mergeProps) {
- return function initMergePropsProxy(dispatch, _ref) {
- var displayName = _ref.displayName,
- pure = _ref.pure,
- areMergedPropsEqual = _ref.areMergedPropsEqual;
- var hasRunOnce = false;
- var mergedProps;
- return function mergePropsProxy(stateProps, dispatchProps, ownProps) {
- var nextMergedProps = mergeProps(stateProps, dispatchProps, ownProps);
- if (hasRunOnce) {
- if (!pure || !areMergedPropsEqual(nextMergedProps, mergedProps)) mergedProps = nextMergedProps;
- } else {
- hasRunOnce = true;
- mergedProps = nextMergedProps;
- if (true) Object(__WEBPACK_IMPORTED_MODULE_1__utils_verifyPlainObject__["a" /* default */])(mergedProps, displayName, 'mergeProps');
- }
- return mergedProps;
- };
- };
- }
- function whenMergePropsIsFunction(mergeProps) {
- return typeof mergeProps === 'function' ? wrapMergePropsFunc(mergeProps) : undefined;
- }
- function whenMergePropsIsOmitted(mergeProps) {
- return !mergeProps ? function () {
- return defaultMergeProps;
- } : undefined;
- }
- /* harmony default export */ __webpack_exports__["a"] = ([whenMergePropsIsFunction, whenMergePropsIsOmitted]);
- /***/ }),
- /***/ "./node_modules/react-redux/es/connect/selectorFactory.js":
- /*!****************************************************************!*\
- !*** ./node_modules/react-redux/es/connect/selectorFactory.js ***!
- \****************************************************************/
- /*! exports provided: impureFinalPropsSelectorFactory, pureFinalPropsSelectorFactory, default */
- /*! exports used: default */
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
- "use strict";
- /* unused harmony export impureFinalPropsSelectorFactory */
- /* unused harmony export pureFinalPropsSelectorFactory */
- /* harmony export (immutable) */ __webpack_exports__["a"] = finalPropsSelectorFactory;
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__babel_runtime_helpers_esm_objectWithoutPropertiesLoose__ = __webpack_require__(/*! @babel/runtime/helpers/esm/objectWithoutPropertiesLoose */ "./node_modules/@babel/runtime/helpers/esm/objectWithoutPropertiesLoose.js");
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__verifySubselectors__ = __webpack_require__(/*! ./verifySubselectors */ "./node_modules/react-redux/es/connect/verifySubselectors.js");
- function impureFinalPropsSelectorFactory(mapStateToProps, mapDispatchToProps, mergeProps, dispatch) {
- return function impureFinalPropsSelector(state, ownProps) {
- return mergeProps(mapStateToProps(state, ownProps), mapDispatchToProps(dispatch, ownProps), ownProps);
- };
- }
- function pureFinalPropsSelectorFactory(mapStateToProps, mapDispatchToProps, mergeProps, dispatch, _ref) {
- var areStatesEqual = _ref.areStatesEqual,
- areOwnPropsEqual = _ref.areOwnPropsEqual,
- areStatePropsEqual = _ref.areStatePropsEqual;
- var hasRunAtLeastOnce = false;
- var state;
- var ownProps;
- var stateProps;
- var dispatchProps;
- var mergedProps;
- function handleFirstCall(firstState, firstOwnProps) {
- state = firstState;
- ownProps = firstOwnProps;
- stateProps = mapStateToProps(state, ownProps);
- dispatchProps = mapDispatchToProps(dispatch, ownProps);
- mergedProps = mergeProps(stateProps, dispatchProps, ownProps);
- hasRunAtLeastOnce = true;
- return mergedProps;
- }
- function handleNewPropsAndNewState() {
- stateProps = mapStateToProps(state, ownProps);
- if (mapDispatchToProps.dependsOnOwnProps) dispatchProps = mapDispatchToProps(dispatch, ownProps);
- mergedProps = mergeProps(stateProps, dispatchProps, ownProps);
- return mergedProps;
- }
- function handleNewProps() {
- if (mapStateToProps.dependsOnOwnProps) stateProps = mapStateToProps(state, ownProps);
- if (mapDispatchToProps.dependsOnOwnProps) dispatchProps = mapDispatchToProps(dispatch, ownProps);
- mergedProps = mergeProps(stateProps, dispatchProps, ownProps);
- return mergedProps;
- }
- function handleNewState() {
- var nextStateProps = mapStateToProps(state, ownProps);
- var statePropsChanged = !areStatePropsEqual(nextStateProps, stateProps);
- stateProps = nextStateProps;
- if (statePropsChanged) mergedProps = mergeProps(stateProps, dispatchProps, ownProps);
- return mergedProps;
- }
- function handleSubsequentCalls(nextState, nextOwnProps) {
- var propsChanged = !areOwnPropsEqual(nextOwnProps, ownProps);
- var stateChanged = !areStatesEqual(nextState, state);
- state = nextState;
- ownProps = nextOwnProps;
- if (propsChanged && stateChanged) return handleNewPropsAndNewState();
- if (propsChanged) return handleNewProps();
- if (stateChanged) return handleNewState();
- return mergedProps;
- }
- return function pureFinalPropsSelector(nextState, nextOwnProps) {
- return hasRunAtLeastOnce ? handleSubsequentCalls(nextState, nextOwnProps) : handleFirstCall(nextState, nextOwnProps);
- };
- } // TODO: Add more comments
- // If pure is true, the selector returned by selectorFactory will memoize its results,
- // allowing connectAdvanced's shouldComponentUpdate to return false if final
- // props have not changed. If false, the selector will always return a new
- // object and shouldComponentUpdate will always return true.
- function finalPropsSelectorFactory(dispatch, _ref2) {
- var initMapStateToProps = _ref2.initMapStateToProps,
- initMapDispatchToProps = _ref2.initMapDispatchToProps,
- initMergeProps = _ref2.initMergeProps,
- options = Object(__WEBPACK_IMPORTED_MODULE_0__babel_runtime_helpers_esm_objectWithoutPropertiesLoose__["a" /* default */])(_ref2, ["initMapStateToProps", "initMapDispatchToProps", "initMergeProps"]);
- var mapStateToProps = initMapStateToProps(dispatch, options);
- var mapDispatchToProps = initMapDispatchToProps(dispatch, options);
- var mergeProps = initMergeProps(dispatch, options);
- if (true) {
- Object(__WEBPACK_IMPORTED_MODULE_1__verifySubselectors__["a" /* default */])(mapStateToProps, mapDispatchToProps, mergeProps, options.displayName);
- }
- var selectorFactory = options.pure ? pureFinalPropsSelectorFactory : impureFinalPropsSelectorFactory;
- return selectorFactory(mapStateToProps, mapDispatchToProps, mergeProps, dispatch, options);
- }
- /***/ }),
- /***/ "./node_modules/react-redux/es/connect/verifySubselectors.js":
- /*!*******************************************************************!*\
- !*** ./node_modules/react-redux/es/connect/verifySubselectors.js ***!
- \*******************************************************************/
- /*! exports provided: default */
- /*! exports used: default */
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
- "use strict";
- /* harmony export (immutable) */ __webpack_exports__["a"] = verifySubselectors;
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__utils_warning__ = __webpack_require__(/*! ../utils/warning */ "./node_modules/react-redux/es/utils/warning.js");
- function verify(selector, methodName, displayName) {
- if (!selector) {
- throw new Error("Unexpected value for " + methodName + " in " + displayName + ".");
- } else if (methodName === 'mapStateToProps' || methodName === 'mapDispatchToProps') {
- if (!selector.hasOwnProperty('dependsOnOwnProps')) {
- Object(__WEBPACK_IMPORTED_MODULE_0__utils_warning__["a" /* default */])("The selector for " + methodName + " of " + displayName + " did not specify a value for dependsOnOwnProps.");
- }
- }
- }
- function verifySubselectors(mapStateToProps, mapDispatchToProps, mergeProps, displayName) {
- verify(mapStateToProps, 'mapStateToProps', displayName);
- verify(mapDispatchToProps, 'mapDispatchToProps', displayName);
- verify(mergeProps, 'mergeProps', displayName);
- }
- /***/ }),
- /***/ "./node_modules/react-redux/es/connect/wrapMapToProps.js":
- /*!***************************************************************!*\
- !*** ./node_modules/react-redux/es/connect/wrapMapToProps.js ***!
- \***************************************************************/
- /*! exports provided: wrapMapToPropsConstant, getDependsOnOwnProps, wrapMapToPropsFunc */
- /*! exports used: wrapMapToPropsConstant, wrapMapToPropsFunc */
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
- "use strict";
- /* harmony export (immutable) */ __webpack_exports__["a"] = wrapMapToPropsConstant;
- /* unused harmony export getDependsOnOwnProps */
- /* harmony export (immutable) */ __webpack_exports__["b"] = wrapMapToPropsFunc;
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__utils_verifyPlainObject__ = __webpack_require__(/*! ../utils/verifyPlainObject */ "./node_modules/react-redux/es/utils/verifyPlainObject.js");
- function wrapMapToPropsConstant(getConstant) {
- return function initConstantSelector(dispatch, options) {
- var constant = getConstant(dispatch, options);
- function constantSelector() {
- return constant;
- }
- constantSelector.dependsOnOwnProps = false;
- return constantSelector;
- };
- } // dependsOnOwnProps is used by createMapToPropsProxy to determine whether to pass props as args
- // to the mapToProps function being wrapped. It is also used by makePurePropsSelector to determine
- // whether mapToProps needs to be invoked when props have changed.
- //
- // A length of one signals that mapToProps does not depend on props from the parent component.
- // A length of zero is assumed to mean mapToProps is getting args via arguments or ...args and
- // therefore not reporting its length accurately..
- function getDependsOnOwnProps(mapToProps) {
- return mapToProps.dependsOnOwnProps !== null && mapToProps.dependsOnOwnProps !== undefined ? Boolean(mapToProps.dependsOnOwnProps) : mapToProps.length !== 1;
- } // Used by whenMapStateToPropsIsFunction and whenMapDispatchToPropsIsFunction,
- // this function wraps mapToProps in a proxy function which does several things:
- //
- // * Detects whether the mapToProps function being called depends on props, which
- // is used by selectorFactory to decide if it should reinvoke on props changes.
- //
- // * On first call, handles mapToProps if returns another function, and treats that
- // new function as the true mapToProps for subsequent calls.
- //
- // * On first call, verifies the first result is a plain object, in order to warn
- // the developer that their mapToProps function is not returning a valid result.
- //
- function wrapMapToPropsFunc(mapToProps, methodName) {
- return function initProxySelector(dispatch, _ref) {
- var displayName = _ref.displayName;
- var proxy = function mapToPropsProxy(stateOrDispatch, ownProps) {
- return proxy.dependsOnOwnProps ? proxy.mapToProps(stateOrDispatch, ownProps) : proxy.mapToProps(stateOrDispatch);
- }; // allow detectFactoryAndVerify to get ownProps
- proxy.dependsOnOwnProps = true;
- proxy.mapToProps = function detectFactoryAndVerify(stateOrDispatch, ownProps) {
- proxy.mapToProps = mapToProps;
- proxy.dependsOnOwnProps = getDependsOnOwnProps(mapToProps);
- var props = proxy(stateOrDispatch, ownProps);
- if (typeof props === 'function') {
- proxy.mapToProps = props;
- proxy.dependsOnOwnProps = getDependsOnOwnProps(props);
- props = proxy(stateOrDispatch, ownProps);
- }
- if (true) Object(__WEBPACK_IMPORTED_MODULE_0__utils_verifyPlainObject__["a" /* default */])(props, displayName, methodName);
- return props;
- };
- return proxy;
- };
- }
- /***/ }),
- /***/ "./node_modules/react-redux/es/index.js":
- /*!**********************************************!*\
- !*** ./node_modules/react-redux/es/index.js ***!
- \**********************************************/
- /*! exports provided: Provider, createProvider, connectAdvanced, connect */
- /*! exports used: Provider, connect */
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
- "use strict";
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__components_Provider__ = __webpack_require__(/*! ./components/Provider */ "./node_modules/react-redux/es/components/Provider.js");
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__components_connectAdvanced__ = __webpack_require__(/*! ./components/connectAdvanced */ "./node_modules/react-redux/es/components/connectAdvanced.js");
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__connect_connect__ = __webpack_require__(/*! ./connect/connect */ "./node_modules/react-redux/es/connect/connect.js");
- /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return __WEBPACK_IMPORTED_MODULE_0__components_Provider__["a"]; });
- /* unused harmony reexport createProvider */
- /* unused harmony reexport connectAdvanced */
- /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return __WEBPACK_IMPORTED_MODULE_2__connect_connect__["a"]; });
- /***/ }),
- /***/ "./node_modules/react-redux/es/utils/PropTypes.js":
- /*!********************************************************!*\
- !*** ./node_modules/react-redux/es/utils/PropTypes.js ***!
- \********************************************************/
- /*! exports provided: subscriptionShape, storeShape */
- /*! exports used: storeShape, subscriptionShape */
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
- "use strict";
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return subscriptionShape; });
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return storeShape; });
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_prop_types__ = __webpack_require__(/*! prop-types */ "./node_modules/prop-types/index.js");
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_prop_types___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_prop_types__);
- var subscriptionShape = __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.shape({
- trySubscribe: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.func.isRequired,
- tryUnsubscribe: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.func.isRequired,
- notifyNestedSubs: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.func.isRequired,
- isSubscribed: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.func.isRequired
- });
- var storeShape = __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.shape({
- subscribe: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.func.isRequired,
- dispatch: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.func.isRequired,
- getState: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.func.isRequired
- });
- /***/ }),
- /***/ "./node_modules/react-redux/es/utils/Subscription.js":
- /*!***********************************************************!*\
- !*** ./node_modules/react-redux/es/utils/Subscription.js ***!
- \***********************************************************/
- /*! exports provided: default */
- /*! exports used: default */
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
- "use strict";
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return Subscription; });
- // encapsulates the subscription logic for connecting a component to the redux store, as
- // well as nesting subscriptions of descendant components, so that we can ensure the
- // ancestor components re-render before descendants
- var CLEARED = null;
- var nullListeners = {
- notify: function notify() {}
- };
- function createListenerCollection() {
- // the current/next pattern is copied from redux's createStore code.
- // TODO: refactor+expose that code to be reusable here?
- var current = [];
- var next = [];
- return {
- clear: function clear() {
- next = CLEARED;
- current = CLEARED;
- },
- notify: function notify() {
- var listeners = current = next;
- for (var i = 0; i < listeners.length; i++) {
- listeners[i]();
- }
- },
- get: function get() {
- return next;
- },
- subscribe: function subscribe(listener) {
- var isSubscribed = true;
- if (next === current) next = current.slice();
- next.push(listener);
- return function unsubscribe() {
- if (!isSubscribed || current === CLEARED) return;
- isSubscribed = false;
- if (next === current) next = current.slice();
- next.splice(next.indexOf(listener), 1);
- };
- }
- };
- }
- var Subscription =
- /*#__PURE__*/
- function () {
- function Subscription(store, parentSub, onStateChange) {
- this.store = store;
- this.parentSub = parentSub;
- this.onStateChange = onStateChange;
- this.unsubscribe = null;
- this.listeners = nullListeners;
- }
- var _proto = Subscription.prototype;
- _proto.addNestedSub = function addNestedSub(listener) {
- this.trySubscribe();
- return this.listeners.subscribe(listener);
- };
- _proto.notifyNestedSubs = function notifyNestedSubs() {
- this.listeners.notify();
- };
- _proto.isSubscribed = function isSubscribed() {
- return Boolean(this.unsubscribe);
- };
- _proto.trySubscribe = function trySubscribe() {
- if (!this.unsubscribe) {
- this.unsubscribe = this.parentSub ? this.parentSub.addNestedSub(this.onStateChange) : this.store.subscribe(this.onStateChange);
- this.listeners = createListenerCollection();
- }
- };
- _proto.tryUnsubscribe = function tryUnsubscribe() {
- if (this.unsubscribe) {
- this.unsubscribe();
- this.unsubscribe = null;
- this.listeners.clear();
- this.listeners = nullListeners;
- }
- };
- return Subscription;
- }();
- /***/ }),
- /***/ "./node_modules/react-redux/es/utils/isPlainObject.js":
- /*!************************************************************!*\
- !*** ./node_modules/react-redux/es/utils/isPlainObject.js ***!
- \************************************************************/
- /*! exports provided: default */
- /*! exports used: default */
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
- "use strict";
- /* harmony export (immutable) */ __webpack_exports__["a"] = isPlainObject;
- /**
- * @param {any} obj The object to inspect.
- * @returns {boolean} True if the argument appears to be a plain object.
- */
- function isPlainObject(obj) {
- if (typeof obj !== 'object' || obj === null) return false;
- var proto = Object.getPrototypeOf(obj);
- if (proto === null) return true;
- var baseProto = proto;
- while (Object.getPrototypeOf(baseProto) !== null) {
- baseProto = Object.getPrototypeOf(baseProto);
- }
- return proto === baseProto;
- }
- /***/ }),
- /***/ "./node_modules/react-redux/es/utils/shallowEqual.js":
- /*!***********************************************************!*\
- !*** ./node_modules/react-redux/es/utils/shallowEqual.js ***!
- \***********************************************************/
- /*! exports provided: default */
- /*! exports used: default */
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
- "use strict";
- /* harmony export (immutable) */ __webpack_exports__["a"] = shallowEqual;
- var hasOwn = Object.prototype.hasOwnProperty;
- function is(x, y) {
- if (x === y) {
- return x !== 0 || y !== 0 || 1 / x === 1 / y;
- } else {
- return x !== x && y !== y;
- }
- }
- function shallowEqual(objA, objB) {
- if (is(objA, objB)) return true;
- if (typeof objA !== 'object' || objA === null || typeof objB !== 'object' || objB === null) {
- return false;
- }
- var keysA = Object.keys(objA);
- var keysB = Object.keys(objB);
- if (keysA.length !== keysB.length) return false;
- for (var i = 0; i < keysA.length; i++) {
- if (!hasOwn.call(objB, keysA[i]) || !is(objA[keysA[i]], objB[keysA[i]])) {
- return false;
- }
- }
- return true;
- }
- /***/ }),
- /***/ "./node_modules/react-redux/es/utils/verifyPlainObject.js":
- /*!****************************************************************!*\
- !*** ./node_modules/react-redux/es/utils/verifyPlainObject.js ***!
- \****************************************************************/
- /*! exports provided: default */
- /*! exports used: default */
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
- "use strict";
- /* harmony export (immutable) */ __webpack_exports__["a"] = verifyPlainObject;
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__isPlainObject__ = __webpack_require__(/*! ./isPlainObject */ "./node_modules/react-redux/es/utils/isPlainObject.js");
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__warning__ = __webpack_require__(/*! ./warning */ "./node_modules/react-redux/es/utils/warning.js");
- function verifyPlainObject(value, displayName, methodName) {
- if (!Object(__WEBPACK_IMPORTED_MODULE_0__isPlainObject__["a" /* default */])(value)) {
- Object(__WEBPACK_IMPORTED_MODULE_1__warning__["a" /* default */])(methodName + "() in " + displayName + " must return a plain object. Instead received " + value + ".");
- }
- }
- /***/ }),
- /***/ "./node_modules/react-redux/es/utils/warning.js":
- /*!******************************************************!*\
- !*** ./node_modules/react-redux/es/utils/warning.js ***!
- \******************************************************/
- /*! exports provided: default */
- /*! exports used: default */
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
- "use strict";
- /* harmony export (immutable) */ __webpack_exports__["a"] = warning;
- /**
- * Prints a warning in the console if it exists.
- *
- * @param {String} message The warning message.
- * @returns {void}
- */
- function warning(message) {
- /* eslint-disable no-console */
- if (typeof console !== 'undefined' && typeof console.error === 'function') {
- console.error(message);
- }
- /* eslint-enable no-console */
- try {
- // This error was thrown as a convenience so that if you enable
- // "break on all exceptions" in your console,
- // it would pause the execution at this line.
- throw new Error(message);
- /* eslint-disable no-empty */
- } catch (e) {}
- /* eslint-enable no-empty */
- }
- /***/ }),
- /***/ "./node_modules/react-router-dom/es/BrowserRouter.js":
- /*!***********************************************************!*\
- !*** ./node_modules/react-router-dom/es/BrowserRouter.js ***!
- \***********************************************************/
- /*! exports provided: default */
- /*! exports used: default */
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
- "use strict";
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_warning__ = __webpack_require__(/*! warning */ "./node_modules/warning/warning.js");
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_warning___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_warning__);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_react__ = __webpack_require__(/*! react */ "./node_modules/react/index.js");
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_react__);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_prop_types__ = __webpack_require__(/*! prop-types */ "./node_modules/prop-types/index.js");
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_prop_types___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_prop_types__);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_history__ = __webpack_require__(/*! history */ "./node_modules/history/esm/history.js");
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__Router__ = __webpack_require__(/*! ./Router */ "./node_modules/react-router-dom/es/Router.js");
- function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
- function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
- function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
- /**
- * The public API for a <Router> that uses HTML5 history.
- */
- var BrowserRouter = function (_React$Component) {
- _inherits(BrowserRouter, _React$Component);
- function BrowserRouter() {
- var _temp, _this, _ret;
- _classCallCheck(this, BrowserRouter);
- for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {
- args[_key] = arguments[_key];
- }
- return _ret = (_temp = (_this = _possibleConstructorReturn(this, _React$Component.call.apply(_React$Component, [this].concat(args))), _this), _this.history = Object(__WEBPACK_IMPORTED_MODULE_3_history__["a" /* createBrowserHistory */])(_this.props), _temp), _possibleConstructorReturn(_this, _ret);
- }
- BrowserRouter.prototype.componentWillMount = function componentWillMount() {
- __WEBPACK_IMPORTED_MODULE_0_warning___default()(!this.props.history, "<BrowserRouter> ignores the history prop. To use a custom history, " + "use `import { Router }` instead of `import { BrowserRouter as Router }`.");
- };
- BrowserRouter.prototype.render = function render() {
- return __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_4__Router__["a" /* default */], { history: this.history, children: this.props.children });
- };
- return BrowserRouter;
- }(__WEBPACK_IMPORTED_MODULE_1_react___default.a.Component);
- BrowserRouter.propTypes = {
- basename: __WEBPACK_IMPORTED_MODULE_2_prop_types___default.a.string,
- forceRefresh: __WEBPACK_IMPORTED_MODULE_2_prop_types___default.a.bool,
- getUserConfirmation: __WEBPACK_IMPORTED_MODULE_2_prop_types___default.a.func,
- keyLength: __WEBPACK_IMPORTED_MODULE_2_prop_types___default.a.number,
- children: __WEBPACK_IMPORTED_MODULE_2_prop_types___default.a.node
- };
- /* harmony default export */ __webpack_exports__["a"] = (BrowserRouter);
- /***/ }),
- /***/ "./node_modules/react-router-dom/es/HashRouter.js":
- /*!********************************************************!*\
- !*** ./node_modules/react-router-dom/es/HashRouter.js ***!
- \********************************************************/
- /*! exports provided: default */
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
- "use strict";
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_warning__ = __webpack_require__(/*! warning */ "./node_modules/warning/warning.js");
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_warning___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_warning__);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_react__ = __webpack_require__(/*! react */ "./node_modules/react/index.js");
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_react__);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_prop_types__ = __webpack_require__(/*! prop-types */ "./node_modules/prop-types/index.js");
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_prop_types___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_prop_types__);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_history__ = __webpack_require__(/*! history */ "./node_modules/history/esm/history.js");
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__Router__ = __webpack_require__(/*! ./Router */ "./node_modules/react-router-dom/es/Router.js");
- function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
- function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
- function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
- /**
- * The public API for a <Router> that uses window.location.hash.
- */
- var HashRouter = function (_React$Component) {
- _inherits(HashRouter, _React$Component);
- function HashRouter() {
- var _temp, _this, _ret;
- _classCallCheck(this, HashRouter);
- for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {
- args[_key] = arguments[_key];
- }
- return _ret = (_temp = (_this = _possibleConstructorReturn(this, _React$Component.call.apply(_React$Component, [this].concat(args))), _this), _this.history = Object(__WEBPACK_IMPORTED_MODULE_3_history__["b" /* createHashHistory */])(_this.props), _temp), _possibleConstructorReturn(_this, _ret);
- }
- HashRouter.prototype.componentWillMount = function componentWillMount() {
- __WEBPACK_IMPORTED_MODULE_0_warning___default()(!this.props.history, "<HashRouter> ignores the history prop. To use a custom history, " + "use `import { Router }` instead of `import { HashRouter as Router }`.");
- };
- HashRouter.prototype.render = function render() {
- return __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_4__Router__["a" /* default */], { history: this.history, children: this.props.children });
- };
- return HashRouter;
- }(__WEBPACK_IMPORTED_MODULE_1_react___default.a.Component);
- HashRouter.propTypes = {
- basename: __WEBPACK_IMPORTED_MODULE_2_prop_types___default.a.string,
- getUserConfirmation: __WEBPACK_IMPORTED_MODULE_2_prop_types___default.a.func,
- hashType: __WEBPACK_IMPORTED_MODULE_2_prop_types___default.a.oneOf(["hashbang", "noslash", "slash"]),
- children: __WEBPACK_IMPORTED_MODULE_2_prop_types___default.a.node
- };
- /* unused harmony default export */ var _unused_webpack_default_export = (HashRouter);
- /***/ }),
- /***/ "./node_modules/react-router-dom/es/Link.js":
- /*!**************************************************!*\
- !*** ./node_modules/react-router-dom/es/Link.js ***!
- \**************************************************/
- /*! exports provided: default */
- /*! exports used: default */
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
- "use strict";
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react__ = __webpack_require__(/*! react */ "./node_modules/react/index.js");
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_react__);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_prop_types__ = __webpack_require__(/*! prop-types */ "./node_modules/prop-types/index.js");
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_prop_types___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_prop_types__);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_invariant__ = __webpack_require__(/*! invariant */ "./node_modules/invariant/browser.js");
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_invariant___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_invariant__);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_history__ = __webpack_require__(/*! history */ "./node_modules/history/esm/history.js");
- var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
- function _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; }
- function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
- function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
- function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
- var isModifiedEvent = function isModifiedEvent(event) {
- return !!(event.metaKey || event.altKey || event.ctrlKey || event.shiftKey);
- };
- /**
- * The public API for rendering a history-aware <a>.
- */
- var Link = function (_React$Component) {
- _inherits(Link, _React$Component);
- function Link() {
- var _temp, _this, _ret;
- _classCallCheck(this, Link);
- for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {
- args[_key] = arguments[_key];
- }
- return _ret = (_temp = (_this = _possibleConstructorReturn(this, _React$Component.call.apply(_React$Component, [this].concat(args))), _this), _this.handleClick = function (event) {
- if (_this.props.onClick) _this.props.onClick(event);
- if (!event.defaultPrevented && // onClick prevented default
- event.button === 0 && // ignore everything but left clicks
- !_this.props.target && // let browser handle "target=_blank" etc.
- !isModifiedEvent(event) // ignore clicks with modifier keys
- ) {
- event.preventDefault();
- var history = _this.context.router.history;
- var _this$props = _this.props,
- replace = _this$props.replace,
- to = _this$props.to;
- if (replace) {
- history.replace(to);
- } else {
- history.push(to);
- }
- }
- }, _temp), _possibleConstructorReturn(_this, _ret);
- }
- Link.prototype.render = function render() {
- var _props = this.props,
- replace = _props.replace,
- to = _props.to,
- innerRef = _props.innerRef,
- props = _objectWithoutProperties(_props, ["replace", "to", "innerRef"]); // eslint-disable-line no-unused-vars
- __WEBPACK_IMPORTED_MODULE_2_invariant___default()(this.context.router, "You should not use <Link> outside a <Router>");
- __WEBPACK_IMPORTED_MODULE_2_invariant___default()(to !== undefined, 'You must specify the "to" property');
- var history = this.context.router.history;
- var location = typeof to === "string" ? Object(__WEBPACK_IMPORTED_MODULE_3_history__["c" /* createLocation */])(to, null, null, history.location) : to;
- var href = history.createHref(location);
- return __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement("a", _extends({}, props, { onClick: this.handleClick, href: href, ref: innerRef }));
- };
- return Link;
- }(__WEBPACK_IMPORTED_MODULE_0_react___default.a.Component);
- Link.propTypes = {
- onClick: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.func,
- target: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.string,
- replace: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.bool,
- to: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.oneOfType([__WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.string, __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.object]).isRequired,
- innerRef: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.oneOfType([__WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.string, __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.func])
- };
- Link.defaultProps = {
- replace: false
- };
- Link.contextTypes = {
- router: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.shape({
- history: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.shape({
- push: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.func.isRequired,
- replace: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.func.isRequired,
- createHref: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.func.isRequired
- }).isRequired
- }).isRequired
- };
- /* harmony default export */ __webpack_exports__["a"] = (Link);
- /***/ }),
- /***/ "./node_modules/react-router-dom/es/MemoryRouter.js":
- /*!**********************************************************!*\
- !*** ./node_modules/react-router-dom/es/MemoryRouter.js ***!
- \**********************************************************/
- /*! exports provided: default */
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
- "use strict";
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react_router_es_MemoryRouter__ = __webpack_require__(/*! react-router/es/MemoryRouter */ "./node_modules/react-router/es/MemoryRouter.js");
- // Written in this round about way for babel-transform-imports
- /* unused harmony default export */ var _unused_webpack_default_export = (__WEBPACK_IMPORTED_MODULE_0_react_router_es_MemoryRouter__["a" /* default */]);
- /***/ }),
- /***/ "./node_modules/react-router-dom/es/NavLink.js":
- /*!*****************************************************!*\
- !*** ./node_modules/react-router-dom/es/NavLink.js ***!
- \*****************************************************/
- /*! exports provided: default */
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
- "use strict";
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react__ = __webpack_require__(/*! react */ "./node_modules/react/index.js");
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_react__);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_prop_types__ = __webpack_require__(/*! prop-types */ "./node_modules/prop-types/index.js");
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_prop_types___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_prop_types__);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__Route__ = __webpack_require__(/*! ./Route */ "./node_modules/react-router-dom/es/Route.js");
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__Link__ = __webpack_require__(/*! ./Link */ "./node_modules/react-router-dom/es/Link.js");
- var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
- var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; };
- function _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; }
- /**
- * A <Link> wrapper that knows if it's "active" or not.
- */
- var NavLink = function NavLink(_ref) {
- var to = _ref.to,
- exact = _ref.exact,
- strict = _ref.strict,
- location = _ref.location,
- activeClassName = _ref.activeClassName,
- className = _ref.className,
- activeStyle = _ref.activeStyle,
- style = _ref.style,
- getIsActive = _ref.isActive,
- ariaCurrent = _ref["aria-current"],
- rest = _objectWithoutProperties(_ref, ["to", "exact", "strict", "location", "activeClassName", "className", "activeStyle", "style", "isActive", "aria-current"]);
- var path = (typeof to === "undefined" ? "undefined" : _typeof(to)) === "object" ? to.pathname : to;
- // Regex taken from: https://github.com/pillarjs/path-to-regexp/blob/master/index.js#L202
- var escapedPath = path && path.replace(/([.+*?=^!:${}()[\]|/\\])/g, "\\$1");
- return __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_2__Route__["a" /* default */], {
- path: escapedPath,
- exact: exact,
- strict: strict,
- location: location,
- children: function children(_ref2) {
- var location = _ref2.location,
- match = _ref2.match;
- var isActive = !!(getIsActive ? getIsActive(match, location) : match);
- return __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_3__Link__["a" /* default */], _extends({
- to: to,
- className: isActive ? [className, activeClassName].filter(function (i) {
- return i;
- }).join(" ") : className,
- style: isActive ? _extends({}, style, activeStyle) : style,
- "aria-current": isActive && ariaCurrent || null
- }, rest));
- }
- });
- };
- NavLink.propTypes = {
- to: __WEBPACK_IMPORTED_MODULE_3__Link__["a" /* default */].propTypes.to,
- exact: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.bool,
- strict: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.bool,
- location: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.object,
- activeClassName: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.string,
- className: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.string,
- activeStyle: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.object,
- style: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.object,
- isActive: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.func,
- "aria-current": __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.oneOf(["page", "step", "location", "date", "time", "true"])
- };
- NavLink.defaultProps = {
- activeClassName: "active",
- "aria-current": "page"
- };
- /* unused harmony default export */ var _unused_webpack_default_export = (NavLink);
- /***/ }),
- /***/ "./node_modules/react-router-dom/es/Prompt.js":
- /*!****************************************************!*\
- !*** ./node_modules/react-router-dom/es/Prompt.js ***!
- \****************************************************/
- /*! exports provided: default */
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
- "use strict";
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react_router_es_Prompt__ = __webpack_require__(/*! react-router/es/Prompt */ "./node_modules/react-router/es/Prompt.js");
- // Written in this round about way for babel-transform-imports
- /* unused harmony default export */ var _unused_webpack_default_export = (__WEBPACK_IMPORTED_MODULE_0_react_router_es_Prompt__["a" /* default */]);
- /***/ }),
- /***/ "./node_modules/react-router-dom/es/Redirect.js":
- /*!******************************************************!*\
- !*** ./node_modules/react-router-dom/es/Redirect.js ***!
- \******************************************************/
- /*! exports provided: default */
- /*! exports used: default */
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
- "use strict";
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react_router_es_Redirect__ = __webpack_require__(/*! react-router/es/Redirect */ "./node_modules/react-router/es/Redirect.js");
- // Written in this round about way for babel-transform-imports
- /* harmony default export */ __webpack_exports__["a"] = (__WEBPACK_IMPORTED_MODULE_0_react_router_es_Redirect__["a" /* default */]);
- /***/ }),
- /***/ "./node_modules/react-router-dom/es/Route.js":
- /*!***************************************************!*\
- !*** ./node_modules/react-router-dom/es/Route.js ***!
- \***************************************************/
- /*! exports provided: default */
- /*! exports used: default */
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
- "use strict";
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react_router_es_Route__ = __webpack_require__(/*! react-router/es/Route */ "./node_modules/react-router/es/Route.js");
- // Written in this round about way for babel-transform-imports
- /* harmony default export */ __webpack_exports__["a"] = (__WEBPACK_IMPORTED_MODULE_0_react_router_es_Route__["a" /* default */]);
- /***/ }),
- /***/ "./node_modules/react-router-dom/es/Router.js":
- /*!****************************************************!*\
- !*** ./node_modules/react-router-dom/es/Router.js ***!
- \****************************************************/
- /*! exports provided: default */
- /*! exports used: default */
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
- "use strict";
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react_router_es_Router__ = __webpack_require__(/*! react-router/es/Router */ "./node_modules/react-router/es/Router.js");
- // Written in this round about way for babel-transform-imports
- /* harmony default export */ __webpack_exports__["a"] = (__WEBPACK_IMPORTED_MODULE_0_react_router_es_Router__["a" /* default */]);
- /***/ }),
- /***/ "./node_modules/react-router-dom/es/StaticRouter.js":
- /*!**********************************************************!*\
- !*** ./node_modules/react-router-dom/es/StaticRouter.js ***!
- \**********************************************************/
- /*! exports provided: default */
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
- "use strict";
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react_router_es_StaticRouter__ = __webpack_require__(/*! react-router/es/StaticRouter */ "./node_modules/react-router/es/StaticRouter.js");
- // Written in this round about way for babel-transform-imports
- /* unused harmony default export */ var _unused_webpack_default_export = (__WEBPACK_IMPORTED_MODULE_0_react_router_es_StaticRouter__["a" /* default */]);
- /***/ }),
- /***/ "./node_modules/react-router-dom/es/Switch.js":
- /*!****************************************************!*\
- !*** ./node_modules/react-router-dom/es/Switch.js ***!
- \****************************************************/
- /*! exports provided: default */
- /*! exports used: default */
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
- "use strict";
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react_router_es_Switch__ = __webpack_require__(/*! react-router/es/Switch */ "./node_modules/react-router/es/Switch.js");
- // Written in this round about way for babel-transform-imports
- /* harmony default export */ __webpack_exports__["a"] = (__WEBPACK_IMPORTED_MODULE_0_react_router_es_Switch__["a" /* default */]);
- /***/ }),
- /***/ "./node_modules/react-router-dom/es/generatePath.js":
- /*!**********************************************************!*\
- !*** ./node_modules/react-router-dom/es/generatePath.js ***!
- \**********************************************************/
- /*! exports provided: default */
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
- "use strict";
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react_router_es_generatePath__ = __webpack_require__(/*! react-router/es/generatePath */ "./node_modules/react-router/es/generatePath.js");
- // Written in this round about way for babel-transform-imports
- /* unused harmony default export */ var _unused_webpack_default_export = (__WEBPACK_IMPORTED_MODULE_0_react_router_es_generatePath__["a" /* default */]);
- /***/ }),
- /***/ "./node_modules/react-router-dom/es/index.js":
- /*!***************************************************!*\
- !*** ./node_modules/react-router-dom/es/index.js ***!
- \***************************************************/
- /*! exports provided: BrowserRouter, HashRouter, Link, MemoryRouter, NavLink, Prompt, Redirect, Route, Router, StaticRouter, Switch, generatePath, matchPath, withRouter */
- /*! exports used: BrowserRouter, Redirect, Route, Switch */
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
- "use strict";
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__BrowserRouter__ = __webpack_require__(/*! ./BrowserRouter */ "./node_modules/react-router-dom/es/BrowserRouter.js");
- /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return __WEBPACK_IMPORTED_MODULE_0__BrowserRouter__["a"]; });
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__HashRouter__ = __webpack_require__(/*! ./HashRouter */ "./node_modules/react-router-dom/es/HashRouter.js");
- /* unused harmony reexport HashRouter */
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__Link__ = __webpack_require__(/*! ./Link */ "./node_modules/react-router-dom/es/Link.js");
- /* unused harmony reexport Link */
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__MemoryRouter__ = __webpack_require__(/*! ./MemoryRouter */ "./node_modules/react-router-dom/es/MemoryRouter.js");
- /* unused harmony reexport MemoryRouter */
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__NavLink__ = __webpack_require__(/*! ./NavLink */ "./node_modules/react-router-dom/es/NavLink.js");
- /* unused harmony reexport NavLink */
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__Prompt__ = __webpack_require__(/*! ./Prompt */ "./node_modules/react-router-dom/es/Prompt.js");
- /* unused harmony reexport Prompt */
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_6__Redirect__ = __webpack_require__(/*! ./Redirect */ "./node_modules/react-router-dom/es/Redirect.js");
- /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return __WEBPACK_IMPORTED_MODULE_6__Redirect__["a"]; });
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_7__Route__ = __webpack_require__(/*! ./Route */ "./node_modules/react-router-dom/es/Route.js");
- /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "c", function() { return __WEBPACK_IMPORTED_MODULE_7__Route__["a"]; });
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_8__Router__ = __webpack_require__(/*! ./Router */ "./node_modules/react-router-dom/es/Router.js");
- /* unused harmony reexport Router */
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_9__StaticRouter__ = __webpack_require__(/*! ./StaticRouter */ "./node_modules/react-router-dom/es/StaticRouter.js");
- /* unused harmony reexport StaticRouter */
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_10__Switch__ = __webpack_require__(/*! ./Switch */ "./node_modules/react-router-dom/es/Switch.js");
- /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "d", function() { return __WEBPACK_IMPORTED_MODULE_10__Switch__["a"]; });
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_11__generatePath__ = __webpack_require__(/*! ./generatePath */ "./node_modules/react-router-dom/es/generatePath.js");
- /* unused harmony reexport generatePath */
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_12__matchPath__ = __webpack_require__(/*! ./matchPath */ "./node_modules/react-router-dom/es/matchPath.js");
- /* unused harmony reexport matchPath */
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_13__withRouter__ = __webpack_require__(/*! ./withRouter */ "./node_modules/react-router-dom/es/withRouter.js");
- /* unused harmony reexport withRouter */
- /***/ }),
- /***/ "./node_modules/react-router-dom/es/matchPath.js":
- /*!*******************************************************!*\
- !*** ./node_modules/react-router-dom/es/matchPath.js ***!
- \*******************************************************/
- /*! exports provided: default */
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
- "use strict";
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react_router_es_matchPath__ = __webpack_require__(/*! react-router/es/matchPath */ "./node_modules/react-router/es/matchPath.js");
- // Written in this round about way for babel-transform-imports
- /* unused harmony default export */ var _unused_webpack_default_export = (__WEBPACK_IMPORTED_MODULE_0_react_router_es_matchPath__["a" /* default */]);
- /***/ }),
- /***/ "./node_modules/react-router-dom/es/withRouter.js":
- /*!********************************************************!*\
- !*** ./node_modules/react-router-dom/es/withRouter.js ***!
- \********************************************************/
- /*! exports provided: default */
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
- "use strict";
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react_router_es_withRouter__ = __webpack_require__(/*! react-router/es/withRouter */ "./node_modules/react-router/es/withRouter.js");
- // Written in this round about way for babel-transform-imports
- /* unused harmony default export */ var _unused_webpack_default_export = (__WEBPACK_IMPORTED_MODULE_0_react_router_es_withRouter__["a" /* default */]);
- /***/ }),
- /***/ "./node_modules/react-router/es/MemoryRouter.js":
- /*!******************************************************!*\
- !*** ./node_modules/react-router/es/MemoryRouter.js ***!
- \******************************************************/
- /*! exports provided: default */
- /*! exports used: default */
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
- "use strict";
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_warning__ = __webpack_require__(/*! warning */ "./node_modules/warning/warning.js");
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_warning___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_warning__);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_react__ = __webpack_require__(/*! react */ "./node_modules/react/index.js");
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_react__);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_prop_types__ = __webpack_require__(/*! prop-types */ "./node_modules/prop-types/index.js");
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_prop_types___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_prop_types__);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_history__ = __webpack_require__(/*! history */ "./node_modules/history/esm/history.js");
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__Router__ = __webpack_require__(/*! ./Router */ "./node_modules/react-router/es/Router.js");
- function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
- function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
- function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
- /**
- * The public API for a <Router> that stores location in memory.
- */
- var MemoryRouter = function (_React$Component) {
- _inherits(MemoryRouter, _React$Component);
- function MemoryRouter() {
- var _temp, _this, _ret;
- _classCallCheck(this, MemoryRouter);
- for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {
- args[_key] = arguments[_key];
- }
- return _ret = (_temp = (_this = _possibleConstructorReturn(this, _React$Component.call.apply(_React$Component, [this].concat(args))), _this), _this.history = Object(__WEBPACK_IMPORTED_MODULE_3_history__["d" /* createMemoryHistory */])(_this.props), _temp), _possibleConstructorReturn(_this, _ret);
- }
- MemoryRouter.prototype.componentWillMount = function componentWillMount() {
- __WEBPACK_IMPORTED_MODULE_0_warning___default()(!this.props.history, "<MemoryRouter> ignores the history prop. To use a custom history, " + "use `import { Router }` instead of `import { MemoryRouter as Router }`.");
- };
- MemoryRouter.prototype.render = function render() {
- return __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_4__Router__["a" /* default */], { history: this.history, children: this.props.children });
- };
- return MemoryRouter;
- }(__WEBPACK_IMPORTED_MODULE_1_react___default.a.Component);
- MemoryRouter.propTypes = {
- initialEntries: __WEBPACK_IMPORTED_MODULE_2_prop_types___default.a.array,
- initialIndex: __WEBPACK_IMPORTED_MODULE_2_prop_types___default.a.number,
- getUserConfirmation: __WEBPACK_IMPORTED_MODULE_2_prop_types___default.a.func,
- keyLength: __WEBPACK_IMPORTED_MODULE_2_prop_types___default.a.number,
- children: __WEBPACK_IMPORTED_MODULE_2_prop_types___default.a.node
- };
- /* harmony default export */ __webpack_exports__["a"] = (MemoryRouter);
- /***/ }),
- /***/ "./node_modules/react-router/es/Prompt.js":
- /*!************************************************!*\
- !*** ./node_modules/react-router/es/Prompt.js ***!
- \************************************************/
- /*! exports provided: default */
- /*! exports used: default */
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
- "use strict";
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react__ = __webpack_require__(/*! react */ "./node_modules/react/index.js");
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_react__);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_prop_types__ = __webpack_require__(/*! prop-types */ "./node_modules/prop-types/index.js");
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_prop_types___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_prop_types__);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_invariant__ = __webpack_require__(/*! invariant */ "./node_modules/invariant/browser.js");
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_invariant___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_invariant__);
- function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
- function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
- function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
- /**
- * The public API for prompting the user before navigating away
- * from a screen with a component.
- */
- var Prompt = function (_React$Component) {
- _inherits(Prompt, _React$Component);
- function Prompt() {
- _classCallCheck(this, Prompt);
- return _possibleConstructorReturn(this, _React$Component.apply(this, arguments));
- }
- Prompt.prototype.enable = function enable(message) {
- if (this.unblock) this.unblock();
- this.unblock = this.context.router.history.block(message);
- };
- Prompt.prototype.disable = function disable() {
- if (this.unblock) {
- this.unblock();
- this.unblock = null;
- }
- };
- Prompt.prototype.componentWillMount = function componentWillMount() {
- __WEBPACK_IMPORTED_MODULE_2_invariant___default()(this.context.router, "You should not use <Prompt> outside a <Router>");
- if (this.props.when) this.enable(this.props.message);
- };
- Prompt.prototype.componentWillReceiveProps = function componentWillReceiveProps(nextProps) {
- if (nextProps.when) {
- if (!this.props.when || this.props.message !== nextProps.message) this.enable(nextProps.message);
- } else {
- this.disable();
- }
- };
- Prompt.prototype.componentWillUnmount = function componentWillUnmount() {
- this.disable();
- };
- Prompt.prototype.render = function render() {
- return null;
- };
- return Prompt;
- }(__WEBPACK_IMPORTED_MODULE_0_react___default.a.Component);
- Prompt.propTypes = {
- when: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.bool,
- message: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.oneOfType([__WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.func, __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.string]).isRequired
- };
- Prompt.defaultProps = {
- when: true
- };
- Prompt.contextTypes = {
- router: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.shape({
- history: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.shape({
- block: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.func.isRequired
- }).isRequired
- }).isRequired
- };
- /* harmony default export */ __webpack_exports__["a"] = (Prompt);
- /***/ }),
- /***/ "./node_modules/react-router/es/Redirect.js":
- /*!**************************************************!*\
- !*** ./node_modules/react-router/es/Redirect.js ***!
- \**************************************************/
- /*! exports provided: default */
- /*! exports used: default */
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
- "use strict";
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react__ = __webpack_require__(/*! react */ "./node_modules/react/index.js");
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_react__);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_prop_types__ = __webpack_require__(/*! prop-types */ "./node_modules/prop-types/index.js");
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_prop_types___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_prop_types__);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_warning__ = __webpack_require__(/*! warning */ "./node_modules/warning/warning.js");
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_warning___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_warning__);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_invariant__ = __webpack_require__(/*! invariant */ "./node_modules/invariant/browser.js");
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_invariant___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_3_invariant__);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_history__ = __webpack_require__(/*! history */ "./node_modules/history/esm/history.js");
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__generatePath__ = __webpack_require__(/*! ./generatePath */ "./node_modules/react-router/es/generatePath.js");
- var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
- function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
- function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
- function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
- /**
- * The public API for updating the location programmatically
- * with a component.
- */
- var Redirect = function (_React$Component) {
- _inherits(Redirect, _React$Component);
- function Redirect() {
- _classCallCheck(this, Redirect);
- return _possibleConstructorReturn(this, _React$Component.apply(this, arguments));
- }
- Redirect.prototype.isStatic = function isStatic() {
- return this.context.router && this.context.router.staticContext;
- };
- Redirect.prototype.componentWillMount = function componentWillMount() {
- __WEBPACK_IMPORTED_MODULE_3_invariant___default()(this.context.router, "You should not use <Redirect> outside a <Router>");
- if (this.isStatic()) this.perform();
- };
- Redirect.prototype.componentDidMount = function componentDidMount() {
- if (!this.isStatic()) this.perform();
- };
- Redirect.prototype.componentDidUpdate = function componentDidUpdate(prevProps) {
- var prevTo = Object(__WEBPACK_IMPORTED_MODULE_4_history__["c" /* createLocation */])(prevProps.to);
- var nextTo = Object(__WEBPACK_IMPORTED_MODULE_4_history__["c" /* createLocation */])(this.props.to);
- if (Object(__WEBPACK_IMPORTED_MODULE_4_history__["f" /* locationsAreEqual */])(prevTo, nextTo)) {
- __WEBPACK_IMPORTED_MODULE_2_warning___default()(false, "You tried to redirect to the same route you're currently on: " + ("\"" + nextTo.pathname + nextTo.search + "\""));
- return;
- }
- this.perform();
- };
- Redirect.prototype.computeTo = function computeTo(_ref) {
- var computedMatch = _ref.computedMatch,
- to = _ref.to;
- if (computedMatch) {
- if (typeof to === "string") {
- return Object(__WEBPACK_IMPORTED_MODULE_5__generatePath__["a" /* default */])(to, computedMatch.params);
- } else {
- return _extends({}, to, {
- pathname: Object(__WEBPACK_IMPORTED_MODULE_5__generatePath__["a" /* default */])(to.pathname, computedMatch.params)
- });
- }
- }
- return to;
- };
- Redirect.prototype.perform = function perform() {
- var history = this.context.router.history;
- var push = this.props.push;
- var to = this.computeTo(this.props);
- if (push) {
- history.push(to);
- } else {
- history.replace(to);
- }
- };
- Redirect.prototype.render = function render() {
- return null;
- };
- return Redirect;
- }(__WEBPACK_IMPORTED_MODULE_0_react___default.a.Component);
- Redirect.propTypes = {
- computedMatch: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.object, // private, from <Switch>
- push: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.bool,
- from: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.string,
- to: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.oneOfType([__WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.string, __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.object]).isRequired
- };
- Redirect.defaultProps = {
- push: false
- };
- Redirect.contextTypes = {
- router: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.shape({
- history: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.shape({
- push: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.func.isRequired,
- replace: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.func.isRequired
- }).isRequired,
- staticContext: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.object
- }).isRequired
- };
- /* harmony default export */ __webpack_exports__["a"] = (Redirect);
- /***/ }),
- /***/ "./node_modules/react-router/es/Route.js":
- /*!***********************************************!*\
- !*** ./node_modules/react-router/es/Route.js ***!
- \***********************************************/
- /*! exports provided: default */
- /*! exports used: default */
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
- "use strict";
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_warning__ = __webpack_require__(/*! warning */ "./node_modules/warning/warning.js");
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_warning___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_warning__);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_invariant__ = __webpack_require__(/*! invariant */ "./node_modules/invariant/browser.js");
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_invariant___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_invariant__);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_react__ = __webpack_require__(/*! react */ "./node_modules/react/index.js");
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_react__);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_prop_types__ = __webpack_require__(/*! prop-types */ "./node_modules/prop-types/index.js");
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_prop_types___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_3_prop_types__);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__matchPath__ = __webpack_require__(/*! ./matchPath */ "./node_modules/react-router/es/matchPath.js");
- var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
- function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
- function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
- function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
- var isEmptyChildren = function isEmptyChildren(children) {
- return __WEBPACK_IMPORTED_MODULE_2_react___default.a.Children.count(children) === 0;
- };
- /**
- * The public API for matching a single path and rendering.
- */
- var Route = function (_React$Component) {
- _inherits(Route, _React$Component);
- function Route() {
- var _temp, _this, _ret;
- _classCallCheck(this, Route);
- for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {
- args[_key] = arguments[_key];
- }
- return _ret = (_temp = (_this = _possibleConstructorReturn(this, _React$Component.call.apply(_React$Component, [this].concat(args))), _this), _this.state = {
- match: _this.computeMatch(_this.props, _this.context.router)
- }, _temp), _possibleConstructorReturn(_this, _ret);
- }
- Route.prototype.getChildContext = function getChildContext() {
- return {
- router: _extends({}, this.context.router, {
- route: {
- location: this.props.location || this.context.router.route.location,
- match: this.state.match
- }
- })
- };
- };
- Route.prototype.computeMatch = function computeMatch(_ref, router) {
- var computedMatch = _ref.computedMatch,
- location = _ref.location,
- path = _ref.path,
- strict = _ref.strict,
- exact = _ref.exact,
- sensitive = _ref.sensitive;
- if (computedMatch) return computedMatch; // <Switch> already computed the match for us
- __WEBPACK_IMPORTED_MODULE_1_invariant___default()(router, "You should not use <Route> or withRouter() outside a <Router>");
- var route = router.route;
- var pathname = (location || route.location).pathname;
- return Object(__WEBPACK_IMPORTED_MODULE_4__matchPath__["a" /* default */])(pathname, { path: path, strict: strict, exact: exact, sensitive: sensitive }, route.match);
- };
- Route.prototype.componentWillMount = function componentWillMount() {
- __WEBPACK_IMPORTED_MODULE_0_warning___default()(!(this.props.component && this.props.render), "You should not use <Route component> and <Route render> in the same route; <Route render> will be ignored");
- __WEBPACK_IMPORTED_MODULE_0_warning___default()(!(this.props.component && this.props.children && !isEmptyChildren(this.props.children)), "You should not use <Route component> and <Route children> in the same route; <Route children> will be ignored");
- __WEBPACK_IMPORTED_MODULE_0_warning___default()(!(this.props.render && this.props.children && !isEmptyChildren(this.props.children)), "You should not use <Route render> and <Route children> in the same route; <Route children> will be ignored");
- };
- Route.prototype.componentWillReceiveProps = function componentWillReceiveProps(nextProps, nextContext) {
- __WEBPACK_IMPORTED_MODULE_0_warning___default()(!(nextProps.location && !this.props.location), '<Route> elements should not change from uncontrolled to controlled (or vice versa). You initially used no "location" prop and then provided one on a subsequent render.');
- __WEBPACK_IMPORTED_MODULE_0_warning___default()(!(!nextProps.location && this.props.location), '<Route> elements should not change from controlled to uncontrolled (or vice versa). You provided a "location" prop initially but omitted it on a subsequent render.');
- this.setState({
- match: this.computeMatch(nextProps, nextContext.router)
- });
- };
- Route.prototype.render = function render() {
- var match = this.state.match;
- var _props = this.props,
- children = _props.children,
- component = _props.component,
- render = _props.render;
- var _context$router = this.context.router,
- history = _context$router.history,
- route = _context$router.route,
- staticContext = _context$router.staticContext;
- var location = this.props.location || route.location;
- var props = { match: match, location: location, history: history, staticContext: staticContext };
- if (component) return match ? __WEBPACK_IMPORTED_MODULE_2_react___default.a.createElement(component, props) : null;
- if (render) return match ? render(props) : null;
- if (typeof children === "function") return children(props);
- if (children && !isEmptyChildren(children)) return __WEBPACK_IMPORTED_MODULE_2_react___default.a.Children.only(children);
- return null;
- };
- return Route;
- }(__WEBPACK_IMPORTED_MODULE_2_react___default.a.Component);
- Route.propTypes = {
- computedMatch: __WEBPACK_IMPORTED_MODULE_3_prop_types___default.a.object, // private, from <Switch>
- path: __WEBPACK_IMPORTED_MODULE_3_prop_types___default.a.string,
- exact: __WEBPACK_IMPORTED_MODULE_3_prop_types___default.a.bool,
- strict: __WEBPACK_IMPORTED_MODULE_3_prop_types___default.a.bool,
- sensitive: __WEBPACK_IMPORTED_MODULE_3_prop_types___default.a.bool,
- component: __WEBPACK_IMPORTED_MODULE_3_prop_types___default.a.func,
- render: __WEBPACK_IMPORTED_MODULE_3_prop_types___default.a.func,
- children: __WEBPACK_IMPORTED_MODULE_3_prop_types___default.a.oneOfType([__WEBPACK_IMPORTED_MODULE_3_prop_types___default.a.func, __WEBPACK_IMPORTED_MODULE_3_prop_types___default.a.node]),
- location: __WEBPACK_IMPORTED_MODULE_3_prop_types___default.a.object
- };
- Route.contextTypes = {
- router: __WEBPACK_IMPORTED_MODULE_3_prop_types___default.a.shape({
- history: __WEBPACK_IMPORTED_MODULE_3_prop_types___default.a.object.isRequired,
- route: __WEBPACK_IMPORTED_MODULE_3_prop_types___default.a.object.isRequired,
- staticContext: __WEBPACK_IMPORTED_MODULE_3_prop_types___default.a.object
- })
- };
- Route.childContextTypes = {
- router: __WEBPACK_IMPORTED_MODULE_3_prop_types___default.a.object.isRequired
- };
- /* harmony default export */ __webpack_exports__["a"] = (Route);
- /***/ }),
- /***/ "./node_modules/react-router/es/Router.js":
- /*!************************************************!*\
- !*** ./node_modules/react-router/es/Router.js ***!
- \************************************************/
- /*! exports provided: default */
- /*! exports used: default */
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
- "use strict";
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_warning__ = __webpack_require__(/*! warning */ "./node_modules/warning/warning.js");
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_warning___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_warning__);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_invariant__ = __webpack_require__(/*! invariant */ "./node_modules/invariant/browser.js");
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_invariant___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_invariant__);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_react__ = __webpack_require__(/*! react */ "./node_modules/react/index.js");
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_react__);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_prop_types__ = __webpack_require__(/*! prop-types */ "./node_modules/prop-types/index.js");
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_prop_types___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_3_prop_types__);
- var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
- function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
- function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
- function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
- /**
- * The public API for putting history on context.
- */
- var Router = function (_React$Component) {
- _inherits(Router, _React$Component);
- function Router() {
- var _temp, _this, _ret;
- _classCallCheck(this, Router);
- for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {
- args[_key] = arguments[_key];
- }
- return _ret = (_temp = (_this = _possibleConstructorReturn(this, _React$Component.call.apply(_React$Component, [this].concat(args))), _this), _this.state = {
- match: _this.computeMatch(_this.props.history.location.pathname)
- }, _temp), _possibleConstructorReturn(_this, _ret);
- }
- Router.prototype.getChildContext = function getChildContext() {
- return {
- router: _extends({}, this.context.router, {
- history: this.props.history,
- route: {
- location: this.props.history.location,
- match: this.state.match
- }
- })
- };
- };
- Router.prototype.computeMatch = function computeMatch(pathname) {
- return {
- path: "/",
- url: "/",
- params: {},
- isExact: pathname === "/"
- };
- };
- Router.prototype.componentWillMount = function componentWillMount() {
- var _this2 = this;
- var _props = this.props,
- children = _props.children,
- history = _props.history;
- __WEBPACK_IMPORTED_MODULE_1_invariant___default()(children == null || __WEBPACK_IMPORTED_MODULE_2_react___default.a.Children.count(children) === 1, "A <Router> may have only one child element");
- // Do this here so we can setState when a <Redirect> changes the
- // location in componentWillMount. This happens e.g. when doing
- // server rendering using a <StaticRouter>.
- this.unlisten = history.listen(function () {
- _this2.setState({
- match: _this2.computeMatch(history.location.pathname)
- });
- });
- };
- Router.prototype.componentWillReceiveProps = function componentWillReceiveProps(nextProps) {
- __WEBPACK_IMPORTED_MODULE_0_warning___default()(this.props.history === nextProps.history, "You cannot change <Router history>");
- };
- Router.prototype.componentWillUnmount = function componentWillUnmount() {
- this.unlisten();
- };
- Router.prototype.render = function render() {
- var children = this.props.children;
- return children ? __WEBPACK_IMPORTED_MODULE_2_react___default.a.Children.only(children) : null;
- };
- return Router;
- }(__WEBPACK_IMPORTED_MODULE_2_react___default.a.Component);
- Router.propTypes = {
- history: __WEBPACK_IMPORTED_MODULE_3_prop_types___default.a.object.isRequired,
- children: __WEBPACK_IMPORTED_MODULE_3_prop_types___default.a.node
- };
- Router.contextTypes = {
- router: __WEBPACK_IMPORTED_MODULE_3_prop_types___default.a.object
- };
- Router.childContextTypes = {
- router: __WEBPACK_IMPORTED_MODULE_3_prop_types___default.a.object.isRequired
- };
- /* harmony default export */ __webpack_exports__["a"] = (Router);
- /***/ }),
- /***/ "./node_modules/react-router/es/StaticRouter.js":
- /*!******************************************************!*\
- !*** ./node_modules/react-router/es/StaticRouter.js ***!
- \******************************************************/
- /*! exports provided: default */
- /*! exports used: default */
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
- "use strict";
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_warning__ = __webpack_require__(/*! warning */ "./node_modules/warning/warning.js");
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_warning___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_warning__);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_invariant__ = __webpack_require__(/*! invariant */ "./node_modules/invariant/browser.js");
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_invariant___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_invariant__);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_react__ = __webpack_require__(/*! react */ "./node_modules/react/index.js");
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_react__);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_prop_types__ = __webpack_require__(/*! prop-types */ "./node_modules/prop-types/index.js");
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_prop_types___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_3_prop_types__);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_history__ = __webpack_require__(/*! history */ "./node_modules/history/esm/history.js");
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__Router__ = __webpack_require__(/*! ./Router */ "./node_modules/react-router/es/Router.js");
- var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
- function _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; }
- function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
- function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
- function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
- var addLeadingSlash = function addLeadingSlash(path) {
- return path.charAt(0) === "/" ? path : "/" + path;
- };
- var addBasename = function addBasename(basename, location) {
- if (!basename) return location;
- return _extends({}, location, {
- pathname: addLeadingSlash(basename) + location.pathname
- });
- };
- var stripBasename = function stripBasename(basename, location) {
- if (!basename) return location;
- var base = addLeadingSlash(basename);
- if (location.pathname.indexOf(base) !== 0) return location;
- return _extends({}, location, {
- pathname: location.pathname.substr(base.length)
- });
- };
- var createURL = function createURL(location) {
- return typeof location === "string" ? location : Object(__WEBPACK_IMPORTED_MODULE_4_history__["e" /* createPath */])(location);
- };
- var staticHandler = function staticHandler(methodName) {
- return function () {
- __WEBPACK_IMPORTED_MODULE_1_invariant___default()(false, "You cannot %s with <StaticRouter>", methodName);
- };
- };
- var noop = function noop() {};
- /**
- * The public top-level API for a "static" <Router>, so-called because it
- * can't actually change the current location. Instead, it just records
- * location changes in a context object. Useful mainly in testing and
- * server-rendering scenarios.
- */
- var StaticRouter = function (_React$Component) {
- _inherits(StaticRouter, _React$Component);
- function StaticRouter() {
- var _temp, _this, _ret;
- _classCallCheck(this, StaticRouter);
- for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {
- args[_key] = arguments[_key];
- }
- return _ret = (_temp = (_this = _possibleConstructorReturn(this, _React$Component.call.apply(_React$Component, [this].concat(args))), _this), _this.createHref = function (path) {
- return addLeadingSlash(_this.props.basename + createURL(path));
- }, _this.handlePush = function (location) {
- var _this$props = _this.props,
- basename = _this$props.basename,
- context = _this$props.context;
- context.action = "PUSH";
- context.location = addBasename(basename, Object(__WEBPACK_IMPORTED_MODULE_4_history__["c" /* createLocation */])(location));
- context.url = createURL(context.location);
- }, _this.handleReplace = function (location) {
- var _this$props2 = _this.props,
- basename = _this$props2.basename,
- context = _this$props2.context;
- context.action = "REPLACE";
- context.location = addBasename(basename, Object(__WEBPACK_IMPORTED_MODULE_4_history__["c" /* createLocation */])(location));
- context.url = createURL(context.location);
- }, _this.handleListen = function () {
- return noop;
- }, _this.handleBlock = function () {
- return noop;
- }, _temp), _possibleConstructorReturn(_this, _ret);
- }
- StaticRouter.prototype.getChildContext = function getChildContext() {
- return {
- router: {
- staticContext: this.props.context
- }
- };
- };
- StaticRouter.prototype.componentWillMount = function componentWillMount() {
- __WEBPACK_IMPORTED_MODULE_0_warning___default()(!this.props.history, "<StaticRouter> ignores the history prop. To use a custom history, " + "use `import { Router }` instead of `import { StaticRouter as Router }`.");
- };
- StaticRouter.prototype.render = function render() {
- var _props = this.props,
- basename = _props.basename,
- context = _props.context,
- location = _props.location,
- props = _objectWithoutProperties(_props, ["basename", "context", "location"]);
- var history = {
- createHref: this.createHref,
- action: "POP",
- location: stripBasename(basename, Object(__WEBPACK_IMPORTED_MODULE_4_history__["c" /* createLocation */])(location)),
- push: this.handlePush,
- replace: this.handleReplace,
- go: staticHandler("go"),
- goBack: staticHandler("goBack"),
- goForward: staticHandler("goForward"),
- listen: this.handleListen,
- block: this.handleBlock
- };
- return __WEBPACK_IMPORTED_MODULE_2_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_5__Router__["a" /* default */], _extends({}, props, { history: history }));
- };
- return StaticRouter;
- }(__WEBPACK_IMPORTED_MODULE_2_react___default.a.Component);
- StaticRouter.propTypes = {
- basename: __WEBPACK_IMPORTED_MODULE_3_prop_types___default.a.string,
- context: __WEBPACK_IMPORTED_MODULE_3_prop_types___default.a.object.isRequired,
- location: __WEBPACK_IMPORTED_MODULE_3_prop_types___default.a.oneOfType([__WEBPACK_IMPORTED_MODULE_3_prop_types___default.a.string, __WEBPACK_IMPORTED_MODULE_3_prop_types___default.a.object])
- };
- StaticRouter.defaultProps = {
- basename: "",
- location: "/"
- };
- StaticRouter.childContextTypes = {
- router: __WEBPACK_IMPORTED_MODULE_3_prop_types___default.a.object.isRequired
- };
- /* harmony default export */ __webpack_exports__["a"] = (StaticRouter);
- /***/ }),
- /***/ "./node_modules/react-router/es/Switch.js":
- /*!************************************************!*\
- !*** ./node_modules/react-router/es/Switch.js ***!
- \************************************************/
- /*! exports provided: default */
- /*! exports used: default */
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
- "use strict";
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react__ = __webpack_require__(/*! react */ "./node_modules/react/index.js");
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_react__);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_prop_types__ = __webpack_require__(/*! prop-types */ "./node_modules/prop-types/index.js");
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_prop_types___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_prop_types__);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_warning__ = __webpack_require__(/*! warning */ "./node_modules/warning/warning.js");
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_warning___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_warning__);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_invariant__ = __webpack_require__(/*! invariant */ "./node_modules/invariant/browser.js");
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_invariant___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_3_invariant__);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__matchPath__ = __webpack_require__(/*! ./matchPath */ "./node_modules/react-router/es/matchPath.js");
- function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
- function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
- function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
- /**
- * The public API for rendering the first <Route> that matches.
- */
- var Switch = function (_React$Component) {
- _inherits(Switch, _React$Component);
- function Switch() {
- _classCallCheck(this, Switch);
- return _possibleConstructorReturn(this, _React$Component.apply(this, arguments));
- }
- Switch.prototype.componentWillMount = function componentWillMount() {
- __WEBPACK_IMPORTED_MODULE_3_invariant___default()(this.context.router, "You should not use <Switch> outside a <Router>");
- };
- Switch.prototype.componentWillReceiveProps = function componentWillReceiveProps(nextProps) {
- __WEBPACK_IMPORTED_MODULE_2_warning___default()(!(nextProps.location && !this.props.location), '<Switch> elements should not change from uncontrolled to controlled (or vice versa). You initially used no "location" prop and then provided one on a subsequent render.');
- __WEBPACK_IMPORTED_MODULE_2_warning___default()(!(!nextProps.location && this.props.location), '<Switch> elements should not change from controlled to uncontrolled (or vice versa). You provided a "location" prop initially but omitted it on a subsequent render.');
- };
- Switch.prototype.render = function render() {
- var route = this.context.router.route;
- var children = this.props.children;
- var location = this.props.location || route.location;
- var match = void 0,
- child = void 0;
- __WEBPACK_IMPORTED_MODULE_0_react___default.a.Children.forEach(children, function (element) {
- if (match == null && __WEBPACK_IMPORTED_MODULE_0_react___default.a.isValidElement(element)) {
- var _element$props = element.props,
- pathProp = _element$props.path,
- exact = _element$props.exact,
- strict = _element$props.strict,
- sensitive = _element$props.sensitive,
- from = _element$props.from;
- var path = pathProp || from;
- child = element;
- match = Object(__WEBPACK_IMPORTED_MODULE_4__matchPath__["a" /* default */])(location.pathname, { path: path, exact: exact, strict: strict, sensitive: sensitive }, route.match);
- }
- });
- return match ? __WEBPACK_IMPORTED_MODULE_0_react___default.a.cloneElement(child, { location: location, computedMatch: match }) : null;
- };
- return Switch;
- }(__WEBPACK_IMPORTED_MODULE_0_react___default.a.Component);
- Switch.contextTypes = {
- router: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.shape({
- route: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.object.isRequired
- }).isRequired
- };
- Switch.propTypes = {
- children: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.node,
- location: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.object
- };
- /* harmony default export */ __webpack_exports__["a"] = (Switch);
- /***/ }),
- /***/ "./node_modules/react-router/es/generatePath.js":
- /*!******************************************************!*\
- !*** ./node_modules/react-router/es/generatePath.js ***!
- \******************************************************/
- /*! exports provided: default */
- /*! exports used: default */
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
- "use strict";
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_path_to_regexp__ = __webpack_require__(/*! path-to-regexp */ "./node_modules/path-to-regexp/index.js");
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_path_to_regexp___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_path_to_regexp__);
- var patternCache = {};
- var cacheLimit = 10000;
- var cacheCount = 0;
- var compileGenerator = function compileGenerator(pattern) {
- var cacheKey = pattern;
- var cache = patternCache[cacheKey] || (patternCache[cacheKey] = {});
- if (cache[pattern]) return cache[pattern];
- var compiledGenerator = __WEBPACK_IMPORTED_MODULE_0_path_to_regexp___default.a.compile(pattern);
- if (cacheCount < cacheLimit) {
- cache[pattern] = compiledGenerator;
- cacheCount++;
- }
- return compiledGenerator;
- };
- /**
- * Public API for generating a URL pathname from a pattern and parameters.
- */
- var generatePath = function generatePath() {
- var pattern = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : "/";
- var params = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
- if (pattern === "/") {
- return pattern;
- }
- var generator = compileGenerator(pattern);
- return generator(params, { pretty: true });
- };
- /* harmony default export */ __webpack_exports__["a"] = (generatePath);
- /***/ }),
- /***/ "./node_modules/react-router/es/matchPath.js":
- /*!***************************************************!*\
- !*** ./node_modules/react-router/es/matchPath.js ***!
- \***************************************************/
- /*! exports provided: default */
- /*! exports used: default */
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
- "use strict";
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_path_to_regexp__ = __webpack_require__(/*! path-to-regexp */ "./node_modules/path-to-regexp/index.js");
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_path_to_regexp___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_path_to_regexp__);
- var patternCache = {};
- var cacheLimit = 10000;
- var cacheCount = 0;
- var compilePath = function compilePath(pattern, options) {
- var cacheKey = "" + options.end + options.strict + options.sensitive;
- var cache = patternCache[cacheKey] || (patternCache[cacheKey] = {});
- if (cache[pattern]) return cache[pattern];
- var keys = [];
- var re = __WEBPACK_IMPORTED_MODULE_0_path_to_regexp___default()(pattern, keys, options);
- var compiledPattern = { re: re, keys: keys };
- if (cacheCount < cacheLimit) {
- cache[pattern] = compiledPattern;
- cacheCount++;
- }
- return compiledPattern;
- };
- /**
- * Public API for matching a URL pathname to a path pattern.
- */
- var matchPath = function matchPath(pathname) {
- var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
- var parent = arguments[2];
- if (typeof options === "string") options = { path: options };
- var _options = options,
- path = _options.path,
- _options$exact = _options.exact,
- exact = _options$exact === undefined ? false : _options$exact,
- _options$strict = _options.strict,
- strict = _options$strict === undefined ? false : _options$strict,
- _options$sensitive = _options.sensitive,
- sensitive = _options$sensitive === undefined ? false : _options$sensitive;
- if (path == null) return parent;
- var _compilePath = compilePath(path, { end: exact, strict: strict, sensitive: sensitive }),
- re = _compilePath.re,
- keys = _compilePath.keys;
- var match = re.exec(pathname);
- if (!match) return null;
- var url = match[0],
- values = match.slice(1);
- var isExact = pathname === url;
- if (exact && !isExact) return null;
- return {
- path: path, // the path pattern used to match
- url: path === "/" && url === "" ? "/" : url, // the matched portion of the URL
- isExact: isExact, // whether or not we matched exactly
- params: keys.reduce(function (memo, key, index) {
- memo[key.name] = values[index];
- return memo;
- }, {})
- };
- };
- /* harmony default export */ __webpack_exports__["a"] = (matchPath);
- /***/ }),
- /***/ "./node_modules/react-router/es/withRouter.js":
- /*!****************************************************!*\
- !*** ./node_modules/react-router/es/withRouter.js ***!
- \****************************************************/
- /*! exports provided: default */
- /*! exports used: default */
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
- "use strict";
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react__ = __webpack_require__(/*! react */ "./node_modules/react/index.js");
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_react__);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_prop_types__ = __webpack_require__(/*! prop-types */ "./node_modules/prop-types/index.js");
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_prop_types___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_prop_types__);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_hoist_non_react_statics__ = __webpack_require__(/*! hoist-non-react-statics */ "./node_modules/react-router/node_modules/hoist-non-react-statics/dist/hoist-non-react-statics.cjs.js");
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_hoist_non_react_statics___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_hoist_non_react_statics__);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__Route__ = __webpack_require__(/*! ./Route */ "./node_modules/react-router/es/Route.js");
- var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
- function _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; }
- /**
- * A public higher-order component to access the imperative API
- */
- var withRouter = function withRouter(Component) {
- var C = function C(props) {
- var wrappedComponentRef = props.wrappedComponentRef,
- remainingProps = _objectWithoutProperties(props, ["wrappedComponentRef"]);
- return __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_3__Route__["a" /* default */], {
- children: function children(routeComponentProps) {
- return __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(Component, _extends({}, remainingProps, routeComponentProps, {
- ref: wrappedComponentRef
- }));
- }
- });
- };
- C.displayName = "withRouter(" + (Component.displayName || Component.name) + ")";
- C.WrappedComponent = Component;
- C.propTypes = {
- wrappedComponentRef: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.func
- };
- return __WEBPACK_IMPORTED_MODULE_2_hoist_non_react_statics___default()(C, Component);
- };
- /* harmony default export */ __webpack_exports__["a"] = (withRouter);
- /***/ }),
- /***/ "./node_modules/react-router/node_modules/hoist-non-react-statics/dist/hoist-non-react-statics.cjs.js":
- /*!************************************************************************************************************!*\
- !*** ./node_modules/react-router/node_modules/hoist-non-react-statics/dist/hoist-non-react-statics.cjs.js ***!
- \************************************************************************************************************/
- /*! dynamic exports provided */
- /*! exports used: default */
- /***/ (function(module, exports, __webpack_require__) {
- "use strict";
- /**
- * Copyright 2015, Yahoo! Inc.
- * Copyrights licensed under the New BSD License. See the accompanying LICENSE file for terms.
- */
- var REACT_STATICS = {
- childContextTypes: true,
- contextTypes: true,
- defaultProps: true,
- displayName: true,
- getDefaultProps: true,
- getDerivedStateFromProps: true,
- mixins: true,
- propTypes: true,
- type: true
- };
- var KNOWN_STATICS = {
- name: true,
- length: true,
- prototype: true,
- caller: true,
- callee: true,
- arguments: true,
- arity: true
- };
- var defineProperty = Object.defineProperty;
- var getOwnPropertyNames = Object.getOwnPropertyNames;
- var getOwnPropertySymbols = Object.getOwnPropertySymbols;
- var getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;
- var getPrototypeOf = Object.getPrototypeOf;
- var objectPrototype = getPrototypeOf && getPrototypeOf(Object);
- function hoistNonReactStatics(targetComponent, sourceComponent, blacklist) {
- if (typeof sourceComponent !== 'string') { // don't hoist over string (html) components
- if (objectPrototype) {
- var inheritedComponent = getPrototypeOf(sourceComponent);
- if (inheritedComponent && inheritedComponent !== objectPrototype) {
- hoistNonReactStatics(targetComponent, inheritedComponent, blacklist);
- }
- }
- var keys = getOwnPropertyNames(sourceComponent);
- if (getOwnPropertySymbols) {
- keys = keys.concat(getOwnPropertySymbols(sourceComponent));
- }
- for (var i = 0; i < keys.length; ++i) {
- var key = keys[i];
- if (!REACT_STATICS[key] && !KNOWN_STATICS[key] && (!blacklist || !blacklist[key])) {
- var descriptor = getOwnPropertyDescriptor(sourceComponent, key);
- try { // Avoid failures from read-only properties
- defineProperty(targetComponent, key, descriptor);
- } catch (e) {}
- }
- }
- return targetComponent;
- }
- return targetComponent;
- }
- module.exports = hoistNonReactStatics;
- /***/ }),
- /***/ "./node_modules/react/cjs/react.development.js":
- /*!*****************************************************!*\
- !*** ./node_modules/react/cjs/react.development.js ***!
- \*****************************************************/
- /*! dynamic exports provided */
- /*! all exports used */
- /***/ (function(module, exports, __webpack_require__) {
- "use strict";
- /** @license React v16.14.0
- * react.development.js
- *
- * Copyright (c) Facebook, Inc. and its affiliates.
- *
- * This source code is licensed under the MIT license found in the
- * LICENSE file in the root directory of this source tree.
- */
- if (true) {
- (function() {
- 'use strict';
- var _assign = __webpack_require__(/*! object-assign */ "./node_modules/object-assign/index.js");
- var checkPropTypes = __webpack_require__(/*! prop-types/checkPropTypes */ "./node_modules/prop-types/checkPropTypes.js");
- var ReactVersion = '16.14.0';
- // The Symbol used to tag the ReactElement-like types. If there is no native Symbol
- // nor polyfill, then a plain number is used for performance.
- var hasSymbol = typeof Symbol === 'function' && Symbol.for;
- var REACT_ELEMENT_TYPE = hasSymbol ? Symbol.for('react.element') : 0xeac7;
- var REACT_PORTAL_TYPE = hasSymbol ? Symbol.for('react.portal') : 0xeaca;
- var REACT_FRAGMENT_TYPE = hasSymbol ? Symbol.for('react.fragment') : 0xeacb;
- var REACT_STRICT_MODE_TYPE = hasSymbol ? Symbol.for('react.strict_mode') : 0xeacc;
- var REACT_PROFILER_TYPE = hasSymbol ? Symbol.for('react.profiler') : 0xead2;
- var REACT_PROVIDER_TYPE = hasSymbol ? Symbol.for('react.provider') : 0xeacd;
- var REACT_CONTEXT_TYPE = hasSymbol ? Symbol.for('react.context') : 0xeace; // TODO: We don't use AsyncMode or ConcurrentMode anymore. They were temporary
- var REACT_CONCURRENT_MODE_TYPE = hasSymbol ? Symbol.for('react.concurrent_mode') : 0xeacf;
- var REACT_FORWARD_REF_TYPE = hasSymbol ? Symbol.for('react.forward_ref') : 0xead0;
- var REACT_SUSPENSE_TYPE = hasSymbol ? Symbol.for('react.suspense') : 0xead1;
- var REACT_SUSPENSE_LIST_TYPE = hasSymbol ? Symbol.for('react.suspense_list') : 0xead8;
- var REACT_MEMO_TYPE = hasSymbol ? Symbol.for('react.memo') : 0xead3;
- var REACT_LAZY_TYPE = hasSymbol ? Symbol.for('react.lazy') : 0xead4;
- var REACT_BLOCK_TYPE = hasSymbol ? Symbol.for('react.block') : 0xead9;
- var REACT_FUNDAMENTAL_TYPE = hasSymbol ? Symbol.for('react.fundamental') : 0xead5;
- var REACT_RESPONDER_TYPE = hasSymbol ? Symbol.for('react.responder') : 0xead6;
- var REACT_SCOPE_TYPE = hasSymbol ? Symbol.for('react.scope') : 0xead7;
- var MAYBE_ITERATOR_SYMBOL = typeof Symbol === 'function' && Symbol.iterator;
- var FAUX_ITERATOR_SYMBOL = '@@iterator';
- function getIteratorFn(maybeIterable) {
- if (maybeIterable === null || typeof maybeIterable !== 'object') {
- return null;
- }
- var maybeIterator = MAYBE_ITERATOR_SYMBOL && maybeIterable[MAYBE_ITERATOR_SYMBOL] || maybeIterable[FAUX_ITERATOR_SYMBOL];
- if (typeof maybeIterator === 'function') {
- return maybeIterator;
- }
- return null;
- }
- /**
- * Keeps track of the current dispatcher.
- */
- var ReactCurrentDispatcher = {
- /**
- * @internal
- * @type {ReactComponent}
- */
- current: null
- };
- /**
- * Keeps track of the current batch's configuration such as how long an update
- * should suspend for if it needs to.
- */
- var ReactCurrentBatchConfig = {
- suspense: null
- };
- /**
- * Keeps track of the current owner.
- *
- * The current owner is the component who should own any components that are
- * currently being constructed.
- */
- var ReactCurrentOwner = {
- /**
- * @internal
- * @type {ReactComponent}
- */
- current: null
- };
- var BEFORE_SLASH_RE = /^(.*)[\\\/]/;
- function describeComponentFrame (name, source, ownerName) {
- var sourceInfo = '';
- if (source) {
- var path = source.fileName;
- var fileName = path.replace(BEFORE_SLASH_RE, '');
- {
- // In DEV, include code for a common special case:
- // prefer "folder/index.js" instead of just "index.js".
- if (/^index\./.test(fileName)) {
- var match = path.match(BEFORE_SLASH_RE);
- if (match) {
- var pathBeforeSlash = match[1];
- if (pathBeforeSlash) {
- var folderName = pathBeforeSlash.replace(BEFORE_SLASH_RE, '');
- fileName = folderName + '/' + fileName;
- }
- }
- }
- }
- sourceInfo = ' (at ' + fileName + ':' + source.lineNumber + ')';
- } else if (ownerName) {
- sourceInfo = ' (created by ' + ownerName + ')';
- }
- return '\n in ' + (name || 'Unknown') + sourceInfo;
- }
- var Resolved = 1;
- function refineResolvedLazyComponent(lazyComponent) {
- return lazyComponent._status === Resolved ? lazyComponent._result : null;
- }
- function getWrappedName(outerType, innerType, wrapperName) {
- var functionName = innerType.displayName || innerType.name || '';
- return outerType.displayName || (functionName !== '' ? wrapperName + "(" + functionName + ")" : wrapperName);
- }
- function getComponentName(type) {
- if (type == null) {
- // Host root, text node or just invalid type.
- return null;
- }
- {
- if (typeof type.tag === 'number') {
- error('Received an unexpected object in getComponentName(). ' + 'This is likely a bug in React. Please file an issue.');
- }
- }
- if (typeof type === 'function') {
- return type.displayName || type.name || null;
- }
- if (typeof type === 'string') {
- return type;
- }
- switch (type) {
- case REACT_FRAGMENT_TYPE:
- return 'Fragment';
- case REACT_PORTAL_TYPE:
- return 'Portal';
- case REACT_PROFILER_TYPE:
- return "Profiler";
- case REACT_STRICT_MODE_TYPE:
- return 'StrictMode';
- case REACT_SUSPENSE_TYPE:
- return 'Suspense';
- case REACT_SUSPENSE_LIST_TYPE:
- return 'SuspenseList';
- }
- if (typeof type === 'object') {
- switch (type.$$typeof) {
- case REACT_CONTEXT_TYPE:
- return 'Context.Consumer';
- case REACT_PROVIDER_TYPE:
- return 'Context.Provider';
- case REACT_FORWARD_REF_TYPE:
- return getWrappedName(type, type.render, 'ForwardRef');
- case REACT_MEMO_TYPE:
- return getComponentName(type.type);
- case REACT_BLOCK_TYPE:
- return getComponentName(type.render);
- case REACT_LAZY_TYPE:
- {
- var thenable = type;
- var resolvedThenable = refineResolvedLazyComponent(thenable);
- if (resolvedThenable) {
- return getComponentName(resolvedThenable);
- }
- break;
- }
- }
- }
- return null;
- }
- var ReactDebugCurrentFrame = {};
- var currentlyValidatingElement = null;
- function setCurrentlyValidatingElement(element) {
- {
- currentlyValidatingElement = element;
- }
- }
- {
- // Stack implementation injected by the current renderer.
- ReactDebugCurrentFrame.getCurrentStack = null;
- ReactDebugCurrentFrame.getStackAddendum = function () {
- var stack = ''; // Add an extra top frame while an element is being validated
- if (currentlyValidatingElement) {
- var name = getComponentName(currentlyValidatingElement.type);
- var owner = currentlyValidatingElement._owner;
- stack += describeComponentFrame(name, currentlyValidatingElement._source, owner && getComponentName(owner.type));
- } // Delegate to the injected renderer-specific implementation
- var impl = ReactDebugCurrentFrame.getCurrentStack;
- if (impl) {
- stack += impl() || '';
- }
- return stack;
- };
- }
- /**
- * Used by act() to track whether you're inside an act() scope.
- */
- var IsSomeRendererActing = {
- current: false
- };
- var ReactSharedInternals = {
- ReactCurrentDispatcher: ReactCurrentDispatcher,
- ReactCurrentBatchConfig: ReactCurrentBatchConfig,
- ReactCurrentOwner: ReactCurrentOwner,
- IsSomeRendererActing: IsSomeRendererActing,
- // Used by renderers to avoid bundling object-assign twice in UMD bundles:
- assign: _assign
- };
- {
- _assign(ReactSharedInternals, {
- // These should not be included in production.
- ReactDebugCurrentFrame: ReactDebugCurrentFrame,
- // Shim for React DOM 16.0.0 which still destructured (but not used) this.
- // TODO: remove in React 17.0.
- ReactComponentTreeHook: {}
- });
- }
- // by calls to these methods by a Babel plugin.
- //
- // In PROD (or in packages without access to React internals),
- // they are left as they are instead.
- function warn(format) {
- {
- for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
- args[_key - 1] = arguments[_key];
- }
- printWarning('warn', format, args);
- }
- }
- function error(format) {
- {
- for (var _len2 = arguments.length, args = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) {
- args[_key2 - 1] = arguments[_key2];
- }
- printWarning('error', format, args);
- }
- }
- function printWarning(level, format, args) {
- // When changing this logic, you might want to also
- // update consoleWithStackDev.www.js as well.
- {
- var hasExistingStack = args.length > 0 && typeof args[args.length - 1] === 'string' && args[args.length - 1].indexOf('\n in') === 0;
- if (!hasExistingStack) {
- var ReactDebugCurrentFrame = ReactSharedInternals.ReactDebugCurrentFrame;
- var stack = ReactDebugCurrentFrame.getStackAddendum();
- if (stack !== '') {
- format += '%s';
- args = args.concat([stack]);
- }
- }
- var argsWithFormat = args.map(function (item) {
- return '' + item;
- }); // Careful: RN currently depends on this prefix
- argsWithFormat.unshift('Warning: ' + format); // We intentionally don't use spread (or .apply) directly because it
- // breaks IE9: https://github.com/facebook/react/issues/13610
- // eslint-disable-next-line react-internal/no-production-logging
- Function.prototype.apply.call(console[level], console, argsWithFormat);
- try {
- // --- Welcome to debugging React ---
- // This error was thrown as a convenience so that you can use this stack
- // to find the callsite that caused this warning to fire.
- var argIndex = 0;
- var message = 'Warning: ' + format.replace(/%s/g, function () {
- return args[argIndex++];
- });
- throw new Error(message);
- } catch (x) {}
- }
- }
- var didWarnStateUpdateForUnmountedComponent = {};
- function warnNoop(publicInstance, callerName) {
- {
- var _constructor = publicInstance.constructor;
- var componentName = _constructor && (_constructor.displayName || _constructor.name) || 'ReactClass';
- var warningKey = componentName + "." + callerName;
- if (didWarnStateUpdateForUnmountedComponent[warningKey]) {
- return;
- }
- error("Can't call %s on a component that is not yet mounted. " + 'This is a no-op, but it might indicate a bug in your application. ' + 'Instead, assign to `this.state` directly or define a `state = {};` ' + 'class property with the desired state in the %s component.', callerName, componentName);
- didWarnStateUpdateForUnmountedComponent[warningKey] = true;
- }
- }
- /**
- * This is the abstract API for an update queue.
- */
- var ReactNoopUpdateQueue = {
- /**
- * Checks whether or not this composite component is mounted.
- * @param {ReactClass} publicInstance The instance we want to test.
- * @return {boolean} True if mounted, false otherwise.
- * @protected
- * @final
- */
- isMounted: function (publicInstance) {
- return false;
- },
- /**
- * Forces an update. This should only be invoked when it is known with
- * certainty that we are **not** in a DOM transaction.
- *
- * You may want to call this when you know that some deeper aspect of the
- * component's state has changed but `setState` was not called.
- *
- * This will not invoke `shouldComponentUpdate`, but it will invoke
- * `componentWillUpdate` and `componentDidUpdate`.
- *
- * @param {ReactClass} publicInstance The instance that should rerender.
- * @param {?function} callback Called after component is updated.
- * @param {?string} callerName name of the calling function in the public API.
- * @internal
- */
- enqueueForceUpdate: function (publicInstance, callback, callerName) {
- warnNoop(publicInstance, 'forceUpdate');
- },
- /**
- * Replaces all of the state. Always use this or `setState` to mutate state.
- * You should treat `this.state` as immutable.
- *
- * There is no guarantee that `this.state` will be immediately updated, so
- * accessing `this.state` after calling this method may return the old value.
- *
- * @param {ReactClass} publicInstance The instance that should rerender.
- * @param {object} completeState Next state.
- * @param {?function} callback Called after component is updated.
- * @param {?string} callerName name of the calling function in the public API.
- * @internal
- */
- enqueueReplaceState: function (publicInstance, completeState, callback, callerName) {
- warnNoop(publicInstance, 'replaceState');
- },
- /**
- * Sets a subset of the state. This only exists because _pendingState is
- * internal. This provides a merging strategy that is not available to deep
- * properties which is confusing. TODO: Expose pendingState or don't use it
- * during the merge.
- *
- * @param {ReactClass} publicInstance The instance that should rerender.
- * @param {object} partialState Next partial state to be merged with state.
- * @param {?function} callback Called after component is updated.
- * @param {?string} Name of the calling function in the public API.
- * @internal
- */
- enqueueSetState: function (publicInstance, partialState, callback, callerName) {
- warnNoop(publicInstance, 'setState');
- }
- };
- var emptyObject = {};
- {
- Object.freeze(emptyObject);
- }
- /**
- * Base class helpers for the updating state of a component.
- */
- function Component(props, context, updater) {
- this.props = props;
- this.context = context; // If a component has string refs, we will assign a different object later.
- this.refs = emptyObject; // We initialize the default updater but the real one gets injected by the
- // renderer.
- this.updater = updater || ReactNoopUpdateQueue;
- }
- Component.prototype.isReactComponent = {};
- /**
- * Sets a subset of the state. Always use this to mutate
- * state. You should treat `this.state` as immutable.
- *
- * There is no guarantee that `this.state` will be immediately updated, so
- * accessing `this.state` after calling this method may return the old value.
- *
- * There is no guarantee that calls to `setState` will run synchronously,
- * as they may eventually be batched together. You can provide an optional
- * callback that will be executed when the call to setState is actually
- * completed.
- *
- * When a function is provided to setState, it will be called at some point in
- * the future (not synchronously). It will be called with the up to date
- * component arguments (state, props, context). These values can be different
- * from this.* because your function may be called after receiveProps but before
- * shouldComponentUpdate, and this new state, props, and context will not yet be
- * assigned to this.
- *
- * @param {object|function} partialState Next partial state or function to
- * produce next partial state to be merged with current state.
- * @param {?function} callback Called after state is updated.
- * @final
- * @protected
- */
- Component.prototype.setState = function (partialState, callback) {
- if (!(typeof partialState === 'object' || typeof partialState === 'function' || partialState == null)) {
- {
- throw Error( "setState(...): takes an object of state variables to update or a function which returns an object of state variables." );
- }
- }
- this.updater.enqueueSetState(this, partialState, callback, 'setState');
- };
- /**
- * Forces an update. This should only be invoked when it is known with
- * certainty that we are **not** in a DOM transaction.
- *
- * You may want to call this when you know that some deeper aspect of the
- * component's state has changed but `setState` was not called.
- *
- * This will not invoke `shouldComponentUpdate`, but it will invoke
- * `componentWillUpdate` and `componentDidUpdate`.
- *
- * @param {?function} callback Called after update is complete.
- * @final
- * @protected
- */
- Component.prototype.forceUpdate = function (callback) {
- this.updater.enqueueForceUpdate(this, callback, 'forceUpdate');
- };
- /**
- * Deprecated APIs. These APIs used to exist on classic React classes but since
- * we would like to deprecate them, we're not going to move them over to this
- * modern base class. Instead, we define a getter that warns if it's accessed.
- */
- {
- var deprecatedAPIs = {
- isMounted: ['isMounted', 'Instead, make sure to clean up subscriptions and pending requests in ' + 'componentWillUnmount to prevent memory leaks.'],
- replaceState: ['replaceState', 'Refactor your code to use setState instead (see ' + 'https://github.com/facebook/react/issues/3236).']
- };
- var defineDeprecationWarning = function (methodName, info) {
- Object.defineProperty(Component.prototype, methodName, {
- get: function () {
- warn('%s(...) is deprecated in plain JavaScript React classes. %s', info[0], info[1]);
- return undefined;
- }
- });
- };
- for (var fnName in deprecatedAPIs) {
- if (deprecatedAPIs.hasOwnProperty(fnName)) {
- defineDeprecationWarning(fnName, deprecatedAPIs[fnName]);
- }
- }
- }
- function ComponentDummy() {}
- ComponentDummy.prototype = Component.prototype;
- /**
- * Convenience component with default shallow equality check for sCU.
- */
- function PureComponent(props, context, updater) {
- this.props = props;
- this.context = context; // If a component has string refs, we will assign a different object later.
- this.refs = emptyObject;
- this.updater = updater || ReactNoopUpdateQueue;
- }
- var pureComponentPrototype = PureComponent.prototype = new ComponentDummy();
- pureComponentPrototype.constructor = PureComponent; // Avoid an extra prototype jump for these methods.
- _assign(pureComponentPrototype, Component.prototype);
- pureComponentPrototype.isPureReactComponent = true;
- // an immutable object with a single mutable value
- function createRef() {
- var refObject = {
- current: null
- };
- {
- Object.seal(refObject);
- }
- return refObject;
- }
- var hasOwnProperty = Object.prototype.hasOwnProperty;
- var RESERVED_PROPS = {
- key: true,
- ref: true,
- __self: true,
- __source: true
- };
- var specialPropKeyWarningShown, specialPropRefWarningShown, didWarnAboutStringRefs;
- {
- didWarnAboutStringRefs = {};
- }
- function hasValidRef(config) {
- {
- if (hasOwnProperty.call(config, 'ref')) {
- var getter = Object.getOwnPropertyDescriptor(config, 'ref').get;
- if (getter && getter.isReactWarning) {
- return false;
- }
- }
- }
- return config.ref !== undefined;
- }
- function hasValidKey(config) {
- {
- if (hasOwnProperty.call(config, 'key')) {
- var getter = Object.getOwnPropertyDescriptor(config, 'key').get;
- if (getter && getter.isReactWarning) {
- return false;
- }
- }
- }
- return config.key !== undefined;
- }
- function defineKeyPropWarningGetter(props, displayName) {
- var warnAboutAccessingKey = function () {
- {
- if (!specialPropKeyWarningShown) {
- specialPropKeyWarningShown = true;
- error('%s: `key` is not a prop. Trying to access it will result ' + 'in `undefined` being returned. If you need to access the same ' + 'value within the child component, you should pass it as a different ' + 'prop. (https://fb.me/react-special-props)', displayName);
- }
- }
- };
- warnAboutAccessingKey.isReactWarning = true;
- Object.defineProperty(props, 'key', {
- get: warnAboutAccessingKey,
- configurable: true
- });
- }
- function defineRefPropWarningGetter(props, displayName) {
- var warnAboutAccessingRef = function () {
- {
- if (!specialPropRefWarningShown) {
- specialPropRefWarningShown = true;
- error('%s: `ref` is not a prop. Trying to access it will result ' + 'in `undefined` being returned. If you need to access the same ' + 'value within the child component, you should pass it as a different ' + 'prop. (https://fb.me/react-special-props)', displayName);
- }
- }
- };
- warnAboutAccessingRef.isReactWarning = true;
- Object.defineProperty(props, 'ref', {
- get: warnAboutAccessingRef,
- configurable: true
- });
- }
- function warnIfStringRefCannotBeAutoConverted(config) {
- {
- if (typeof config.ref === 'string' && ReactCurrentOwner.current && config.__self && ReactCurrentOwner.current.stateNode !== config.__self) {
- var componentName = getComponentName(ReactCurrentOwner.current.type);
- if (!didWarnAboutStringRefs[componentName]) {
- error('Component "%s" contains the string ref "%s". ' + 'Support for string refs will be removed in a future major release. ' + 'This case cannot be automatically converted to an arrow function. ' + 'We ask you to manually fix this case by using useRef() or createRef() instead. ' + 'Learn more about using refs safely here: ' + 'https://fb.me/react-strict-mode-string-ref', getComponentName(ReactCurrentOwner.current.type), config.ref);
- didWarnAboutStringRefs[componentName] = true;
- }
- }
- }
- }
- /**
- * Factory method to create a new React element. This no longer adheres to
- * the class pattern, so do not use new to call it. Also, instanceof check
- * will not work. Instead test $$typeof field against Symbol.for('react.element') to check
- * if something is a React Element.
- *
- * @param {*} type
- * @param {*} props
- * @param {*} key
- * @param {string|object} ref
- * @param {*} owner
- * @param {*} self A *temporary* helper to detect places where `this` is
- * different from the `owner` when React.createElement is called, so that we
- * can warn. We want to get rid of owner and replace string `ref`s with arrow
- * functions, and as long as `this` and owner are the same, there will be no
- * change in behavior.
- * @param {*} source An annotation object (added by a transpiler or otherwise)
- * indicating filename, line number, and/or other information.
- * @internal
- */
- var ReactElement = function (type, key, ref, self, source, owner, props) {
- var element = {
- // This tag allows us to uniquely identify this as a React Element
- $$typeof: REACT_ELEMENT_TYPE,
- // Built-in properties that belong on the element
- type: type,
- key: key,
- ref: ref,
- props: props,
- // Record the component responsible for creating this element.
- _owner: owner
- };
- {
- // The validation flag is currently mutative. We put it on
- // an external backing store so that we can freeze the whole object.
- // This can be replaced with a WeakMap once they are implemented in
- // commonly used development environments.
- element._store = {}; // To make comparing ReactElements easier for testing purposes, we make
- // the validation flag non-enumerable (where possible, which should
- // include every environment we run tests in), so the test framework
- // ignores it.
- Object.defineProperty(element._store, 'validated', {
- configurable: false,
- enumerable: false,
- writable: true,
- value: false
- }); // self and source are DEV only properties.
- Object.defineProperty(element, '_self', {
- configurable: false,
- enumerable: false,
- writable: false,
- value: self
- }); // Two elements created in two different places should be considered
- // equal for testing purposes and therefore we hide it from enumeration.
- Object.defineProperty(element, '_source', {
- configurable: false,
- enumerable: false,
- writable: false,
- value: source
- });
- if (Object.freeze) {
- Object.freeze(element.props);
- Object.freeze(element);
- }
- }
- return element;
- };
- /**
- * Create and return a new ReactElement of the given type.
- * See https://reactjs.org/docs/react-api.html#createelement
- */
- function createElement(type, config, children) {
- var propName; // Reserved names are extracted
- var props = {};
- var key = null;
- var ref = null;
- var self = null;
- var source = null;
- if (config != null) {
- if (hasValidRef(config)) {
- ref = config.ref;
- {
- warnIfStringRefCannotBeAutoConverted(config);
- }
- }
- if (hasValidKey(config)) {
- key = '' + config.key;
- }
- self = config.__self === undefined ? null : config.__self;
- source = config.__source === undefined ? null : config.__source; // Remaining properties are added to a new props object
- for (propName in config) {
- if (hasOwnProperty.call(config, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) {
- props[propName] = config[propName];
- }
- }
- } // Children can be more than one argument, and those are transferred onto
- // the newly allocated props object.
- var childrenLength = arguments.length - 2;
- if (childrenLength === 1) {
- props.children = children;
- } else if (childrenLength > 1) {
- var childArray = Array(childrenLength);
- for (var i = 0; i < childrenLength; i++) {
- childArray[i] = arguments[i + 2];
- }
- {
- if (Object.freeze) {
- Object.freeze(childArray);
- }
- }
- props.children = childArray;
- } // Resolve default props
- if (type && type.defaultProps) {
- var defaultProps = type.defaultProps;
- for (propName in defaultProps) {
- if (props[propName] === undefined) {
- props[propName] = defaultProps[propName];
- }
- }
- }
- {
- if (key || ref) {
- var displayName = typeof type === 'function' ? type.displayName || type.name || 'Unknown' : type;
- if (key) {
- defineKeyPropWarningGetter(props, displayName);
- }
- if (ref) {
- defineRefPropWarningGetter(props, displayName);
- }
- }
- }
- return ReactElement(type, key, ref, self, source, ReactCurrentOwner.current, props);
- }
- function cloneAndReplaceKey(oldElement, newKey) {
- var newElement = ReactElement(oldElement.type, newKey, oldElement.ref, oldElement._self, oldElement._source, oldElement._owner, oldElement.props);
- return newElement;
- }
- /**
- * Clone and return a new ReactElement using element as the starting point.
- * See https://reactjs.org/docs/react-api.html#cloneelement
- */
- function cloneElement(element, config, children) {
- if (!!(element === null || element === undefined)) {
- {
- throw Error( "React.cloneElement(...): The argument must be a React element, but you passed " + element + "." );
- }
- }
- var propName; // Original props are copied
- var props = _assign({}, element.props); // Reserved names are extracted
- var key = element.key;
- var ref = element.ref; // Self is preserved since the owner is preserved.
- var self = element._self; // Source is preserved since cloneElement is unlikely to be targeted by a
- // transpiler, and the original source is probably a better indicator of the
- // true owner.
- var source = element._source; // Owner will be preserved, unless ref is overridden
- var owner = element._owner;
- if (config != null) {
- if (hasValidRef(config)) {
- // Silently steal the ref from the parent.
- ref = config.ref;
- owner = ReactCurrentOwner.current;
- }
- if (hasValidKey(config)) {
- key = '' + config.key;
- } // Remaining properties override existing props
- var defaultProps;
- if (element.type && element.type.defaultProps) {
- defaultProps = element.type.defaultProps;
- }
- for (propName in config) {
- if (hasOwnProperty.call(config, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) {
- if (config[propName] === undefined && defaultProps !== undefined) {
- // Resolve default props
- props[propName] = defaultProps[propName];
- } else {
- props[propName] = config[propName];
- }
- }
- }
- } // Children can be more than one argument, and those are transferred onto
- // the newly allocated props object.
- var childrenLength = arguments.length - 2;
- if (childrenLength === 1) {
- props.children = children;
- } else if (childrenLength > 1) {
- var childArray = Array(childrenLength);
- for (var i = 0; i < childrenLength; i++) {
- childArray[i] = arguments[i + 2];
- }
- props.children = childArray;
- }
- return ReactElement(element.type, key, ref, self, source, owner, props);
- }
- /**
- * Verifies the object is a ReactElement.
- * See https://reactjs.org/docs/react-api.html#isvalidelement
- * @param {?object} object
- * @return {boolean} True if `object` is a ReactElement.
- * @final
- */
- function isValidElement(object) {
- return typeof object === 'object' && object !== null && object.$$typeof === REACT_ELEMENT_TYPE;
- }
- var SEPARATOR = '.';
- var SUBSEPARATOR = ':';
- /**
- * Escape and wrap key so it is safe to use as a reactid
- *
- * @param {string} key to be escaped.
- * @return {string} the escaped key.
- */
- function escape(key) {
- var escapeRegex = /[=:]/g;
- var escaperLookup = {
- '=': '=0',
- ':': '=2'
- };
- var escapedString = ('' + key).replace(escapeRegex, function (match) {
- return escaperLookup[match];
- });
- return '$' + escapedString;
- }
- /**
- * TODO: Test that a single child and an array with one item have the same key
- * pattern.
- */
- var didWarnAboutMaps = false;
- var userProvidedKeyEscapeRegex = /\/+/g;
- function escapeUserProvidedKey(text) {
- return ('' + text).replace(userProvidedKeyEscapeRegex, '$&/');
- }
- var POOL_SIZE = 10;
- var traverseContextPool = [];
- function getPooledTraverseContext(mapResult, keyPrefix, mapFunction, mapContext) {
- if (traverseContextPool.length) {
- var traverseContext = traverseContextPool.pop();
- traverseContext.result = mapResult;
- traverseContext.keyPrefix = keyPrefix;
- traverseContext.func = mapFunction;
- traverseContext.context = mapContext;
- traverseContext.count = 0;
- return traverseContext;
- } else {
- return {
- result: mapResult,
- keyPrefix: keyPrefix,
- func: mapFunction,
- context: mapContext,
- count: 0
- };
- }
- }
- function releaseTraverseContext(traverseContext) {
- traverseContext.result = null;
- traverseContext.keyPrefix = null;
- traverseContext.func = null;
- traverseContext.context = null;
- traverseContext.count = 0;
- if (traverseContextPool.length < POOL_SIZE) {
- traverseContextPool.push(traverseContext);
- }
- }
- /**
- * @param {?*} children Children tree container.
- * @param {!string} nameSoFar Name of the key path so far.
- * @param {!function} callback Callback to invoke with each child found.
- * @param {?*} traverseContext Used to pass information throughout the traversal
- * process.
- * @return {!number} The number of children in this subtree.
- */
- function traverseAllChildrenImpl(children, nameSoFar, callback, traverseContext) {
- var type = typeof children;
- if (type === 'undefined' || type === 'boolean') {
- // All of the above are perceived as null.
- children = null;
- }
- var invokeCallback = false;
- if (children === null) {
- invokeCallback = true;
- } else {
- switch (type) {
- case 'string':
- case 'number':
- invokeCallback = true;
- break;
- case 'object':
- switch (children.$$typeof) {
- case REACT_ELEMENT_TYPE:
- case REACT_PORTAL_TYPE:
- invokeCallback = true;
- }
- }
- }
- if (invokeCallback) {
- callback(traverseContext, children, // If it's the only child, treat the name as if it was wrapped in an array
- // so that it's consistent if the number of children grows.
- nameSoFar === '' ? SEPARATOR + getComponentKey(children, 0) : nameSoFar);
- return 1;
- }
- var child;
- var nextName;
- var subtreeCount = 0; // Count of children found in the current subtree.
- var nextNamePrefix = nameSoFar === '' ? SEPARATOR : nameSoFar + SUBSEPARATOR;
- if (Array.isArray(children)) {
- for (var i = 0; i < children.length; i++) {
- child = children[i];
- nextName = nextNamePrefix + getComponentKey(child, i);
- subtreeCount += traverseAllChildrenImpl(child, nextName, callback, traverseContext);
- }
- } else {
- var iteratorFn = getIteratorFn(children);
- if (typeof iteratorFn === 'function') {
- {
- // Warn about using Maps as children
- if (iteratorFn === children.entries) {
- if (!didWarnAboutMaps) {
- warn('Using Maps as children is deprecated and will be removed in ' + 'a future major release. Consider converting children to ' + 'an array of keyed ReactElements instead.');
- }
- didWarnAboutMaps = true;
- }
- }
- var iterator = iteratorFn.call(children);
- var step;
- var ii = 0;
- while (!(step = iterator.next()).done) {
- child = step.value;
- nextName = nextNamePrefix + getComponentKey(child, ii++);
- subtreeCount += traverseAllChildrenImpl(child, nextName, callback, traverseContext);
- }
- } else if (type === 'object') {
- var addendum = '';
- {
- addendum = ' If you meant to render a collection of children, use an array ' + 'instead.' + ReactDebugCurrentFrame.getStackAddendum();
- }
- var childrenString = '' + children;
- {
- {
- throw Error( "Objects are not valid as a React child (found: " + (childrenString === '[object Object]' ? 'object with keys {' + Object.keys(children).join(', ') + '}' : childrenString) + ")." + addendum );
- }
- }
- }
- }
- return subtreeCount;
- }
- /**
- * Traverses children that are typically specified as `props.children`, but
- * might also be specified through attributes:
- *
- * - `traverseAllChildren(this.props.children, ...)`
- * - `traverseAllChildren(this.props.leftPanelChildren, ...)`
- *
- * The `traverseContext` is an optional argument that is passed through the
- * entire traversal. It can be used to store accumulations or anything else that
- * the callback might find relevant.
- *
- * @param {?*} children Children tree object.
- * @param {!function} callback To invoke upon traversing each child.
- * @param {?*} traverseContext Context for traversal.
- * @return {!number} The number of children in this subtree.
- */
- function traverseAllChildren(children, callback, traverseContext) {
- if (children == null) {
- return 0;
- }
- return traverseAllChildrenImpl(children, '', callback, traverseContext);
- }
- /**
- * Generate a key string that identifies a component within a set.
- *
- * @param {*} component A component that could contain a manual key.
- * @param {number} index Index that is used if a manual key is not provided.
- * @return {string}
- */
- function getComponentKey(component, index) {
- // Do some typechecking here since we call this blindly. We want to ensure
- // that we don't block potential future ES APIs.
- if (typeof component === 'object' && component !== null && component.key != null) {
- // Explicit key
- return escape(component.key);
- } // Implicit key determined by the index in the set
- return index.toString(36);
- }
- function forEachSingleChild(bookKeeping, child, name) {
- var func = bookKeeping.func,
- context = bookKeeping.context;
- func.call(context, child, bookKeeping.count++);
- }
- /**
- * Iterates through children that are typically specified as `props.children`.
- *
- * See https://reactjs.org/docs/react-api.html#reactchildrenforeach
- *
- * The provided forEachFunc(child, index) will be called for each
- * leaf child.
- *
- * @param {?*} children Children tree container.
- * @param {function(*, int)} forEachFunc
- * @param {*} forEachContext Context for forEachContext.
- */
- function forEachChildren(children, forEachFunc, forEachContext) {
- if (children == null) {
- return children;
- }
- var traverseContext = getPooledTraverseContext(null, null, forEachFunc, forEachContext);
- traverseAllChildren(children, forEachSingleChild, traverseContext);
- releaseTraverseContext(traverseContext);
- }
- function mapSingleChildIntoContext(bookKeeping, child, childKey) {
- var result = bookKeeping.result,
- keyPrefix = bookKeeping.keyPrefix,
- func = bookKeeping.func,
- context = bookKeeping.context;
- var mappedChild = func.call(context, child, bookKeeping.count++);
- if (Array.isArray(mappedChild)) {
- mapIntoWithKeyPrefixInternal(mappedChild, result, childKey, function (c) {
- return c;
- });
- } else if (mappedChild != null) {
- if (isValidElement(mappedChild)) {
- mappedChild = cloneAndReplaceKey(mappedChild, // Keep both the (mapped) and old keys if they differ, just as
- // traverseAllChildren used to do for objects as children
- keyPrefix + (mappedChild.key && (!child || child.key !== mappedChild.key) ? escapeUserProvidedKey(mappedChild.key) + '/' : '') + childKey);
- }
- result.push(mappedChild);
- }
- }
- function mapIntoWithKeyPrefixInternal(children, array, prefix, func, context) {
- var escapedPrefix = '';
- if (prefix != null) {
- escapedPrefix = escapeUserProvidedKey(prefix) + '/';
- }
- var traverseContext = getPooledTraverseContext(array, escapedPrefix, func, context);
- traverseAllChildren(children, mapSingleChildIntoContext, traverseContext);
- releaseTraverseContext(traverseContext);
- }
- /**
- * Maps children that are typically specified as `props.children`.
- *
- * See https://reactjs.org/docs/react-api.html#reactchildrenmap
- *
- * The provided mapFunction(child, key, index) will be called for each
- * leaf child.
- *
- * @param {?*} children Children tree container.
- * @param {function(*, int)} func The map function.
- * @param {*} context Context for mapFunction.
- * @return {object} Object containing the ordered map of results.
- */
- function mapChildren(children, func, context) {
- if (children == null) {
- return children;
- }
- var result = [];
- mapIntoWithKeyPrefixInternal(children, result, null, func, context);
- return result;
- }
- /**
- * Count the number of children that are typically specified as
- * `props.children`.
- *
- * See https://reactjs.org/docs/react-api.html#reactchildrencount
- *
- * @param {?*} children Children tree container.
- * @return {number} The number of children.
- */
- function countChildren(children) {
- return traverseAllChildren(children, function () {
- return null;
- }, null);
- }
- /**
- * Flatten a children object (typically specified as `props.children`) and
- * return an array with appropriately re-keyed children.
- *
- * See https://reactjs.org/docs/react-api.html#reactchildrentoarray
- */
- function toArray(children) {
- var result = [];
- mapIntoWithKeyPrefixInternal(children, result, null, function (child) {
- return child;
- });
- return result;
- }
- /**
- * Returns the first child in a collection of children and verifies that there
- * is only one child in the collection.
- *
- * See https://reactjs.org/docs/react-api.html#reactchildrenonly
- *
- * The current implementation of this function assumes that a single child gets
- * passed without a wrapper, but the purpose of this helper function is to
- * abstract away the particular structure of children.
- *
- * @param {?object} children Child collection structure.
- * @return {ReactElement} The first and only `ReactElement` contained in the
- * structure.
- */
- function onlyChild(children) {
- if (!isValidElement(children)) {
- {
- throw Error( "React.Children.only expected to receive a single React element child." );
- }
- }
- return children;
- }
- function createContext(defaultValue, calculateChangedBits) {
- if (calculateChangedBits === undefined) {
- calculateChangedBits = null;
- } else {
- {
- if (calculateChangedBits !== null && typeof calculateChangedBits !== 'function') {
- error('createContext: Expected the optional second argument to be a ' + 'function. Instead received: %s', calculateChangedBits);
- }
- }
- }
- var context = {
- $$typeof: REACT_CONTEXT_TYPE,
- _calculateChangedBits: calculateChangedBits,
- // As a workaround to support multiple concurrent renderers, we categorize
- // some renderers as primary and others as secondary. We only expect
- // there to be two concurrent renderers at most: React Native (primary) and
- // Fabric (secondary); React DOM (primary) and React ART (secondary).
- // Secondary renderers store their context values on separate fields.
- _currentValue: defaultValue,
- _currentValue2: defaultValue,
- // Used to track how many concurrent renderers this context currently
- // supports within in a single renderer. Such as parallel server rendering.
- _threadCount: 0,
- // These are circular
- Provider: null,
- Consumer: null
- };
- context.Provider = {
- $$typeof: REACT_PROVIDER_TYPE,
- _context: context
- };
- var hasWarnedAboutUsingNestedContextConsumers = false;
- var hasWarnedAboutUsingConsumerProvider = false;
- {
- // A separate object, but proxies back to the original context object for
- // backwards compatibility. It has a different $$typeof, so we can properly
- // warn for the incorrect usage of Context as a Consumer.
- var Consumer = {
- $$typeof: REACT_CONTEXT_TYPE,
- _context: context,
- _calculateChangedBits: context._calculateChangedBits
- }; // $FlowFixMe: Flow complains about not setting a value, which is intentional here
- Object.defineProperties(Consumer, {
- Provider: {
- get: function () {
- if (!hasWarnedAboutUsingConsumerProvider) {
- hasWarnedAboutUsingConsumerProvider = true;
- error('Rendering <Context.Consumer.Provider> is not supported and will be removed in ' + 'a future major release. Did you mean to render <Context.Provider> instead?');
- }
- return context.Provider;
- },
- set: function (_Provider) {
- context.Provider = _Provider;
- }
- },
- _currentValue: {
- get: function () {
- return context._currentValue;
- },
- set: function (_currentValue) {
- context._currentValue = _currentValue;
- }
- },
- _currentValue2: {
- get: function () {
- return context._currentValue2;
- },
- set: function (_currentValue2) {
- context._currentValue2 = _currentValue2;
- }
- },
- _threadCount: {
- get: function () {
- return context._threadCount;
- },
- set: function (_threadCount) {
- context._threadCount = _threadCount;
- }
- },
- Consumer: {
- get: function () {
- if (!hasWarnedAboutUsingNestedContextConsumers) {
- hasWarnedAboutUsingNestedContextConsumers = true;
- error('Rendering <Context.Consumer.Consumer> is not supported and will be removed in ' + 'a future major release. Did you mean to render <Context.Consumer> instead?');
- }
- return context.Consumer;
- }
- }
- }); // $FlowFixMe: Flow complains about missing properties because it doesn't understand defineProperty
- context.Consumer = Consumer;
- }
- {
- context._currentRenderer = null;
- context._currentRenderer2 = null;
- }
- return context;
- }
- function lazy(ctor) {
- var lazyType = {
- $$typeof: REACT_LAZY_TYPE,
- _ctor: ctor,
- // React uses these fields to store the result.
- _status: -1,
- _result: null
- };
- {
- // In production, this would just set it on the object.
- var defaultProps;
- var propTypes;
- Object.defineProperties(lazyType, {
- defaultProps: {
- configurable: true,
- get: function () {
- return defaultProps;
- },
- set: function (newDefaultProps) {
- error('React.lazy(...): It is not supported to assign `defaultProps` to ' + 'a lazy component import. Either specify them where the component ' + 'is defined, or create a wrapping component around it.');
- defaultProps = newDefaultProps; // Match production behavior more closely:
- Object.defineProperty(lazyType, 'defaultProps', {
- enumerable: true
- });
- }
- },
- propTypes: {
- configurable: true,
- get: function () {
- return propTypes;
- },
- set: function (newPropTypes) {
- error('React.lazy(...): It is not supported to assign `propTypes` to ' + 'a lazy component import. Either specify them where the component ' + 'is defined, or create a wrapping component around it.');
- propTypes = newPropTypes; // Match production behavior more closely:
- Object.defineProperty(lazyType, 'propTypes', {
- enumerable: true
- });
- }
- }
- });
- }
- return lazyType;
- }
- function forwardRef(render) {
- {
- if (render != null && render.$$typeof === REACT_MEMO_TYPE) {
- error('forwardRef requires a render function but received a `memo` ' + 'component. Instead of forwardRef(memo(...)), use ' + 'memo(forwardRef(...)).');
- } else if (typeof render !== 'function') {
- error('forwardRef requires a render function but was given %s.', render === null ? 'null' : typeof render);
- } else {
- if (render.length !== 0 && render.length !== 2) {
- error('forwardRef render functions accept exactly two parameters: props and ref. %s', render.length === 1 ? 'Did you forget to use the ref parameter?' : 'Any additional parameter will be undefined.');
- }
- }
- if (render != null) {
- if (render.defaultProps != null || render.propTypes != null) {
- error('forwardRef render functions do not support propTypes or defaultProps. ' + 'Did you accidentally pass a React component?');
- }
- }
- }
- return {
- $$typeof: REACT_FORWARD_REF_TYPE,
- render: render
- };
- }
- function isValidElementType(type) {
- return typeof type === 'string' || typeof type === 'function' || // Note: its typeof might be other than 'symbol' or 'number' if it's a polyfill.
- type === REACT_FRAGMENT_TYPE || type === REACT_CONCURRENT_MODE_TYPE || type === REACT_PROFILER_TYPE || type === REACT_STRICT_MODE_TYPE || type === REACT_SUSPENSE_TYPE || type === REACT_SUSPENSE_LIST_TYPE || typeof type === 'object' && type !== null && (type.$$typeof === REACT_LAZY_TYPE || type.$$typeof === REACT_MEMO_TYPE || type.$$typeof === REACT_PROVIDER_TYPE || type.$$typeof === REACT_CONTEXT_TYPE || type.$$typeof === REACT_FORWARD_REF_TYPE || type.$$typeof === REACT_FUNDAMENTAL_TYPE || type.$$typeof === REACT_RESPONDER_TYPE || type.$$typeof === REACT_SCOPE_TYPE || type.$$typeof === REACT_BLOCK_TYPE);
- }
- function memo(type, compare) {
- {
- if (!isValidElementType(type)) {
- error('memo: The first argument must be a component. Instead ' + 'received: %s', type === null ? 'null' : typeof type);
- }
- }
- return {
- $$typeof: REACT_MEMO_TYPE,
- type: type,
- compare: compare === undefined ? null : compare
- };
- }
- function resolveDispatcher() {
- var dispatcher = ReactCurrentDispatcher.current;
- if (!(dispatcher !== null)) {
- {
- throw Error( "Invalid hook call. Hooks can only be called inside of the body of a function component. This could happen for one of the following reasons:\n1. You might have mismatching versions of React and the renderer (such as React DOM)\n2. You might be breaking the Rules of Hooks\n3. You might have more than one copy of React in the same app\nSee https://fb.me/react-invalid-hook-call for tips about how to debug and fix this problem." );
- }
- }
- return dispatcher;
- }
- function useContext(Context, unstable_observedBits) {
- var dispatcher = resolveDispatcher();
- {
- if (unstable_observedBits !== undefined) {
- error('useContext() second argument is reserved for future ' + 'use in React. Passing it is not supported. ' + 'You passed: %s.%s', unstable_observedBits, typeof unstable_observedBits === 'number' && Array.isArray(arguments[2]) ? '\n\nDid you call array.map(useContext)? ' + 'Calling Hooks inside a loop is not supported. ' + 'Learn more at https://fb.me/rules-of-hooks' : '');
- } // TODO: add a more generic warning for invalid values.
- if (Context._context !== undefined) {
- var realContext = Context._context; // Don't deduplicate because this legitimately causes bugs
- // and nobody should be using this in existing code.
- if (realContext.Consumer === Context) {
- error('Calling useContext(Context.Consumer) is not supported, may cause bugs, and will be ' + 'removed in a future major release. Did you mean to call useContext(Context) instead?');
- } else if (realContext.Provider === Context) {
- error('Calling useContext(Context.Provider) is not supported. ' + 'Did you mean to call useContext(Context) instead?');
- }
- }
- }
- return dispatcher.useContext(Context, unstable_observedBits);
- }
- function useState(initialState) {
- var dispatcher = resolveDispatcher();
- return dispatcher.useState(initialState);
- }
- function useReducer(reducer, initialArg, init) {
- var dispatcher = resolveDispatcher();
- return dispatcher.useReducer(reducer, initialArg, init);
- }
- function useRef(initialValue) {
- var dispatcher = resolveDispatcher();
- return dispatcher.useRef(initialValue);
- }
- function useEffect(create, deps) {
- var dispatcher = resolveDispatcher();
- return dispatcher.useEffect(create, deps);
- }
- function useLayoutEffect(create, deps) {
- var dispatcher = resolveDispatcher();
- return dispatcher.useLayoutEffect(create, deps);
- }
- function useCallback(callback, deps) {
- var dispatcher = resolveDispatcher();
- return dispatcher.useCallback(callback, deps);
- }
- function useMemo(create, deps) {
- var dispatcher = resolveDispatcher();
- return dispatcher.useMemo(create, deps);
- }
- function useImperativeHandle(ref, create, deps) {
- var dispatcher = resolveDispatcher();
- return dispatcher.useImperativeHandle(ref, create, deps);
- }
- function useDebugValue(value, formatterFn) {
- {
- var dispatcher = resolveDispatcher();
- return dispatcher.useDebugValue(value, formatterFn);
- }
- }
- var propTypesMisspellWarningShown;
- {
- propTypesMisspellWarningShown = false;
- }
- function getDeclarationErrorAddendum() {
- if (ReactCurrentOwner.current) {
- var name = getComponentName(ReactCurrentOwner.current.type);
- if (name) {
- return '\n\nCheck the render method of `' + name + '`.';
- }
- }
- return '';
- }
- function getSourceInfoErrorAddendum(source) {
- if (source !== undefined) {
- var fileName = source.fileName.replace(/^.*[\\\/]/, '');
- var lineNumber = source.lineNumber;
- return '\n\nCheck your code at ' + fileName + ':' + lineNumber + '.';
- }
- return '';
- }
- function getSourceInfoErrorAddendumForProps(elementProps) {
- if (elementProps !== null && elementProps !== undefined) {
- return getSourceInfoErrorAddendum(elementProps.__source);
- }
- return '';
- }
- /**
- * Warn if there's no key explicitly set on dynamic arrays of children or
- * object keys are not valid. This allows us to keep track of children between
- * updates.
- */
- var ownerHasKeyUseWarning = {};
- function getCurrentComponentErrorInfo(parentType) {
- var info = getDeclarationErrorAddendum();
- if (!info) {
- var parentName = typeof parentType === 'string' ? parentType : parentType.displayName || parentType.name;
- if (parentName) {
- info = "\n\nCheck the top-level render call using <" + parentName + ">.";
- }
- }
- return info;
- }
- /**
- * Warn if the element doesn't have an explicit key assigned to it.
- * This element is in an array. The array could grow and shrink or be
- * reordered. All children that haven't already been validated are required to
- * have a "key" property assigned to it. Error statuses are cached so a warning
- * will only be shown once.
- *
- * @internal
- * @param {ReactElement} element Element that requires a key.
- * @param {*} parentType element's parent's type.
- */
- function validateExplicitKey(element, parentType) {
- if (!element._store || element._store.validated || element.key != null) {
- return;
- }
- element._store.validated = true;
- var currentComponentErrorInfo = getCurrentComponentErrorInfo(parentType);
- if (ownerHasKeyUseWarning[currentComponentErrorInfo]) {
- return;
- }
- ownerHasKeyUseWarning[currentComponentErrorInfo] = true; // Usually the current owner is the offender, but if it accepts children as a
- // property, it may be the creator of the child that's responsible for
- // assigning it a key.
- var childOwner = '';
- if (element && element._owner && element._owner !== ReactCurrentOwner.current) {
- // Give the component that originally created this child.
- childOwner = " It was passed a child from " + getComponentName(element._owner.type) + ".";
- }
- setCurrentlyValidatingElement(element);
- {
- error('Each child in a list should have a unique "key" prop.' + '%s%s See https://fb.me/react-warning-keys for more information.', currentComponentErrorInfo, childOwner);
- }
- setCurrentlyValidatingElement(null);
- }
- /**
- * Ensure that every element either is passed in a static location, in an
- * array with an explicit keys property defined, or in an object literal
- * with valid key property.
- *
- * @internal
- * @param {ReactNode} node Statically passed child of any type.
- * @param {*} parentType node's parent's type.
- */
- function validateChildKeys(node, parentType) {
- if (typeof node !== 'object') {
- return;
- }
- if (Array.isArray(node)) {
- for (var i = 0; i < node.length; i++) {
- var child = node[i];
- if (isValidElement(child)) {
- validateExplicitKey(child, parentType);
- }
- }
- } else if (isValidElement(node)) {
- // This element was passed in a valid location.
- if (node._store) {
- node._store.validated = true;
- }
- } else if (node) {
- var iteratorFn = getIteratorFn(node);
- if (typeof iteratorFn === 'function') {
- // Entry iterators used to provide implicit keys,
- // but now we print a separate warning for them later.
- if (iteratorFn !== node.entries) {
- var iterator = iteratorFn.call(node);
- var step;
- while (!(step = iterator.next()).done) {
- if (isValidElement(step.value)) {
- validateExplicitKey(step.value, parentType);
- }
- }
- }
- }
- }
- }
- /**
- * Given an element, validate that its props follow the propTypes definition,
- * provided by the type.
- *
- * @param {ReactElement} element
- */
- function validatePropTypes(element) {
- {
- var type = element.type;
- if (type === null || type === undefined || typeof type === 'string') {
- return;
- }
- var name = getComponentName(type);
- var propTypes;
- if (typeof type === 'function') {
- propTypes = type.propTypes;
- } else if (typeof type === 'object' && (type.$$typeof === REACT_FORWARD_REF_TYPE || // Note: Memo only checks outer props here.
- // Inner props are checked in the reconciler.
- type.$$typeof === REACT_MEMO_TYPE)) {
- propTypes = type.propTypes;
- } else {
- return;
- }
- if (propTypes) {
- setCurrentlyValidatingElement(element);
- checkPropTypes(propTypes, element.props, 'prop', name, ReactDebugCurrentFrame.getStackAddendum);
- setCurrentlyValidatingElement(null);
- } else if (type.PropTypes !== undefined && !propTypesMisspellWarningShown) {
- propTypesMisspellWarningShown = true;
- error('Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?', name || 'Unknown');
- }
- if (typeof type.getDefaultProps === 'function' && !type.getDefaultProps.isReactClassApproved) {
- error('getDefaultProps is only used on classic React.createClass ' + 'definitions. Use a static property named `defaultProps` instead.');
- }
- }
- }
- /**
- * Given a fragment, validate that it can only be provided with fragment props
- * @param {ReactElement} fragment
- */
- function validateFragmentProps(fragment) {
- {
- setCurrentlyValidatingElement(fragment);
- var keys = Object.keys(fragment.props);
- for (var i = 0; i < keys.length; i++) {
- var key = keys[i];
- if (key !== 'children' && key !== 'key') {
- error('Invalid prop `%s` supplied to `React.Fragment`. ' + 'React.Fragment can only have `key` and `children` props.', key);
- break;
- }
- }
- if (fragment.ref !== null) {
- error('Invalid attribute `ref` supplied to `React.Fragment`.');
- }
- setCurrentlyValidatingElement(null);
- }
- }
- function createElementWithValidation(type, props, children) {
- var validType = isValidElementType(type); // We warn in this case but don't throw. We expect the element creation to
- // succeed and there will likely be errors in render.
- if (!validType) {
- var info = '';
- if (type === undefined || typeof type === 'object' && type !== null && Object.keys(type).length === 0) {
- info += ' You likely forgot to export your component from the file ' + "it's defined in, or you might have mixed up default and named imports.";
- }
- var sourceInfo = getSourceInfoErrorAddendumForProps(props);
- if (sourceInfo) {
- info += sourceInfo;
- } else {
- info += getDeclarationErrorAddendum();
- }
- var typeString;
- if (type === null) {
- typeString = 'null';
- } else if (Array.isArray(type)) {
- typeString = 'array';
- } else if (type !== undefined && type.$$typeof === REACT_ELEMENT_TYPE) {
- typeString = "<" + (getComponentName(type.type) || 'Unknown') + " />";
- info = ' Did you accidentally export a JSX literal instead of a component?';
- } else {
- typeString = typeof type;
- }
- {
- error('React.createElement: type is invalid -- expected a string (for ' + 'built-in components) or a class/function (for composite ' + 'components) but got: %s.%s', typeString, info);
- }
- }
- var element = createElement.apply(this, arguments); // The result can be nullish if a mock or a custom function is used.
- // TODO: Drop this when these are no longer allowed as the type argument.
- if (element == null) {
- return element;
- } // Skip key warning if the type isn't valid since our key validation logic
- // doesn't expect a non-string/function type and can throw confusing errors.
- // We don't want exception behavior to differ between dev and prod.
- // (Rendering will throw with a helpful message and as soon as the type is
- // fixed, the key warnings will appear.)
- if (validType) {
- for (var i = 2; i < arguments.length; i++) {
- validateChildKeys(arguments[i], type);
- }
- }
- if (type === REACT_FRAGMENT_TYPE) {
- validateFragmentProps(element);
- } else {
- validatePropTypes(element);
- }
- return element;
- }
- var didWarnAboutDeprecatedCreateFactory = false;
- function createFactoryWithValidation(type) {
- var validatedFactory = createElementWithValidation.bind(null, type);
- validatedFactory.type = type;
- {
- if (!didWarnAboutDeprecatedCreateFactory) {
- didWarnAboutDeprecatedCreateFactory = true;
- warn('React.createFactory() is deprecated and will be removed in ' + 'a future major release. Consider using JSX ' + 'or use React.createElement() directly instead.');
- } // Legacy hook: remove it
- Object.defineProperty(validatedFactory, 'type', {
- enumerable: false,
- get: function () {
- warn('Factory.type is deprecated. Access the class directly ' + 'before passing it to createFactory.');
- Object.defineProperty(this, 'type', {
- value: type
- });
- return type;
- }
- });
- }
- return validatedFactory;
- }
- function cloneElementWithValidation(element, props, children) {
- var newElement = cloneElement.apply(this, arguments);
- for (var i = 2; i < arguments.length; i++) {
- validateChildKeys(arguments[i], newElement.type);
- }
- validatePropTypes(newElement);
- return newElement;
- }
- {
- try {
- var frozenObject = Object.freeze({});
- var testMap = new Map([[frozenObject, null]]);
- var testSet = new Set([frozenObject]); // This is necessary for Rollup to not consider these unused.
- // https://github.com/rollup/rollup/issues/1771
- // TODO: we can remove these if Rollup fixes the bug.
- testMap.set(0, 0);
- testSet.add(0);
- } catch (e) {
- }
- }
- var createElement$1 = createElementWithValidation ;
- var cloneElement$1 = cloneElementWithValidation ;
- var createFactory = createFactoryWithValidation ;
- var Children = {
- map: mapChildren,
- forEach: forEachChildren,
- count: countChildren,
- toArray: toArray,
- only: onlyChild
- };
- exports.Children = Children;
- exports.Component = Component;
- exports.Fragment = REACT_FRAGMENT_TYPE;
- exports.Profiler = REACT_PROFILER_TYPE;
- exports.PureComponent = PureComponent;
- exports.StrictMode = REACT_STRICT_MODE_TYPE;
- exports.Suspense = REACT_SUSPENSE_TYPE;
- exports.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED = ReactSharedInternals;
- exports.cloneElement = cloneElement$1;
- exports.createContext = createContext;
- exports.createElement = createElement$1;
- exports.createFactory = createFactory;
- exports.createRef = createRef;
- exports.forwardRef = forwardRef;
- exports.isValidElement = isValidElement;
- exports.lazy = lazy;
- exports.memo = memo;
- exports.useCallback = useCallback;
- exports.useContext = useContext;
- exports.useDebugValue = useDebugValue;
- exports.useEffect = useEffect;
- exports.useImperativeHandle = useImperativeHandle;
- exports.useLayoutEffect = useLayoutEffect;
- exports.useMemo = useMemo;
- exports.useReducer = useReducer;
- exports.useRef = useRef;
- exports.useState = useState;
- exports.version = ReactVersion;
- })();
- }
- /***/ }),
- /***/ "./node_modules/react/index.js":
- /*!*************************************!*\
- !*** ./node_modules/react/index.js ***!
- \*************************************/
- /*! dynamic exports provided */
- /*! all exports used */
- /***/ (function(module, exports, __webpack_require__) {
- "use strict";
- if (false) {
- module.exports = require('./cjs/react.production.min.js');
- } else {
- module.exports = __webpack_require__(/*! ./cjs/react.development.js */ "./node_modules/react/cjs/react.development.js");
- }
- /***/ }),
- /***/ "./node_modules/redux-thunk/es/index.js":
- /*!**********************************************!*\
- !*** ./node_modules/redux-thunk/es/index.js ***!
- \**********************************************/
- /*! exports provided: default */
- /*! exports used: default */
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
- "use strict";
- /** A function that accepts a potential "extra argument" value to be injected later,
- * and returns an instance of the thunk middleware that uses that value
- */
- function createThunkMiddleware(extraArgument) {
- // Standard Redux middleware definition pattern:
- // See: https://redux.js.org/tutorials/fundamentals/part-4-store#writing-custom-middleware
- var middleware = function middleware(_ref) {
- var dispatch = _ref.dispatch,
- getState = _ref.getState;
- return function (next) {
- return function (action) {
- // The thunk middleware looks for any functions that were passed to `store.dispatch`.
- // If this "action" is really a function, call it and return the result.
- if (typeof action === 'function') {
- // Inject the store's `dispatch` and `getState` methods, as well as any "extra arg"
- return action(dispatch, getState, extraArgument);
- } // Otherwise, pass the action down the middleware chain as usual
- return next(action);
- };
- };
- };
- return middleware;
- }
- var thunk = createThunkMiddleware(); // Attach the factory function so users can create a customized version
- // with whatever "extra arg" they want to inject into their thunks
- thunk.withExtraArgument = createThunkMiddleware;
- /* harmony default export */ __webpack_exports__["a"] = (thunk);
- /***/ }),
- /***/ "./node_modules/redux/es/applyMiddleware.js":
- /*!**************************************************!*\
- !*** ./node_modules/redux/es/applyMiddleware.js ***!
- \**************************************************/
- /*! exports provided: default */
- /*! exports used: default */
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
- "use strict";
- /* harmony export (immutable) */ __webpack_exports__["a"] = applyMiddleware;
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__compose__ = __webpack_require__(/*! ./compose */ "./node_modules/redux/es/compose.js");
- var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
- /**
- * Creates a store enhancer that applies middleware to the dispatch method
- * of the Redux store. This is handy for a variety of tasks, such as expressing
- * asynchronous actions in a concise manner, or logging every action payload.
- *
- * See `redux-thunk` package as an example of the Redux middleware.
- *
- * Because middleware is potentially asynchronous, this should be the first
- * store enhancer in the composition chain.
- *
- * Note that each middleware will be given the `dispatch` and `getState` functions
- * as named arguments.
- *
- * @param {...Function} middlewares The middleware chain to be applied.
- * @returns {Function} A store enhancer applying the middleware.
- */
- function applyMiddleware() {
- for (var _len = arguments.length, middlewares = Array(_len), _key = 0; _key < _len; _key++) {
- middlewares[_key] = arguments[_key];
- }
- return function (createStore) {
- return function (reducer, preloadedState, enhancer) {
- var store = createStore(reducer, preloadedState, enhancer);
- var _dispatch = store.dispatch;
- var chain = [];
- var middlewareAPI = {
- getState: store.getState,
- dispatch: function dispatch(action) {
- return _dispatch(action);
- }
- };
- chain = middlewares.map(function (middleware) {
- return middleware(middlewareAPI);
- });
- _dispatch = __WEBPACK_IMPORTED_MODULE_0__compose__["a" /* default */].apply(undefined, chain)(store.dispatch);
- return _extends({}, store, {
- dispatch: _dispatch
- });
- };
- };
- }
- /***/ }),
- /***/ "./node_modules/redux/es/bindActionCreators.js":
- /*!*****************************************************!*\
- !*** ./node_modules/redux/es/bindActionCreators.js ***!
- \*****************************************************/
- /*! exports provided: default */
- /*! exports used: default */
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
- "use strict";
- /* harmony export (immutable) */ __webpack_exports__["a"] = bindActionCreators;
- function bindActionCreator(actionCreator, dispatch) {
- return function () {
- return dispatch(actionCreator.apply(undefined, arguments));
- };
- }
- /**
- * Turns an object whose values are action creators, into an object with the
- * same keys, but with every function wrapped into a `dispatch` call so they
- * may be invoked directly. This is just a convenience method, as you can call
- * `store.dispatch(MyActionCreators.doSomething())` yourself just fine.
- *
- * For convenience, you can also pass a single function as the first argument,
- * and get a function in return.
- *
- * @param {Function|Object} actionCreators An object whose values are action
- * creator functions. One handy way to obtain it is to use ES6 `import * as`
- * syntax. You may also pass a single function.
- *
- * @param {Function} dispatch The `dispatch` function available on your Redux
- * store.
- *
- * @returns {Function|Object} The object mimicking the original object, but with
- * every action creator wrapped into the `dispatch` call. If you passed a
- * function as `actionCreators`, the return value will also be a single
- * function.
- */
- function bindActionCreators(actionCreators, dispatch) {
- if (typeof actionCreators === 'function') {
- return bindActionCreator(actionCreators, dispatch);
- }
- if (typeof actionCreators !== 'object' || actionCreators === null) {
- throw new Error('bindActionCreators expected an object or a function, instead received ' + (actionCreators === null ? 'null' : typeof actionCreators) + '. ' + 'Did you write "import ActionCreators from" instead of "import * as ActionCreators from"?');
- }
- var keys = Object.keys(actionCreators);
- var boundActionCreators = {};
- for (var i = 0; i < keys.length; i++) {
- var key = keys[i];
- var actionCreator = actionCreators[key];
- if (typeof actionCreator === 'function') {
- boundActionCreators[key] = bindActionCreator(actionCreator, dispatch);
- }
- }
- return boundActionCreators;
- }
- /***/ }),
- /***/ "./node_modules/redux/es/combineReducers.js":
- /*!**************************************************!*\
- !*** ./node_modules/redux/es/combineReducers.js ***!
- \**************************************************/
- /*! exports provided: default */
- /*! exports used: default */
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
- "use strict";
- /* harmony export (immutable) */ __webpack_exports__["a"] = combineReducers;
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__createStore__ = __webpack_require__(/*! ./createStore */ "./node_modules/redux/es/createStore.js");
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_lodash_es_isPlainObject__ = __webpack_require__(/*! lodash-es/isPlainObject */ "./node_modules/lodash-es/isPlainObject.js");
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__utils_warning__ = __webpack_require__(/*! ./utils/warning */ "./node_modules/redux/es/utils/warning.js");
- function getUndefinedStateErrorMessage(key, action) {
- var actionType = action && action.type;
- var actionName = actionType && '"' + actionType.toString() + '"' || 'an action';
- return 'Given action ' + actionName + ', reducer "' + key + '" returned undefined. ' + 'To ignore an action, you must explicitly return the previous state. ' + 'If you want this reducer to hold no value, you can return null instead of undefined.';
- }
- function getUnexpectedStateShapeWarningMessage(inputState, reducers, action, unexpectedKeyCache) {
- var reducerKeys = Object.keys(reducers);
- var argumentName = action && action.type === __WEBPACK_IMPORTED_MODULE_0__createStore__["a" /* ActionTypes */].INIT ? 'preloadedState argument passed to createStore' : 'previous state received by the reducer';
- if (reducerKeys.length === 0) {
- return 'Store does not have a valid reducer. Make sure the argument passed ' + 'to combineReducers is an object whose values are reducers.';
- }
- if (!Object(__WEBPACK_IMPORTED_MODULE_1_lodash_es_isPlainObject__["a" /* default */])(inputState)) {
- return 'The ' + argumentName + ' has unexpected type of "' + {}.toString.call(inputState).match(/\s([a-z|A-Z]+)/)[1] + '". Expected argument to be an object with the following ' + ('keys: "' + reducerKeys.join('", "') + '"');
- }
- var unexpectedKeys = Object.keys(inputState).filter(function (key) {
- return !reducers.hasOwnProperty(key) && !unexpectedKeyCache[key];
- });
- unexpectedKeys.forEach(function (key) {
- unexpectedKeyCache[key] = true;
- });
- if (unexpectedKeys.length > 0) {
- return 'Unexpected ' + (unexpectedKeys.length > 1 ? 'keys' : 'key') + ' ' + ('"' + unexpectedKeys.join('", "') + '" found in ' + argumentName + '. ') + 'Expected to find one of the known reducer keys instead: ' + ('"' + reducerKeys.join('", "') + '". Unexpected keys will be ignored.');
- }
- }
- function assertReducerShape(reducers) {
- Object.keys(reducers).forEach(function (key) {
- var reducer = reducers[key];
- var initialState = reducer(undefined, { type: __WEBPACK_IMPORTED_MODULE_0__createStore__["a" /* ActionTypes */].INIT });
- if (typeof initialState === 'undefined') {
- throw new Error('Reducer "' + key + '" returned undefined during initialization. ' + 'If the state passed to the reducer is undefined, you must ' + 'explicitly return the initial state. The initial state may ' + 'not be undefined. If you don\'t want to set a value for this reducer, ' + 'you can use null instead of undefined.');
- }
- var type = '@@redux/PROBE_UNKNOWN_ACTION_' + Math.random().toString(36).substring(7).split('').join('.');
- if (typeof reducer(undefined, { type: type }) === 'undefined') {
- throw new Error('Reducer "' + key + '" returned undefined when probed with a random type. ' + ('Don\'t try to handle ' + __WEBPACK_IMPORTED_MODULE_0__createStore__["a" /* ActionTypes */].INIT + ' or other actions in "redux/*" ') + 'namespace. They are considered private. Instead, you must return the ' + 'current state for any unknown actions, unless it is undefined, ' + 'in which case you must return the initial state, regardless of the ' + 'action type. The initial state may not be undefined, but can be null.');
- }
- });
- }
- /**
- * Turns an object whose values are different reducer functions, into a single
- * reducer function. It will call every child reducer, and gather their results
- * into a single state object, whose keys correspond to the keys of the passed
- * reducer functions.
- *
- * @param {Object} reducers An object whose values correspond to different
- * reducer functions that need to be combined into one. One handy way to obtain
- * it is to use ES6 `import * as reducers` syntax. The reducers may never return
- * undefined for any action. Instead, they should return their initial state
- * if the state passed to them was undefined, and the current state for any
- * unrecognized action.
- *
- * @returns {Function} A reducer function that invokes every reducer inside the
- * passed object, and builds a state object with the same shape.
- */
- function combineReducers(reducers) {
- var reducerKeys = Object.keys(reducers);
- var finalReducers = {};
- for (var i = 0; i < reducerKeys.length; i++) {
- var key = reducerKeys[i];
- if (true) {
- if (typeof reducers[key] === 'undefined') {
- Object(__WEBPACK_IMPORTED_MODULE_2__utils_warning__["a" /* default */])('No reducer provided for key "' + key + '"');
- }
- }
- if (typeof reducers[key] === 'function') {
- finalReducers[key] = reducers[key];
- }
- }
- var finalReducerKeys = Object.keys(finalReducers);
- var unexpectedKeyCache = void 0;
- if (true) {
- unexpectedKeyCache = {};
- }
- var shapeAssertionError = void 0;
- try {
- assertReducerShape(finalReducers);
- } catch (e) {
- shapeAssertionError = e;
- }
- return function combination() {
- var state = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
- var action = arguments[1];
- if (shapeAssertionError) {
- throw shapeAssertionError;
- }
- if (true) {
- var warningMessage = getUnexpectedStateShapeWarningMessage(state, finalReducers, action, unexpectedKeyCache);
- if (warningMessage) {
- Object(__WEBPACK_IMPORTED_MODULE_2__utils_warning__["a" /* default */])(warningMessage);
- }
- }
- var hasChanged = false;
- var nextState = {};
- for (var _i = 0; _i < finalReducerKeys.length; _i++) {
- var _key = finalReducerKeys[_i];
- var reducer = finalReducers[_key];
- var previousStateForKey = state[_key];
- var nextStateForKey = reducer(previousStateForKey, action);
- if (typeof nextStateForKey === 'undefined') {
- var errorMessage = getUndefinedStateErrorMessage(_key, action);
- throw new Error(errorMessage);
- }
- nextState[_key] = nextStateForKey;
- hasChanged = hasChanged || nextStateForKey !== previousStateForKey;
- }
- return hasChanged ? nextState : state;
- };
- }
- /***/ }),
- /***/ "./node_modules/redux/es/compose.js":
- /*!******************************************!*\
- !*** ./node_modules/redux/es/compose.js ***!
- \******************************************/
- /*! exports provided: default */
- /*! exports used: default */
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
- "use strict";
- /* harmony export (immutable) */ __webpack_exports__["a"] = compose;
- /**
- * Composes single-argument functions from right to left. The rightmost
- * function can take multiple arguments as it provides the signature for
- * the resulting composite function.
- *
- * @param {...Function} funcs The functions to compose.
- * @returns {Function} A function obtained by composing the argument functions
- * from right to left. For example, compose(f, g, h) is identical to doing
- * (...args) => f(g(h(...args))).
- */
- function compose() {
- for (var _len = arguments.length, funcs = Array(_len), _key = 0; _key < _len; _key++) {
- funcs[_key] = arguments[_key];
- }
- if (funcs.length === 0) {
- return function (arg) {
- return arg;
- };
- }
- if (funcs.length === 1) {
- return funcs[0];
- }
- return funcs.reduce(function (a, b) {
- return function () {
- return a(b.apply(undefined, arguments));
- };
- });
- }
- /***/ }),
- /***/ "./node_modules/redux/es/createStore.js":
- /*!**********************************************!*\
- !*** ./node_modules/redux/es/createStore.js ***!
- \**********************************************/
- /*! exports provided: ActionTypes, default */
- /*! exports used: ActionTypes, default */
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
- "use strict";
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return ActionTypes; });
- /* harmony export (immutable) */ __webpack_exports__["b"] = createStore;
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_lodash_es_isPlainObject__ = __webpack_require__(/*! lodash-es/isPlainObject */ "./node_modules/lodash-es/isPlainObject.js");
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_symbol_observable__ = __webpack_require__(/*! symbol-observable */ "./node_modules/symbol-observable/es/index.js");
- /**
- * These are private action types reserved by Redux.
- * For any unknown actions, you must return the current state.
- * If the current state is undefined, you must return the initial state.
- * Do not reference these action types directly in your code.
- */
- var ActionTypes = {
- INIT: '@@redux/INIT'
- /**
- * Creates a Redux store that holds the state tree.
- * The only way to change the data in the store is to call `dispatch()` on it.
- *
- * There should only be a single store in your app. To specify how different
- * parts of the state tree respond to actions, you may combine several reducers
- * into a single reducer function by using `combineReducers`.
- *
- * @param {Function} reducer A function that returns the next state tree, given
- * the current state tree and the action to handle.
- *
- * @param {any} [preloadedState] The initial state. You may optionally specify it
- * to hydrate the state from the server in universal apps, or to restore a
- * previously serialized user session.
- * If you use `combineReducers` to produce the root reducer function, this must be
- * an object with the same shape as `combineReducers` keys.
- *
- * @param {Function} [enhancer] The store enhancer. You may optionally specify it
- * to enhance the store with third-party capabilities such as middleware,
- * time travel, persistence, etc. The only store enhancer that ships with Redux
- * is `applyMiddleware()`.
- *
- * @returns {Store} A Redux store that lets you read the state, dispatch actions
- * and subscribe to changes.
- */
- };function createStore(reducer, preloadedState, enhancer) {
- var _ref2;
- if (typeof preloadedState === 'function' && typeof enhancer === 'undefined') {
- enhancer = preloadedState;
- preloadedState = undefined;
- }
- if (typeof enhancer !== 'undefined') {
- if (typeof enhancer !== 'function') {
- throw new Error('Expected the enhancer to be a function.');
- }
- return enhancer(createStore)(reducer, preloadedState);
- }
- if (typeof reducer !== 'function') {
- throw new Error('Expected the reducer to be a function.');
- }
- var currentReducer = reducer;
- var currentState = preloadedState;
- var currentListeners = [];
- var nextListeners = currentListeners;
- var isDispatching = false;
- function ensureCanMutateNextListeners() {
- if (nextListeners === currentListeners) {
- nextListeners = currentListeners.slice();
- }
- }
- /**
- * Reads the state tree managed by the store.
- *
- * @returns {any} The current state tree of your application.
- */
- function getState() {
- return currentState;
- }
- /**
- * Adds a change listener. It will be called any time an action is dispatched,
- * and some part of the state tree may potentially have changed. You may then
- * call `getState()` to read the current state tree inside the callback.
- *
- * You may call `dispatch()` from a change listener, with the following
- * caveats:
- *
- * 1. The subscriptions are snapshotted just before every `dispatch()` call.
- * If you subscribe or unsubscribe while the listeners are being invoked, this
- * will not have any effect on the `dispatch()` that is currently in progress.
- * However, the next `dispatch()` call, whether nested or not, will use a more
- * recent snapshot of the subscription list.
- *
- * 2. The listener should not expect to see all state changes, as the state
- * might have been updated multiple times during a nested `dispatch()` before
- * the listener is called. It is, however, guaranteed that all subscribers
- * registered before the `dispatch()` started will be called with the latest
- * state by the time it exits.
- *
- * @param {Function} listener A callback to be invoked on every dispatch.
- * @returns {Function} A function to remove this change listener.
- */
- function subscribe(listener) {
- if (typeof listener !== 'function') {
- throw new Error('Expected listener to be a function.');
- }
- var isSubscribed = true;
- ensureCanMutateNextListeners();
- nextListeners.push(listener);
- return function unsubscribe() {
- if (!isSubscribed) {
- return;
- }
- isSubscribed = false;
- ensureCanMutateNextListeners();
- var index = nextListeners.indexOf(listener);
- nextListeners.splice(index, 1);
- };
- }
- /**
- * Dispatches an action. It is the only way to trigger a state change.
- *
- * The `reducer` function, used to create the store, will be called with the
- * current state tree and the given `action`. Its return value will
- * be considered the **next** state of the tree, and the change listeners
- * will be notified.
- *
- * The base implementation only supports plain object actions. If you want to
- * dispatch a Promise, an Observable, a thunk, or something else, you need to
- * wrap your store creating function into the corresponding middleware. For
- * example, see the documentation for the `redux-thunk` package. Even the
- * middleware will eventually dispatch plain object actions using this method.
- *
- * @param {Object} action A plain object representing “what changed”. It is
- * a good idea to keep actions serializable so you can record and replay user
- * sessions, or use the time travelling `redux-devtools`. An action must have
- * a `type` property which may not be `undefined`. It is a good idea to use
- * string constants for action types.
- *
- * @returns {Object} For convenience, the same action object you dispatched.
- *
- * Note that, if you use a custom middleware, it may wrap `dispatch()` to
- * return something else (for example, a Promise you can await).
- */
- function dispatch(action) {
- if (!Object(__WEBPACK_IMPORTED_MODULE_0_lodash_es_isPlainObject__["a" /* default */])(action)) {
- throw new Error('Actions must be plain objects. ' + 'Use custom middleware for async actions.');
- }
- if (typeof action.type === 'undefined') {
- throw new Error('Actions may not have an undefined "type" property. ' + 'Have you misspelled a constant?');
- }
- if (isDispatching) {
- throw new Error('Reducers may not dispatch actions.');
- }
- try {
- isDispatching = true;
- currentState = currentReducer(currentState, action);
- } finally {
- isDispatching = false;
- }
- var listeners = currentListeners = nextListeners;
- for (var i = 0; i < listeners.length; i++) {
- var listener = listeners[i];
- listener();
- }
- return action;
- }
- /**
- * Replaces the reducer currently used by the store to calculate the state.
- *
- * You might need this if your app implements code splitting and you want to
- * load some of the reducers dynamically. You might also need this if you
- * implement a hot reloading mechanism for Redux.
- *
- * @param {Function} nextReducer The reducer for the store to use instead.
- * @returns {void}
- */
- function replaceReducer(nextReducer) {
- if (typeof nextReducer !== 'function') {
- throw new Error('Expected the nextReducer to be a function.');
- }
- currentReducer = nextReducer;
- dispatch({ type: ActionTypes.INIT });
- }
- /**
- * Interoperability point for observable/reactive libraries.
- * @returns {observable} A minimal observable of state changes.
- * For more information, see the observable proposal:
- * https://github.com/tc39/proposal-observable
- */
- function observable() {
- var _ref;
- var outerSubscribe = subscribe;
- return _ref = {
- /**
- * The minimal observable subscription method.
- * @param {Object} observer Any object that can be used as an observer.
- * The observer object should have a `next` method.
- * @returns {subscription} An object with an `unsubscribe` method that can
- * be used to unsubscribe the observable from the store, and prevent further
- * emission of values from the observable.
- */
- subscribe: function subscribe(observer) {
- if (typeof observer !== 'object') {
- throw new TypeError('Expected the observer to be an object.');
- }
- function observeState() {
- if (observer.next) {
- observer.next(getState());
- }
- }
- observeState();
- var unsubscribe = outerSubscribe(observeState);
- return { unsubscribe: unsubscribe };
- }
- }, _ref[__WEBPACK_IMPORTED_MODULE_1_symbol_observable__["a" /* default */]] = function () {
- return this;
- }, _ref;
- }
- // When a store is created, an "INIT" action is dispatched so that every
- // reducer returns their initial state. This effectively populates
- // the initial state tree.
- dispatch({ type: ActionTypes.INIT });
- return _ref2 = {
- dispatch: dispatch,
- subscribe: subscribe,
- getState: getState,
- replaceReducer: replaceReducer
- }, _ref2[__WEBPACK_IMPORTED_MODULE_1_symbol_observable__["a" /* default */]] = observable, _ref2;
- }
- /***/ }),
- /***/ "./node_modules/redux/es/index.js":
- /*!****************************************!*\
- !*** ./node_modules/redux/es/index.js ***!
- \****************************************/
- /*! exports provided: createStore, combineReducers, bindActionCreators, applyMiddleware, compose */
- /*! exports used: applyMiddleware, bindActionCreators, combineReducers, createStore */
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
- "use strict";
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__createStore__ = __webpack_require__(/*! ./createStore */ "./node_modules/redux/es/createStore.js");
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__combineReducers__ = __webpack_require__(/*! ./combineReducers */ "./node_modules/redux/es/combineReducers.js");
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__bindActionCreators__ = __webpack_require__(/*! ./bindActionCreators */ "./node_modules/redux/es/bindActionCreators.js");
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__applyMiddleware__ = __webpack_require__(/*! ./applyMiddleware */ "./node_modules/redux/es/applyMiddleware.js");
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__compose__ = __webpack_require__(/*! ./compose */ "./node_modules/redux/es/compose.js");
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__utils_warning__ = __webpack_require__(/*! ./utils/warning */ "./node_modules/redux/es/utils/warning.js");
- /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "d", function() { return __WEBPACK_IMPORTED_MODULE_0__createStore__["b"]; });
- /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "c", function() { return __WEBPACK_IMPORTED_MODULE_1__combineReducers__["a"]; });
- /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return __WEBPACK_IMPORTED_MODULE_2__bindActionCreators__["a"]; });
- /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return __WEBPACK_IMPORTED_MODULE_3__applyMiddleware__["a"]; });
- /* unused harmony reexport compose */
- /*
- * This is a dummy function to check if the function name has been altered by minification.
- * If the function has been minified and NODE_ENV !== 'production', warn the user.
- */
- function isCrushed() {}
- if ("development" !== 'production' && typeof isCrushed.name === 'string' && isCrushed.name !== 'isCrushed') {
- Object(__WEBPACK_IMPORTED_MODULE_5__utils_warning__["a" /* default */])('You are currently using minified code outside of NODE_ENV === \'production\'. ' + 'This means that you are running a slower development build of Redux. ' + 'You can use loose-envify (https://github.com/zertosh/loose-envify) for browserify ' + 'or DefinePlugin for webpack (http://stackoverflow.com/questions/30030031) ' + 'to ensure you have the correct code for your production build.');
- }
- /***/ }),
- /***/ "./node_modules/redux/es/utils/warning.js":
- /*!************************************************!*\
- !*** ./node_modules/redux/es/utils/warning.js ***!
- \************************************************/
- /*! exports provided: default */
- /*! exports used: default */
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
- "use strict";
- /* harmony export (immutable) */ __webpack_exports__["a"] = warning;
- /**
- * Prints a warning in the console if it exists.
- *
- * @param {String} message The warning message.
- * @returns {void}
- */
- function warning(message) {
- /* eslint-disable no-console */
- if (typeof console !== 'undefined' && typeof console.error === 'function') {
- console.error(message);
- }
- /* eslint-enable no-console */
- try {
- // This error was thrown as a convenience so that if you enable
- // "break on all exceptions" in your console,
- // it would pause the execution at this line.
- throw new Error(message);
- /* eslint-disable no-empty */
- } catch (e) {}
- /* eslint-enable no-empty */
- }
- /***/ }),
- /***/ "./node_modules/requires-port/index.js":
- /*!*********************************************!*\
- !*** ./node_modules/requires-port/index.js ***!
- \*********************************************/
- /*! dynamic exports provided */
- /*! all exports used */
- /***/ (function(module, exports, __webpack_require__) {
- "use strict";
- /**
- * Check if we're required to add a port number.
- *
- * @see https://url.spec.whatwg.org/#default-port
- * @param {Number|String} port Port number we need to check
- * @param {String} protocol Protocol we need to check against.
- * @returns {Boolean} Is it a default port for the given protocol
- * @api private
- */
- module.exports = function required(port, protocol) {
- protocol = protocol.split(':')[0];
- port = +port;
- if (!port) return false;
- switch (protocol) {
- case 'http':
- case 'ws':
- return port !== 80;
- case 'https':
- case 'wss':
- return port !== 443;
- case 'ftp':
- return port !== 21;
- case 'gopher':
- return port !== 70;
- case 'file':
- return false;
- }
- return port !== 0;
- };
- /***/ }),
- /***/ "./node_modules/resolve-pathname/esm/resolve-pathname.js":
- /*!***************************************************************!*\
- !*** ./node_modules/resolve-pathname/esm/resolve-pathname.js ***!
- \***************************************************************/
- /*! exports provided: default */
- /*! exports used: default */
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
- "use strict";
- function isAbsolute(pathname) {
- return pathname.charAt(0) === '/';
- }
- // About 1.5x faster than the two-arg version of Array#splice()
- function spliceOne(list, index) {
- for (var i = index, k = i + 1, n = list.length; k < n; i += 1, k += 1) {
- list[i] = list[k];
- }
- list.pop();
- }
- // This implementation is based heavily on node's url.parse
- function resolvePathname(to, from) {
- if (from === undefined) from = '';
- var toParts = (to && to.split('/')) || [];
- var fromParts = (from && from.split('/')) || [];
- var isToAbs = to && isAbsolute(to);
- var isFromAbs = from && isAbsolute(from);
- var mustEndAbs = isToAbs || isFromAbs;
- if (to && isAbsolute(to)) {
- // to is absolute
- fromParts = toParts;
- } else if (toParts.length) {
- // to is relative, drop the filename
- fromParts.pop();
- fromParts = fromParts.concat(toParts);
- }
- if (!fromParts.length) return '/';
- var hasTrailingSlash;
- if (fromParts.length) {
- var last = fromParts[fromParts.length - 1];
- hasTrailingSlash = last === '.' || last === '..' || last === '';
- } else {
- hasTrailingSlash = false;
- }
- var up = 0;
- for (var i = fromParts.length; i >= 0; i--) {
- var part = fromParts[i];
- if (part === '.') {
- spliceOne(fromParts, i);
- } else if (part === '..') {
- spliceOne(fromParts, i);
- up++;
- } else if (up) {
- spliceOne(fromParts, i);
- up--;
- }
- }
- if (!mustEndAbs) for (; up--; up) fromParts.unshift('..');
- if (
- mustEndAbs &&
- fromParts[0] !== '' &&
- (!fromParts[0] || !isAbsolute(fromParts[0]))
- )
- fromParts.unshift('');
- var result = fromParts.join('/');
- if (hasTrailingSlash && result.substr(-1) !== '/') result += '/';
- return result;
- }
- /* harmony default export */ __webpack_exports__["a"] = (resolvePathname);
- /***/ }),
- /***/ "./node_modules/scheduler/cjs/scheduler-tracing.development.js":
- /*!*********************************************************************!*\
- !*** ./node_modules/scheduler/cjs/scheduler-tracing.development.js ***!
- \*********************************************************************/
- /*! dynamic exports provided */
- /*! all exports used */
- /***/ (function(module, exports, __webpack_require__) {
- "use strict";
- /** @license React v0.19.1
- * scheduler-tracing.development.js
- *
- * Copyright (c) Facebook, Inc. and its affiliates.
- *
- * This source code is licensed under the MIT license found in the
- * LICENSE file in the root directory of this source tree.
- */
- if (true) {
- (function() {
- 'use strict';
- var DEFAULT_THREAD_ID = 0; // Counters used to generate unique IDs.
- var interactionIDCounter = 0;
- var threadIDCounter = 0; // Set of currently traced interactions.
- // Interactions "stack"–
- // Meaning that newly traced interactions are appended to the previously active set.
- // When an interaction goes out of scope, the previous set (if any) is restored.
- exports.__interactionsRef = null; // Listener(s) to notify when interactions begin and end.
- exports.__subscriberRef = null;
- {
- exports.__interactionsRef = {
- current: new Set()
- };
- exports.__subscriberRef = {
- current: null
- };
- }
- function unstable_clear(callback) {
- var prevInteractions = exports.__interactionsRef.current;
- exports.__interactionsRef.current = new Set();
- try {
- return callback();
- } finally {
- exports.__interactionsRef.current = prevInteractions;
- }
- }
- function unstable_getCurrent() {
- {
- return exports.__interactionsRef.current;
- }
- }
- function unstable_getThreadID() {
- return ++threadIDCounter;
- }
- function unstable_trace(name, timestamp, callback) {
- var threadID = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : DEFAULT_THREAD_ID;
- var interaction = {
- __count: 1,
- id: interactionIDCounter++,
- name: name,
- timestamp: timestamp
- };
- var prevInteractions = exports.__interactionsRef.current; // Traced interactions should stack/accumulate.
- // To do that, clone the current interactions.
- // The previous set will be restored upon completion.
- var interactions = new Set(prevInteractions);
- interactions.add(interaction);
- exports.__interactionsRef.current = interactions;
- var subscriber = exports.__subscriberRef.current;
- var returnValue;
- try {
- if (subscriber !== null) {
- subscriber.onInteractionTraced(interaction);
- }
- } finally {
- try {
- if (subscriber !== null) {
- subscriber.onWorkStarted(interactions, threadID);
- }
- } finally {
- try {
- returnValue = callback();
- } finally {
- exports.__interactionsRef.current = prevInteractions;
- try {
- if (subscriber !== null) {
- subscriber.onWorkStopped(interactions, threadID);
- }
- } finally {
- interaction.__count--; // If no async work was scheduled for this interaction,
- // Notify subscribers that it's completed.
- if (subscriber !== null && interaction.__count === 0) {
- subscriber.onInteractionScheduledWorkCompleted(interaction);
- }
- }
- }
- }
- }
- return returnValue;
- }
- function unstable_wrap(callback) {
- var threadID = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : DEFAULT_THREAD_ID;
- var wrappedInteractions = exports.__interactionsRef.current;
- var subscriber = exports.__subscriberRef.current;
- if (subscriber !== null) {
- subscriber.onWorkScheduled(wrappedInteractions, threadID);
- } // Update the pending async work count for the current interactions.
- // Update after calling subscribers in case of error.
- wrappedInteractions.forEach(function (interaction) {
- interaction.__count++;
- });
- var hasRun = false;
- function wrapped() {
- var prevInteractions = exports.__interactionsRef.current;
- exports.__interactionsRef.current = wrappedInteractions;
- subscriber = exports.__subscriberRef.current;
- try {
- var returnValue;
- try {
- if (subscriber !== null) {
- subscriber.onWorkStarted(wrappedInteractions, threadID);
- }
- } finally {
- try {
- returnValue = callback.apply(undefined, arguments);
- } finally {
- exports.__interactionsRef.current = prevInteractions;
- if (subscriber !== null) {
- subscriber.onWorkStopped(wrappedInteractions, threadID);
- }
- }
- }
- return returnValue;
- } finally {
- if (!hasRun) {
- // We only expect a wrapped function to be executed once,
- // But in the event that it's executed more than once–
- // Only decrement the outstanding interaction counts once.
- hasRun = true; // Update pending async counts for all wrapped interactions.
- // If this was the last scheduled async work for any of them,
- // Mark them as completed.
- wrappedInteractions.forEach(function (interaction) {
- interaction.__count--;
- if (subscriber !== null && interaction.__count === 0) {
- subscriber.onInteractionScheduledWorkCompleted(interaction);
- }
- });
- }
- }
- }
- wrapped.cancel = function cancel() {
- subscriber = exports.__subscriberRef.current;
- try {
- if (subscriber !== null) {
- subscriber.onWorkCanceled(wrappedInteractions, threadID);
- }
- } finally {
- // Update pending async counts for all wrapped interactions.
- // If this was the last scheduled async work for any of them,
- // Mark them as completed.
- wrappedInteractions.forEach(function (interaction) {
- interaction.__count--;
- if (subscriber && interaction.__count === 0) {
- subscriber.onInteractionScheduledWorkCompleted(interaction);
- }
- });
- }
- };
- return wrapped;
- }
- var subscribers = null;
- {
- subscribers = new Set();
- }
- function unstable_subscribe(subscriber) {
- {
- subscribers.add(subscriber);
- if (subscribers.size === 1) {
- exports.__subscriberRef.current = {
- onInteractionScheduledWorkCompleted: onInteractionScheduledWorkCompleted,
- onInteractionTraced: onInteractionTraced,
- onWorkCanceled: onWorkCanceled,
- onWorkScheduled: onWorkScheduled,
- onWorkStarted: onWorkStarted,
- onWorkStopped: onWorkStopped
- };
- }
- }
- }
- function unstable_unsubscribe(subscriber) {
- {
- subscribers.delete(subscriber);
- if (subscribers.size === 0) {
- exports.__subscriberRef.current = null;
- }
- }
- }
- function onInteractionTraced(interaction) {
- var didCatchError = false;
- var caughtError = null;
- subscribers.forEach(function (subscriber) {
- try {
- subscriber.onInteractionTraced(interaction);
- } catch (error) {
- if (!didCatchError) {
- didCatchError = true;
- caughtError = error;
- }
- }
- });
- if (didCatchError) {
- throw caughtError;
- }
- }
- function onInteractionScheduledWorkCompleted(interaction) {
- var didCatchError = false;
- var caughtError = null;
- subscribers.forEach(function (subscriber) {
- try {
- subscriber.onInteractionScheduledWorkCompleted(interaction);
- } catch (error) {
- if (!didCatchError) {
- didCatchError = true;
- caughtError = error;
- }
- }
- });
- if (didCatchError) {
- throw caughtError;
- }
- }
- function onWorkScheduled(interactions, threadID) {
- var didCatchError = false;
- var caughtError = null;
- subscribers.forEach(function (subscriber) {
- try {
- subscriber.onWorkScheduled(interactions, threadID);
- } catch (error) {
- if (!didCatchError) {
- didCatchError = true;
- caughtError = error;
- }
- }
- });
- if (didCatchError) {
- throw caughtError;
- }
- }
- function onWorkStarted(interactions, threadID) {
- var didCatchError = false;
- var caughtError = null;
- subscribers.forEach(function (subscriber) {
- try {
- subscriber.onWorkStarted(interactions, threadID);
- } catch (error) {
- if (!didCatchError) {
- didCatchError = true;
- caughtError = error;
- }
- }
- });
- if (didCatchError) {
- throw caughtError;
- }
- }
- function onWorkStopped(interactions, threadID) {
- var didCatchError = false;
- var caughtError = null;
- subscribers.forEach(function (subscriber) {
- try {
- subscriber.onWorkStopped(interactions, threadID);
- } catch (error) {
- if (!didCatchError) {
- didCatchError = true;
- caughtError = error;
- }
- }
- });
- if (didCatchError) {
- throw caughtError;
- }
- }
- function onWorkCanceled(interactions, threadID) {
- var didCatchError = false;
- var caughtError = null;
- subscribers.forEach(function (subscriber) {
- try {
- subscriber.onWorkCanceled(interactions, threadID);
- } catch (error) {
- if (!didCatchError) {
- didCatchError = true;
- caughtError = error;
- }
- }
- });
- if (didCatchError) {
- throw caughtError;
- }
- }
- exports.unstable_clear = unstable_clear;
- exports.unstable_getCurrent = unstable_getCurrent;
- exports.unstable_getThreadID = unstable_getThreadID;
- exports.unstable_subscribe = unstable_subscribe;
- exports.unstable_trace = unstable_trace;
- exports.unstable_unsubscribe = unstable_unsubscribe;
- exports.unstable_wrap = unstable_wrap;
- })();
- }
- /***/ }),
- /***/ "./node_modules/scheduler/cjs/scheduler.development.js":
- /*!*************************************************************!*\
- !*** ./node_modules/scheduler/cjs/scheduler.development.js ***!
- \*************************************************************/
- /*! dynamic exports provided */
- /*! all exports used */
- /***/ (function(module, exports, __webpack_require__) {
- "use strict";
- /** @license React v0.19.1
- * scheduler.development.js
- *
- * Copyright (c) Facebook, Inc. and its affiliates.
- *
- * This source code is licensed under the MIT license found in the
- * LICENSE file in the root directory of this source tree.
- */
- if (true) {
- (function() {
- 'use strict';
- var enableSchedulerDebugging = false;
- var enableProfiling = true;
- var requestHostCallback;
- var requestHostTimeout;
- var cancelHostTimeout;
- var shouldYieldToHost;
- var requestPaint;
- if ( // If Scheduler runs in a non-DOM environment, it falls back to a naive
- // implementation using setTimeout.
- typeof window === 'undefined' || // Check if MessageChannel is supported, too.
- typeof MessageChannel !== 'function') {
- // If this accidentally gets imported in a non-browser environment, e.g. JavaScriptCore,
- // fallback to a naive implementation.
- var _callback = null;
- var _timeoutID = null;
- var _flushCallback = function () {
- if (_callback !== null) {
- try {
- var currentTime = exports.unstable_now();
- var hasRemainingTime = true;
- _callback(hasRemainingTime, currentTime);
- _callback = null;
- } catch (e) {
- setTimeout(_flushCallback, 0);
- throw e;
- }
- }
- };
- var initialTime = Date.now();
- exports.unstable_now = function () {
- return Date.now() - initialTime;
- };
- requestHostCallback = function (cb) {
- if (_callback !== null) {
- // Protect against re-entrancy.
- setTimeout(requestHostCallback, 0, cb);
- } else {
- _callback = cb;
- setTimeout(_flushCallback, 0);
- }
- };
- requestHostTimeout = function (cb, ms) {
- _timeoutID = setTimeout(cb, ms);
- };
- cancelHostTimeout = function () {
- clearTimeout(_timeoutID);
- };
- shouldYieldToHost = function () {
- return false;
- };
- requestPaint = exports.unstable_forceFrameRate = function () {};
- } else {
- // Capture local references to native APIs, in case a polyfill overrides them.
- var performance = window.performance;
- var _Date = window.Date;
- var _setTimeout = window.setTimeout;
- var _clearTimeout = window.clearTimeout;
- if (typeof console !== 'undefined') {
- // TODO: Scheduler no longer requires these methods to be polyfilled. But
- // maybe we want to continue warning if they don't exist, to preserve the
- // option to rely on it in the future?
- var requestAnimationFrame = window.requestAnimationFrame;
- var cancelAnimationFrame = window.cancelAnimationFrame; // TODO: Remove fb.me link
- if (typeof requestAnimationFrame !== 'function') {
- // Using console['error'] to evade Babel and ESLint
- console['error']("This browser doesn't support requestAnimationFrame. " + 'Make sure that you load a ' + 'polyfill in older browsers. https://fb.me/react-polyfills');
- }
- if (typeof cancelAnimationFrame !== 'function') {
- // Using console['error'] to evade Babel and ESLint
- console['error']("This browser doesn't support cancelAnimationFrame. " + 'Make sure that you load a ' + 'polyfill in older browsers. https://fb.me/react-polyfills');
- }
- }
- if (typeof performance === 'object' && typeof performance.now === 'function') {
- exports.unstable_now = function () {
- return performance.now();
- };
- } else {
- var _initialTime = _Date.now();
- exports.unstable_now = function () {
- return _Date.now() - _initialTime;
- };
- }
- var isMessageLoopRunning = false;
- var scheduledHostCallback = null;
- var taskTimeoutID = -1; // Scheduler periodically yields in case there is other work on the main
- // thread, like user events. By default, it yields multiple times per frame.
- // It does not attempt to align with frame boundaries, since most tasks don't
- // need to be frame aligned; for those that do, use requestAnimationFrame.
- var yieldInterval = 5;
- var deadline = 0; // TODO: Make this configurable
- {
- // `isInputPending` is not available. Since we have no way of knowing if
- // there's pending input, always yield at the end of the frame.
- shouldYieldToHost = function () {
- return exports.unstable_now() >= deadline;
- }; // Since we yield every frame regardless, `requestPaint` has no effect.
- requestPaint = function () {};
- }
- exports.unstable_forceFrameRate = function (fps) {
- if (fps < 0 || fps > 125) {
- // Using console['error'] to evade Babel and ESLint
- console['error']('forceFrameRate takes a positive int between 0 and 125, ' + 'forcing framerates higher than 125 fps is not unsupported');
- return;
- }
- if (fps > 0) {
- yieldInterval = Math.floor(1000 / fps);
- } else {
- // reset the framerate
- yieldInterval = 5;
- }
- };
- var performWorkUntilDeadline = function () {
- if (scheduledHostCallback !== null) {
- var currentTime = exports.unstable_now(); // Yield after `yieldInterval` ms, regardless of where we are in the vsync
- // cycle. This means there's always time remaining at the beginning of
- // the message event.
- deadline = currentTime + yieldInterval;
- var hasTimeRemaining = true;
- try {
- var hasMoreWork = scheduledHostCallback(hasTimeRemaining, currentTime);
- if (!hasMoreWork) {
- isMessageLoopRunning = false;
- scheduledHostCallback = null;
- } else {
- // If there's more work, schedule the next message event at the end
- // of the preceding one.
- port.postMessage(null);
- }
- } catch (error) {
- // If a scheduler task throws, exit the current browser task so the
- // error can be observed.
- port.postMessage(null);
- throw error;
- }
- } else {
- isMessageLoopRunning = false;
- } // Yielding to the browser will give it a chance to paint, so we can
- };
- var channel = new MessageChannel();
- var port = channel.port2;
- channel.port1.onmessage = performWorkUntilDeadline;
- requestHostCallback = function (callback) {
- scheduledHostCallback = callback;
- if (!isMessageLoopRunning) {
- isMessageLoopRunning = true;
- port.postMessage(null);
- }
- };
- requestHostTimeout = function (callback, ms) {
- taskTimeoutID = _setTimeout(function () {
- callback(exports.unstable_now());
- }, ms);
- };
- cancelHostTimeout = function () {
- _clearTimeout(taskTimeoutID);
- taskTimeoutID = -1;
- };
- }
- function push(heap, node) {
- var index = heap.length;
- heap.push(node);
- siftUp(heap, node, index);
- }
- function peek(heap) {
- var first = heap[0];
- return first === undefined ? null : first;
- }
- function pop(heap) {
- var first = heap[0];
- if (first !== undefined) {
- var last = heap.pop();
- if (last !== first) {
- heap[0] = last;
- siftDown(heap, last, 0);
- }
- return first;
- } else {
- return null;
- }
- }
- function siftUp(heap, node, i) {
- var index = i;
- while (true) {
- var parentIndex = index - 1 >>> 1;
- var parent = heap[parentIndex];
- if (parent !== undefined && compare(parent, node) > 0) {
- // The parent is larger. Swap positions.
- heap[parentIndex] = node;
- heap[index] = parent;
- index = parentIndex;
- } else {
- // The parent is smaller. Exit.
- return;
- }
- }
- }
- function siftDown(heap, node, i) {
- var index = i;
- var length = heap.length;
- while (index < length) {
- var leftIndex = (index + 1) * 2 - 1;
- var left = heap[leftIndex];
- var rightIndex = leftIndex + 1;
- var right = heap[rightIndex]; // If the left or right node is smaller, swap with the smaller of those.
- if (left !== undefined && compare(left, node) < 0) {
- if (right !== undefined && compare(right, left) < 0) {
- heap[index] = right;
- heap[rightIndex] = node;
- index = rightIndex;
- } else {
- heap[index] = left;
- heap[leftIndex] = node;
- index = leftIndex;
- }
- } else if (right !== undefined && compare(right, node) < 0) {
- heap[index] = right;
- heap[rightIndex] = node;
- index = rightIndex;
- } else {
- // Neither child is smaller. Exit.
- return;
- }
- }
- }
- function compare(a, b) {
- // Compare sort index first, then task id.
- var diff = a.sortIndex - b.sortIndex;
- return diff !== 0 ? diff : a.id - b.id;
- }
- // TODO: Use symbols?
- var NoPriority = 0;
- var ImmediatePriority = 1;
- var UserBlockingPriority = 2;
- var NormalPriority = 3;
- var LowPriority = 4;
- var IdlePriority = 5;
- var runIdCounter = 0;
- var mainThreadIdCounter = 0;
- var profilingStateSize = 4;
- var sharedProfilingBuffer = // $FlowFixMe Flow doesn't know about SharedArrayBuffer
- typeof SharedArrayBuffer === 'function' ? new SharedArrayBuffer(profilingStateSize * Int32Array.BYTES_PER_ELEMENT) : // $FlowFixMe Flow doesn't know about ArrayBuffer
- typeof ArrayBuffer === 'function' ? new ArrayBuffer(profilingStateSize * Int32Array.BYTES_PER_ELEMENT) : null // Don't crash the init path on IE9
- ;
- var profilingState = sharedProfilingBuffer !== null ? new Int32Array(sharedProfilingBuffer) : []; // We can't read this but it helps save bytes for null checks
- var PRIORITY = 0;
- var CURRENT_TASK_ID = 1;
- var CURRENT_RUN_ID = 2;
- var QUEUE_SIZE = 3;
- {
- profilingState[PRIORITY] = NoPriority; // This is maintained with a counter, because the size of the priority queue
- // array might include canceled tasks.
- profilingState[QUEUE_SIZE] = 0;
- profilingState[CURRENT_TASK_ID] = 0;
- } // Bytes per element is 4
- var INITIAL_EVENT_LOG_SIZE = 131072;
- var MAX_EVENT_LOG_SIZE = 524288; // Equivalent to 2 megabytes
- var eventLogSize = 0;
- var eventLogBuffer = null;
- var eventLog = null;
- var eventLogIndex = 0;
- var TaskStartEvent = 1;
- var TaskCompleteEvent = 2;
- var TaskErrorEvent = 3;
- var TaskCancelEvent = 4;
- var TaskRunEvent = 5;
- var TaskYieldEvent = 6;
- var SchedulerSuspendEvent = 7;
- var SchedulerResumeEvent = 8;
- function logEvent(entries) {
- if (eventLog !== null) {
- var offset = eventLogIndex;
- eventLogIndex += entries.length;
- if (eventLogIndex + 1 > eventLogSize) {
- eventLogSize *= 2;
- if (eventLogSize > MAX_EVENT_LOG_SIZE) {
- // Using console['error'] to evade Babel and ESLint
- console['error']("Scheduler Profiling: Event log exceeded maximum size. Don't " + 'forget to call `stopLoggingProfilingEvents()`.');
- stopLoggingProfilingEvents();
- return;
- }
- var newEventLog = new Int32Array(eventLogSize * 4);
- newEventLog.set(eventLog);
- eventLogBuffer = newEventLog.buffer;
- eventLog = newEventLog;
- }
- eventLog.set(entries, offset);
- }
- }
- function startLoggingProfilingEvents() {
- eventLogSize = INITIAL_EVENT_LOG_SIZE;
- eventLogBuffer = new ArrayBuffer(eventLogSize * 4);
- eventLog = new Int32Array(eventLogBuffer);
- eventLogIndex = 0;
- }
- function stopLoggingProfilingEvents() {
- var buffer = eventLogBuffer;
- eventLogSize = 0;
- eventLogBuffer = null;
- eventLog = null;
- eventLogIndex = 0;
- return buffer;
- }
- function markTaskStart(task, ms) {
- {
- profilingState[QUEUE_SIZE]++;
- if (eventLog !== null) {
- // performance.now returns a float, representing milliseconds. When the
- // event is logged, it's coerced to an int. Convert to microseconds to
- // maintain extra degrees of precision.
- logEvent([TaskStartEvent, ms * 1000, task.id, task.priorityLevel]);
- }
- }
- }
- function markTaskCompleted(task, ms) {
- {
- profilingState[PRIORITY] = NoPriority;
- profilingState[CURRENT_TASK_ID] = 0;
- profilingState[QUEUE_SIZE]--;
- if (eventLog !== null) {
- logEvent([TaskCompleteEvent, ms * 1000, task.id]);
- }
- }
- }
- function markTaskCanceled(task, ms) {
- {
- profilingState[QUEUE_SIZE]--;
- if (eventLog !== null) {
- logEvent([TaskCancelEvent, ms * 1000, task.id]);
- }
- }
- }
- function markTaskErrored(task, ms) {
- {
- profilingState[PRIORITY] = NoPriority;
- profilingState[CURRENT_TASK_ID] = 0;
- profilingState[QUEUE_SIZE]--;
- if (eventLog !== null) {
- logEvent([TaskErrorEvent, ms * 1000, task.id]);
- }
- }
- }
- function markTaskRun(task, ms) {
- {
- runIdCounter++;
- profilingState[PRIORITY] = task.priorityLevel;
- profilingState[CURRENT_TASK_ID] = task.id;
- profilingState[CURRENT_RUN_ID] = runIdCounter;
- if (eventLog !== null) {
- logEvent([TaskRunEvent, ms * 1000, task.id, runIdCounter]);
- }
- }
- }
- function markTaskYield(task, ms) {
- {
- profilingState[PRIORITY] = NoPriority;
- profilingState[CURRENT_TASK_ID] = 0;
- profilingState[CURRENT_RUN_ID] = 0;
- if (eventLog !== null) {
- logEvent([TaskYieldEvent, ms * 1000, task.id, runIdCounter]);
- }
- }
- }
- function markSchedulerSuspended(ms) {
- {
- mainThreadIdCounter++;
- if (eventLog !== null) {
- logEvent([SchedulerSuspendEvent, ms * 1000, mainThreadIdCounter]);
- }
- }
- }
- function markSchedulerUnsuspended(ms) {
- {
- if (eventLog !== null) {
- logEvent([SchedulerResumeEvent, ms * 1000, mainThreadIdCounter]);
- }
- }
- }
- /* eslint-disable no-var */
- // Math.pow(2, 30) - 1
- // 0b111111111111111111111111111111
- var maxSigned31BitInt = 1073741823; // Times out immediately
- var IMMEDIATE_PRIORITY_TIMEOUT = -1; // Eventually times out
- var USER_BLOCKING_PRIORITY = 250;
- var NORMAL_PRIORITY_TIMEOUT = 5000;
- var LOW_PRIORITY_TIMEOUT = 10000; // Never times out
- var IDLE_PRIORITY = maxSigned31BitInt; // Tasks are stored on a min heap
- var taskQueue = [];
- var timerQueue = []; // Incrementing id counter. Used to maintain insertion order.
- var taskIdCounter = 1; // Pausing the scheduler is useful for debugging.
- var currentTask = null;
- var currentPriorityLevel = NormalPriority; // This is set while performing work, to prevent re-entrancy.
- var isPerformingWork = false;
- var isHostCallbackScheduled = false;
- var isHostTimeoutScheduled = false;
- function advanceTimers(currentTime) {
- // Check for tasks that are no longer delayed and add them to the queue.
- var timer = peek(timerQueue);
- while (timer !== null) {
- if (timer.callback === null) {
- // Timer was cancelled.
- pop(timerQueue);
- } else if (timer.startTime <= currentTime) {
- // Timer fired. Transfer to the task queue.
- pop(timerQueue);
- timer.sortIndex = timer.expirationTime;
- push(taskQueue, timer);
- {
- markTaskStart(timer, currentTime);
- timer.isQueued = true;
- }
- } else {
- // Remaining timers are pending.
- return;
- }
- timer = peek(timerQueue);
- }
- }
- function handleTimeout(currentTime) {
- isHostTimeoutScheduled = false;
- advanceTimers(currentTime);
- if (!isHostCallbackScheduled) {
- if (peek(taskQueue) !== null) {
- isHostCallbackScheduled = true;
- requestHostCallback(flushWork);
- } else {
- var firstTimer = peek(timerQueue);
- if (firstTimer !== null) {
- requestHostTimeout(handleTimeout, firstTimer.startTime - currentTime);
- }
- }
- }
- }
- function flushWork(hasTimeRemaining, initialTime) {
- {
- markSchedulerUnsuspended(initialTime);
- } // We'll need a host callback the next time work is scheduled.
- isHostCallbackScheduled = false;
- if (isHostTimeoutScheduled) {
- // We scheduled a timeout but it's no longer needed. Cancel it.
- isHostTimeoutScheduled = false;
- cancelHostTimeout();
- }
- isPerformingWork = true;
- var previousPriorityLevel = currentPriorityLevel;
- try {
- if (enableProfiling) {
- try {
- return workLoop(hasTimeRemaining, initialTime);
- } catch (error) {
- if (currentTask !== null) {
- var currentTime = exports.unstable_now();
- markTaskErrored(currentTask, currentTime);
- currentTask.isQueued = false;
- }
- throw error;
- }
- } else {
- // No catch in prod codepath.
- return workLoop(hasTimeRemaining, initialTime);
- }
- } finally {
- currentTask = null;
- currentPriorityLevel = previousPriorityLevel;
- isPerformingWork = false;
- {
- var _currentTime = exports.unstable_now();
- markSchedulerSuspended(_currentTime);
- }
- }
- }
- function workLoop(hasTimeRemaining, initialTime) {
- var currentTime = initialTime;
- advanceTimers(currentTime);
- currentTask = peek(taskQueue);
- while (currentTask !== null && !(enableSchedulerDebugging )) {
- if (currentTask.expirationTime > currentTime && (!hasTimeRemaining || shouldYieldToHost())) {
- // This currentTask hasn't expired, and we've reached the deadline.
- break;
- }
- var callback = currentTask.callback;
- if (callback !== null) {
- currentTask.callback = null;
- currentPriorityLevel = currentTask.priorityLevel;
- var didUserCallbackTimeout = currentTask.expirationTime <= currentTime;
- markTaskRun(currentTask, currentTime);
- var continuationCallback = callback(didUserCallbackTimeout);
- currentTime = exports.unstable_now();
- if (typeof continuationCallback === 'function') {
- currentTask.callback = continuationCallback;
- markTaskYield(currentTask, currentTime);
- } else {
- {
- markTaskCompleted(currentTask, currentTime);
- currentTask.isQueued = false;
- }
- if (currentTask === peek(taskQueue)) {
- pop(taskQueue);
- }
- }
- advanceTimers(currentTime);
- } else {
- pop(taskQueue);
- }
- currentTask = peek(taskQueue);
- } // Return whether there's additional work
- if (currentTask !== null) {
- return true;
- } else {
- var firstTimer = peek(timerQueue);
- if (firstTimer !== null) {
- requestHostTimeout(handleTimeout, firstTimer.startTime - currentTime);
- }
- return false;
- }
- }
- function unstable_runWithPriority(priorityLevel, eventHandler) {
- switch (priorityLevel) {
- case ImmediatePriority:
- case UserBlockingPriority:
- case NormalPriority:
- case LowPriority:
- case IdlePriority:
- break;
- default:
- priorityLevel = NormalPriority;
- }
- var previousPriorityLevel = currentPriorityLevel;
- currentPriorityLevel = priorityLevel;
- try {
- return eventHandler();
- } finally {
- currentPriorityLevel = previousPriorityLevel;
- }
- }
- function unstable_next(eventHandler) {
- var priorityLevel;
- switch (currentPriorityLevel) {
- case ImmediatePriority:
- case UserBlockingPriority:
- case NormalPriority:
- // Shift down to normal priority
- priorityLevel = NormalPriority;
- break;
- default:
- // Anything lower than normal priority should remain at the current level.
- priorityLevel = currentPriorityLevel;
- break;
- }
- var previousPriorityLevel = currentPriorityLevel;
- currentPriorityLevel = priorityLevel;
- try {
- return eventHandler();
- } finally {
- currentPriorityLevel = previousPriorityLevel;
- }
- }
- function unstable_wrapCallback(callback) {
- var parentPriorityLevel = currentPriorityLevel;
- return function () {
- // This is a fork of runWithPriority, inlined for performance.
- var previousPriorityLevel = currentPriorityLevel;
- currentPriorityLevel = parentPriorityLevel;
- try {
- return callback.apply(this, arguments);
- } finally {
- currentPriorityLevel = previousPriorityLevel;
- }
- };
- }
- function timeoutForPriorityLevel(priorityLevel) {
- switch (priorityLevel) {
- case ImmediatePriority:
- return IMMEDIATE_PRIORITY_TIMEOUT;
- case UserBlockingPriority:
- return USER_BLOCKING_PRIORITY;
- case IdlePriority:
- return IDLE_PRIORITY;
- case LowPriority:
- return LOW_PRIORITY_TIMEOUT;
- case NormalPriority:
- default:
- return NORMAL_PRIORITY_TIMEOUT;
- }
- }
- function unstable_scheduleCallback(priorityLevel, callback, options) {
- var currentTime = exports.unstable_now();
- var startTime;
- var timeout;
- if (typeof options === 'object' && options !== null) {
- var delay = options.delay;
- if (typeof delay === 'number' && delay > 0) {
- startTime = currentTime + delay;
- } else {
- startTime = currentTime;
- }
- timeout = typeof options.timeout === 'number' ? options.timeout : timeoutForPriorityLevel(priorityLevel);
- } else {
- timeout = timeoutForPriorityLevel(priorityLevel);
- startTime = currentTime;
- }
- var expirationTime = startTime + timeout;
- var newTask = {
- id: taskIdCounter++,
- callback: callback,
- priorityLevel: priorityLevel,
- startTime: startTime,
- expirationTime: expirationTime,
- sortIndex: -1
- };
- {
- newTask.isQueued = false;
- }
- if (startTime > currentTime) {
- // This is a delayed task.
- newTask.sortIndex = startTime;
- push(timerQueue, newTask);
- if (peek(taskQueue) === null && newTask === peek(timerQueue)) {
- // All tasks are delayed, and this is the task with the earliest delay.
- if (isHostTimeoutScheduled) {
- // Cancel an existing timeout.
- cancelHostTimeout();
- } else {
- isHostTimeoutScheduled = true;
- } // Schedule a timeout.
- requestHostTimeout(handleTimeout, startTime - currentTime);
- }
- } else {
- newTask.sortIndex = expirationTime;
- push(taskQueue, newTask);
- {
- markTaskStart(newTask, currentTime);
- newTask.isQueued = true;
- } // Schedule a host callback, if needed. If we're already performing work,
- // wait until the next time we yield.
- if (!isHostCallbackScheduled && !isPerformingWork) {
- isHostCallbackScheduled = true;
- requestHostCallback(flushWork);
- }
- }
- return newTask;
- }
- function unstable_pauseExecution() {
- }
- function unstable_continueExecution() {
- if (!isHostCallbackScheduled && !isPerformingWork) {
- isHostCallbackScheduled = true;
- requestHostCallback(flushWork);
- }
- }
- function unstable_getFirstCallbackNode() {
- return peek(taskQueue);
- }
- function unstable_cancelCallback(task) {
- {
- if (task.isQueued) {
- var currentTime = exports.unstable_now();
- markTaskCanceled(task, currentTime);
- task.isQueued = false;
- }
- } // Null out the callback to indicate the task has been canceled. (Can't
- // remove from the queue because you can't remove arbitrary nodes from an
- // array based heap, only the first one.)
- task.callback = null;
- }
- function unstable_getCurrentPriorityLevel() {
- return currentPriorityLevel;
- }
- function unstable_shouldYield() {
- var currentTime = exports.unstable_now();
- advanceTimers(currentTime);
- var firstTask = peek(taskQueue);
- return firstTask !== currentTask && currentTask !== null && firstTask !== null && firstTask.callback !== null && firstTask.startTime <= currentTime && firstTask.expirationTime < currentTask.expirationTime || shouldYieldToHost();
- }
- var unstable_requestPaint = requestPaint;
- var unstable_Profiling = {
- startLoggingProfilingEvents: startLoggingProfilingEvents,
- stopLoggingProfilingEvents: stopLoggingProfilingEvents,
- sharedProfilingBuffer: sharedProfilingBuffer
- } ;
- exports.unstable_IdlePriority = IdlePriority;
- exports.unstable_ImmediatePriority = ImmediatePriority;
- exports.unstable_LowPriority = LowPriority;
- exports.unstable_NormalPriority = NormalPriority;
- exports.unstable_Profiling = unstable_Profiling;
- exports.unstable_UserBlockingPriority = UserBlockingPriority;
- exports.unstable_cancelCallback = unstable_cancelCallback;
- exports.unstable_continueExecution = unstable_continueExecution;
- exports.unstable_getCurrentPriorityLevel = unstable_getCurrentPriorityLevel;
- exports.unstable_getFirstCallbackNode = unstable_getFirstCallbackNode;
- exports.unstable_next = unstable_next;
- exports.unstable_pauseExecution = unstable_pauseExecution;
- exports.unstable_requestPaint = unstable_requestPaint;
- exports.unstable_runWithPriority = unstable_runWithPriority;
- exports.unstable_scheduleCallback = unstable_scheduleCallback;
- exports.unstable_shouldYield = unstable_shouldYield;
- exports.unstable_wrapCallback = unstable_wrapCallback;
- })();
- }
- /***/ }),
- /***/ "./node_modules/scheduler/index.js":
- /*!*****************************************!*\
- !*** ./node_modules/scheduler/index.js ***!
- \*****************************************/
- /*! dynamic exports provided */
- /*! all exports used */
- /***/ (function(module, exports, __webpack_require__) {
- "use strict";
- if (false) {
- module.exports = require('./cjs/scheduler.production.min.js');
- } else {
- module.exports = __webpack_require__(/*! ./cjs/scheduler.development.js */ "./node_modules/scheduler/cjs/scheduler.development.js");
- }
- /***/ }),
- /***/ "./node_modules/scheduler/tracing.js":
- /*!*******************************************!*\
- !*** ./node_modules/scheduler/tracing.js ***!
- \*******************************************/
- /*! dynamic exports provided */
- /*! all exports used */
- /***/ (function(module, exports, __webpack_require__) {
- "use strict";
- if (false) {
- module.exports = require('./cjs/scheduler-tracing.production.min.js');
- } else {
- module.exports = __webpack_require__(/*! ./cjs/scheduler-tracing.development.js */ "./node_modules/scheduler/cjs/scheduler-tracing.development.js");
- }
- /***/ }),
- /***/ "./node_modules/sockjs-client/lib/entry.js":
- /*!*************************************************!*\
- !*** ./node_modules/sockjs-client/lib/entry.js ***!
- \*************************************************/
- /*! dynamic exports provided */
- /*! all exports used */
- /***/ (function(module, exports, __webpack_require__) {
- "use strict";
- /* WEBPACK VAR INJECTION */(function(global) {
- var transportList = __webpack_require__(/*! ./transport-list */ "./node_modules/sockjs-client/lib/transport-list.js");
- module.exports = __webpack_require__(/*! ./main */ "./node_modules/sockjs-client/lib/main.js")(transportList);
- // TODO can't get rid of this until all servers do
- if ('_sockjs_onload' in global) {
- setTimeout(global._sockjs_onload, 1);
- }
- /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(/*! ./../../webpack/buildin/global.js */ "./node_modules/webpack/buildin/global.js")))
- /***/ }),
- /***/ "./node_modules/sockjs-client/lib/event/close.js":
- /*!*******************************************************!*\
- !*** ./node_modules/sockjs-client/lib/event/close.js ***!
- \*******************************************************/
- /*! dynamic exports provided */
- /*! all exports used */
- /***/ (function(module, exports, __webpack_require__) {
- "use strict";
- var inherits = __webpack_require__(/*! inherits */ "./node_modules/inherits/inherits_browser.js")
- , Event = __webpack_require__(/*! ./event */ "./node_modules/sockjs-client/lib/event/event.js")
- ;
- function CloseEvent() {
- Event.call(this);
- this.initEvent('close', false, false);
- this.wasClean = false;
- this.code = 0;
- this.reason = '';
- }
- inherits(CloseEvent, Event);
- module.exports = CloseEvent;
- /***/ }),
- /***/ "./node_modules/sockjs-client/lib/event/emitter.js":
- /*!*********************************************************!*\
- !*** ./node_modules/sockjs-client/lib/event/emitter.js ***!
- \*********************************************************/
- /*! dynamic exports provided */
- /*! all exports used */
- /***/ (function(module, exports, __webpack_require__) {
- "use strict";
- var inherits = __webpack_require__(/*! inherits */ "./node_modules/inherits/inherits_browser.js")
- , EventTarget = __webpack_require__(/*! ./eventtarget */ "./node_modules/sockjs-client/lib/event/eventtarget.js")
- ;
- function EventEmitter() {
- EventTarget.call(this);
- }
- inherits(EventEmitter, EventTarget);
- EventEmitter.prototype.removeAllListeners = function(type) {
- if (type) {
- delete this._listeners[type];
- } else {
- this._listeners = {};
- }
- };
- EventEmitter.prototype.once = function(type, listener) {
- var self = this
- , fired = false;
- function g() {
- self.removeListener(type, g);
- if (!fired) {
- fired = true;
- listener.apply(this, arguments);
- }
- }
- this.on(type, g);
- };
- EventEmitter.prototype.emit = function() {
- var type = arguments[0];
- var listeners = this._listeners[type];
- if (!listeners) {
- return;
- }
- // equivalent of Array.prototype.slice.call(arguments, 1);
- var l = arguments.length;
- var args = new Array(l - 1);
- for (var ai = 1; ai < l; ai++) {
- args[ai - 1] = arguments[ai];
- }
- for (var i = 0; i < listeners.length; i++) {
- listeners[i].apply(this, args);
- }
- };
- EventEmitter.prototype.on = EventEmitter.prototype.addListener = EventTarget.prototype.addEventListener;
- EventEmitter.prototype.removeListener = EventTarget.prototype.removeEventListener;
- module.exports.EventEmitter = EventEmitter;
- /***/ }),
- /***/ "./node_modules/sockjs-client/lib/event/event.js":
- /*!*******************************************************!*\
- !*** ./node_modules/sockjs-client/lib/event/event.js ***!
- \*******************************************************/
- /*! dynamic exports provided */
- /*! all exports used */
- /***/ (function(module, exports, __webpack_require__) {
- "use strict";
- function Event(eventType) {
- this.type = eventType;
- }
- Event.prototype.initEvent = function(eventType, canBubble, cancelable) {
- this.type = eventType;
- this.bubbles = canBubble;
- this.cancelable = cancelable;
- this.timeStamp = +new Date();
- return this;
- };
- Event.prototype.stopPropagation = function() {};
- Event.prototype.preventDefault = function() {};
- Event.CAPTURING_PHASE = 1;
- Event.AT_TARGET = 2;
- Event.BUBBLING_PHASE = 3;
- module.exports = Event;
- /***/ }),
- /***/ "./node_modules/sockjs-client/lib/event/eventtarget.js":
- /*!*************************************************************!*\
- !*** ./node_modules/sockjs-client/lib/event/eventtarget.js ***!
- \*************************************************************/
- /*! dynamic exports provided */
- /*! all exports used */
- /***/ (function(module, exports, __webpack_require__) {
- "use strict";
- /* Simplified implementation of DOM2 EventTarget.
- * http://www.w3.org/TR/DOM-Level-2-Events/events.html#Events-EventTarget
- */
- function EventTarget() {
- this._listeners = {};
- }
- EventTarget.prototype.addEventListener = function(eventType, listener) {
- if (!(eventType in this._listeners)) {
- this._listeners[eventType] = [];
- }
- var arr = this._listeners[eventType];
- // #4
- if (arr.indexOf(listener) === -1) {
- // Make a copy so as not to interfere with a current dispatchEvent.
- arr = arr.concat([listener]);
- }
- this._listeners[eventType] = arr;
- };
- EventTarget.prototype.removeEventListener = function(eventType, listener) {
- var arr = this._listeners[eventType];
- if (!arr) {
- return;
- }
- var idx = arr.indexOf(listener);
- if (idx !== -1) {
- if (arr.length > 1) {
- // Make a copy so as not to interfere with a current dispatchEvent.
- this._listeners[eventType] = arr.slice(0, idx).concat(arr.slice(idx + 1));
- } else {
- delete this._listeners[eventType];
- }
- return;
- }
- };
- EventTarget.prototype.dispatchEvent = function() {
- var event = arguments[0];
- var t = event.type;
- // equivalent of Array.prototype.slice.call(arguments, 0);
- var args = arguments.length === 1 ? [event] : Array.apply(null, arguments);
- // TODO: This doesn't match the real behavior; per spec, onfoo get
- // their place in line from the /first/ time they're set from
- // non-null. Although WebKit bumps it to the end every time it's
- // set.
- if (this['on' + t]) {
- this['on' + t].apply(this, args);
- }
- if (t in this._listeners) {
- // Grab a reference to the listeners list. removeEventListener may alter the list.
- var listeners = this._listeners[t];
- for (var i = 0; i < listeners.length; i++) {
- listeners[i].apply(this, args);
- }
- }
- };
- module.exports = EventTarget;
- /***/ }),
- /***/ "./node_modules/sockjs-client/lib/event/trans-message.js":
- /*!***************************************************************!*\
- !*** ./node_modules/sockjs-client/lib/event/trans-message.js ***!
- \***************************************************************/
- /*! dynamic exports provided */
- /*! all exports used */
- /***/ (function(module, exports, __webpack_require__) {
- "use strict";
- var inherits = __webpack_require__(/*! inherits */ "./node_modules/inherits/inherits_browser.js")
- , Event = __webpack_require__(/*! ./event */ "./node_modules/sockjs-client/lib/event/event.js")
- ;
- function TransportMessageEvent(data) {
- Event.call(this);
- this.initEvent('message', false, false);
- this.data = data;
- }
- inherits(TransportMessageEvent, Event);
- module.exports = TransportMessageEvent;
- /***/ }),
- /***/ "./node_modules/sockjs-client/lib/facade.js":
- /*!**************************************************!*\
- !*** ./node_modules/sockjs-client/lib/facade.js ***!
- \**************************************************/
- /*! dynamic exports provided */
- /*! all exports used */
- /***/ (function(module, exports, __webpack_require__) {
- "use strict";
- var JSON3 = __webpack_require__(/*! json3 */ "./node_modules/json3/lib/json3.js")
- , iframeUtils = __webpack_require__(/*! ./utils/iframe */ "./node_modules/sockjs-client/lib/utils/iframe.js")
- ;
- function FacadeJS(transport) {
- this._transport = transport;
- transport.on('message', this._transportMessage.bind(this));
- transport.on('close', this._transportClose.bind(this));
- }
- FacadeJS.prototype._transportClose = function(code, reason) {
- iframeUtils.postMessage('c', JSON3.stringify([code, reason]));
- };
- FacadeJS.prototype._transportMessage = function(frame) {
- iframeUtils.postMessage('t', frame);
- };
- FacadeJS.prototype._send = function(data) {
- this._transport.send(data);
- };
- FacadeJS.prototype._close = function() {
- this._transport.close();
- this._transport.removeAllListeners();
- };
- module.exports = FacadeJS;
- /***/ }),
- /***/ "./node_modules/sockjs-client/lib/iframe-bootstrap.js":
- /*!************************************************************!*\
- !*** ./node_modules/sockjs-client/lib/iframe-bootstrap.js ***!
- \************************************************************/
- /*! dynamic exports provided */
- /*! all exports used */
- /***/ (function(module, exports, __webpack_require__) {
- "use strict";
- var urlUtils = __webpack_require__(/*! ./utils/url */ "./node_modules/sockjs-client/lib/utils/url.js")
- , eventUtils = __webpack_require__(/*! ./utils/event */ "./node_modules/sockjs-client/lib/utils/event.js")
- , JSON3 = __webpack_require__(/*! json3 */ "./node_modules/json3/lib/json3.js")
- , FacadeJS = __webpack_require__(/*! ./facade */ "./node_modules/sockjs-client/lib/facade.js")
- , InfoIframeReceiver = __webpack_require__(/*! ./info-iframe-receiver */ "./node_modules/sockjs-client/lib/info-iframe-receiver.js")
- , iframeUtils = __webpack_require__(/*! ./utils/iframe */ "./node_modules/sockjs-client/lib/utils/iframe.js")
- , loc = __webpack_require__(/*! ./location */ "./node_modules/sockjs-client/lib/location.js")
- ;
- var debug = function() {};
- if (true) {
- debug = __webpack_require__(/*! debug */ "./node_modules/debug/src/browser.js")('sockjs-client:iframe-bootstrap');
- }
- module.exports = function(SockJS, availableTransports) {
- var transportMap = {};
- availableTransports.forEach(function(at) {
- if (at.facadeTransport) {
- transportMap[at.facadeTransport.transportName] = at.facadeTransport;
- }
- });
- // hard-coded for the info iframe
- // TODO see if we can make this more dynamic
- transportMap[InfoIframeReceiver.transportName] = InfoIframeReceiver;
- var parentOrigin;
- /* eslint-disable camelcase */
- SockJS.bootstrap_iframe = function() {
- /* eslint-enable camelcase */
- var facade;
- iframeUtils.currentWindowId = loc.hash.slice(1);
- var onMessage = function(e) {
- if (e.source !== parent) {
- return;
- }
- if (typeof parentOrigin === 'undefined') {
- parentOrigin = e.origin;
- }
- if (e.origin !== parentOrigin) {
- return;
- }
- var iframeMessage;
- try {
- iframeMessage = JSON3.parse(e.data);
- } catch (ignored) {
- debug('bad json', e.data);
- return;
- }
- if (iframeMessage.windowId !== iframeUtils.currentWindowId) {
- return;
- }
- switch (iframeMessage.type) {
- case 's':
- var p;
- try {
- p = JSON3.parse(iframeMessage.data);
- } catch (ignored) {
- debug('bad json', iframeMessage.data);
- break;
- }
- var version = p[0];
- var transport = p[1];
- var transUrl = p[2];
- var baseUrl = p[3];
- debug(version, transport, transUrl, baseUrl);
- // change this to semver logic
- if (version !== SockJS.version) {
- throw new Error('Incompatible SockJS! Main site uses:' +
- ' "' + version + '", the iframe:' +
- ' "' + SockJS.version + '".');
- }
- if (!urlUtils.isOriginEqual(transUrl, loc.href) ||
- !urlUtils.isOriginEqual(baseUrl, loc.href)) {
- throw new Error('Can\'t connect to different domain from within an ' +
- 'iframe. (' + loc.href + ', ' + transUrl + ', ' + baseUrl + ')');
- }
- facade = new FacadeJS(new transportMap[transport](transUrl, baseUrl));
- break;
- case 'm':
- facade._send(iframeMessage.data);
- break;
- case 'c':
- if (facade) {
- facade._close();
- }
- facade = null;
- break;
- }
- };
- eventUtils.attachEvent('message', onMessage);
- // Start
- iframeUtils.postMessage('s');
- };
- };
- /***/ }),
- /***/ "./node_modules/sockjs-client/lib/info-ajax.js":
- /*!*****************************************************!*\
- !*** ./node_modules/sockjs-client/lib/info-ajax.js ***!
- \*****************************************************/
- /*! dynamic exports provided */
- /*! all exports used */
- /***/ (function(module, exports, __webpack_require__) {
- "use strict";
- var EventEmitter = __webpack_require__(/*! events */ "./node_modules/sockjs-client/lib/event/emitter.js").EventEmitter
- , inherits = __webpack_require__(/*! inherits */ "./node_modules/inherits/inherits_browser.js")
- , JSON3 = __webpack_require__(/*! json3 */ "./node_modules/json3/lib/json3.js")
- , objectUtils = __webpack_require__(/*! ./utils/object */ "./node_modules/sockjs-client/lib/utils/object.js")
- ;
- var debug = function() {};
- if (true) {
- debug = __webpack_require__(/*! debug */ "./node_modules/debug/src/browser.js")('sockjs-client:info-ajax');
- }
- function InfoAjax(url, AjaxObject) {
- EventEmitter.call(this);
- var self = this;
- var t0 = +new Date();
- this.xo = new AjaxObject('GET', url);
- this.xo.once('finish', function(status, text) {
- var info, rtt;
- if (status === 200) {
- rtt = (+new Date()) - t0;
- if (text) {
- try {
- info = JSON3.parse(text);
- } catch (e) {
- debug('bad json', text);
- }
- }
- if (!objectUtils.isObject(info)) {
- info = {};
- }
- }
- self.emit('finish', info, rtt);
- self.removeAllListeners();
- });
- }
- inherits(InfoAjax, EventEmitter);
- InfoAjax.prototype.close = function() {
- this.removeAllListeners();
- this.xo.close();
- };
- module.exports = InfoAjax;
- /***/ }),
- /***/ "./node_modules/sockjs-client/lib/info-iframe-receiver.js":
- /*!****************************************************************!*\
- !*** ./node_modules/sockjs-client/lib/info-iframe-receiver.js ***!
- \****************************************************************/
- /*! dynamic exports provided */
- /*! all exports used */
- /***/ (function(module, exports, __webpack_require__) {
- "use strict";
- var inherits = __webpack_require__(/*! inherits */ "./node_modules/inherits/inherits_browser.js")
- , EventEmitter = __webpack_require__(/*! events */ "./node_modules/sockjs-client/lib/event/emitter.js").EventEmitter
- , JSON3 = __webpack_require__(/*! json3 */ "./node_modules/json3/lib/json3.js")
- , XHRLocalObject = __webpack_require__(/*! ./transport/sender/xhr-local */ "./node_modules/sockjs-client/lib/transport/sender/xhr-local.js")
- , InfoAjax = __webpack_require__(/*! ./info-ajax */ "./node_modules/sockjs-client/lib/info-ajax.js")
- ;
- function InfoReceiverIframe(transUrl) {
- var self = this;
- EventEmitter.call(this);
- this.ir = new InfoAjax(transUrl, XHRLocalObject);
- this.ir.once('finish', function(info, rtt) {
- self.ir = null;
- self.emit('message', JSON3.stringify([info, rtt]));
- });
- }
- inherits(InfoReceiverIframe, EventEmitter);
- InfoReceiverIframe.transportName = 'iframe-info-receiver';
- InfoReceiverIframe.prototype.close = function() {
- if (this.ir) {
- this.ir.close();
- this.ir = null;
- }
- this.removeAllListeners();
- };
- module.exports = InfoReceiverIframe;
- /***/ }),
- /***/ "./node_modules/sockjs-client/lib/info-iframe.js":
- /*!*******************************************************!*\
- !*** ./node_modules/sockjs-client/lib/info-iframe.js ***!
- \*******************************************************/
- /*! dynamic exports provided */
- /*! all exports used */
- /***/ (function(module, exports, __webpack_require__) {
- "use strict";
- /* WEBPACK VAR INJECTION */(function(global) {
- var EventEmitter = __webpack_require__(/*! events */ "./node_modules/sockjs-client/lib/event/emitter.js").EventEmitter
- , inherits = __webpack_require__(/*! inherits */ "./node_modules/inherits/inherits_browser.js")
- , JSON3 = __webpack_require__(/*! json3 */ "./node_modules/json3/lib/json3.js")
- , utils = __webpack_require__(/*! ./utils/event */ "./node_modules/sockjs-client/lib/utils/event.js")
- , IframeTransport = __webpack_require__(/*! ./transport/iframe */ "./node_modules/sockjs-client/lib/transport/iframe.js")
- , InfoReceiverIframe = __webpack_require__(/*! ./info-iframe-receiver */ "./node_modules/sockjs-client/lib/info-iframe-receiver.js")
- ;
- var debug = function() {};
- if (true) {
- debug = __webpack_require__(/*! debug */ "./node_modules/debug/src/browser.js")('sockjs-client:info-iframe');
- }
- function InfoIframe(baseUrl, url) {
- var self = this;
- EventEmitter.call(this);
- var go = function() {
- var ifr = self.ifr = new IframeTransport(InfoReceiverIframe.transportName, url, baseUrl);
- ifr.once('message', function(msg) {
- if (msg) {
- var d;
- try {
- d = JSON3.parse(msg);
- } catch (e) {
- debug('bad json', msg);
- self.emit('finish');
- self.close();
- return;
- }
- var info = d[0], rtt = d[1];
- self.emit('finish', info, rtt);
- }
- self.close();
- });
- ifr.once('close', function() {
- self.emit('finish');
- self.close();
- });
- };
- // TODO this seems the same as the 'needBody' from transports
- if (!global.document.body) {
- utils.attachEvent('load', go);
- } else {
- go();
- }
- }
- inherits(InfoIframe, EventEmitter);
- InfoIframe.enabled = function() {
- return IframeTransport.enabled();
- };
- InfoIframe.prototype.close = function() {
- if (this.ifr) {
- this.ifr.close();
- }
- this.removeAllListeners();
- this.ifr = null;
- };
- module.exports = InfoIframe;
- /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(/*! ./../../webpack/buildin/global.js */ "./node_modules/webpack/buildin/global.js")))
- /***/ }),
- /***/ "./node_modules/sockjs-client/lib/info-receiver.js":
- /*!*********************************************************!*\
- !*** ./node_modules/sockjs-client/lib/info-receiver.js ***!
- \*********************************************************/
- /*! dynamic exports provided */
- /*! all exports used */
- /***/ (function(module, exports, __webpack_require__) {
- "use strict";
- var EventEmitter = __webpack_require__(/*! events */ "./node_modules/sockjs-client/lib/event/emitter.js").EventEmitter
- , inherits = __webpack_require__(/*! inherits */ "./node_modules/inherits/inherits_browser.js")
- , urlUtils = __webpack_require__(/*! ./utils/url */ "./node_modules/sockjs-client/lib/utils/url.js")
- , XDR = __webpack_require__(/*! ./transport/sender/xdr */ "./node_modules/sockjs-client/lib/transport/sender/xdr.js")
- , XHRCors = __webpack_require__(/*! ./transport/sender/xhr-cors */ "./node_modules/sockjs-client/lib/transport/sender/xhr-cors.js")
- , XHRLocal = __webpack_require__(/*! ./transport/sender/xhr-local */ "./node_modules/sockjs-client/lib/transport/sender/xhr-local.js")
- , XHRFake = __webpack_require__(/*! ./transport/sender/xhr-fake */ "./node_modules/sockjs-client/lib/transport/sender/xhr-fake.js")
- , InfoIframe = __webpack_require__(/*! ./info-iframe */ "./node_modules/sockjs-client/lib/info-iframe.js")
- , InfoAjax = __webpack_require__(/*! ./info-ajax */ "./node_modules/sockjs-client/lib/info-ajax.js")
- ;
- var debug = function() {};
- if (true) {
- debug = __webpack_require__(/*! debug */ "./node_modules/debug/src/browser.js")('sockjs-client:info-receiver');
- }
- function InfoReceiver(baseUrl, urlInfo) {
- debug(baseUrl);
- var self = this;
- EventEmitter.call(this);
- setTimeout(function() {
- self.doXhr(baseUrl, urlInfo);
- }, 0);
- }
- inherits(InfoReceiver, EventEmitter);
- // TODO this is currently ignoring the list of available transports and the whitelist
- InfoReceiver._getReceiver = function(baseUrl, url, urlInfo) {
- // determine method of CORS support (if needed)
- if (urlInfo.sameOrigin) {
- return new InfoAjax(url, XHRLocal);
- }
- if (XHRCors.enabled) {
- return new InfoAjax(url, XHRCors);
- }
- if (XDR.enabled && urlInfo.sameScheme) {
- return new InfoAjax(url, XDR);
- }
- if (InfoIframe.enabled()) {
- return new InfoIframe(baseUrl, url);
- }
- return new InfoAjax(url, XHRFake);
- };
- InfoReceiver.prototype.doXhr = function(baseUrl, urlInfo) {
- var self = this
- , url = urlUtils.addPath(baseUrl, '/info')
- ;
- debug('doXhr', url);
- this.xo = InfoReceiver._getReceiver(baseUrl, url, urlInfo);
- this.timeoutRef = setTimeout(function() {
- debug('timeout');
- self._cleanup(false);
- self.emit('finish');
- }, InfoReceiver.timeout);
- this.xo.once('finish', function(info, rtt) {
- debug('finish', info, rtt);
- self._cleanup(true);
- self.emit('finish', info, rtt);
- });
- };
- InfoReceiver.prototype._cleanup = function(wasClean) {
- debug('_cleanup');
- clearTimeout(this.timeoutRef);
- this.timeoutRef = null;
- if (!wasClean && this.xo) {
- this.xo.close();
- }
- this.xo = null;
- };
- InfoReceiver.prototype.close = function() {
- debug('close');
- this.removeAllListeners();
- this._cleanup(false);
- };
- InfoReceiver.timeout = 8000;
- module.exports = InfoReceiver;
- /***/ }),
- /***/ "./node_modules/sockjs-client/lib/location.js":
- /*!****************************************************!*\
- !*** ./node_modules/sockjs-client/lib/location.js ***!
- \****************************************************/
- /*! dynamic exports provided */
- /*! all exports used */
- /***/ (function(module, exports, __webpack_require__) {
- "use strict";
- /* WEBPACK VAR INJECTION */(function(global) {
- module.exports = global.location || {
- origin: 'http://localhost:80'
- , protocol: 'http'
- , host: 'localhost'
- , port: 80
- , href: 'http://localhost/'
- , hash: ''
- };
- /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(/*! ./../../webpack/buildin/global.js */ "./node_modules/webpack/buildin/global.js")))
- /***/ }),
- /***/ "./node_modules/sockjs-client/lib/main.js":
- /*!************************************************!*\
- !*** ./node_modules/sockjs-client/lib/main.js ***!
- \************************************************/
- /*! dynamic exports provided */
- /*! all exports used */
- /***/ (function(module, exports, __webpack_require__) {
- "use strict";
- /* WEBPACK VAR INJECTION */(function(global) {
- __webpack_require__(/*! ./shims */ "./node_modules/sockjs-client/lib/shims.js");
- var URL = __webpack_require__(/*! url-parse */ "./node_modules/url-parse/index.js")
- , inherits = __webpack_require__(/*! inherits */ "./node_modules/inherits/inherits_browser.js")
- , JSON3 = __webpack_require__(/*! json3 */ "./node_modules/json3/lib/json3.js")
- , random = __webpack_require__(/*! ./utils/random */ "./node_modules/sockjs-client/lib/utils/random.js")
- , escape = __webpack_require__(/*! ./utils/escape */ "./node_modules/sockjs-client/lib/utils/escape.js")
- , urlUtils = __webpack_require__(/*! ./utils/url */ "./node_modules/sockjs-client/lib/utils/url.js")
- , eventUtils = __webpack_require__(/*! ./utils/event */ "./node_modules/sockjs-client/lib/utils/event.js")
- , transport = __webpack_require__(/*! ./utils/transport */ "./node_modules/sockjs-client/lib/utils/transport.js")
- , objectUtils = __webpack_require__(/*! ./utils/object */ "./node_modules/sockjs-client/lib/utils/object.js")
- , browser = __webpack_require__(/*! ./utils/browser */ "./node_modules/sockjs-client/lib/utils/browser.js")
- , log = __webpack_require__(/*! ./utils/log */ "./node_modules/sockjs-client/lib/utils/log.js")
- , Event = __webpack_require__(/*! ./event/event */ "./node_modules/sockjs-client/lib/event/event.js")
- , EventTarget = __webpack_require__(/*! ./event/eventtarget */ "./node_modules/sockjs-client/lib/event/eventtarget.js")
- , loc = __webpack_require__(/*! ./location */ "./node_modules/sockjs-client/lib/location.js")
- , CloseEvent = __webpack_require__(/*! ./event/close */ "./node_modules/sockjs-client/lib/event/close.js")
- , TransportMessageEvent = __webpack_require__(/*! ./event/trans-message */ "./node_modules/sockjs-client/lib/event/trans-message.js")
- , InfoReceiver = __webpack_require__(/*! ./info-receiver */ "./node_modules/sockjs-client/lib/info-receiver.js")
- ;
- var debug = function() {};
- if (true) {
- debug = __webpack_require__(/*! debug */ "./node_modules/debug/src/browser.js")('sockjs-client:main');
- }
- var transports;
- // follow constructor steps defined at http://dev.w3.org/html5/websockets/#the-websocket-interface
- function SockJS(url, protocols, options) {
- if (!(this instanceof SockJS)) {
- return new SockJS(url, protocols, options);
- }
- if (arguments.length < 1) {
- throw new TypeError("Failed to construct 'SockJS: 1 argument required, but only 0 present");
- }
- EventTarget.call(this);
- this.readyState = SockJS.CONNECTING;
- this.extensions = '';
- this.protocol = '';
- // non-standard extension
- options = options || {};
- if (options.protocols_whitelist) {
- log.warn("'protocols_whitelist' is DEPRECATED. Use 'transports' instead.");
- }
- this._transportsWhitelist = options.transports;
- this._transportOptions = options.transportOptions || {};
- var sessionId = options.sessionId || 8;
- if (typeof sessionId === 'function') {
- this._generateSessionId = sessionId;
- } else if (typeof sessionId === 'number') {
- this._generateSessionId = function() {
- return random.string(sessionId);
- };
- } else {
- throw new TypeError('If sessionId is used in the options, it needs to be a number or a function.');
- }
- this._server = options.server || random.numberString(1000);
- // Step 1 of WS spec - parse and validate the url. Issue #8
- var parsedUrl = new URL(url);
- if (!parsedUrl.host || !parsedUrl.protocol) {
- throw new SyntaxError("The URL '" + url + "' is invalid");
- } else if (parsedUrl.hash) {
- throw new SyntaxError('The URL must not contain a fragment');
- } else if (parsedUrl.protocol !== 'http:' && parsedUrl.protocol !== 'https:') {
- throw new SyntaxError("The URL's scheme must be either 'http:' or 'https:'. '" + parsedUrl.protocol + "' is not allowed.");
- }
- var secure = parsedUrl.protocol === 'https:';
- // Step 2 - don't allow secure origin with an insecure protocol
- if (loc.protocol === 'https' && !secure) {
- throw new Error('SecurityError: An insecure SockJS connection may not be initiated from a page loaded over HTTPS');
- }
- // Step 3 - check port access - no need here
- // Step 4 - parse protocols argument
- if (!protocols) {
- protocols = [];
- } else if (!Array.isArray(protocols)) {
- protocols = [protocols];
- }
- // Step 5 - check protocols argument
- var sortedProtocols = protocols.sort();
- sortedProtocols.forEach(function(proto, i) {
- if (!proto) {
- throw new SyntaxError("The protocols entry '" + proto + "' is invalid.");
- }
- if (i < (sortedProtocols.length - 1) && proto === sortedProtocols[i + 1]) {
- throw new SyntaxError("The protocols entry '" + proto + "' is duplicated.");
- }
- });
- // Step 6 - convert origin
- var o = urlUtils.getOrigin(loc.href);
- this._origin = o ? o.toLowerCase() : null;
- // remove the trailing slash
- parsedUrl.set('pathname', parsedUrl.pathname.replace(/\/+$/, ''));
- // store the sanitized url
- this.url = parsedUrl.href;
- debug('using url', this.url);
- // Step 7 - start connection in background
- // obtain server info
- // http://sockjs.github.io/sockjs-protocol/sockjs-protocol-0.3.3.html#section-26
- this._urlInfo = {
- nullOrigin: !browser.hasDomain()
- , sameOrigin: urlUtils.isOriginEqual(this.url, loc.href)
- , sameScheme: urlUtils.isSchemeEqual(this.url, loc.href)
- };
- this._ir = new InfoReceiver(this.url, this._urlInfo);
- this._ir.once('finish', this._receiveInfo.bind(this));
- }
- inherits(SockJS, EventTarget);
- function userSetCode(code) {
- return code === 1000 || (code >= 3000 && code <= 4999);
- }
- SockJS.prototype.close = function(code, reason) {
- // Step 1
- if (code && !userSetCode(code)) {
- throw new Error('InvalidAccessError: Invalid code');
- }
- // Step 2.4 states the max is 123 bytes, but we are just checking length
- if (reason && reason.length > 123) {
- throw new SyntaxError('reason argument has an invalid length');
- }
- // Step 3.1
- if (this.readyState === SockJS.CLOSING || this.readyState === SockJS.CLOSED) {
- return;
- }
- // TODO look at docs to determine how to set this
- var wasClean = true;
- this._close(code || 1000, reason || 'Normal closure', wasClean);
- };
- SockJS.prototype.send = function(data) {
- // #13 - convert anything non-string to string
- // TODO this currently turns objects into [object Object]
- if (typeof data !== 'string') {
- data = '' + data;
- }
- if (this.readyState === SockJS.CONNECTING) {
- throw new Error('InvalidStateError: The connection has not been established yet');
- }
- if (this.readyState !== SockJS.OPEN) {
- return;
- }
- this._transport.send(escape.quote(data));
- };
- SockJS.version = __webpack_require__(/*! ./version */ "./node_modules/sockjs-client/lib/version.js");
- SockJS.CONNECTING = 0;
- SockJS.OPEN = 1;
- SockJS.CLOSING = 2;
- SockJS.CLOSED = 3;
- SockJS.prototype._receiveInfo = function(info, rtt) {
- debug('_receiveInfo', rtt);
- this._ir = null;
- if (!info) {
- this._close(1002, 'Cannot connect to server');
- return;
- }
- // establish a round-trip timeout (RTO) based on the
- // round-trip time (RTT)
- this._rto = this.countRTO(rtt);
- // allow server to override url used for the actual transport
- this._transUrl = info.base_url ? info.base_url : this.url;
- info = objectUtils.extend(info, this._urlInfo);
- debug('info', info);
- // determine list of desired and supported transports
- var enabledTransports = transports.filterToEnabled(this._transportsWhitelist, info);
- this._transports = enabledTransports.main;
- debug(this._transports.length + ' enabled transports');
- this._connect();
- };
- SockJS.prototype._connect = function() {
- for (var Transport = this._transports.shift(); Transport; Transport = this._transports.shift()) {
- debug('attempt', Transport.transportName);
- if (Transport.needBody) {
- if (!global.document.body ||
- (typeof global.document.readyState !== 'undefined' &&
- global.document.readyState !== 'complete' &&
- global.document.readyState !== 'interactive')) {
- debug('waiting for body');
- this._transports.unshift(Transport);
- eventUtils.attachEvent('load', this._connect.bind(this));
- return;
- }
- }
- // calculate timeout based on RTO and round trips. Default to 5s
- var timeoutMs = (this._rto * Transport.roundTrips) || 5000;
- this._transportTimeoutId = setTimeout(this._transportTimeout.bind(this), timeoutMs);
- debug('using timeout', timeoutMs);
- var transportUrl = urlUtils.addPath(this._transUrl, '/' + this._server + '/' + this._generateSessionId());
- var options = this._transportOptions[Transport.transportName];
- debug('transport url', transportUrl);
- var transportObj = new Transport(transportUrl, this._transUrl, options);
- transportObj.on('message', this._transportMessage.bind(this));
- transportObj.once('close', this._transportClose.bind(this));
- transportObj.transportName = Transport.transportName;
- this._transport = transportObj;
- return;
- }
- this._close(2000, 'All transports failed', false);
- };
- SockJS.prototype._transportTimeout = function() {
- debug('_transportTimeout');
- if (this.readyState === SockJS.CONNECTING) {
- this._transportClose(2007, 'Transport timed out');
- }
- };
- SockJS.prototype._transportMessage = function(msg) {
- debug('_transportMessage', msg);
- var self = this
- , type = msg.slice(0, 1)
- , content = msg.slice(1)
- , payload
- ;
- // first check for messages that don't need a payload
- switch (type) {
- case 'o':
- this._open();
- return;
- case 'h':
- this.dispatchEvent(new Event('heartbeat'));
- debug('heartbeat', this.transport);
- return;
- }
- if (content) {
- try {
- payload = JSON3.parse(content);
- } catch (e) {
- debug('bad json', content);
- }
- }
- if (typeof payload === 'undefined') {
- debug('empty payload', content);
- return;
- }
- switch (type) {
- case 'a':
- if (Array.isArray(payload)) {
- payload.forEach(function(p) {
- debug('message', self.transport, p);
- self.dispatchEvent(new TransportMessageEvent(p));
- });
- }
- break;
- case 'm':
- debug('message', this.transport, payload);
- this.dispatchEvent(new TransportMessageEvent(payload));
- break;
- case 'c':
- if (Array.isArray(payload) && payload.length === 2) {
- this._close(payload[0], payload[1], true);
- }
- break;
- }
- };
- SockJS.prototype._transportClose = function(code, reason) {
- debug('_transportClose', this.transport, code, reason);
- if (this._transport) {
- this._transport.removeAllListeners();
- this._transport = null;
- this.transport = null;
- }
- if (!userSetCode(code) && code !== 2000 && this.readyState === SockJS.CONNECTING) {
- this._connect();
- return;
- }
- this._close(code, reason);
- };
- SockJS.prototype._open = function() {
- debug('_open', this._transport.transportName, this.readyState);
- if (this.readyState === SockJS.CONNECTING) {
- if (this._transportTimeoutId) {
- clearTimeout(this._transportTimeoutId);
- this._transportTimeoutId = null;
- }
- this.readyState = SockJS.OPEN;
- this.transport = this._transport.transportName;
- this.dispatchEvent(new Event('open'));
- debug('connected', this.transport);
- } else {
- // The server might have been restarted, and lost track of our
- // connection.
- this._close(1006, 'Server lost session');
- }
- };
- SockJS.prototype._close = function(code, reason, wasClean) {
- debug('_close', this.transport, code, reason, wasClean, this.readyState);
- var forceFail = false;
- if (this._ir) {
- forceFail = true;
- this._ir.close();
- this._ir = null;
- }
- if (this._transport) {
- this._transport.close();
- this._transport = null;
- this.transport = null;
- }
- if (this.readyState === SockJS.CLOSED) {
- throw new Error('InvalidStateError: SockJS has already been closed');
- }
- this.readyState = SockJS.CLOSING;
- setTimeout(function() {
- this.readyState = SockJS.CLOSED;
- if (forceFail) {
- this.dispatchEvent(new Event('error'));
- }
- var e = new CloseEvent('close');
- e.wasClean = wasClean || false;
- e.code = code || 1000;
- e.reason = reason;
- this.dispatchEvent(e);
- this.onmessage = this.onclose = this.onerror = null;
- debug('disconnected');
- }.bind(this), 0);
- };
- // See: http://www.erg.abdn.ac.uk/~gerrit/dccp/notes/ccid2/rto_estimator/
- // and RFC 2988.
- SockJS.prototype.countRTO = function(rtt) {
- // In a local environment, when using IE8/9 and the `jsonp-polling`
- // transport the time needed to establish a connection (the time that pass
- // from the opening of the transport to the call of `_dispatchOpen`) is
- // around 200msec (the lower bound used in the article above) and this
- // causes spurious timeouts. For this reason we calculate a value slightly
- // larger than that used in the article.
- if (rtt > 100) {
- return 4 * rtt; // rto > 400msec
- }
- return 300 + rtt; // 300msec < rto <= 400msec
- };
- module.exports = function(availableTransports) {
- transports = transport(availableTransports);
- __webpack_require__(/*! ./iframe-bootstrap */ "./node_modules/sockjs-client/lib/iframe-bootstrap.js")(SockJS, availableTransports);
- return SockJS;
- };
- /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(/*! ./../../webpack/buildin/global.js */ "./node_modules/webpack/buildin/global.js")))
- /***/ }),
- /***/ "./node_modules/sockjs-client/lib/shims.js":
- /*!*************************************************!*\
- !*** ./node_modules/sockjs-client/lib/shims.js ***!
- \*************************************************/
- /*! dynamic exports provided */
- /*! all exports used */
- /***/ (function(module, exports, __webpack_require__) {
- "use strict";
- /* eslint-disable */
- /* jscs: disable */
- // pulled specific shims from https://github.com/es-shims/es5-shim
- var ArrayPrototype = Array.prototype;
- var ObjectPrototype = Object.prototype;
- var FunctionPrototype = Function.prototype;
- var StringPrototype = String.prototype;
- var array_slice = ArrayPrototype.slice;
- var _toString = ObjectPrototype.toString;
- var isFunction = function (val) {
- return ObjectPrototype.toString.call(val) === '[object Function]';
- };
- var isArray = function isArray(obj) {
- return _toString.call(obj) === '[object Array]';
- };
- var isString = function isString(obj) {
- return _toString.call(obj) === '[object String]';
- };
- var supportsDescriptors = Object.defineProperty && (function () {
- try {
- Object.defineProperty({}, 'x', {});
- return true;
- } catch (e) { /* this is ES3 */
- return false;
- }
- }());
- // Define configurable, writable and non-enumerable props
- // if they don't exist.
- var defineProperty;
- if (supportsDescriptors) {
- defineProperty = function (object, name, method, forceAssign) {
- if (!forceAssign && (name in object)) { return; }
- Object.defineProperty(object, name, {
- configurable: true,
- enumerable: false,
- writable: true,
- value: method
- });
- };
- } else {
- defineProperty = function (object, name, method, forceAssign) {
- if (!forceAssign && (name in object)) { return; }
- object[name] = method;
- };
- }
- var defineProperties = function (object, map, forceAssign) {
- for (var name in map) {
- if (ObjectPrototype.hasOwnProperty.call(map, name)) {
- defineProperty(object, name, map[name], forceAssign);
- }
- }
- };
- var toObject = function (o) {
- if (o == null) { // this matches both null and undefined
- throw new TypeError("can't convert " + o + ' to object');
- }
- return Object(o);
- };
- //
- // Util
- // ======
- //
- // ES5 9.4
- // http://es5.github.com/#x9.4
- // http://jsperf.com/to-integer
- function toInteger(num) {
- var n = +num;
- if (n !== n) { // isNaN
- n = 0;
- } else if (n !== 0 && n !== (1 / 0) && n !== -(1 / 0)) {
- n = (n > 0 || -1) * Math.floor(Math.abs(n));
- }
- return n;
- }
- function ToUint32(x) {
- return x >>> 0;
- }
- //
- // Function
- // ========
- //
- // ES-5 15.3.4.5
- // http://es5.github.com/#x15.3.4.5
- function Empty() {}
- defineProperties(FunctionPrototype, {
- bind: function bind(that) { // .length is 1
- // 1. Let Target be the this value.
- var target = this;
- // 2. If IsCallable(Target) is false, throw a TypeError exception.
- if (!isFunction(target)) {
- throw new TypeError('Function.prototype.bind called on incompatible ' + target);
- }
- // 3. Let A be a new (possibly empty) internal list of all of the
- // argument values provided after thisArg (arg1, arg2 etc), in order.
- // XXX slicedArgs will stand in for "A" if used
- var args = array_slice.call(arguments, 1); // for normal call
- // 4. Let F be a new native ECMAScript object.
- // 11. Set the [[Prototype]] internal property of F to the standard
- // built-in Function prototype object as specified in 15.3.3.1.
- // 12. Set the [[Call]] internal property of F as described in
- // 15.3.4.5.1.
- // 13. Set the [[Construct]] internal property of F as described in
- // 15.3.4.5.2.
- // 14. Set the [[HasInstance]] internal property of F as described in
- // 15.3.4.5.3.
- var binder = function () {
- if (this instanceof bound) {
- // 15.3.4.5.2 [[Construct]]
- // When the [[Construct]] internal method of a function object,
- // F that was created using the bind function is called with a
- // list of arguments ExtraArgs, the following steps are taken:
- // 1. Let target be the value of F's [[TargetFunction]]
- // internal property.
- // 2. If target has no [[Construct]] internal method, a
- // TypeError exception is thrown.
- // 3. Let boundArgs be the value of F's [[BoundArgs]] internal
- // property.
- // 4. Let args be a new list containing the same values as the
- // list boundArgs in the same order followed by the same
- // values as the list ExtraArgs in the same order.
- // 5. Return the result of calling the [[Construct]] internal
- // method of target providing args as the arguments.
- var result = target.apply(
- this,
- args.concat(array_slice.call(arguments))
- );
- if (Object(result) === result) {
- return result;
- }
- return this;
- } else {
- // 15.3.4.5.1 [[Call]]
- // When the [[Call]] internal method of a function object, F,
- // which was created using the bind function is called with a
- // this value and a list of arguments ExtraArgs, the following
- // steps are taken:
- // 1. Let boundArgs be the value of F's [[BoundArgs]] internal
- // property.
- // 2. Let boundThis be the value of F's [[BoundThis]] internal
- // property.
- // 3. Let target be the value of F's [[TargetFunction]] internal
- // property.
- // 4. Let args be a new list containing the same values as the
- // list boundArgs in the same order followed by the same
- // values as the list ExtraArgs in the same order.
- // 5. Return the result of calling the [[Call]] internal method
- // of target providing boundThis as the this value and
- // providing args as the arguments.
- // equiv: target.call(this, ...boundArgs, ...args)
- return target.apply(
- that,
- args.concat(array_slice.call(arguments))
- );
- }
- };
- // 15. If the [[Class]] internal property of Target is "Function", then
- // a. Let L be the length property of Target minus the length of A.
- // b. Set the length own property of F to either 0 or L, whichever is
- // larger.
- // 16. Else set the length own property of F to 0.
- var boundLength = Math.max(0, target.length - args.length);
- // 17. Set the attributes of the length own property of F to the values
- // specified in 15.3.5.1.
- var boundArgs = [];
- for (var i = 0; i < boundLength; i++) {
- boundArgs.push('$' + i);
- }
- // XXX Build a dynamic function with desired amount of arguments is the only
- // way to set the length property of a function.
- // In environments where Content Security Policies enabled (Chrome extensions,
- // for ex.) all use of eval or Function costructor throws an exception.
- // However in all of these environments Function.prototype.bind exists
- // and so this code will never be executed.
- var bound = Function('binder', 'return function (' + boundArgs.join(',') + '){ return binder.apply(this, arguments); }')(binder);
- if (target.prototype) {
- Empty.prototype = target.prototype;
- bound.prototype = new Empty();
- // Clean up dangling references.
- Empty.prototype = null;
- }
- // TODO
- // 18. Set the [[Extensible]] internal property of F to true.
- // TODO
- // 19. Let thrower be the [[ThrowTypeError]] function Object (13.2.3).
- // 20. Call the [[DefineOwnProperty]] internal method of F with
- // arguments "caller", PropertyDescriptor {[[Get]]: thrower, [[Set]]:
- // thrower, [[Enumerable]]: false, [[Configurable]]: false}, and
- // false.
- // 21. Call the [[DefineOwnProperty]] internal method of F with
- // arguments "arguments", PropertyDescriptor {[[Get]]: thrower,
- // [[Set]]: thrower, [[Enumerable]]: false, [[Configurable]]: false},
- // and false.
- // TODO
- // NOTE Function objects created using Function.prototype.bind do not
- // have a prototype property or the [[Code]], [[FormalParameters]], and
- // [[Scope]] internal properties.
- // XXX can't delete prototype in pure-js.
- // 22. Return F.
- return bound;
- }
- });
- //
- // Array
- // =====
- //
- // ES5 15.4.3.2
- // http://es5.github.com/#x15.4.3.2
- // https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Array/isArray
- defineProperties(Array, { isArray: isArray });
- var boxedString = Object('a');
- var splitString = boxedString[0] !== 'a' || !(0 in boxedString);
- var properlyBoxesContext = function properlyBoxed(method) {
- // Check node 0.6.21 bug where third parameter is not boxed
- var properlyBoxesNonStrict = true;
- var properlyBoxesStrict = true;
- if (method) {
- method.call('foo', function (_, __, context) {
- if (typeof context !== 'object') { properlyBoxesNonStrict = false; }
- });
- method.call([1], function () {
- 'use strict';
- properlyBoxesStrict = typeof this === 'string';
- }, 'x');
- }
- return !!method && properlyBoxesNonStrict && properlyBoxesStrict;
- };
- defineProperties(ArrayPrototype, {
- forEach: function forEach(fun /*, thisp*/) {
- var object = toObject(this),
- self = splitString && isString(this) ? this.split('') : object,
- thisp = arguments[1],
- i = -1,
- length = self.length >>> 0;
- // If no callback function or if callback is not a callable function
- if (!isFunction(fun)) {
- throw new TypeError(); // TODO message
- }
- while (++i < length) {
- if (i in self) {
- // Invoke the callback function with call, passing arguments:
- // context, property value, property key, thisArg object
- // context
- fun.call(thisp, self[i], i, object);
- }
- }
- }
- }, !properlyBoxesContext(ArrayPrototype.forEach));
- // ES5 15.4.4.14
- // http://es5.github.com/#x15.4.4.14
- // https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Array/indexOf
- var hasFirefox2IndexOfBug = Array.prototype.indexOf && [0, 1].indexOf(1, 2) !== -1;
- defineProperties(ArrayPrototype, {
- indexOf: function indexOf(sought /*, fromIndex */ ) {
- var self = splitString && isString(this) ? this.split('') : toObject(this),
- length = self.length >>> 0;
- if (!length) {
- return -1;
- }
- var i = 0;
- if (arguments.length > 1) {
- i = toInteger(arguments[1]);
- }
- // handle negative indices
- i = i >= 0 ? i : Math.max(0, length + i);
- for (; i < length; i++) {
- if (i in self && self[i] === sought) {
- return i;
- }
- }
- return -1;
- }
- }, hasFirefox2IndexOfBug);
- //
- // String
- // ======
- //
- // ES5 15.5.4.14
- // http://es5.github.com/#x15.5.4.14
- // [bugfix, IE lt 9, firefox 4, Konqueror, Opera, obscure browsers]
- // Many browsers do not split properly with regular expressions or they
- // do not perform the split correctly under obscure conditions.
- // See http://blog.stevenlevithan.com/archives/cross-browser-split
- // I've tested in many browsers and this seems to cover the deviant ones:
- // 'ab'.split(/(?:ab)*/) should be ["", ""], not [""]
- // '.'.split(/(.?)(.?)/) should be ["", ".", "", ""], not ["", ""]
- // 'tesst'.split(/(s)*/) should be ["t", undefined, "e", "s", "t"], not
- // [undefined, "t", undefined, "e", ...]
- // ''.split(/.?/) should be [], not [""]
- // '.'.split(/()()/) should be ["."], not ["", "", "."]
- var string_split = StringPrototype.split;
- if (
- 'ab'.split(/(?:ab)*/).length !== 2 ||
- '.'.split(/(.?)(.?)/).length !== 4 ||
- 'tesst'.split(/(s)*/)[1] === 't' ||
- 'test'.split(/(?:)/, -1).length !== 4 ||
- ''.split(/.?/).length ||
- '.'.split(/()()/).length > 1
- ) {
- (function () {
- var compliantExecNpcg = /()??/.exec('')[1] === void 0; // NPCG: nonparticipating capturing group
- StringPrototype.split = function (separator, limit) {
- var string = this;
- if (separator === void 0 && limit === 0) {
- return [];
- }
- // If `separator` is not a regex, use native split
- if (_toString.call(separator) !== '[object RegExp]') {
- return string_split.call(this, separator, limit);
- }
- var output = [],
- flags = (separator.ignoreCase ? 'i' : '') +
- (separator.multiline ? 'm' : '') +
- (separator.extended ? 'x' : '') + // Proposed for ES6
- (separator.sticky ? 'y' : ''), // Firefox 3+
- lastLastIndex = 0,
- // Make `global` and avoid `lastIndex` issues by working with a copy
- separator2, match, lastIndex, lastLength;
- separator = new RegExp(separator.source, flags + 'g');
- string += ''; // Type-convert
- if (!compliantExecNpcg) {
- // Doesn't need flags gy, but they don't hurt
- separator2 = new RegExp('^' + separator.source + '$(?!\\s)', flags);
- }
- /* Values for `limit`, per the spec:
- * If undefined: 4294967295 // Math.pow(2, 32) - 1
- * If 0, Infinity, or NaN: 0
- * If positive number: limit = Math.floor(limit); if (limit > 4294967295) limit -= 4294967296;
- * If negative number: 4294967296 - Math.floor(Math.abs(limit))
- * If other: Type-convert, then use the above rules
- */
- limit = limit === void 0 ?
- -1 >>> 0 : // Math.pow(2, 32) - 1
- ToUint32(limit);
- while (match = separator.exec(string)) {
- // `separator.lastIndex` is not reliable cross-browser
- lastIndex = match.index + match[0].length;
- if (lastIndex > lastLastIndex) {
- output.push(string.slice(lastLastIndex, match.index));
- // Fix browsers whose `exec` methods don't consistently return `undefined` for
- // nonparticipating capturing groups
- if (!compliantExecNpcg && match.length > 1) {
- match[0].replace(separator2, function () {
- for (var i = 1; i < arguments.length - 2; i++) {
- if (arguments[i] === void 0) {
- match[i] = void 0;
- }
- }
- });
- }
- if (match.length > 1 && match.index < string.length) {
- ArrayPrototype.push.apply(output, match.slice(1));
- }
- lastLength = match[0].length;
- lastLastIndex = lastIndex;
- if (output.length >= limit) {
- break;
- }
- }
- if (separator.lastIndex === match.index) {
- separator.lastIndex++; // Avoid an infinite loop
- }
- }
- if (lastLastIndex === string.length) {
- if (lastLength || !separator.test('')) {
- output.push('');
- }
- } else {
- output.push(string.slice(lastLastIndex));
- }
- return output.length > limit ? output.slice(0, limit) : output;
- };
- }());
- // [bugfix, chrome]
- // If separator is undefined, then the result array contains just one String,
- // which is the this value (converted to a String). If limit is not undefined,
- // then the output array is truncated so that it contains no more than limit
- // elements.
- // "0".split(undefined, 0) -> []
- } else if ('0'.split(void 0, 0).length) {
- StringPrototype.split = function split(separator, limit) {
- if (separator === void 0 && limit === 0) { return []; }
- return string_split.call(this, separator, limit);
- };
- }
- // ECMA-262, 3rd B.2.3
- // Not an ECMAScript standard, although ECMAScript 3rd Edition has a
- // non-normative section suggesting uniform semantics and it should be
- // normalized across all browsers
- // [bugfix, IE lt 9] IE < 9 substr() with negative value not working in IE
- var string_substr = StringPrototype.substr;
- var hasNegativeSubstrBug = ''.substr && '0b'.substr(-1) !== 'b';
- defineProperties(StringPrototype, {
- substr: function substr(start, length) {
- return string_substr.call(
- this,
- start < 0 ? ((start = this.length + start) < 0 ? 0 : start) : start,
- length
- );
- }
- }, hasNegativeSubstrBug);
- /***/ }),
- /***/ "./node_modules/sockjs-client/lib/transport-list.js":
- /*!**********************************************************!*\
- !*** ./node_modules/sockjs-client/lib/transport-list.js ***!
- \**********************************************************/
- /*! dynamic exports provided */
- /*! all exports used */
- /***/ (function(module, exports, __webpack_require__) {
- "use strict";
- module.exports = [
- // streaming transports
- __webpack_require__(/*! ./transport/websocket */ "./node_modules/sockjs-client/lib/transport/websocket.js")
- , __webpack_require__(/*! ./transport/xhr-streaming */ "./node_modules/sockjs-client/lib/transport/xhr-streaming.js")
- , __webpack_require__(/*! ./transport/xdr-streaming */ "./node_modules/sockjs-client/lib/transport/xdr-streaming.js")
- , __webpack_require__(/*! ./transport/eventsource */ "./node_modules/sockjs-client/lib/transport/eventsource.js")
- , __webpack_require__(/*! ./transport/lib/iframe-wrap */ "./node_modules/sockjs-client/lib/transport/lib/iframe-wrap.js")(__webpack_require__(/*! ./transport/eventsource */ "./node_modules/sockjs-client/lib/transport/eventsource.js"))
- // polling transports
- , __webpack_require__(/*! ./transport/htmlfile */ "./node_modules/sockjs-client/lib/transport/htmlfile.js")
- , __webpack_require__(/*! ./transport/lib/iframe-wrap */ "./node_modules/sockjs-client/lib/transport/lib/iframe-wrap.js")(__webpack_require__(/*! ./transport/htmlfile */ "./node_modules/sockjs-client/lib/transport/htmlfile.js"))
- , __webpack_require__(/*! ./transport/xhr-polling */ "./node_modules/sockjs-client/lib/transport/xhr-polling.js")
- , __webpack_require__(/*! ./transport/xdr-polling */ "./node_modules/sockjs-client/lib/transport/xdr-polling.js")
- , __webpack_require__(/*! ./transport/lib/iframe-wrap */ "./node_modules/sockjs-client/lib/transport/lib/iframe-wrap.js")(__webpack_require__(/*! ./transport/xhr-polling */ "./node_modules/sockjs-client/lib/transport/xhr-polling.js"))
- , __webpack_require__(/*! ./transport/jsonp-polling */ "./node_modules/sockjs-client/lib/transport/jsonp-polling.js")
- ];
- /***/ }),
- /***/ "./node_modules/sockjs-client/lib/transport/browser/abstract-xhr.js":
- /*!**************************************************************************!*\
- !*** ./node_modules/sockjs-client/lib/transport/browser/abstract-xhr.js ***!
- \**************************************************************************/
- /*! dynamic exports provided */
- /*! all exports used */
- /***/ (function(module, exports, __webpack_require__) {
- "use strict";
- /* WEBPACK VAR INJECTION */(function(global) {
- var EventEmitter = __webpack_require__(/*! events */ "./node_modules/sockjs-client/lib/event/emitter.js").EventEmitter
- , inherits = __webpack_require__(/*! inherits */ "./node_modules/inherits/inherits_browser.js")
- , utils = __webpack_require__(/*! ../../utils/event */ "./node_modules/sockjs-client/lib/utils/event.js")
- , urlUtils = __webpack_require__(/*! ../../utils/url */ "./node_modules/sockjs-client/lib/utils/url.js")
- , XHR = global.XMLHttpRequest
- ;
- var debug = function() {};
- if (true) {
- debug = __webpack_require__(/*! debug */ "./node_modules/debug/src/browser.js")('sockjs-client:browser:xhr');
- }
- function AbstractXHRObject(method, url, payload, opts) {
- debug(method, url);
- var self = this;
- EventEmitter.call(this);
- setTimeout(function () {
- self._start(method, url, payload, opts);
- }, 0);
- }
- inherits(AbstractXHRObject, EventEmitter);
- AbstractXHRObject.prototype._start = function(method, url, payload, opts) {
- var self = this;
- try {
- this.xhr = new XHR();
- } catch (x) {
- // intentionally empty
- }
- if (!this.xhr) {
- debug('no xhr');
- this.emit('finish', 0, 'no xhr support');
- this._cleanup();
- return;
- }
- // several browsers cache POSTs
- url = urlUtils.addQuery(url, 't=' + (+new Date()));
- // Explorer tends to keep connection open, even after the
- // tab gets closed: http://bugs.jquery.com/ticket/5280
- this.unloadRef = utils.unloadAdd(function() {
- debug('unload cleanup');
- self._cleanup(true);
- });
- try {
- this.xhr.open(method, url, true);
- if (this.timeout && 'timeout' in this.xhr) {
- this.xhr.timeout = this.timeout;
- this.xhr.ontimeout = function() {
- debug('xhr timeout');
- self.emit('finish', 0, '');
- self._cleanup(false);
- };
- }
- } catch (e) {
- debug('exception', e);
- // IE raises an exception on wrong port.
- this.emit('finish', 0, '');
- this._cleanup(false);
- return;
- }
- if ((!opts || !opts.noCredentials) && AbstractXHRObject.supportsCORS) {
- debug('withCredentials');
- // Mozilla docs says https://developer.mozilla.org/en/XMLHttpRequest :
- // "This never affects same-site requests."
- this.xhr.withCredentials = 'true';
- }
- if (opts && opts.headers) {
- for (var key in opts.headers) {
- this.xhr.setRequestHeader(key, opts.headers[key]);
- }
- }
- this.xhr.onreadystatechange = function() {
- if (self.xhr) {
- var x = self.xhr;
- var text, status;
- debug('readyState', x.readyState);
- switch (x.readyState) {
- case 3:
- // IE doesn't like peeking into responseText or status
- // on Microsoft.XMLHTTP and readystate=3
- try {
- status = x.status;
- text = x.responseText;
- } catch (e) {
- // intentionally empty
- }
- debug('status', status);
- // IE returns 1223 for 204: http://bugs.jquery.com/ticket/1450
- if (status === 1223) {
- status = 204;
- }
- // IE does return readystate == 3 for 404 answers.
- if (status === 200 && text && text.length > 0) {
- debug('chunk');
- self.emit('chunk', status, text);
- }
- break;
- case 4:
- status = x.status;
- debug('status', status);
- // IE returns 1223 for 204: http://bugs.jquery.com/ticket/1450
- if (status === 1223) {
- status = 204;
- }
- // IE returns this for a bad port
- // http://msdn.microsoft.com/en-us/library/windows/desktop/aa383770(v=vs.85).aspx
- if (status === 12005 || status === 12029) {
- status = 0;
- }
- debug('finish', status, x.responseText);
- self.emit('finish', status, x.responseText);
- self._cleanup(false);
- break;
- }
- }
- };
- try {
- self.xhr.send(payload);
- } catch (e) {
- self.emit('finish', 0, '');
- self._cleanup(false);
- }
- };
- AbstractXHRObject.prototype._cleanup = function(abort) {
- debug('cleanup');
- if (!this.xhr) {
- return;
- }
- this.removeAllListeners();
- utils.unloadDel(this.unloadRef);
- // IE needs this field to be a function
- this.xhr.onreadystatechange = function() {};
- if (this.xhr.ontimeout) {
- this.xhr.ontimeout = null;
- }
- if (abort) {
- try {
- this.xhr.abort();
- } catch (x) {
- // intentionally empty
- }
- }
- this.unloadRef = this.xhr = null;
- };
- AbstractXHRObject.prototype.close = function() {
- debug('close');
- this._cleanup(true);
- };
- AbstractXHRObject.enabled = !!XHR;
- // override XMLHttpRequest for IE6/7
- // obfuscate to avoid firewalls
- var axo = ['Active'].concat('Object').join('X');
- if (!AbstractXHRObject.enabled && (axo in global)) {
- debug('overriding xmlhttprequest');
- XHR = function() {
- try {
- return new global[axo]('Microsoft.XMLHTTP');
- } catch (e) {
- return null;
- }
- };
- AbstractXHRObject.enabled = !!new XHR();
- }
- var cors = false;
- try {
- cors = 'withCredentials' in new XHR();
- } catch (ignored) {
- // intentionally empty
- }
- AbstractXHRObject.supportsCORS = cors;
- module.exports = AbstractXHRObject;
- /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(/*! ./../../../../webpack/buildin/global.js */ "./node_modules/webpack/buildin/global.js")))
- /***/ }),
- /***/ "./node_modules/sockjs-client/lib/transport/browser/eventsource.js":
- /*!*************************************************************************!*\
- !*** ./node_modules/sockjs-client/lib/transport/browser/eventsource.js ***!
- \*************************************************************************/
- /*! dynamic exports provided */
- /*! all exports used */
- /***/ (function(module, exports, __webpack_require__) {
- /* WEBPACK VAR INJECTION */(function(global) {module.exports = global.EventSource;
- /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(/*! ./../../../../webpack/buildin/global.js */ "./node_modules/webpack/buildin/global.js")))
- /***/ }),
- /***/ "./node_modules/sockjs-client/lib/transport/browser/websocket.js":
- /*!***********************************************************************!*\
- !*** ./node_modules/sockjs-client/lib/transport/browser/websocket.js ***!
- \***********************************************************************/
- /*! dynamic exports provided */
- /*! all exports used */
- /***/ (function(module, exports, __webpack_require__) {
- "use strict";
- /* WEBPACK VAR INJECTION */(function(global) {
- var Driver = global.WebSocket || global.MozWebSocket;
- if (Driver) {
- module.exports = function WebSocketBrowserDriver(url) {
- return new Driver(url);
- };
- } else {
- module.exports = undefined;
- }
- /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(/*! ./../../../../webpack/buildin/global.js */ "./node_modules/webpack/buildin/global.js")))
- /***/ }),
- /***/ "./node_modules/sockjs-client/lib/transport/eventsource.js":
- /*!*****************************************************************!*\
- !*** ./node_modules/sockjs-client/lib/transport/eventsource.js ***!
- \*****************************************************************/
- /*! dynamic exports provided */
- /*! all exports used */
- /***/ (function(module, exports, __webpack_require__) {
- "use strict";
- var inherits = __webpack_require__(/*! inherits */ "./node_modules/inherits/inherits_browser.js")
- , AjaxBasedTransport = __webpack_require__(/*! ./lib/ajax-based */ "./node_modules/sockjs-client/lib/transport/lib/ajax-based.js")
- , EventSourceReceiver = __webpack_require__(/*! ./receiver/eventsource */ "./node_modules/sockjs-client/lib/transport/receiver/eventsource.js")
- , XHRCorsObject = __webpack_require__(/*! ./sender/xhr-cors */ "./node_modules/sockjs-client/lib/transport/sender/xhr-cors.js")
- , EventSourceDriver = __webpack_require__(/*! eventsource */ "./node_modules/sockjs-client/lib/transport/browser/eventsource.js")
- ;
- function EventSourceTransport(transUrl) {
- if (!EventSourceTransport.enabled()) {
- throw new Error('Transport created when disabled');
- }
- AjaxBasedTransport.call(this, transUrl, '/eventsource', EventSourceReceiver, XHRCorsObject);
- }
- inherits(EventSourceTransport, AjaxBasedTransport);
- EventSourceTransport.enabled = function() {
- return !!EventSourceDriver;
- };
- EventSourceTransport.transportName = 'eventsource';
- EventSourceTransport.roundTrips = 2;
- module.exports = EventSourceTransport;
- /***/ }),
- /***/ "./node_modules/sockjs-client/lib/transport/htmlfile.js":
- /*!**************************************************************!*\
- !*** ./node_modules/sockjs-client/lib/transport/htmlfile.js ***!
- \**************************************************************/
- /*! dynamic exports provided */
- /*! all exports used */
- /***/ (function(module, exports, __webpack_require__) {
- "use strict";
- var inherits = __webpack_require__(/*! inherits */ "./node_modules/inherits/inherits_browser.js")
- , HtmlfileReceiver = __webpack_require__(/*! ./receiver/htmlfile */ "./node_modules/sockjs-client/lib/transport/receiver/htmlfile.js")
- , XHRLocalObject = __webpack_require__(/*! ./sender/xhr-local */ "./node_modules/sockjs-client/lib/transport/sender/xhr-local.js")
- , AjaxBasedTransport = __webpack_require__(/*! ./lib/ajax-based */ "./node_modules/sockjs-client/lib/transport/lib/ajax-based.js")
- ;
- function HtmlFileTransport(transUrl) {
- if (!HtmlfileReceiver.enabled) {
- throw new Error('Transport created when disabled');
- }
- AjaxBasedTransport.call(this, transUrl, '/htmlfile', HtmlfileReceiver, XHRLocalObject);
- }
- inherits(HtmlFileTransport, AjaxBasedTransport);
- HtmlFileTransport.enabled = function(info) {
- return HtmlfileReceiver.enabled && info.sameOrigin;
- };
- HtmlFileTransport.transportName = 'htmlfile';
- HtmlFileTransport.roundTrips = 2;
- module.exports = HtmlFileTransport;
- /***/ }),
- /***/ "./node_modules/sockjs-client/lib/transport/iframe.js":
- /*!************************************************************!*\
- !*** ./node_modules/sockjs-client/lib/transport/iframe.js ***!
- \************************************************************/
- /*! dynamic exports provided */
- /*! all exports used */
- /***/ (function(module, exports, __webpack_require__) {
- "use strict";
- // Few cool transports do work only for same-origin. In order to make
- // them work cross-domain we shall use iframe, served from the
- // remote domain. New browsers have capabilities to communicate with
- // cross domain iframe using postMessage(). In IE it was implemented
- // from IE 8+, but of course, IE got some details wrong:
- // http://msdn.microsoft.com/en-us/library/cc197015(v=VS.85).aspx
- // http://stevesouders.com/misc/test-postmessage.php
- var inherits = __webpack_require__(/*! inherits */ "./node_modules/inherits/inherits_browser.js")
- , JSON3 = __webpack_require__(/*! json3 */ "./node_modules/json3/lib/json3.js")
- , EventEmitter = __webpack_require__(/*! events */ "./node_modules/sockjs-client/lib/event/emitter.js").EventEmitter
- , version = __webpack_require__(/*! ../version */ "./node_modules/sockjs-client/lib/version.js")
- , urlUtils = __webpack_require__(/*! ../utils/url */ "./node_modules/sockjs-client/lib/utils/url.js")
- , iframeUtils = __webpack_require__(/*! ../utils/iframe */ "./node_modules/sockjs-client/lib/utils/iframe.js")
- , eventUtils = __webpack_require__(/*! ../utils/event */ "./node_modules/sockjs-client/lib/utils/event.js")
- , random = __webpack_require__(/*! ../utils/random */ "./node_modules/sockjs-client/lib/utils/random.js")
- ;
- var debug = function() {};
- if (true) {
- debug = __webpack_require__(/*! debug */ "./node_modules/debug/src/browser.js")('sockjs-client:transport:iframe');
- }
- function IframeTransport(transport, transUrl, baseUrl) {
- if (!IframeTransport.enabled()) {
- throw new Error('Transport created when disabled');
- }
- EventEmitter.call(this);
- var self = this;
- this.origin = urlUtils.getOrigin(baseUrl);
- this.baseUrl = baseUrl;
- this.transUrl = transUrl;
- this.transport = transport;
- this.windowId = random.string(8);
- var iframeUrl = urlUtils.addPath(baseUrl, '/iframe.html') + '#' + this.windowId;
- debug(transport, transUrl, iframeUrl);
- this.iframeObj = iframeUtils.createIframe(iframeUrl, function(r) {
- debug('err callback');
- self.emit('close', 1006, 'Unable to load an iframe (' + r + ')');
- self.close();
- });
- this.onmessageCallback = this._message.bind(this);
- eventUtils.attachEvent('message', this.onmessageCallback);
- }
- inherits(IframeTransport, EventEmitter);
- IframeTransport.prototype.close = function() {
- debug('close');
- this.removeAllListeners();
- if (this.iframeObj) {
- eventUtils.detachEvent('message', this.onmessageCallback);
- try {
- // When the iframe is not loaded, IE raises an exception
- // on 'contentWindow'.
- this.postMessage('c');
- } catch (x) {
- // intentionally empty
- }
- this.iframeObj.cleanup();
- this.iframeObj = null;
- this.onmessageCallback = this.iframeObj = null;
- }
- };
- IframeTransport.prototype._message = function(e) {
- debug('message', e.data);
- if (!urlUtils.isOriginEqual(e.origin, this.origin)) {
- debug('not same origin', e.origin, this.origin);
- return;
- }
- var iframeMessage;
- try {
- iframeMessage = JSON3.parse(e.data);
- } catch (ignored) {
- debug('bad json', e.data);
- return;
- }
- if (iframeMessage.windowId !== this.windowId) {
- debug('mismatched window id', iframeMessage.windowId, this.windowId);
- return;
- }
- switch (iframeMessage.type) {
- case 's':
- this.iframeObj.loaded();
- // window global dependency
- this.postMessage('s', JSON3.stringify([
- version
- , this.transport
- , this.transUrl
- , this.baseUrl
- ]));
- break;
- case 't':
- this.emit('message', iframeMessage.data);
- break;
- case 'c':
- var cdata;
- try {
- cdata = JSON3.parse(iframeMessage.data);
- } catch (ignored) {
- debug('bad json', iframeMessage.data);
- return;
- }
- this.emit('close', cdata[0], cdata[1]);
- this.close();
- break;
- }
- };
- IframeTransport.prototype.postMessage = function(type, data) {
- debug('postMessage', type, data);
- this.iframeObj.post(JSON3.stringify({
- windowId: this.windowId
- , type: type
- , data: data || ''
- }), this.origin);
- };
- IframeTransport.prototype.send = function(message) {
- debug('send', message);
- this.postMessage('m', message);
- };
- IframeTransport.enabled = function() {
- return iframeUtils.iframeEnabled;
- };
- IframeTransport.transportName = 'iframe';
- IframeTransport.roundTrips = 2;
- module.exports = IframeTransport;
- /***/ }),
- /***/ "./node_modules/sockjs-client/lib/transport/jsonp-polling.js":
- /*!*******************************************************************!*\
- !*** ./node_modules/sockjs-client/lib/transport/jsonp-polling.js ***!
- \*******************************************************************/
- /*! dynamic exports provided */
- /*! all exports used */
- /***/ (function(module, exports, __webpack_require__) {
- "use strict";
- /* WEBPACK VAR INJECTION */(function(global) {
- // The simplest and most robust transport, using the well-know cross
- // domain hack - JSONP. This transport is quite inefficient - one
- // message could use up to one http request. But at least it works almost
- // everywhere.
- // Known limitations:
- // o you will get a spinning cursor
- // o for Konqueror a dumb timer is needed to detect errors
- var inherits = __webpack_require__(/*! inherits */ "./node_modules/inherits/inherits_browser.js")
- , SenderReceiver = __webpack_require__(/*! ./lib/sender-receiver */ "./node_modules/sockjs-client/lib/transport/lib/sender-receiver.js")
- , JsonpReceiver = __webpack_require__(/*! ./receiver/jsonp */ "./node_modules/sockjs-client/lib/transport/receiver/jsonp.js")
- , jsonpSender = __webpack_require__(/*! ./sender/jsonp */ "./node_modules/sockjs-client/lib/transport/sender/jsonp.js")
- ;
- function JsonPTransport(transUrl) {
- if (!JsonPTransport.enabled()) {
- throw new Error('Transport created when disabled');
- }
- SenderReceiver.call(this, transUrl, '/jsonp', jsonpSender, JsonpReceiver);
- }
- inherits(JsonPTransport, SenderReceiver);
- JsonPTransport.enabled = function() {
- return !!global.document;
- };
- JsonPTransport.transportName = 'jsonp-polling';
- JsonPTransport.roundTrips = 1;
- JsonPTransport.needBody = true;
- module.exports = JsonPTransport;
- /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(/*! ./../../../webpack/buildin/global.js */ "./node_modules/webpack/buildin/global.js")))
- /***/ }),
- /***/ "./node_modules/sockjs-client/lib/transport/lib/ajax-based.js":
- /*!********************************************************************!*\
- !*** ./node_modules/sockjs-client/lib/transport/lib/ajax-based.js ***!
- \********************************************************************/
- /*! dynamic exports provided */
- /*! all exports used */
- /***/ (function(module, exports, __webpack_require__) {
- "use strict";
- var inherits = __webpack_require__(/*! inherits */ "./node_modules/inherits/inherits_browser.js")
- , urlUtils = __webpack_require__(/*! ../../utils/url */ "./node_modules/sockjs-client/lib/utils/url.js")
- , SenderReceiver = __webpack_require__(/*! ./sender-receiver */ "./node_modules/sockjs-client/lib/transport/lib/sender-receiver.js")
- ;
- var debug = function() {};
- if (true) {
- debug = __webpack_require__(/*! debug */ "./node_modules/debug/src/browser.js")('sockjs-client:ajax-based');
- }
- function createAjaxSender(AjaxObject) {
- return function(url, payload, callback) {
- debug('create ajax sender', url, payload);
- var opt = {};
- if (typeof payload === 'string') {
- opt.headers = {'Content-type': 'text/plain'};
- }
- var ajaxUrl = urlUtils.addPath(url, '/xhr_send');
- var xo = new AjaxObject('POST', ajaxUrl, payload, opt);
- xo.once('finish', function(status) {
- debug('finish', status);
- xo = null;
- if (status !== 200 && status !== 204) {
- return callback(new Error('http status ' + status));
- }
- callback();
- });
- return function() {
- debug('abort');
- xo.close();
- xo = null;
- var err = new Error('Aborted');
- err.code = 1000;
- callback(err);
- };
- };
- }
- function AjaxBasedTransport(transUrl, urlSuffix, Receiver, AjaxObject) {
- SenderReceiver.call(this, transUrl, urlSuffix, createAjaxSender(AjaxObject), Receiver, AjaxObject);
- }
- inherits(AjaxBasedTransport, SenderReceiver);
- module.exports = AjaxBasedTransport;
- /***/ }),
- /***/ "./node_modules/sockjs-client/lib/transport/lib/buffered-sender.js":
- /*!*************************************************************************!*\
- !*** ./node_modules/sockjs-client/lib/transport/lib/buffered-sender.js ***!
- \*************************************************************************/
- /*! dynamic exports provided */
- /*! all exports used */
- /***/ (function(module, exports, __webpack_require__) {
- "use strict";
- var inherits = __webpack_require__(/*! inherits */ "./node_modules/inherits/inherits_browser.js")
- , EventEmitter = __webpack_require__(/*! events */ "./node_modules/sockjs-client/lib/event/emitter.js").EventEmitter
- ;
- var debug = function() {};
- if (true) {
- debug = __webpack_require__(/*! debug */ "./node_modules/debug/src/browser.js")('sockjs-client:buffered-sender');
- }
- function BufferedSender(url, sender) {
- debug(url);
- EventEmitter.call(this);
- this.sendBuffer = [];
- this.sender = sender;
- this.url = url;
- }
- inherits(BufferedSender, EventEmitter);
- BufferedSender.prototype.send = function(message) {
- debug('send', message);
- this.sendBuffer.push(message);
- if (!this.sendStop) {
- this.sendSchedule();
- }
- };
- // For polling transports in a situation when in the message callback,
- // new message is being send. If the sending connection was started
- // before receiving one, it is possible to saturate the network and
- // timeout due to the lack of receiving socket. To avoid that we delay
- // sending messages by some small time, in order to let receiving
- // connection be started beforehand. This is only a halfmeasure and
- // does not fix the big problem, but it does make the tests go more
- // stable on slow networks.
- BufferedSender.prototype.sendScheduleWait = function() {
- debug('sendScheduleWait');
- var self = this;
- var tref;
- this.sendStop = function() {
- debug('sendStop');
- self.sendStop = null;
- clearTimeout(tref);
- };
- tref = setTimeout(function() {
- debug('timeout');
- self.sendStop = null;
- self.sendSchedule();
- }, 25);
- };
- BufferedSender.prototype.sendSchedule = function() {
- debug('sendSchedule', this.sendBuffer.length);
- var self = this;
- if (this.sendBuffer.length > 0) {
- var payload = '[' + this.sendBuffer.join(',') + ']';
- this.sendStop = this.sender(this.url, payload, function(err) {
- self.sendStop = null;
- if (err) {
- debug('error', err);
- self.emit('close', err.code || 1006, 'Sending error: ' + err);
- self.close();
- } else {
- self.sendScheduleWait();
- }
- });
- this.sendBuffer = [];
- }
- };
- BufferedSender.prototype._cleanup = function() {
- debug('_cleanup');
- this.removeAllListeners();
- };
- BufferedSender.prototype.close = function() {
- debug('close');
- this._cleanup();
- if (this.sendStop) {
- this.sendStop();
- this.sendStop = null;
- }
- };
- module.exports = BufferedSender;
- /***/ }),
- /***/ "./node_modules/sockjs-client/lib/transport/lib/iframe-wrap.js":
- /*!*********************************************************************!*\
- !*** ./node_modules/sockjs-client/lib/transport/lib/iframe-wrap.js ***!
- \*********************************************************************/
- /*! dynamic exports provided */
- /*! all exports used */
- /***/ (function(module, exports, __webpack_require__) {
- "use strict";
- /* WEBPACK VAR INJECTION */(function(global) {
- var inherits = __webpack_require__(/*! inherits */ "./node_modules/inherits/inherits_browser.js")
- , IframeTransport = __webpack_require__(/*! ../iframe */ "./node_modules/sockjs-client/lib/transport/iframe.js")
- , objectUtils = __webpack_require__(/*! ../../utils/object */ "./node_modules/sockjs-client/lib/utils/object.js")
- ;
- module.exports = function(transport) {
- function IframeWrapTransport(transUrl, baseUrl) {
- IframeTransport.call(this, transport.transportName, transUrl, baseUrl);
- }
- inherits(IframeWrapTransport, IframeTransport);
- IframeWrapTransport.enabled = function(url, info) {
- if (!global.document) {
- return false;
- }
- var iframeInfo = objectUtils.extend({}, info);
- iframeInfo.sameOrigin = true;
- return transport.enabled(iframeInfo) && IframeTransport.enabled();
- };
- IframeWrapTransport.transportName = 'iframe-' + transport.transportName;
- IframeWrapTransport.needBody = true;
- IframeWrapTransport.roundTrips = IframeTransport.roundTrips + transport.roundTrips - 1; // html, javascript (2) + transport - no CORS (1)
- IframeWrapTransport.facadeTransport = transport;
- return IframeWrapTransport;
- };
- /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(/*! ./../../../../webpack/buildin/global.js */ "./node_modules/webpack/buildin/global.js")))
- /***/ }),
- /***/ "./node_modules/sockjs-client/lib/transport/lib/polling.js":
- /*!*****************************************************************!*\
- !*** ./node_modules/sockjs-client/lib/transport/lib/polling.js ***!
- \*****************************************************************/
- /*! dynamic exports provided */
- /*! all exports used */
- /***/ (function(module, exports, __webpack_require__) {
- "use strict";
- var inherits = __webpack_require__(/*! inherits */ "./node_modules/inherits/inherits_browser.js")
- , EventEmitter = __webpack_require__(/*! events */ "./node_modules/sockjs-client/lib/event/emitter.js").EventEmitter
- ;
- var debug = function() {};
- if (true) {
- debug = __webpack_require__(/*! debug */ "./node_modules/debug/src/browser.js")('sockjs-client:polling');
- }
- function Polling(Receiver, receiveUrl, AjaxObject) {
- debug(receiveUrl);
- EventEmitter.call(this);
- this.Receiver = Receiver;
- this.receiveUrl = receiveUrl;
- this.AjaxObject = AjaxObject;
- this._scheduleReceiver();
- }
- inherits(Polling, EventEmitter);
- Polling.prototype._scheduleReceiver = function() {
- debug('_scheduleReceiver');
- var self = this;
- var poll = this.poll = new this.Receiver(this.receiveUrl, this.AjaxObject);
- poll.on('message', function(msg) {
- debug('message', msg);
- self.emit('message', msg);
- });
- poll.once('close', function(code, reason) {
- debug('close', code, reason, self.pollIsClosing);
- self.poll = poll = null;
- if (!self.pollIsClosing) {
- if (reason === 'network') {
- self._scheduleReceiver();
- } else {
- self.emit('close', code || 1006, reason);
- self.removeAllListeners();
- }
- }
- });
- };
- Polling.prototype.abort = function() {
- debug('abort');
- this.removeAllListeners();
- this.pollIsClosing = true;
- if (this.poll) {
- this.poll.abort();
- }
- };
- module.exports = Polling;
- /***/ }),
- /***/ "./node_modules/sockjs-client/lib/transport/lib/sender-receiver.js":
- /*!*************************************************************************!*\
- !*** ./node_modules/sockjs-client/lib/transport/lib/sender-receiver.js ***!
- \*************************************************************************/
- /*! dynamic exports provided */
- /*! all exports used */
- /***/ (function(module, exports, __webpack_require__) {
- "use strict";
- var inherits = __webpack_require__(/*! inherits */ "./node_modules/inherits/inherits_browser.js")
- , urlUtils = __webpack_require__(/*! ../../utils/url */ "./node_modules/sockjs-client/lib/utils/url.js")
- , BufferedSender = __webpack_require__(/*! ./buffered-sender */ "./node_modules/sockjs-client/lib/transport/lib/buffered-sender.js")
- , Polling = __webpack_require__(/*! ./polling */ "./node_modules/sockjs-client/lib/transport/lib/polling.js")
- ;
- var debug = function() {};
- if (true) {
- debug = __webpack_require__(/*! debug */ "./node_modules/debug/src/browser.js")('sockjs-client:sender-receiver');
- }
- function SenderReceiver(transUrl, urlSuffix, senderFunc, Receiver, AjaxObject) {
- var pollUrl = urlUtils.addPath(transUrl, urlSuffix);
- debug(pollUrl);
- var self = this;
- BufferedSender.call(this, transUrl, senderFunc);
- this.poll = new Polling(Receiver, pollUrl, AjaxObject);
- this.poll.on('message', function(msg) {
- debug('poll message', msg);
- self.emit('message', msg);
- });
- this.poll.once('close', function(code, reason) {
- debug('poll close', code, reason);
- self.poll = null;
- self.emit('close', code, reason);
- self.close();
- });
- }
- inherits(SenderReceiver, BufferedSender);
- SenderReceiver.prototype.close = function() {
- BufferedSender.prototype.close.call(this);
- debug('close');
- this.removeAllListeners();
- if (this.poll) {
- this.poll.abort();
- this.poll = null;
- }
- };
- module.exports = SenderReceiver;
- /***/ }),
- /***/ "./node_modules/sockjs-client/lib/transport/receiver/eventsource.js":
- /*!**************************************************************************!*\
- !*** ./node_modules/sockjs-client/lib/transport/receiver/eventsource.js ***!
- \**************************************************************************/
- /*! dynamic exports provided */
- /*! all exports used */
- /***/ (function(module, exports, __webpack_require__) {
- "use strict";
- var inherits = __webpack_require__(/*! inherits */ "./node_modules/inherits/inherits_browser.js")
- , EventEmitter = __webpack_require__(/*! events */ "./node_modules/sockjs-client/lib/event/emitter.js").EventEmitter
- , EventSourceDriver = __webpack_require__(/*! eventsource */ "./node_modules/sockjs-client/lib/transport/browser/eventsource.js")
- ;
- var debug = function() {};
- if (true) {
- debug = __webpack_require__(/*! debug */ "./node_modules/debug/src/browser.js")('sockjs-client:receiver:eventsource');
- }
- function EventSourceReceiver(url) {
- debug(url);
- EventEmitter.call(this);
- var self = this;
- var es = this.es = new EventSourceDriver(url);
- es.onmessage = function(e) {
- debug('message', e.data);
- self.emit('message', decodeURI(e.data));
- };
- es.onerror = function(e) {
- debug('error', es.readyState, e);
- // ES on reconnection has readyState = 0 or 1.
- // on network error it's CLOSED = 2
- var reason = (es.readyState !== 2 ? 'network' : 'permanent');
- self._cleanup();
- self._close(reason);
- };
- }
- inherits(EventSourceReceiver, EventEmitter);
- EventSourceReceiver.prototype.abort = function() {
- debug('abort');
- this._cleanup();
- this._close('user');
- };
- EventSourceReceiver.prototype._cleanup = function() {
- debug('cleanup');
- var es = this.es;
- if (es) {
- es.onmessage = es.onerror = null;
- es.close();
- this.es = null;
- }
- };
- EventSourceReceiver.prototype._close = function(reason) {
- debug('close', reason);
- var self = this;
- // Safari and chrome < 15 crash if we close window before
- // waiting for ES cleanup. See:
- // https://code.google.com/p/chromium/issues/detail?id=89155
- setTimeout(function() {
- self.emit('close', null, reason);
- self.removeAllListeners();
- }, 200);
- };
- module.exports = EventSourceReceiver;
- /***/ }),
- /***/ "./node_modules/sockjs-client/lib/transport/receiver/htmlfile.js":
- /*!***********************************************************************!*\
- !*** ./node_modules/sockjs-client/lib/transport/receiver/htmlfile.js ***!
- \***********************************************************************/
- /*! dynamic exports provided */
- /*! all exports used */
- /***/ (function(module, exports, __webpack_require__) {
- "use strict";
- /* WEBPACK VAR INJECTION */(function(global) {
- var inherits = __webpack_require__(/*! inherits */ "./node_modules/inherits/inherits_browser.js")
- , iframeUtils = __webpack_require__(/*! ../../utils/iframe */ "./node_modules/sockjs-client/lib/utils/iframe.js")
- , urlUtils = __webpack_require__(/*! ../../utils/url */ "./node_modules/sockjs-client/lib/utils/url.js")
- , EventEmitter = __webpack_require__(/*! events */ "./node_modules/sockjs-client/lib/event/emitter.js").EventEmitter
- , random = __webpack_require__(/*! ../../utils/random */ "./node_modules/sockjs-client/lib/utils/random.js")
- ;
- var debug = function() {};
- if (true) {
- debug = __webpack_require__(/*! debug */ "./node_modules/debug/src/browser.js")('sockjs-client:receiver:htmlfile');
- }
- function HtmlfileReceiver(url) {
- debug(url);
- EventEmitter.call(this);
- var self = this;
- iframeUtils.polluteGlobalNamespace();
- this.id = 'a' + random.string(6);
- url = urlUtils.addQuery(url, 'c=' + decodeURIComponent(iframeUtils.WPrefix + '.' + this.id));
- debug('using htmlfile', HtmlfileReceiver.htmlfileEnabled);
- var constructFunc = HtmlfileReceiver.htmlfileEnabled ?
- iframeUtils.createHtmlfile : iframeUtils.createIframe;
- global[iframeUtils.WPrefix][this.id] = {
- start: function() {
- debug('start');
- self.iframeObj.loaded();
- }
- , message: function(data) {
- debug('message', data);
- self.emit('message', data);
- }
- , stop: function() {
- debug('stop');
- self._cleanup();
- self._close('network');
- }
- };
- this.iframeObj = constructFunc(url, function() {
- debug('callback');
- self._cleanup();
- self._close('permanent');
- });
- }
- inherits(HtmlfileReceiver, EventEmitter);
- HtmlfileReceiver.prototype.abort = function() {
- debug('abort');
- this._cleanup();
- this._close('user');
- };
- HtmlfileReceiver.prototype._cleanup = function() {
- debug('_cleanup');
- if (this.iframeObj) {
- this.iframeObj.cleanup();
- this.iframeObj = null;
- }
- delete global[iframeUtils.WPrefix][this.id];
- };
- HtmlfileReceiver.prototype._close = function(reason) {
- debug('_close', reason);
- this.emit('close', null, reason);
- this.removeAllListeners();
- };
- HtmlfileReceiver.htmlfileEnabled = false;
- // obfuscate to avoid firewalls
- var axo = ['Active'].concat('Object').join('X');
- if (axo in global) {
- try {
- HtmlfileReceiver.htmlfileEnabled = !!new global[axo]('htmlfile');
- } catch (x) {
- // intentionally empty
- }
- }
- HtmlfileReceiver.enabled = HtmlfileReceiver.htmlfileEnabled || iframeUtils.iframeEnabled;
- module.exports = HtmlfileReceiver;
- /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(/*! ./../../../../webpack/buildin/global.js */ "./node_modules/webpack/buildin/global.js")))
- /***/ }),
- /***/ "./node_modules/sockjs-client/lib/transport/receiver/jsonp.js":
- /*!********************************************************************!*\
- !*** ./node_modules/sockjs-client/lib/transport/receiver/jsonp.js ***!
- \********************************************************************/
- /*! dynamic exports provided */
- /*! all exports used */
- /***/ (function(module, exports, __webpack_require__) {
- "use strict";
- /* WEBPACK VAR INJECTION */(function(global) {
- var utils = __webpack_require__(/*! ../../utils/iframe */ "./node_modules/sockjs-client/lib/utils/iframe.js")
- , random = __webpack_require__(/*! ../../utils/random */ "./node_modules/sockjs-client/lib/utils/random.js")
- , browser = __webpack_require__(/*! ../../utils/browser */ "./node_modules/sockjs-client/lib/utils/browser.js")
- , urlUtils = __webpack_require__(/*! ../../utils/url */ "./node_modules/sockjs-client/lib/utils/url.js")
- , inherits = __webpack_require__(/*! inherits */ "./node_modules/inherits/inherits_browser.js")
- , EventEmitter = __webpack_require__(/*! events */ "./node_modules/sockjs-client/lib/event/emitter.js").EventEmitter
- ;
- var debug = function() {};
- if (true) {
- debug = __webpack_require__(/*! debug */ "./node_modules/debug/src/browser.js")('sockjs-client:receiver:jsonp');
- }
- function JsonpReceiver(url) {
- debug(url);
- var self = this;
- EventEmitter.call(this);
- utils.polluteGlobalNamespace();
- this.id = 'a' + random.string(6);
- var urlWithId = urlUtils.addQuery(url, 'c=' + encodeURIComponent(utils.WPrefix + '.' + this.id));
- global[utils.WPrefix][this.id] = this._callback.bind(this);
- this._createScript(urlWithId);
- // Fallback mostly for Konqueror - stupid timer, 35 seconds shall be plenty.
- this.timeoutId = setTimeout(function() {
- debug('timeout');
- self._abort(new Error('JSONP script loaded abnormally (timeout)'));
- }, JsonpReceiver.timeout);
- }
- inherits(JsonpReceiver, EventEmitter);
- JsonpReceiver.prototype.abort = function() {
- debug('abort');
- if (global[utils.WPrefix][this.id]) {
- var err = new Error('JSONP user aborted read');
- err.code = 1000;
- this._abort(err);
- }
- };
- JsonpReceiver.timeout = 35000;
- JsonpReceiver.scriptErrorTimeout = 1000;
- JsonpReceiver.prototype._callback = function(data) {
- debug('_callback', data);
- this._cleanup();
- if (this.aborting) {
- return;
- }
- if (data) {
- debug('message', data);
- this.emit('message', data);
- }
- this.emit('close', null, 'network');
- this.removeAllListeners();
- };
- JsonpReceiver.prototype._abort = function(err) {
- debug('_abort', err);
- this._cleanup();
- this.aborting = true;
- this.emit('close', err.code, err.message);
- this.removeAllListeners();
- };
- JsonpReceiver.prototype._cleanup = function() {
- debug('_cleanup');
- clearTimeout(this.timeoutId);
- if (this.script2) {
- this.script2.parentNode.removeChild(this.script2);
- this.script2 = null;
- }
- if (this.script) {
- var script = this.script;
- // Unfortunately, you can't really abort script loading of
- // the script.
- script.parentNode.removeChild(script);
- script.onreadystatechange = script.onerror =
- script.onload = script.onclick = null;
- this.script = null;
- }
- delete global[utils.WPrefix][this.id];
- };
- JsonpReceiver.prototype._scriptError = function() {
- debug('_scriptError');
- var self = this;
- if (this.errorTimer) {
- return;
- }
- this.errorTimer = setTimeout(function() {
- if (!self.loadedOkay) {
- self._abort(new Error('JSONP script loaded abnormally (onerror)'));
- }
- }, JsonpReceiver.scriptErrorTimeout);
- };
- JsonpReceiver.prototype._createScript = function(url) {
- debug('_createScript', url);
- var self = this;
- var script = this.script = global.document.createElement('script');
- var script2; // Opera synchronous load trick.
- script.id = 'a' + random.string(8);
- script.src = url;
- script.type = 'text/javascript';
- script.charset = 'UTF-8';
- script.onerror = this._scriptError.bind(this);
- script.onload = function() {
- debug('onload');
- self._abort(new Error('JSONP script loaded abnormally (onload)'));
- };
- // IE9 fires 'error' event after onreadystatechange or before, in random order.
- // Use loadedOkay to determine if actually errored
- script.onreadystatechange = function() {
- debug('onreadystatechange', script.readyState);
- if (/loaded|closed/.test(script.readyState)) {
- if (script && script.htmlFor && script.onclick) {
- self.loadedOkay = true;
- try {
- // In IE, actually execute the script.
- script.onclick();
- } catch (x) {
- // intentionally empty
- }
- }
- if (script) {
- self._abort(new Error('JSONP script loaded abnormally (onreadystatechange)'));
- }
- }
- };
- // IE: event/htmlFor/onclick trick.
- // One can't rely on proper order for onreadystatechange. In order to
- // make sure, set a 'htmlFor' and 'event' properties, so that
- // script code will be installed as 'onclick' handler for the
- // script object. Later, onreadystatechange, manually execute this
- // code. FF and Chrome doesn't work with 'event' and 'htmlFor'
- // set. For reference see:
- // http://jaubourg.net/2010/07/loading-script-as-onclick-handler-of.html
- // Also, read on that about script ordering:
- // http://wiki.whatwg.org/wiki/Dynamic_Script_Execution_Order
- if (typeof script.async === 'undefined' && global.document.attachEvent) {
- // According to mozilla docs, in recent browsers script.async defaults
- // to 'true', so we may use it to detect a good browser:
- // https://developer.mozilla.org/en/HTML/Element/script
- if (!browser.isOpera()) {
- // Naively assume we're in IE
- try {
- script.htmlFor = script.id;
- script.event = 'onclick';
- } catch (x) {
- // intentionally empty
- }
- script.async = true;
- } else {
- // Opera, second sync script hack
- script2 = this.script2 = global.document.createElement('script');
- script2.text = "try{var a = document.getElementById('" + script.id + "'); if(a)a.onerror();}catch(x){};";
- script.async = script2.async = false;
- }
- }
- if (typeof script.async !== 'undefined') {
- script.async = true;
- }
- var head = global.document.getElementsByTagName('head')[0];
- head.insertBefore(script, head.firstChild);
- if (script2) {
- head.insertBefore(script2, head.firstChild);
- }
- };
- module.exports = JsonpReceiver;
- /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(/*! ./../../../../webpack/buildin/global.js */ "./node_modules/webpack/buildin/global.js")))
- /***/ }),
- /***/ "./node_modules/sockjs-client/lib/transport/receiver/xhr.js":
- /*!******************************************************************!*\
- !*** ./node_modules/sockjs-client/lib/transport/receiver/xhr.js ***!
- \******************************************************************/
- /*! dynamic exports provided */
- /*! all exports used */
- /***/ (function(module, exports, __webpack_require__) {
- "use strict";
- var inherits = __webpack_require__(/*! inherits */ "./node_modules/inherits/inherits_browser.js")
- , EventEmitter = __webpack_require__(/*! events */ "./node_modules/sockjs-client/lib/event/emitter.js").EventEmitter
- ;
- var debug = function() {};
- if (true) {
- debug = __webpack_require__(/*! debug */ "./node_modules/debug/src/browser.js")('sockjs-client:receiver:xhr');
- }
- function XhrReceiver(url, AjaxObject) {
- debug(url);
- EventEmitter.call(this);
- var self = this;
- this.bufferPosition = 0;
- this.xo = new AjaxObject('POST', url, null);
- this.xo.on('chunk', this._chunkHandler.bind(this));
- this.xo.once('finish', function(status, text) {
- debug('finish', status, text);
- self._chunkHandler(status, text);
- self.xo = null;
- var reason = status === 200 ? 'network' : 'permanent';
- debug('close', reason);
- self.emit('close', null, reason);
- self._cleanup();
- });
- }
- inherits(XhrReceiver, EventEmitter);
- XhrReceiver.prototype._chunkHandler = function(status, text) {
- debug('_chunkHandler', status);
- if (status !== 200 || !text) {
- return;
- }
- for (var idx = -1; ; this.bufferPosition += idx + 1) {
- var buf = text.slice(this.bufferPosition);
- idx = buf.indexOf('\n');
- if (idx === -1) {
- break;
- }
- var msg = buf.slice(0, idx);
- if (msg) {
- debug('message', msg);
- this.emit('message', msg);
- }
- }
- };
- XhrReceiver.prototype._cleanup = function() {
- debug('_cleanup');
- this.removeAllListeners();
- };
- XhrReceiver.prototype.abort = function() {
- debug('abort');
- if (this.xo) {
- this.xo.close();
- debug('close');
- this.emit('close', null, 'user');
- this.xo = null;
- }
- this._cleanup();
- };
- module.exports = XhrReceiver;
- /***/ }),
- /***/ "./node_modules/sockjs-client/lib/transport/sender/jsonp.js":
- /*!******************************************************************!*\
- !*** ./node_modules/sockjs-client/lib/transport/sender/jsonp.js ***!
- \******************************************************************/
- /*! dynamic exports provided */
- /*! all exports used */
- /***/ (function(module, exports, __webpack_require__) {
- "use strict";
- /* WEBPACK VAR INJECTION */(function(global) {
- var random = __webpack_require__(/*! ../../utils/random */ "./node_modules/sockjs-client/lib/utils/random.js")
- , urlUtils = __webpack_require__(/*! ../../utils/url */ "./node_modules/sockjs-client/lib/utils/url.js")
- ;
- var debug = function() {};
- if (true) {
- debug = __webpack_require__(/*! debug */ "./node_modules/debug/src/browser.js")('sockjs-client:sender:jsonp');
- }
- var form, area;
- function createIframe(id) {
- debug('createIframe', id);
- try {
- // ie6 dynamic iframes with target="" support (thanks Chris Lambacher)
- return global.document.createElement('<iframe name="' + id + '">');
- } catch (x) {
- var iframe = global.document.createElement('iframe');
- iframe.name = id;
- return iframe;
- }
- }
- function createForm() {
- debug('createForm');
- form = global.document.createElement('form');
- form.style.display = 'none';
- form.style.position = 'absolute';
- form.method = 'POST';
- form.enctype = 'application/x-www-form-urlencoded';
- form.acceptCharset = 'UTF-8';
- area = global.document.createElement('textarea');
- area.name = 'd';
- form.appendChild(area);
- global.document.body.appendChild(form);
- }
- module.exports = function(url, payload, callback) {
- debug(url, payload);
- if (!form) {
- createForm();
- }
- var id = 'a' + random.string(8);
- form.target = id;
- form.action = urlUtils.addQuery(urlUtils.addPath(url, '/jsonp_send'), 'i=' + id);
- var iframe = createIframe(id);
- iframe.id = id;
- iframe.style.display = 'none';
- form.appendChild(iframe);
- try {
- area.value = payload;
- } catch (e) {
- // seriously broken browsers get here
- }
- form.submit();
- var completed = function(err) {
- debug('completed', id, err);
- if (!iframe.onerror) {
- return;
- }
- iframe.onreadystatechange = iframe.onerror = iframe.onload = null;
- // Opera mini doesn't like if we GC iframe
- // immediately, thus this timeout.
- setTimeout(function() {
- debug('cleaning up', id);
- iframe.parentNode.removeChild(iframe);
- iframe = null;
- }, 500);
- area.value = '';
- // It is not possible to detect if the iframe succeeded or
- // failed to submit our form.
- callback(err);
- };
- iframe.onerror = function() {
- debug('onerror', id);
- completed();
- };
- iframe.onload = function() {
- debug('onload', id);
- completed();
- };
- iframe.onreadystatechange = function(e) {
- debug('onreadystatechange', id, iframe.readyState, e);
- if (iframe.readyState === 'complete') {
- completed();
- }
- };
- return function() {
- debug('aborted', id);
- completed(new Error('Aborted'));
- };
- };
- /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(/*! ./../../../../webpack/buildin/global.js */ "./node_modules/webpack/buildin/global.js")))
- /***/ }),
- /***/ "./node_modules/sockjs-client/lib/transport/sender/xdr.js":
- /*!****************************************************************!*\
- !*** ./node_modules/sockjs-client/lib/transport/sender/xdr.js ***!
- \****************************************************************/
- /*! dynamic exports provided */
- /*! all exports used */
- /***/ (function(module, exports, __webpack_require__) {
- "use strict";
- /* WEBPACK VAR INJECTION */(function(global) {
- var EventEmitter = __webpack_require__(/*! events */ "./node_modules/sockjs-client/lib/event/emitter.js").EventEmitter
- , inherits = __webpack_require__(/*! inherits */ "./node_modules/inherits/inherits_browser.js")
- , eventUtils = __webpack_require__(/*! ../../utils/event */ "./node_modules/sockjs-client/lib/utils/event.js")
- , browser = __webpack_require__(/*! ../../utils/browser */ "./node_modules/sockjs-client/lib/utils/browser.js")
- , urlUtils = __webpack_require__(/*! ../../utils/url */ "./node_modules/sockjs-client/lib/utils/url.js")
- ;
- var debug = function() {};
- if (true) {
- debug = __webpack_require__(/*! debug */ "./node_modules/debug/src/browser.js")('sockjs-client:sender:xdr');
- }
- // References:
- // http://ajaxian.com/archives/100-line-ajax-wrapper
- // http://msdn.microsoft.com/en-us/library/cc288060(v=VS.85).aspx
- function XDRObject(method, url, payload) {
- debug(method, url);
- var self = this;
- EventEmitter.call(this);
- setTimeout(function() {
- self._start(method, url, payload);
- }, 0);
- }
- inherits(XDRObject, EventEmitter);
- XDRObject.prototype._start = function(method, url, payload) {
- debug('_start');
- var self = this;
- var xdr = new global.XDomainRequest();
- // IE caches even POSTs
- url = urlUtils.addQuery(url, 't=' + (+new Date()));
- xdr.onerror = function() {
- debug('onerror');
- self._error();
- };
- xdr.ontimeout = function() {
- debug('ontimeout');
- self._error();
- };
- xdr.onprogress = function() {
- debug('progress', xdr.responseText);
- self.emit('chunk', 200, xdr.responseText);
- };
- xdr.onload = function() {
- debug('load');
- self.emit('finish', 200, xdr.responseText);
- self._cleanup(false);
- };
- this.xdr = xdr;
- this.unloadRef = eventUtils.unloadAdd(function() {
- self._cleanup(true);
- });
- try {
- // Fails with AccessDenied if port number is bogus
- this.xdr.open(method, url);
- if (this.timeout) {
- this.xdr.timeout = this.timeout;
- }
- this.xdr.send(payload);
- } catch (x) {
- this._error();
- }
- };
- XDRObject.prototype._error = function() {
- this.emit('finish', 0, '');
- this._cleanup(false);
- };
- XDRObject.prototype._cleanup = function(abort) {
- debug('cleanup', abort);
- if (!this.xdr) {
- return;
- }
- this.removeAllListeners();
- eventUtils.unloadDel(this.unloadRef);
- this.xdr.ontimeout = this.xdr.onerror = this.xdr.onprogress = this.xdr.onload = null;
- if (abort) {
- try {
- this.xdr.abort();
- } catch (x) {
- // intentionally empty
- }
- }
- this.unloadRef = this.xdr = null;
- };
- XDRObject.prototype.close = function() {
- debug('close');
- this._cleanup(true);
- };
- // IE 8/9 if the request target uses the same scheme - #79
- XDRObject.enabled = !!(global.XDomainRequest && browser.hasDomain());
- module.exports = XDRObject;
- /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(/*! ./../../../../webpack/buildin/global.js */ "./node_modules/webpack/buildin/global.js")))
- /***/ }),
- /***/ "./node_modules/sockjs-client/lib/transport/sender/xhr-cors.js":
- /*!*********************************************************************!*\
- !*** ./node_modules/sockjs-client/lib/transport/sender/xhr-cors.js ***!
- \*********************************************************************/
- /*! dynamic exports provided */
- /*! all exports used */
- /***/ (function(module, exports, __webpack_require__) {
- "use strict";
- var inherits = __webpack_require__(/*! inherits */ "./node_modules/inherits/inherits_browser.js")
- , XhrDriver = __webpack_require__(/*! ../driver/xhr */ "./node_modules/sockjs-client/lib/transport/browser/abstract-xhr.js")
- ;
- function XHRCorsObject(method, url, payload, opts) {
- XhrDriver.call(this, method, url, payload, opts);
- }
- inherits(XHRCorsObject, XhrDriver);
- XHRCorsObject.enabled = XhrDriver.enabled && XhrDriver.supportsCORS;
- module.exports = XHRCorsObject;
- /***/ }),
- /***/ "./node_modules/sockjs-client/lib/transport/sender/xhr-fake.js":
- /*!*********************************************************************!*\
- !*** ./node_modules/sockjs-client/lib/transport/sender/xhr-fake.js ***!
- \*********************************************************************/
- /*! dynamic exports provided */
- /*! all exports used */
- /***/ (function(module, exports, __webpack_require__) {
- "use strict";
- var EventEmitter = __webpack_require__(/*! events */ "./node_modules/sockjs-client/lib/event/emitter.js").EventEmitter
- , inherits = __webpack_require__(/*! inherits */ "./node_modules/inherits/inherits_browser.js")
- ;
- function XHRFake(/* method, url, payload, opts */) {
- var self = this;
- EventEmitter.call(this);
- this.to = setTimeout(function() {
- self.emit('finish', 200, '{}');
- }, XHRFake.timeout);
- }
- inherits(XHRFake, EventEmitter);
- XHRFake.prototype.close = function() {
- clearTimeout(this.to);
- };
- XHRFake.timeout = 2000;
- module.exports = XHRFake;
- /***/ }),
- /***/ "./node_modules/sockjs-client/lib/transport/sender/xhr-local.js":
- /*!**********************************************************************!*\
- !*** ./node_modules/sockjs-client/lib/transport/sender/xhr-local.js ***!
- \**********************************************************************/
- /*! dynamic exports provided */
- /*! all exports used */
- /***/ (function(module, exports, __webpack_require__) {
- "use strict";
- var inherits = __webpack_require__(/*! inherits */ "./node_modules/inherits/inherits_browser.js")
- , XhrDriver = __webpack_require__(/*! ../driver/xhr */ "./node_modules/sockjs-client/lib/transport/browser/abstract-xhr.js")
- ;
- function XHRLocalObject(method, url, payload /*, opts */) {
- XhrDriver.call(this, method, url, payload, {
- noCredentials: true
- });
- }
- inherits(XHRLocalObject, XhrDriver);
- XHRLocalObject.enabled = XhrDriver.enabled;
- module.exports = XHRLocalObject;
- /***/ }),
- /***/ "./node_modules/sockjs-client/lib/transport/websocket.js":
- /*!***************************************************************!*\
- !*** ./node_modules/sockjs-client/lib/transport/websocket.js ***!
- \***************************************************************/
- /*! dynamic exports provided */
- /*! all exports used */
- /***/ (function(module, exports, __webpack_require__) {
- "use strict";
- var utils = __webpack_require__(/*! ../utils/event */ "./node_modules/sockjs-client/lib/utils/event.js")
- , urlUtils = __webpack_require__(/*! ../utils/url */ "./node_modules/sockjs-client/lib/utils/url.js")
- , inherits = __webpack_require__(/*! inherits */ "./node_modules/inherits/inherits_browser.js")
- , EventEmitter = __webpack_require__(/*! events */ "./node_modules/sockjs-client/lib/event/emitter.js").EventEmitter
- , WebsocketDriver = __webpack_require__(/*! ./driver/websocket */ "./node_modules/sockjs-client/lib/transport/browser/websocket.js")
- ;
- var debug = function() {};
- if (true) {
- debug = __webpack_require__(/*! debug */ "./node_modules/debug/src/browser.js")('sockjs-client:websocket');
- }
- function WebSocketTransport(transUrl, ignore, options) {
- if (!WebSocketTransport.enabled()) {
- throw new Error('Transport created when disabled');
- }
- EventEmitter.call(this);
- debug('constructor', transUrl);
- var self = this;
- var url = urlUtils.addPath(transUrl, '/websocket');
- if (url.slice(0, 5) === 'https') {
- url = 'wss' + url.slice(5);
- } else {
- url = 'ws' + url.slice(4);
- }
- this.url = url;
- this.ws = new WebsocketDriver(this.url, [], options);
- this.ws.onmessage = function(e) {
- debug('message event', e.data);
- self.emit('message', e.data);
- };
- // Firefox has an interesting bug. If a websocket connection is
- // created after onunload, it stays alive even when user
- // navigates away from the page. In such situation let's lie -
- // let's not open the ws connection at all. See:
- // https://github.com/sockjs/sockjs-client/issues/28
- // https://bugzilla.mozilla.org/show_bug.cgi?id=696085
- this.unloadRef = utils.unloadAdd(function() {
- debug('unload');
- self.ws.close();
- });
- this.ws.onclose = function(e) {
- debug('close event', e.code, e.reason);
- self.emit('close', e.code, e.reason);
- self._cleanup();
- };
- this.ws.onerror = function(e) {
- debug('error event', e);
- self.emit('close', 1006, 'WebSocket connection broken');
- self._cleanup();
- };
- }
- inherits(WebSocketTransport, EventEmitter);
- WebSocketTransport.prototype.send = function(data) {
- var msg = '[' + data + ']';
- debug('send', msg);
- this.ws.send(msg);
- };
- WebSocketTransport.prototype.close = function() {
- debug('close');
- var ws = this.ws;
- this._cleanup();
- if (ws) {
- ws.close();
- }
- };
- WebSocketTransport.prototype._cleanup = function() {
- debug('_cleanup');
- var ws = this.ws;
- if (ws) {
- ws.onmessage = ws.onclose = ws.onerror = null;
- }
- utils.unloadDel(this.unloadRef);
- this.unloadRef = this.ws = null;
- this.removeAllListeners();
- };
- WebSocketTransport.enabled = function() {
- debug('enabled');
- return !!WebsocketDriver;
- };
- WebSocketTransport.transportName = 'websocket';
- // In theory, ws should require 1 round trip. But in chrome, this is
- // not very stable over SSL. Most likely a ws connection requires a
- // separate SSL connection, in which case 2 round trips are an
- // absolute minumum.
- WebSocketTransport.roundTrips = 2;
- module.exports = WebSocketTransport;
- /***/ }),
- /***/ "./node_modules/sockjs-client/lib/transport/xdr-polling.js":
- /*!*****************************************************************!*\
- !*** ./node_modules/sockjs-client/lib/transport/xdr-polling.js ***!
- \*****************************************************************/
- /*! dynamic exports provided */
- /*! all exports used */
- /***/ (function(module, exports, __webpack_require__) {
- "use strict";
- var inherits = __webpack_require__(/*! inherits */ "./node_modules/inherits/inherits_browser.js")
- , AjaxBasedTransport = __webpack_require__(/*! ./lib/ajax-based */ "./node_modules/sockjs-client/lib/transport/lib/ajax-based.js")
- , XdrStreamingTransport = __webpack_require__(/*! ./xdr-streaming */ "./node_modules/sockjs-client/lib/transport/xdr-streaming.js")
- , XhrReceiver = __webpack_require__(/*! ./receiver/xhr */ "./node_modules/sockjs-client/lib/transport/receiver/xhr.js")
- , XDRObject = __webpack_require__(/*! ./sender/xdr */ "./node_modules/sockjs-client/lib/transport/sender/xdr.js")
- ;
- function XdrPollingTransport(transUrl) {
- if (!XDRObject.enabled) {
- throw new Error('Transport created when disabled');
- }
- AjaxBasedTransport.call(this, transUrl, '/xhr', XhrReceiver, XDRObject);
- }
- inherits(XdrPollingTransport, AjaxBasedTransport);
- XdrPollingTransport.enabled = XdrStreamingTransport.enabled;
- XdrPollingTransport.transportName = 'xdr-polling';
- XdrPollingTransport.roundTrips = 2; // preflight, ajax
- module.exports = XdrPollingTransport;
- /***/ }),
- /***/ "./node_modules/sockjs-client/lib/transport/xdr-streaming.js":
- /*!*******************************************************************!*\
- !*** ./node_modules/sockjs-client/lib/transport/xdr-streaming.js ***!
- \*******************************************************************/
- /*! dynamic exports provided */
- /*! all exports used */
- /***/ (function(module, exports, __webpack_require__) {
- "use strict";
- var inherits = __webpack_require__(/*! inherits */ "./node_modules/inherits/inherits_browser.js")
- , AjaxBasedTransport = __webpack_require__(/*! ./lib/ajax-based */ "./node_modules/sockjs-client/lib/transport/lib/ajax-based.js")
- , XhrReceiver = __webpack_require__(/*! ./receiver/xhr */ "./node_modules/sockjs-client/lib/transport/receiver/xhr.js")
- , XDRObject = __webpack_require__(/*! ./sender/xdr */ "./node_modules/sockjs-client/lib/transport/sender/xdr.js")
- ;
- // According to:
- // http://stackoverflow.com/questions/1641507/detect-browser-support-for-cross-domain-xmlhttprequests
- // http://hacks.mozilla.org/2009/07/cross-site-xmlhttprequest-with-cors/
- function XdrStreamingTransport(transUrl) {
- if (!XDRObject.enabled) {
- throw new Error('Transport created when disabled');
- }
- AjaxBasedTransport.call(this, transUrl, '/xhr_streaming', XhrReceiver, XDRObject);
- }
- inherits(XdrStreamingTransport, AjaxBasedTransport);
- XdrStreamingTransport.enabled = function(info) {
- if (info.cookie_needed || info.nullOrigin) {
- return false;
- }
- return XDRObject.enabled && info.sameScheme;
- };
- XdrStreamingTransport.transportName = 'xdr-streaming';
- XdrStreamingTransport.roundTrips = 2; // preflight, ajax
- module.exports = XdrStreamingTransport;
- /***/ }),
- /***/ "./node_modules/sockjs-client/lib/transport/xhr-polling.js":
- /*!*****************************************************************!*\
- !*** ./node_modules/sockjs-client/lib/transport/xhr-polling.js ***!
- \*****************************************************************/
- /*! dynamic exports provided */
- /*! all exports used */
- /***/ (function(module, exports, __webpack_require__) {
- "use strict";
- var inherits = __webpack_require__(/*! inherits */ "./node_modules/inherits/inherits_browser.js")
- , AjaxBasedTransport = __webpack_require__(/*! ./lib/ajax-based */ "./node_modules/sockjs-client/lib/transport/lib/ajax-based.js")
- , XhrReceiver = __webpack_require__(/*! ./receiver/xhr */ "./node_modules/sockjs-client/lib/transport/receiver/xhr.js")
- , XHRCorsObject = __webpack_require__(/*! ./sender/xhr-cors */ "./node_modules/sockjs-client/lib/transport/sender/xhr-cors.js")
- , XHRLocalObject = __webpack_require__(/*! ./sender/xhr-local */ "./node_modules/sockjs-client/lib/transport/sender/xhr-local.js")
- ;
- function XhrPollingTransport(transUrl) {
- if (!XHRLocalObject.enabled && !XHRCorsObject.enabled) {
- throw new Error('Transport created when disabled');
- }
- AjaxBasedTransport.call(this, transUrl, '/xhr', XhrReceiver, XHRCorsObject);
- }
- inherits(XhrPollingTransport, AjaxBasedTransport);
- XhrPollingTransport.enabled = function(info) {
- if (info.nullOrigin) {
- return false;
- }
- if (XHRLocalObject.enabled && info.sameOrigin) {
- return true;
- }
- return XHRCorsObject.enabled;
- };
- XhrPollingTransport.transportName = 'xhr-polling';
- XhrPollingTransport.roundTrips = 2; // preflight, ajax
- module.exports = XhrPollingTransport;
- /***/ }),
- /***/ "./node_modules/sockjs-client/lib/transport/xhr-streaming.js":
- /*!*******************************************************************!*\
- !*** ./node_modules/sockjs-client/lib/transport/xhr-streaming.js ***!
- \*******************************************************************/
- /*! dynamic exports provided */
- /*! all exports used */
- /***/ (function(module, exports, __webpack_require__) {
- "use strict";
- /* WEBPACK VAR INJECTION */(function(global) {
- var inherits = __webpack_require__(/*! inherits */ "./node_modules/inherits/inherits_browser.js")
- , AjaxBasedTransport = __webpack_require__(/*! ./lib/ajax-based */ "./node_modules/sockjs-client/lib/transport/lib/ajax-based.js")
- , XhrReceiver = __webpack_require__(/*! ./receiver/xhr */ "./node_modules/sockjs-client/lib/transport/receiver/xhr.js")
- , XHRCorsObject = __webpack_require__(/*! ./sender/xhr-cors */ "./node_modules/sockjs-client/lib/transport/sender/xhr-cors.js")
- , XHRLocalObject = __webpack_require__(/*! ./sender/xhr-local */ "./node_modules/sockjs-client/lib/transport/sender/xhr-local.js")
- , browser = __webpack_require__(/*! ../utils/browser */ "./node_modules/sockjs-client/lib/utils/browser.js")
- ;
- function XhrStreamingTransport(transUrl) {
- if (!XHRLocalObject.enabled && !XHRCorsObject.enabled) {
- throw new Error('Transport created when disabled');
- }
- AjaxBasedTransport.call(this, transUrl, '/xhr_streaming', XhrReceiver, XHRCorsObject);
- }
- inherits(XhrStreamingTransport, AjaxBasedTransport);
- XhrStreamingTransport.enabled = function(info) {
- if (info.nullOrigin) {
- return false;
- }
- // Opera doesn't support xhr-streaming #60
- // But it might be able to #92
- if (browser.isOpera()) {
- return false;
- }
- return XHRCorsObject.enabled;
- };
- XhrStreamingTransport.transportName = 'xhr-streaming';
- XhrStreamingTransport.roundTrips = 2; // preflight, ajax
- // Safari gets confused when a streaming ajax request is started
- // before onload. This causes the load indicator to spin indefinetely.
- // Only require body when used in a browser
- XhrStreamingTransport.needBody = !!global.document;
- module.exports = XhrStreamingTransport;
- /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(/*! ./../../../webpack/buildin/global.js */ "./node_modules/webpack/buildin/global.js")))
- /***/ }),
- /***/ "./node_modules/sockjs-client/lib/utils/browser-crypto.js":
- /*!****************************************************************!*\
- !*** ./node_modules/sockjs-client/lib/utils/browser-crypto.js ***!
- \****************************************************************/
- /*! dynamic exports provided */
- /*! all exports used */
- /***/ (function(module, exports, __webpack_require__) {
- "use strict";
- /* WEBPACK VAR INJECTION */(function(global) {
- if (global.crypto && global.crypto.getRandomValues) {
- module.exports.randomBytes = function(length) {
- var bytes = new Uint8Array(length);
- global.crypto.getRandomValues(bytes);
- return bytes;
- };
- } else {
- module.exports.randomBytes = function(length) {
- var bytes = new Array(length);
- for (var i = 0; i < length; i++) {
- bytes[i] = Math.floor(Math.random() * 256);
- }
- return bytes;
- };
- }
- /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(/*! ./../../../webpack/buildin/global.js */ "./node_modules/webpack/buildin/global.js")))
- /***/ }),
- /***/ "./node_modules/sockjs-client/lib/utils/browser.js":
- /*!*********************************************************!*\
- !*** ./node_modules/sockjs-client/lib/utils/browser.js ***!
- \*********************************************************/
- /*! dynamic exports provided */
- /*! all exports used */
- /***/ (function(module, exports, __webpack_require__) {
- "use strict";
- /* WEBPACK VAR INJECTION */(function(global) {
- module.exports = {
- isOpera: function() {
- return global.navigator &&
- /opera/i.test(global.navigator.userAgent);
- }
- , isKonqueror: function() {
- return global.navigator &&
- /konqueror/i.test(global.navigator.userAgent);
- }
- // #187 wrap document.domain in try/catch because of WP8 from file:///
- , hasDomain: function () {
- // non-browser client always has a domain
- if (!global.document) {
- return true;
- }
- try {
- return !!global.document.domain;
- } catch (e) {
- return false;
- }
- }
- };
- /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(/*! ./../../../webpack/buildin/global.js */ "./node_modules/webpack/buildin/global.js")))
- /***/ }),
- /***/ "./node_modules/sockjs-client/lib/utils/escape.js":
- /*!********************************************************!*\
- !*** ./node_modules/sockjs-client/lib/utils/escape.js ***!
- \********************************************************/
- /*! dynamic exports provided */
- /*! all exports used */
- /***/ (function(module, exports, __webpack_require__) {
- "use strict";
- var JSON3 = __webpack_require__(/*! json3 */ "./node_modules/json3/lib/json3.js");
- // Some extra characters that Chrome gets wrong, and substitutes with
- // something else on the wire.
- // eslint-disable-next-line no-control-regex
- var extraEscapable = /[\x00-\x1f\ud800-\udfff\ufffe\uffff\u0300-\u0333\u033d-\u0346\u034a-\u034c\u0350-\u0352\u0357-\u0358\u035c-\u0362\u0374\u037e\u0387\u0591-\u05af\u05c4\u0610-\u0617\u0653-\u0654\u0657-\u065b\u065d-\u065e\u06df-\u06e2\u06eb-\u06ec\u0730\u0732-\u0733\u0735-\u0736\u073a\u073d\u073f-\u0741\u0743\u0745\u0747\u07eb-\u07f1\u0951\u0958-\u095f\u09dc-\u09dd\u09df\u0a33\u0a36\u0a59-\u0a5b\u0a5e\u0b5c-\u0b5d\u0e38-\u0e39\u0f43\u0f4d\u0f52\u0f57\u0f5c\u0f69\u0f72-\u0f76\u0f78\u0f80-\u0f83\u0f93\u0f9d\u0fa2\u0fa7\u0fac\u0fb9\u1939-\u193a\u1a17\u1b6b\u1cda-\u1cdb\u1dc0-\u1dcf\u1dfc\u1dfe\u1f71\u1f73\u1f75\u1f77\u1f79\u1f7b\u1f7d\u1fbb\u1fbe\u1fc9\u1fcb\u1fd3\u1fdb\u1fe3\u1feb\u1fee-\u1fef\u1ff9\u1ffb\u1ffd\u2000-\u2001\u20d0-\u20d1\u20d4-\u20d7\u20e7-\u20e9\u2126\u212a-\u212b\u2329-\u232a\u2adc\u302b-\u302c\uaab2-\uaab3\uf900-\ufa0d\ufa10\ufa12\ufa15-\ufa1e\ufa20\ufa22\ufa25-\ufa26\ufa2a-\ufa2d\ufa30-\ufa6d\ufa70-\ufad9\ufb1d\ufb1f\ufb2a-\ufb36\ufb38-\ufb3c\ufb3e\ufb40-\ufb41\ufb43-\ufb44\ufb46-\ufb4e\ufff0-\uffff]/g
- , extraLookup;
- // This may be quite slow, so let's delay until user actually uses bad
- // characters.
- var unrollLookup = function(escapable) {
- var i;
- var unrolled = {};
- var c = [];
- for (i = 0; i < 65536; i++) {
- c.push( String.fromCharCode(i) );
- }
- escapable.lastIndex = 0;
- c.join('').replace(escapable, function(a) {
- unrolled[ a ] = '\\u' + ('0000' + a.charCodeAt(0).toString(16)).slice(-4);
- return '';
- });
- escapable.lastIndex = 0;
- return unrolled;
- };
- // Quote string, also taking care of unicode characters that browsers
- // often break. Especially, take care of unicode surrogates:
- // http://en.wikipedia.org/wiki/Mapping_of_Unicode_characters#Surrogates
- module.exports = {
- quote: function(string) {
- var quoted = JSON3.stringify(string);
- // In most cases this should be very fast and good enough.
- extraEscapable.lastIndex = 0;
- if (!extraEscapable.test(quoted)) {
- return quoted;
- }
- if (!extraLookup) {
- extraLookup = unrollLookup(extraEscapable);
- }
- return quoted.replace(extraEscapable, function(a) {
- return extraLookup[a];
- });
- }
- };
- /***/ }),
- /***/ "./node_modules/sockjs-client/lib/utils/event.js":
- /*!*******************************************************!*\
- !*** ./node_modules/sockjs-client/lib/utils/event.js ***!
- \*******************************************************/
- /*! dynamic exports provided */
- /*! all exports used */
- /***/ (function(module, exports, __webpack_require__) {
- "use strict";
- /* WEBPACK VAR INJECTION */(function(global) {
- var random = __webpack_require__(/*! ./random */ "./node_modules/sockjs-client/lib/utils/random.js");
- var onUnload = {}
- , afterUnload = false
- // detect google chrome packaged apps because they don't allow the 'unload' event
- , isChromePackagedApp = global.chrome && global.chrome.app && global.chrome.app.runtime
- ;
- module.exports = {
- attachEvent: function(event, listener) {
- if (typeof global.addEventListener !== 'undefined') {
- global.addEventListener(event, listener, false);
- } else if (global.document && global.attachEvent) {
- // IE quirks.
- // According to: http://stevesouders.com/misc/test-postmessage.php
- // the message gets delivered only to 'document', not 'window'.
- global.document.attachEvent('on' + event, listener);
- // I get 'window' for ie8.
- global.attachEvent('on' + event, listener);
- }
- }
- , detachEvent: function(event, listener) {
- if (typeof global.addEventListener !== 'undefined') {
- global.removeEventListener(event, listener, false);
- } else if (global.document && global.detachEvent) {
- global.document.detachEvent('on' + event, listener);
- global.detachEvent('on' + event, listener);
- }
- }
- , unloadAdd: function(listener) {
- if (isChromePackagedApp) {
- return null;
- }
- var ref = random.string(8);
- onUnload[ref] = listener;
- if (afterUnload) {
- setTimeout(this.triggerUnloadCallbacks, 0);
- }
- return ref;
- }
- , unloadDel: function(ref) {
- if (ref in onUnload) {
- delete onUnload[ref];
- }
- }
- , triggerUnloadCallbacks: function() {
- for (var ref in onUnload) {
- onUnload[ref]();
- delete onUnload[ref];
- }
- }
- };
- var unloadTriggered = function() {
- if (afterUnload) {
- return;
- }
- afterUnload = true;
- module.exports.triggerUnloadCallbacks();
- };
- // 'unload' alone is not reliable in opera within an iframe, but we
- // can't use `beforeunload` as IE fires it on javascript: links.
- if (!isChromePackagedApp) {
- module.exports.attachEvent('unload', unloadTriggered);
- }
- /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(/*! ./../../../webpack/buildin/global.js */ "./node_modules/webpack/buildin/global.js")))
- /***/ }),
- /***/ "./node_modules/sockjs-client/lib/utils/iframe.js":
- /*!********************************************************!*\
- !*** ./node_modules/sockjs-client/lib/utils/iframe.js ***!
- \********************************************************/
- /*! dynamic exports provided */
- /*! all exports used */
- /***/ (function(module, exports, __webpack_require__) {
- "use strict";
- /* WEBPACK VAR INJECTION */(function(global) {
- var eventUtils = __webpack_require__(/*! ./event */ "./node_modules/sockjs-client/lib/utils/event.js")
- , JSON3 = __webpack_require__(/*! json3 */ "./node_modules/json3/lib/json3.js")
- , browser = __webpack_require__(/*! ./browser */ "./node_modules/sockjs-client/lib/utils/browser.js")
- ;
- var debug = function() {};
- if (true) {
- debug = __webpack_require__(/*! debug */ "./node_modules/debug/src/browser.js")('sockjs-client:utils:iframe');
- }
- module.exports = {
- WPrefix: '_jp'
- , currentWindowId: null
- , polluteGlobalNamespace: function() {
- if (!(module.exports.WPrefix in global)) {
- global[module.exports.WPrefix] = {};
- }
- }
- , postMessage: function(type, data) {
- if (global.parent !== global) {
- global.parent.postMessage(JSON3.stringify({
- windowId: module.exports.currentWindowId
- , type: type
- , data: data || ''
- }), '*');
- } else {
- debug('Cannot postMessage, no parent window.', type, data);
- }
- }
- , createIframe: function(iframeUrl, errorCallback) {
- var iframe = global.document.createElement('iframe');
- var tref, unloadRef;
- var unattach = function() {
- debug('unattach');
- clearTimeout(tref);
- // Explorer had problems with that.
- try {
- iframe.onload = null;
- } catch (x) {
- // intentionally empty
- }
- iframe.onerror = null;
- };
- var cleanup = function() {
- debug('cleanup');
- if (iframe) {
- unattach();
- // This timeout makes chrome fire onbeforeunload event
- // within iframe. Without the timeout it goes straight to
- // onunload.
- setTimeout(function() {
- if (iframe) {
- iframe.parentNode.removeChild(iframe);
- }
- iframe = null;
- }, 0);
- eventUtils.unloadDel(unloadRef);
- }
- };
- var onerror = function(err) {
- debug('onerror', err);
- if (iframe) {
- cleanup();
- errorCallback(err);
- }
- };
- var post = function(msg, origin) {
- debug('post', msg, origin);
- try {
- // When the iframe is not loaded, IE raises an exception
- // on 'contentWindow'.
- setTimeout(function() {
- if (iframe && iframe.contentWindow) {
- iframe.contentWindow.postMessage(msg, origin);
- }
- }, 0);
- } catch (x) {
- // intentionally empty
- }
- };
- iframe.src = iframeUrl;
- iframe.style.display = 'none';
- iframe.style.position = 'absolute';
- iframe.onerror = function() {
- onerror('onerror');
- };
- iframe.onload = function() {
- debug('onload');
- // `onload` is triggered before scripts on the iframe are
- // executed. Give it few seconds to actually load stuff.
- clearTimeout(tref);
- tref = setTimeout(function() {
- onerror('onload timeout');
- }, 2000);
- };
- global.document.body.appendChild(iframe);
- tref = setTimeout(function() {
- onerror('timeout');
- }, 15000);
- unloadRef = eventUtils.unloadAdd(cleanup);
- return {
- post: post
- , cleanup: cleanup
- , loaded: unattach
- };
- }
- /* eslint no-undef: "off", new-cap: "off" */
- , createHtmlfile: function(iframeUrl, errorCallback) {
- var axo = ['Active'].concat('Object').join('X');
- var doc = new global[axo]('htmlfile');
- var tref, unloadRef;
- var iframe;
- var unattach = function() {
- clearTimeout(tref);
- iframe.onerror = null;
- };
- var cleanup = function() {
- if (doc) {
- unattach();
- eventUtils.unloadDel(unloadRef);
- iframe.parentNode.removeChild(iframe);
- iframe = doc = null;
- CollectGarbage();
- }
- };
- var onerror = function(r) {
- debug('onerror', r);
- if (doc) {
- cleanup();
- errorCallback(r);
- }
- };
- var post = function(msg, origin) {
- try {
- // When the iframe is not loaded, IE raises an exception
- // on 'contentWindow'.
- setTimeout(function() {
- if (iframe && iframe.contentWindow) {
- iframe.contentWindow.postMessage(msg, origin);
- }
- }, 0);
- } catch (x) {
- // intentionally empty
- }
- };
- doc.open();
- doc.write('<html><s' + 'cript>' +
- 'document.domain="' + global.document.domain + '";' +
- '</s' + 'cript></html>');
- doc.close();
- doc.parentWindow[module.exports.WPrefix] = global[module.exports.WPrefix];
- var c = doc.createElement('div');
- doc.body.appendChild(c);
- iframe = doc.createElement('iframe');
- c.appendChild(iframe);
- iframe.src = iframeUrl;
- iframe.onerror = function() {
- onerror('onerror');
- };
- tref = setTimeout(function() {
- onerror('timeout');
- }, 15000);
- unloadRef = eventUtils.unloadAdd(cleanup);
- return {
- post: post
- , cleanup: cleanup
- , loaded: unattach
- };
- }
- };
- module.exports.iframeEnabled = false;
- if (global.document) {
- // postMessage misbehaves in konqueror 4.6.5 - the messages are delivered with
- // huge delay, or not at all.
- module.exports.iframeEnabled = (typeof global.postMessage === 'function' ||
- typeof global.postMessage === 'object') && (!browser.isKonqueror());
- }
- /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(/*! ./../../../webpack/buildin/global.js */ "./node_modules/webpack/buildin/global.js")))
- /***/ }),
- /***/ "./node_modules/sockjs-client/lib/utils/log.js":
- /*!*****************************************************!*\
- !*** ./node_modules/sockjs-client/lib/utils/log.js ***!
- \*****************************************************/
- /*! dynamic exports provided */
- /*! all exports used */
- /***/ (function(module, exports, __webpack_require__) {
- "use strict";
- /* WEBPACK VAR INJECTION */(function(global) {
- var logObject = {};
- ['log', 'debug', 'warn'].forEach(function (level) {
- var levelExists;
- try {
- levelExists = global.console && global.console[level] && global.console[level].apply;
- } catch(e) {
- // do nothing
- }
- logObject[level] = levelExists ? function () {
- return global.console[level].apply(global.console, arguments);
- } : (level === 'log' ? function () {} : logObject.log);
- });
- module.exports = logObject;
- /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(/*! ./../../../webpack/buildin/global.js */ "./node_modules/webpack/buildin/global.js")))
- /***/ }),
- /***/ "./node_modules/sockjs-client/lib/utils/object.js":
- /*!********************************************************!*\
- !*** ./node_modules/sockjs-client/lib/utils/object.js ***!
- \********************************************************/
- /*! dynamic exports provided */
- /*! all exports used */
- /***/ (function(module, exports, __webpack_require__) {
- "use strict";
- module.exports = {
- isObject: function(obj) {
- var type = typeof obj;
- return type === 'function' || type === 'object' && !!obj;
- }
- , extend: function(obj) {
- if (!this.isObject(obj)) {
- return obj;
- }
- var source, prop;
- for (var i = 1, length = arguments.length; i < length; i++) {
- source = arguments[i];
- for (prop in source) {
- if (Object.prototype.hasOwnProperty.call(source, prop)) {
- obj[prop] = source[prop];
- }
- }
- }
- return obj;
- }
- };
- /***/ }),
- /***/ "./node_modules/sockjs-client/lib/utils/random.js":
- /*!********************************************************!*\
- !*** ./node_modules/sockjs-client/lib/utils/random.js ***!
- \********************************************************/
- /*! dynamic exports provided */
- /*! all exports used */
- /***/ (function(module, exports, __webpack_require__) {
- "use strict";
- /* global crypto:true */
- var crypto = __webpack_require__(/*! crypto */ "./node_modules/sockjs-client/lib/utils/browser-crypto.js");
- // This string has length 32, a power of 2, so the modulus doesn't introduce a
- // bias.
- var _randomStringChars = 'abcdefghijklmnopqrstuvwxyz012345';
- module.exports = {
- string: function(length) {
- var max = _randomStringChars.length;
- var bytes = crypto.randomBytes(length);
- var ret = [];
- for (var i = 0; i < length; i++) {
- ret.push(_randomStringChars.substr(bytes[i] % max, 1));
- }
- return ret.join('');
- }
- , number: function(max) {
- return Math.floor(Math.random() * max);
- }
- , numberString: function(max) {
- var t = ('' + (max - 1)).length;
- var p = new Array(t + 1).join('0');
- return (p + this.number(max)).slice(-t);
- }
- };
- /***/ }),
- /***/ "./node_modules/sockjs-client/lib/utils/transport.js":
- /*!***********************************************************!*\
- !*** ./node_modules/sockjs-client/lib/utils/transport.js ***!
- \***********************************************************/
- /*! dynamic exports provided */
- /*! all exports used */
- /***/ (function(module, exports, __webpack_require__) {
- "use strict";
- var debug = function() {};
- if (true) {
- debug = __webpack_require__(/*! debug */ "./node_modules/debug/src/browser.js")('sockjs-client:utils:transport');
- }
- module.exports = function(availableTransports) {
- return {
- filterToEnabled: function(transportsWhitelist, info) {
- var transports = {
- main: []
- , facade: []
- };
- if (!transportsWhitelist) {
- transportsWhitelist = [];
- } else if (typeof transportsWhitelist === 'string') {
- transportsWhitelist = [transportsWhitelist];
- }
- availableTransports.forEach(function(trans) {
- if (!trans) {
- return;
- }
- if (trans.transportName === 'websocket' && info.websocket === false) {
- debug('disabled from server', 'websocket');
- return;
- }
- if (transportsWhitelist.length &&
- transportsWhitelist.indexOf(trans.transportName) === -1) {
- debug('not in whitelist', trans.transportName);
- return;
- }
- if (trans.enabled(info)) {
- debug('enabled', trans.transportName);
- transports.main.push(trans);
- if (trans.facadeTransport) {
- transports.facade.push(trans.facadeTransport);
- }
- } else {
- debug('disabled', trans.transportName);
- }
- });
- return transports;
- }
- };
- };
- /***/ }),
- /***/ "./node_modules/sockjs-client/lib/utils/url.js":
- /*!*****************************************************!*\
- !*** ./node_modules/sockjs-client/lib/utils/url.js ***!
- \*****************************************************/
- /*! dynamic exports provided */
- /*! all exports used */
- /***/ (function(module, exports, __webpack_require__) {
- "use strict";
- var URL = __webpack_require__(/*! url-parse */ "./node_modules/url-parse/index.js");
- var debug = function() {};
- if (true) {
- debug = __webpack_require__(/*! debug */ "./node_modules/debug/src/browser.js")('sockjs-client:utils:url');
- }
- module.exports = {
- getOrigin: function(url) {
- if (!url) {
- return null;
- }
- var p = new URL(url);
- if (p.protocol === 'file:') {
- return null;
- }
- var port = p.port;
- if (!port) {
- port = (p.protocol === 'https:') ? '443' : '80';
- }
- return p.protocol + '//' + p.hostname + ':' + port;
- }
- , isOriginEqual: function(a, b) {
- var res = this.getOrigin(a) === this.getOrigin(b);
- debug('same', a, b, res);
- return res;
- }
- , isSchemeEqual: function(a, b) {
- return (a.split(':')[0] === b.split(':')[0]);
- }
- , addPath: function (url, path) {
- var qs = url.split('?');
- return qs[0] + path + (qs[1] ? '?' + qs[1] : '');
- }
- , addQuery: function (url, q) {
- return url + (url.indexOf('?') === -1 ? ('?' + q) : ('&' + q));
- }
- };
- /***/ }),
- /***/ "./node_modules/sockjs-client/lib/version.js":
- /*!***************************************************!*\
- !*** ./node_modules/sockjs-client/lib/version.js ***!
- \***************************************************/
- /*! dynamic exports provided */
- /*! all exports used */
- /***/ (function(module, exports) {
- module.exports = '1.1.4';
- /***/ }),
- /***/ "./node_modules/strip-ansi/index.js":
- /*!******************************************!*\
- !*** ./node_modules/strip-ansi/index.js ***!
- \******************************************/
- /*! dynamic exports provided */
- /*! all exports used */
- /***/ (function(module, exports, __webpack_require__) {
- "use strict";
- var ansiRegex = __webpack_require__(/*! ansi-regex */ "./node_modules/ansi-regex/index.js")();
- module.exports = function (str) {
- return typeof str === 'string' ? str.replace(ansiRegex, '') : str;
- };
- /***/ }),
- /***/ "./node_modules/style-loader/lib/addStyles.js":
- /*!****************************************************!*\
- !*** ./node_modules/style-loader/lib/addStyles.js ***!
- \****************************************************/
- /*! dynamic exports provided */
- /*! all exports used */
- /***/ (function(module, exports, __webpack_require__) {
- /*
- MIT License http://www.opensource.org/licenses/mit-license.php
- Author Tobias Koppers @sokra
- */
- var stylesInDom = {};
- var memoize = function (fn) {
- var memo;
- return function () {
- if (typeof memo === "undefined") memo = fn.apply(this, arguments);
- return memo;
- };
- };
- var isOldIE = memoize(function () {
- // Test for IE <= 9 as proposed by Browserhacks
- // @see http://browserhacks.com/#hack-e71d8692f65334173fee715c222cb805
- // Tests for existence of standard globals is to allow style-loader
- // to operate correctly into non-standard environments
- // @see https://github.com/webpack-contrib/style-loader/issues/177
- return window && document && document.all && !window.atob;
- });
- var getElement = (function (fn) {
- var memo = {};
- return function(selector) {
- if (typeof memo[selector] === "undefined") {
- var styleTarget = fn.call(this, selector);
- // Special case to return head of iframe instead of iframe itself
- if (styleTarget instanceof window.HTMLIFrameElement) {
- try {
- // This will throw an exception if access to iframe is blocked
- // due to cross-origin restrictions
- styleTarget = styleTarget.contentDocument.head;
- } catch(e) {
- styleTarget = null;
- }
- }
- memo[selector] = styleTarget;
- }
- return memo[selector]
- };
- })(function (target) {
- return document.querySelector(target)
- });
- var singleton = null;
- var singletonCounter = 0;
- var stylesInsertedAtTop = [];
- var fixUrls = __webpack_require__(/*! ./urls */ "./node_modules/style-loader/lib/urls.js");
- module.exports = function(list, options) {
- if (typeof DEBUG !== "undefined" && DEBUG) {
- if (typeof document !== "object") throw new Error("The style-loader cannot be used in a non-browser environment");
- }
- options = options || {};
- options.attrs = typeof options.attrs === "object" ? options.attrs : {};
- // Force single-tag solution on IE6-9, which has a hard limit on the # of <style>
- // tags it will allow on a page
- if (!options.singleton) options.singleton = isOldIE();
- // By default, add <style> tags to the <head> element
- if (!options.insertInto) options.insertInto = "head";
- // By default, add <style> tags to the bottom of the target
- if (!options.insertAt) options.insertAt = "bottom";
- var styles = listToStyles(list, options);
- addStylesToDom(styles, options);
- return function update (newList) {
- var mayRemove = [];
- for (var i = 0; i < styles.length; i++) {
- var item = styles[i];
- var domStyle = stylesInDom[item.id];
- domStyle.refs--;
- mayRemove.push(domStyle);
- }
- if(newList) {
- var newStyles = listToStyles(newList, options);
- addStylesToDom(newStyles, options);
- }
- for (var i = 0; i < mayRemove.length; i++) {
- var domStyle = mayRemove[i];
- if(domStyle.refs === 0) {
- for (var j = 0; j < domStyle.parts.length; j++) domStyle.parts[j]();
- delete stylesInDom[domStyle.id];
- }
- }
- };
- };
- function addStylesToDom (styles, options) {
- for (var i = 0; i < styles.length; i++) {
- var item = styles[i];
- var domStyle = stylesInDom[item.id];
- if(domStyle) {
- domStyle.refs++;
- for(var j = 0; j < domStyle.parts.length; j++) {
- domStyle.parts[j](item.parts[j]);
- }
- for(; j < item.parts.length; j++) {
- domStyle.parts.push(addStyle(item.parts[j], options));
- }
- } else {
- var parts = [];
- for(var j = 0; j < item.parts.length; j++) {
- parts.push(addStyle(item.parts[j], options));
- }
- stylesInDom[item.id] = {id: item.id, refs: 1, parts: parts};
- }
- }
- }
- function listToStyles (list, options) {
- var styles = [];
- var newStyles = {};
- for (var i = 0; i < list.length; i++) {
- var item = list[i];
- var id = options.base ? item[0] + options.base : item[0];
- var css = item[1];
- var media = item[2];
- var sourceMap = item[3];
- var part = {css: css, media: media, sourceMap: sourceMap};
- if(!newStyles[id]) styles.push(newStyles[id] = {id: id, parts: [part]});
- else newStyles[id].parts.push(part);
- }
- return styles;
- }
- function insertStyleElement (options, style) {
- var target = getElement(options.insertInto)
- if (!target) {
- throw new Error("Couldn't find a style target. This probably means that the value for the 'insertInto' parameter is invalid.");
- }
- var lastStyleElementInsertedAtTop = stylesInsertedAtTop[stylesInsertedAtTop.length - 1];
- if (options.insertAt === "top") {
- if (!lastStyleElementInsertedAtTop) {
- target.insertBefore(style, target.firstChild);
- } else if (lastStyleElementInsertedAtTop.nextSibling) {
- target.insertBefore(style, lastStyleElementInsertedAtTop.nextSibling);
- } else {
- target.appendChild(style);
- }
- stylesInsertedAtTop.push(style);
- } else if (options.insertAt === "bottom") {
- target.appendChild(style);
- } else if (typeof options.insertAt === "object" && options.insertAt.before) {
- var nextSibling = getElement(options.insertInto + " " + options.insertAt.before);
- target.insertBefore(style, nextSibling);
- } else {
- throw new Error("[Style Loader]\n\n Invalid value for parameter 'insertAt' ('options.insertAt') found.\n Must be 'top', 'bottom', or Object.\n (https://github.com/webpack-contrib/style-loader#insertat)\n");
- }
- }
- function removeStyleElement (style) {
- if (style.parentNode === null) return false;
- style.parentNode.removeChild(style);
- var idx = stylesInsertedAtTop.indexOf(style);
- if(idx >= 0) {
- stylesInsertedAtTop.splice(idx, 1);
- }
- }
- function createStyleElement (options) {
- var style = document.createElement("style");
- options.attrs.type = "text/css";
- addAttrs(style, options.attrs);
- insertStyleElement(options, style);
- return style;
- }
- function createLinkElement (options) {
- var link = document.createElement("link");
- options.attrs.type = "text/css";
- options.attrs.rel = "stylesheet";
- addAttrs(link, options.attrs);
- insertStyleElement(options, link);
- return link;
- }
- function addAttrs (el, attrs) {
- Object.keys(attrs).forEach(function (key) {
- el.setAttribute(key, attrs[key]);
- });
- }
- function addStyle (obj, options) {
- var style, update, remove, result;
- // If a transform function was defined, run it on the css
- if (options.transform && obj.css) {
- result = options.transform(obj.css);
- if (result) {
- // If transform returns a value, use that instead of the original css.
- // This allows running runtime transformations on the css.
- obj.css = result;
- } else {
- // If the transform function returns a falsy value, don't add this css.
- // This allows conditional loading of css
- return function() {
- // noop
- };
- }
- }
- if (options.singleton) {
- var styleIndex = singletonCounter++;
- style = singleton || (singleton = createStyleElement(options));
- update = applyToSingletonTag.bind(null, style, styleIndex, false);
- remove = applyToSingletonTag.bind(null, style, styleIndex, true);
- } else if (
- obj.sourceMap &&
- typeof URL === "function" &&
- typeof URL.createObjectURL === "function" &&
- typeof URL.revokeObjectURL === "function" &&
- typeof Blob === "function" &&
- typeof btoa === "function"
- ) {
- style = createLinkElement(options);
- update = updateLink.bind(null, style, options);
- remove = function () {
- removeStyleElement(style);
- if(style.href) URL.revokeObjectURL(style.href);
- };
- } else {
- style = createStyleElement(options);
- update = applyToTag.bind(null, style);
- remove = function () {
- removeStyleElement(style);
- };
- }
- update(obj);
- return function updateStyle (newObj) {
- if (newObj) {
- if (
- newObj.css === obj.css &&
- newObj.media === obj.media &&
- newObj.sourceMap === obj.sourceMap
- ) {
- return;
- }
- update(obj = newObj);
- } else {
- remove();
- }
- };
- }
- var replaceText = (function () {
- var textStore = [];
- return function (index, replacement) {
- textStore[index] = replacement;
- return textStore.filter(Boolean).join('\n');
- };
- })();
- function applyToSingletonTag (style, index, remove, obj) {
- var css = remove ? "" : obj.css;
- if (style.styleSheet) {
- style.styleSheet.cssText = replaceText(index, css);
- } else {
- var cssNode = document.createTextNode(css);
- var childNodes = style.childNodes;
- if (childNodes[index]) style.removeChild(childNodes[index]);
- if (childNodes.length) {
- style.insertBefore(cssNode, childNodes[index]);
- } else {
- style.appendChild(cssNode);
- }
- }
- }
- function applyToTag (style, obj) {
- var css = obj.css;
- var media = obj.media;
- if(media) {
- style.setAttribute("media", media)
- }
- if(style.styleSheet) {
- style.styleSheet.cssText = css;
- } else {
- while(style.firstChild) {
- style.removeChild(style.firstChild);
- }
- style.appendChild(document.createTextNode(css));
- }
- }
- function updateLink (link, options, obj) {
- var css = obj.css;
- var sourceMap = obj.sourceMap;
- /*
- If convertToAbsoluteUrls isn't defined, but sourcemaps are enabled
- and there is no publicPath defined then lets turn convertToAbsoluteUrls
- on by default. Otherwise default to the convertToAbsoluteUrls option
- directly
- */
- var autoFixUrls = options.convertToAbsoluteUrls === undefined && sourceMap;
- if (options.convertToAbsoluteUrls || autoFixUrls) {
- css = fixUrls(css);
- }
- if (sourceMap) {
- // http://stackoverflow.com/a/26603875
- css += "\n/*# sourceMappingURL=data:application/json;base64," + btoa(unescape(encodeURIComponent(JSON.stringify(sourceMap)))) + " */";
- }
- var blob = new Blob([css], { type: "text/css" });
- var oldSrc = link.href;
- link.href = URL.createObjectURL(blob);
- if(oldSrc) URL.revokeObjectURL(oldSrc);
- }
- /***/ }),
- /***/ "./node_modules/style-loader/lib/urls.js":
- /*!***********************************************!*\
- !*** ./node_modules/style-loader/lib/urls.js ***!
- \***********************************************/
- /*! dynamic exports provided */
- /*! all exports used */
- /***/ (function(module, exports) {
- /**
- * When source maps are enabled, `style-loader` uses a link element with a data-uri to
- * embed the css on the page. This breaks all relative urls because now they are relative to a
- * bundle instead of the current page.
- *
- * One solution is to only use full urls, but that may be impossible.
- *
- * Instead, this function "fixes" the relative urls to be absolute according to the current page location.
- *
- * A rudimentary test suite is located at `test/fixUrls.js` and can be run via the `npm test` command.
- *
- */
- module.exports = function (css) {
- // get current location
- var location = typeof window !== "undefined" && window.location;
- if (!location) {
- throw new Error("fixUrls requires window.location");
- }
- // blank or null?
- if (!css || typeof css !== "string") {
- return css;
- }
- var baseUrl = location.protocol + "//" + location.host;
- var currentDir = baseUrl + location.pathname.replace(/\/[^\/]*$/, "/");
- // convert each url(...)
- /*
- This regular expression is just a way to recursively match brackets within
- a string.
- /url\s*\( = Match on the word "url" with any whitespace after it and then a parens
- ( = Start a capturing group
- (?: = Start a non-capturing group
- [^)(] = Match anything that isn't a parentheses
- | = OR
- \( = Match a start parentheses
- (?: = Start another non-capturing groups
- [^)(]+ = Match anything that isn't a parentheses
- | = OR
- \( = Match a start parentheses
- [^)(]* = Match anything that isn't a parentheses
- \) = Match a end parentheses
- ) = End Group
- *\) = Match anything and then a close parens
- ) = Close non-capturing group
- * = Match anything
- ) = Close capturing group
- \) = Match a close parens
- /gi = Get all matches, not the first. Be case insensitive.
- */
- var fixedCss = css.replace(/url\s*\(((?:[^)(]|\((?:[^)(]+|\([^)(]*\))*\))*)\)/gi, function(fullMatch, origUrl) {
- // strip quotes (if they exist)
- var unquotedOrigUrl = origUrl
- .trim()
- .replace(/^"(.*)"$/, function(o, $1){ return $1; })
- .replace(/^'(.*)'$/, function(o, $1){ return $1; });
- // already a full url? no change
- if (/^(#|data:|http:\/\/|https:\/\/|file:\/\/\/)/i.test(unquotedOrigUrl)) {
- return fullMatch;
- }
- // convert the url to a full url
- var newUrl;
- if (unquotedOrigUrl.indexOf("//") === 0) {
- //TODO: should we add protocol?
- newUrl = unquotedOrigUrl;
- } else if (unquotedOrigUrl.indexOf("/") === 0) {
- // path should be relative to the base url
- newUrl = baseUrl + unquotedOrigUrl; // already starts with '/'
- } else {
- // path should be relative to current directory
- newUrl = currentDir + unquotedOrigUrl.replace(/^\.\//, ""); // Strip leading './'
- }
- // send back the fixed url(...)
- return "url(" + JSON.stringify(newUrl) + ")";
- });
- // send back the fixed css
- return fixedCss;
- };
- /***/ }),
- /***/ "./node_modules/symbol-observable/es/index.js":
- /*!****************************************************!*\
- !*** ./node_modules/symbol-observable/es/index.js ***!
- \****************************************************/
- /*! exports provided: default */
- /*! exports used: default */
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
- "use strict";
- /* WEBPACK VAR INJECTION */(function(global, module) {/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__ponyfill_js__ = __webpack_require__(/*! ./ponyfill.js */ "./node_modules/symbol-observable/es/ponyfill.js");
- /* global window */
- var root;
- if (typeof self !== 'undefined') {
- root = self;
- } else if (typeof window !== 'undefined') {
- root = window;
- } else if (typeof global !== 'undefined') {
- root = global;
- } else if (true) {
- root = module;
- } else {
- root = Function('return this')();
- }
- var result = Object(__WEBPACK_IMPORTED_MODULE_0__ponyfill_js__["a" /* default */])(root);
- /* harmony default export */ __webpack_exports__["a"] = (result);
- /* WEBPACK VAR INJECTION */}.call(__webpack_exports__, __webpack_require__(/*! ./../../webpack/buildin/global.js */ "./node_modules/webpack/buildin/global.js"), __webpack_require__(/*! ./../../webpack/buildin/harmony-module.js */ "./node_modules/webpack/buildin/harmony-module.js")(module)))
- /***/ }),
- /***/ "./node_modules/symbol-observable/es/ponyfill.js":
- /*!*******************************************************!*\
- !*** ./node_modules/symbol-observable/es/ponyfill.js ***!
- \*******************************************************/
- /*! exports provided: default */
- /*! exports used: default */
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
- "use strict";
- /* harmony export (immutable) */ __webpack_exports__["a"] = symbolObservablePonyfill;
- function symbolObservablePonyfill(root) {
- var result;
- var Symbol = root.Symbol;
- if (typeof Symbol === 'function') {
- if (Symbol.observable) {
- result = Symbol.observable;
- } else {
- result = Symbol('observable');
- Symbol.observable = result;
- }
- } else {
- result = '@@observable';
- }
- return result;
- };
- /***/ }),
- /***/ "./node_modules/tiny-invariant/dist/tiny-invariant.esm.js":
- /*!****************************************************************!*\
- !*** ./node_modules/tiny-invariant/dist/tiny-invariant.esm.js ***!
- \****************************************************************/
- /*! exports provided: default */
- /*! exports used: default */
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
- "use strict";
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return invariant; });
- var isProduction = "development" === 'production';
- var prefix = 'Invariant failed';
- function invariant(condition, message) {
- if (condition) {
- return;
- }
- if (isProduction) {
- throw new Error(prefix);
- }
- var provided = typeof message === 'function' ? message() : message;
- var value = provided ? "".concat(prefix, ": ").concat(provided) : prefix;
- throw new Error(value);
- }
- /***/ }),
- /***/ "./node_modules/tiny-warning/dist/tiny-warning.esm.js":
- /*!************************************************************!*\
- !*** ./node_modules/tiny-warning/dist/tiny-warning.esm.js ***!
- \************************************************************/
- /*! exports provided: default */
- /*! exports used: default */
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
- "use strict";
- var isProduction = "development" === 'production';
- function warning(condition, message) {
- if (!isProduction) {
- if (condition) {
- return;
- }
- var text = "Warning: " + message;
- if (typeof console !== 'undefined') {
- console.warn(text);
- }
- try {
- throw Error(text);
- } catch (x) {}
- }
- }
- /* harmony default export */ __webpack_exports__["a"] = (warning);
- /***/ }),
- /***/ "./node_modules/url-parse/index.js":
- /*!*****************************************!*\
- !*** ./node_modules/url-parse/index.js ***!
- \*****************************************/
- /*! dynamic exports provided */
- /*! all exports used */
- /***/ (function(module, exports, __webpack_require__) {
- "use strict";
- /* WEBPACK VAR INJECTION */(function(global) {
- var required = __webpack_require__(/*! requires-port */ "./node_modules/requires-port/index.js")
- , qs = __webpack_require__(/*! querystringify */ "./node_modules/querystringify/index.js")
- , controlOrWhitespace = /^[\x00-\x20\u00a0\u1680\u2000-\u200a\u2028\u2029\u202f\u205f\u3000\ufeff]+/
- , CRHTLF = /[\n\r\t]/g
- , slashes = /^[A-Za-z][A-Za-z0-9+-.]*:\/\//
- , port = /:\d+$/
- , protocolre = /^([a-z][a-z0-9.+-]*:)?(\/\/)?([\\/]+)?([\S\s]*)/i
- , windowsDriveLetter = /^[a-zA-Z]:/;
- /**
- * Remove control characters and whitespace from the beginning of a string.
- *
- * @param {Object|String} str String to trim.
- * @returns {String} A new string representing `str` stripped of control
- * characters and whitespace from its beginning.
- * @public
- */
- function trimLeft(str) {
- return (str ? str : '').toString().replace(controlOrWhitespace, '');
- }
- /**
- * These are the parse rules for the URL parser, it informs the parser
- * about:
- *
- * 0. The char it Needs to parse, if it's a string it should be done using
- * indexOf, RegExp using exec and NaN means set as current value.
- * 1. The property we should set when parsing this value.
- * 2. Indication if it's backwards or forward parsing, when set as number it's
- * the value of extra chars that should be split off.
- * 3. Inherit from location if non existing in the parser.
- * 4. `toLowerCase` the resulting value.
- */
- var rules = [
- ['#', 'hash'], // Extract from the back.
- ['?', 'query'], // Extract from the back.
- function sanitize(address, url) { // Sanitize what is left of the address
- return isSpecial(url.protocol) ? address.replace(/\\/g, '/') : address;
- },
- ['/', 'pathname'], // Extract from the back.
- ['@', 'auth', 1], // Extract from the front.
- [NaN, 'host', undefined, 1, 1], // Set left over value.
- [/:(\d*)$/, 'port', undefined, 1], // RegExp the back.
- [NaN, 'hostname', undefined, 1, 1] // Set left over.
- ];
- /**
- * These properties should not be copied or inherited from. This is only needed
- * for all non blob URL's as a blob URL does not include a hash, only the
- * origin.
- *
- * @type {Object}
- * @private
- */
- var ignore = { hash: 1, query: 1 };
- /**
- * The location object differs when your code is loaded through a normal page,
- * Worker or through a worker using a blob. And with the blobble begins the
- * trouble as the location object will contain the URL of the blob, not the
- * location of the page where our code is loaded in. The actual origin is
- * encoded in the `pathname` so we can thankfully generate a good "default"
- * location from it so we can generate proper relative URL's again.
- *
- * @param {Object|String} loc Optional default location object.
- * @returns {Object} lolcation object.
- * @public
- */
- function lolcation(loc) {
- var globalVar;
- if (typeof window !== 'undefined') globalVar = window;
- else if (typeof global !== 'undefined') globalVar = global;
- else if (typeof self !== 'undefined') globalVar = self;
- else globalVar = {};
- var location = globalVar.location || {};
- loc = loc || location;
- var finaldestination = {}
- , type = typeof loc
- , key;
- if ('blob:' === loc.protocol) {
- finaldestination = new Url(unescape(loc.pathname), {});
- } else if ('string' === type) {
- finaldestination = new Url(loc, {});
- for (key in ignore) delete finaldestination[key];
- } else if ('object' === type) {
- for (key in loc) {
- if (key in ignore) continue;
- finaldestination[key] = loc[key];
- }
- if (finaldestination.slashes === undefined) {
- finaldestination.slashes = slashes.test(loc.href);
- }
- }
- return finaldestination;
- }
- /**
- * Check whether a protocol scheme is special.
- *
- * @param {String} The protocol scheme of the URL
- * @return {Boolean} `true` if the protocol scheme is special, else `false`
- * @private
- */
- function isSpecial(scheme) {
- return (
- scheme === 'file:' ||
- scheme === 'ftp:' ||
- scheme === 'http:' ||
- scheme === 'https:' ||
- scheme === 'ws:' ||
- scheme === 'wss:'
- );
- }
- /**
- * @typedef ProtocolExtract
- * @type Object
- * @property {String} protocol Protocol matched in the URL, in lowercase.
- * @property {Boolean} slashes `true` if protocol is followed by "//", else `false`.
- * @property {String} rest Rest of the URL that is not part of the protocol.
- */
- /**
- * Extract protocol information from a URL with/without double slash ("//").
- *
- * @param {String} address URL we want to extract from.
- * @param {Object} location
- * @return {ProtocolExtract} Extracted information.
- * @private
- */
- function extractProtocol(address, location) {
- address = trimLeft(address);
- address = address.replace(CRHTLF, '');
- location = location || {};
- var match = protocolre.exec(address);
- var protocol = match[1] ? match[1].toLowerCase() : '';
- var forwardSlashes = !!match[2];
- var otherSlashes = !!match[3];
- var slashesCount = 0;
- var rest;
- if (forwardSlashes) {
- if (otherSlashes) {
- rest = match[2] + match[3] + match[4];
- slashesCount = match[2].length + match[3].length;
- } else {
- rest = match[2] + match[4];
- slashesCount = match[2].length;
- }
- } else {
- if (otherSlashes) {
- rest = match[3] + match[4];
- slashesCount = match[3].length;
- } else {
- rest = match[4]
- }
- }
- if (protocol === 'file:') {
- if (slashesCount >= 2) {
- rest = rest.slice(2);
- }
- } else if (isSpecial(protocol)) {
- rest = match[4];
- } else if (protocol) {
- if (forwardSlashes) {
- rest = rest.slice(2);
- }
- } else if (slashesCount >= 2 && isSpecial(location.protocol)) {
- rest = match[4];
- }
- return {
- protocol: protocol,
- slashes: forwardSlashes || isSpecial(protocol),
- slashesCount: slashesCount,
- rest: rest
- };
- }
- /**
- * Resolve a relative URL pathname against a base URL pathname.
- *
- * @param {String} relative Pathname of the relative URL.
- * @param {String} base Pathname of the base URL.
- * @return {String} Resolved pathname.
- * @private
- */
- function resolve(relative, base) {
- if (relative === '') return base;
- var path = (base || '/').split('/').slice(0, -1).concat(relative.split('/'))
- , i = path.length
- , last = path[i - 1]
- , unshift = false
- , up = 0;
- while (i--) {
- if (path[i] === '.') {
- path.splice(i, 1);
- } else if (path[i] === '..') {
- path.splice(i, 1);
- up++;
- } else if (up) {
- if (i === 0) unshift = true;
- path.splice(i, 1);
- up--;
- }
- }
- if (unshift) path.unshift('');
- if (last === '.' || last === '..') path.push('');
- return path.join('/');
- }
- /**
- * The actual URL instance. Instead of returning an object we've opted-in to
- * create an actual constructor as it's much more memory efficient and
- * faster and it pleases my OCD.
- *
- * It is worth noting that we should not use `URL` as class name to prevent
- * clashes with the global URL instance that got introduced in browsers.
- *
- * @constructor
- * @param {String} address URL we want to parse.
- * @param {Object|String} [location] Location defaults for relative paths.
- * @param {Boolean|Function} [parser] Parser for the query string.
- * @private
- */
- function Url(address, location, parser) {
- address = trimLeft(address);
- address = address.replace(CRHTLF, '');
- if (!(this instanceof Url)) {
- return new Url(address, location, parser);
- }
- var relative, extracted, parse, instruction, index, key
- , instructions = rules.slice()
- , type = typeof location
- , url = this
- , i = 0;
- //
- // The following if statements allows this module two have compatibility with
- // 2 different API:
- //
- // 1. Node.js's `url.parse` api which accepts a URL, boolean as arguments
- // where the boolean indicates that the query string should also be parsed.
- //
- // 2. The `URL` interface of the browser which accepts a URL, object as
- // arguments. The supplied object will be used as default values / fall-back
- // for relative paths.
- //
- if ('object' !== type && 'string' !== type) {
- parser = location;
- location = null;
- }
- if (parser && 'function' !== typeof parser) parser = qs.parse;
- location = lolcation(location);
- //
- // Extract protocol information before running the instructions.
- //
- extracted = extractProtocol(address || '', location);
- relative = !extracted.protocol && !extracted.slashes;
- url.slashes = extracted.slashes || relative && location.slashes;
- url.protocol = extracted.protocol || location.protocol || '';
- address = extracted.rest;
- //
- // When the authority component is absent the URL starts with a path
- // component.
- //
- if (
- extracted.protocol === 'file:' && (
- extracted.slashesCount !== 2 || windowsDriveLetter.test(address)) ||
- (!extracted.slashes &&
- (extracted.protocol ||
- extracted.slashesCount < 2 ||
- !isSpecial(url.protocol)))
- ) {
- instructions[3] = [/(.*)/, 'pathname'];
- }
- for (; i < instructions.length; i++) {
- instruction = instructions[i];
- if (typeof instruction === 'function') {
- address = instruction(address, url);
- continue;
- }
- parse = instruction[0];
- key = instruction[1];
- if (parse !== parse) {
- url[key] = address;
- } else if ('string' === typeof parse) {
- index = parse === '@'
- ? address.lastIndexOf(parse)
- : address.indexOf(parse);
- if (~index) {
- if ('number' === typeof instruction[2]) {
- url[key] = address.slice(0, index);
- address = address.slice(index + instruction[2]);
- } else {
- url[key] = address.slice(index);
- address = address.slice(0, index);
- }
- }
- } else if ((index = parse.exec(address))) {
- url[key] = index[1];
- address = address.slice(0, index.index);
- }
- url[key] = url[key] || (
- relative && instruction[3] ? location[key] || '' : ''
- );
- //
- // Hostname, host and protocol should be lowercased so they can be used to
- // create a proper `origin`.
- //
- if (instruction[4]) url[key] = url[key].toLowerCase();
- }
- //
- // Also parse the supplied query string in to an object. If we're supplied
- // with a custom parser as function use that instead of the default build-in
- // parser.
- //
- if (parser) url.query = parser(url.query);
- //
- // If the URL is relative, resolve the pathname against the base URL.
- //
- if (
- relative
- && location.slashes
- && url.pathname.charAt(0) !== '/'
- && (url.pathname !== '' || location.pathname !== '')
- ) {
- url.pathname = resolve(url.pathname, location.pathname);
- }
- //
- // Default to a / for pathname if none exists. This normalizes the URL
- // to always have a /
- //
- if (url.pathname.charAt(0) !== '/' && isSpecial(url.protocol)) {
- url.pathname = '/' + url.pathname;
- }
- //
- // We should not add port numbers if they are already the default port number
- // for a given protocol. As the host also contains the port number we're going
- // override it with the hostname which contains no port number.
- //
- if (!required(url.port, url.protocol)) {
- url.host = url.hostname;
- url.port = '';
- }
- //
- // Parse down the `auth` for the username and password.
- //
- url.username = url.password = '';
- if (url.auth) {
- index = url.auth.indexOf(':');
- if (~index) {
- url.username = url.auth.slice(0, index);
- url.username = encodeURIComponent(decodeURIComponent(url.username));
- url.password = url.auth.slice(index + 1);
- url.password = encodeURIComponent(decodeURIComponent(url.password))
- } else {
- url.username = encodeURIComponent(decodeURIComponent(url.auth));
- }
- url.auth = url.password ? url.username +':'+ url.password : url.username;
- }
- url.origin = url.protocol !== 'file:' && isSpecial(url.protocol) && url.host
- ? url.protocol +'//'+ url.host
- : 'null';
- //
- // The href is just the compiled result.
- //
- url.href = url.toString();
- }
- /**
- * This is convenience method for changing properties in the URL instance to
- * insure that they all propagate correctly.
- *
- * @param {String} part Property we need to adjust.
- * @param {Mixed} value The newly assigned value.
- * @param {Boolean|Function} fn When setting the query, it will be the function
- * used to parse the query.
- * When setting the protocol, double slash will be
- * removed from the final url if it is true.
- * @returns {URL} URL instance for chaining.
- * @public
- */
- function set(part, value, fn) {
- var url = this;
- switch (part) {
- case 'query':
- if ('string' === typeof value && value.length) {
- value = (fn || qs.parse)(value);
- }
- url[part] = value;
- break;
- case 'port':
- url[part] = value;
- if (!required(value, url.protocol)) {
- url.host = url.hostname;
- url[part] = '';
- } else if (value) {
- url.host = url.hostname +':'+ value;
- }
- break;
- case 'hostname':
- url[part] = value;
- if (url.port) value += ':'+ url.port;
- url.host = value;
- break;
- case 'host':
- url[part] = value;
- if (port.test(value)) {
- value = value.split(':');
- url.port = value.pop();
- url.hostname = value.join(':');
- } else {
- url.hostname = value;
- url.port = '';
- }
- break;
- case 'protocol':
- url.protocol = value.toLowerCase();
- url.slashes = !fn;
- break;
- case 'pathname':
- case 'hash':
- if (value) {
- var char = part === 'pathname' ? '/' : '#';
- url[part] = value.charAt(0) !== char ? char + value : value;
- } else {
- url[part] = value;
- }
- break;
- case 'username':
- case 'password':
- url[part] = encodeURIComponent(value);
- break;
- case 'auth':
- var index = value.indexOf(':');
- if (~index) {
- url.username = value.slice(0, index);
- url.username = encodeURIComponent(decodeURIComponent(url.username));
- url.password = value.slice(index + 1);
- url.password = encodeURIComponent(decodeURIComponent(url.password));
- } else {
- url.username = encodeURIComponent(decodeURIComponent(value));
- }
- }
- for (var i = 0; i < rules.length; i++) {
- var ins = rules[i];
- if (ins[4]) url[ins[1]] = url[ins[1]].toLowerCase();
- }
- url.auth = url.password ? url.username +':'+ url.password : url.username;
- url.origin = url.protocol !== 'file:' && isSpecial(url.protocol) && url.host
- ? url.protocol +'//'+ url.host
- : 'null';
- url.href = url.toString();
- return url;
- }
- /**
- * Transform the properties back in to a valid and full URL string.
- *
- * @param {Function} stringify Optional query stringify function.
- * @returns {String} Compiled version of the URL.
- * @public
- */
- function toString(stringify) {
- if (!stringify || 'function' !== typeof stringify) stringify = qs.stringify;
- var query
- , url = this
- , host = url.host
- , protocol = url.protocol;
- if (protocol && protocol.charAt(protocol.length - 1) !== ':') protocol += ':';
- var result =
- protocol +
- ((url.protocol && url.slashes) || isSpecial(url.protocol) ? '//' : '');
- if (url.username) {
- result += url.username;
- if (url.password) result += ':'+ url.password;
- result += '@';
- } else if (url.password) {
- result += ':'+ url.password;
- result += '@';
- } else if (
- url.protocol !== 'file:' &&
- isSpecial(url.protocol) &&
- !host &&
- url.pathname !== '/'
- ) {
- //
- // Add back the empty userinfo, otherwise the original invalid URL
- // might be transformed into a valid one with `url.pathname` as host.
- //
- result += '@';
- }
- //
- // Trailing colon is removed from `url.host` when it is parsed. If it still
- // ends with a colon, then add back the trailing colon that was removed. This
- // prevents an invalid URL from being transformed into a valid one.
- //
- if (host[host.length - 1] === ':' || (port.test(url.hostname) && !url.port)) {
- host += ':';
- }
- result += host + url.pathname;
- query = 'object' === typeof url.query ? stringify(url.query) : url.query;
- if (query) result += '?' !== query.charAt(0) ? '?'+ query : query;
- if (url.hash) result += url.hash;
- return result;
- }
- Url.prototype = { set: set, toString: toString };
- //
- // Expose the URL parser and some additional properties that might be useful for
- // others or testing.
- //
- Url.extractProtocol = extractProtocol;
- Url.location = lolcation;
- Url.trimLeft = trimLeft;
- Url.qs = qs;
- module.exports = Url;
- /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(/*! ./../webpack/buildin/global.js */ "./node_modules/webpack/buildin/global.js")))
- /***/ }),
- /***/ "./node_modules/url/url.js":
- /*!*********************************!*\
- !*** ./node_modules/url/url.js ***!
- \*********************************/
- /*! dynamic exports provided */
- /*! all exports used */
- /***/ (function(module, exports, __webpack_require__) {
- "use strict";
- // Copyright Joyent, Inc. and other Node contributors.
- //
- // Permission is hereby granted, free of charge, to any person obtaining a
- // copy of this software and associated documentation files (the
- // "Software"), to deal in the Software without restriction, including
- // without limitation the rights to use, copy, modify, merge, publish,
- // distribute, sublicense, and/or sell copies of the Software, and to permit
- // persons to whom the Software is furnished to do so, subject to the
- // following conditions:
- //
- // The above copyright notice and this permission notice shall be included
- // in all copies or substantial portions of the Software.
- //
- // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
- // OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
- // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
- // NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
- // DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
- // OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
- // USE OR OTHER DEALINGS IN THE SOFTWARE.
- var punycode = __webpack_require__(/*! punycode */ "./node_modules/node-libs-browser/node_modules/punycode/punycode.js");
- var util = __webpack_require__(/*! ./util */ "./node_modules/url/util.js");
- exports.parse = urlParse;
- exports.resolve = urlResolve;
- exports.resolveObject = urlResolveObject;
- exports.format = urlFormat;
- exports.Url = Url;
- function Url() {
- this.protocol = null;
- this.slashes = null;
- this.auth = null;
- this.host = null;
- this.port = null;
- this.hostname = null;
- this.hash = null;
- this.search = null;
- this.query = null;
- this.pathname = null;
- this.path = null;
- this.href = null;
- }
- // Reference: RFC 3986, RFC 1808, RFC 2396
- // define these here so at least they only have to be
- // compiled once on the first module load.
- var protocolPattern = /^([a-z0-9.+-]+:)/i,
- portPattern = /:[0-9]*$/,
- // Special case for a simple path URL
- simplePathPattern = /^(\/\/?(?!\/)[^\?\s]*)(\?[^\s]*)?$/,
- // RFC 2396: characters reserved for delimiting URLs.
- // We actually just auto-escape these.
- delims = ['<', '>', '"', '`', ' ', '\r', '\n', '\t'],
- // RFC 2396: characters not allowed for various reasons.
- unwise = ['{', '}', '|', '\\', '^', '`'].concat(delims),
- // Allowed by RFCs, but cause of XSS attacks. Always escape these.
- autoEscape = ['\''].concat(unwise),
- // Characters that are never ever allowed in a hostname.
- // Note that any invalid chars are also handled, but these
- // are the ones that are *expected* to be seen, so we fast-path
- // them.
- nonHostChars = ['%', '/', '?', ';', '#'].concat(autoEscape),
- hostEndingChars = ['/', '?', '#'],
- hostnameMaxLen = 255,
- hostnamePartPattern = /^[+a-z0-9A-Z_-]{0,63}$/,
- hostnamePartStart = /^([+a-z0-9A-Z_-]{0,63})(.*)$/,
- // protocols that can allow "unsafe" and "unwise" chars.
- unsafeProtocol = {
- 'javascript': true,
- 'javascript:': true
- },
- // protocols that never have a hostname.
- hostlessProtocol = {
- 'javascript': true,
- 'javascript:': true
- },
- // protocols that always contain a // bit.
- slashedProtocol = {
- 'http': true,
- 'https': true,
- 'ftp': true,
- 'gopher': true,
- 'file': true,
- 'http:': true,
- 'https:': true,
- 'ftp:': true,
- 'gopher:': true,
- 'file:': true
- },
- querystring = __webpack_require__(/*! querystring */ "./node_modules/querystring-es3/index.js");
- function urlParse(url, parseQueryString, slashesDenoteHost) {
- if (url && util.isObject(url) && url instanceof Url) return url;
- var u = new Url;
- u.parse(url, parseQueryString, slashesDenoteHost);
- return u;
- }
- Url.prototype.parse = function(url, parseQueryString, slashesDenoteHost) {
- if (!util.isString(url)) {
- throw new TypeError("Parameter 'url' must be a string, not " + typeof url);
- }
- // Copy chrome, IE, opera backslash-handling behavior.
- // Back slashes before the query string get converted to forward slashes
- // See: https://code.google.com/p/chromium/issues/detail?id=25916
- var queryIndex = url.indexOf('?'),
- splitter =
- (queryIndex !== -1 && queryIndex < url.indexOf('#')) ? '?' : '#',
- uSplit = url.split(splitter),
- slashRegex = /\\/g;
- uSplit[0] = uSplit[0].replace(slashRegex, '/');
- url = uSplit.join(splitter);
- var rest = url;
- // trim before proceeding.
- // This is to support parse stuff like " http://foo.com \n"
- rest = rest.trim();
- if (!slashesDenoteHost && url.split('#').length === 1) {
- // Try fast path regexp
- var simplePath = simplePathPattern.exec(rest);
- if (simplePath) {
- this.path = rest;
- this.href = rest;
- this.pathname = simplePath[1];
- if (simplePath[2]) {
- this.search = simplePath[2];
- if (parseQueryString) {
- this.query = querystring.parse(this.search.substr(1));
- } else {
- this.query = this.search.substr(1);
- }
- } else if (parseQueryString) {
- this.search = '';
- this.query = {};
- }
- return this;
- }
- }
- var proto = protocolPattern.exec(rest);
- if (proto) {
- proto = proto[0];
- var lowerProto = proto.toLowerCase();
- this.protocol = lowerProto;
- rest = rest.substr(proto.length);
- }
- // figure out if it's got a host
- // user@server is *always* interpreted as a hostname, and url
- // resolution will treat //foo/bar as host=foo,path=bar because that's
- // how the browser resolves relative URLs.
- if (slashesDenoteHost || proto || rest.match(/^\/\/[^@\/]+@[^@\/]+/)) {
- var slashes = rest.substr(0, 2) === '//';
- if (slashes && !(proto && hostlessProtocol[proto])) {
- rest = rest.substr(2);
- this.slashes = true;
- }
- }
- if (!hostlessProtocol[proto] &&
- (slashes || (proto && !slashedProtocol[proto]))) {
- // there's a hostname.
- // the first instance of /, ?, ;, or # ends the host.
- //
- // If there is an @ in the hostname, then non-host chars *are* allowed
- // to the left of the last @ sign, unless some host-ending character
- // comes *before* the @-sign.
- // URLs are obnoxious.
- //
- // ex:
- // http://a@b@c/ => user:a@b host:c
- // http://a@b?@c => user:a host:c path:/?@c
- // v0.12 TODO(isaacs): This is not quite how Chrome does things.
- // Review our test case against browsers more comprehensively.
- // find the first instance of any hostEndingChars
- var hostEnd = -1;
- for (var i = 0; i < hostEndingChars.length; i++) {
- var hec = rest.indexOf(hostEndingChars[i]);
- if (hec !== -1 && (hostEnd === -1 || hec < hostEnd))
- hostEnd = hec;
- }
- // at this point, either we have an explicit point where the
- // auth portion cannot go past, or the last @ char is the decider.
- var auth, atSign;
- if (hostEnd === -1) {
- // atSign can be anywhere.
- atSign = rest.lastIndexOf('@');
- } else {
- // atSign must be in auth portion.
- // http://a@b/c@d => host:b auth:a path:/c@d
- atSign = rest.lastIndexOf('@', hostEnd);
- }
- // Now we have a portion which is definitely the auth.
- // Pull that off.
- if (atSign !== -1) {
- auth = rest.slice(0, atSign);
- rest = rest.slice(atSign + 1);
- this.auth = decodeURIComponent(auth);
- }
- // the host is the remaining to the left of the first non-host char
- hostEnd = -1;
- for (var i = 0; i < nonHostChars.length; i++) {
- var hec = rest.indexOf(nonHostChars[i]);
- if (hec !== -1 && (hostEnd === -1 || hec < hostEnd))
- hostEnd = hec;
- }
- // if we still have not hit it, then the entire thing is a host.
- if (hostEnd === -1)
- hostEnd = rest.length;
- this.host = rest.slice(0, hostEnd);
- rest = rest.slice(hostEnd);
- // pull out port.
- this.parseHost();
- // we've indicated that there is a hostname,
- // so even if it's empty, it has to be present.
- this.hostname = this.hostname || '';
- // if hostname begins with [ and ends with ]
- // assume that it's an IPv6 address.
- var ipv6Hostname = this.hostname[0] === '[' &&
- this.hostname[this.hostname.length - 1] === ']';
- // validate a little.
- if (!ipv6Hostname) {
- var hostparts = this.hostname.split(/\./);
- for (var i = 0, l = hostparts.length; i < l; i++) {
- var part = hostparts[i];
- if (!part) continue;
- if (!part.match(hostnamePartPattern)) {
- var newpart = '';
- for (var j = 0, k = part.length; j < k; j++) {
- if (part.charCodeAt(j) > 127) {
- // we replace non-ASCII char with a temporary placeholder
- // we need this to make sure size of hostname is not
- // broken by replacing non-ASCII by nothing
- newpart += 'x';
- } else {
- newpart += part[j];
- }
- }
- // we test again with ASCII char only
- if (!newpart.match(hostnamePartPattern)) {
- var validParts = hostparts.slice(0, i);
- var notHost = hostparts.slice(i + 1);
- var bit = part.match(hostnamePartStart);
- if (bit) {
- validParts.push(bit[1]);
- notHost.unshift(bit[2]);
- }
- if (notHost.length) {
- rest = '/' + notHost.join('.') + rest;
- }
- this.hostname = validParts.join('.');
- break;
- }
- }
- }
- }
- if (this.hostname.length > hostnameMaxLen) {
- this.hostname = '';
- } else {
- // hostnames are always lower case.
- this.hostname = this.hostname.toLowerCase();
- }
- if (!ipv6Hostname) {
- // IDNA Support: Returns a punycoded representation of "domain".
- // It only converts parts of the domain name that
- // have non-ASCII characters, i.e. it doesn't matter if
- // you call it with a domain that already is ASCII-only.
- this.hostname = punycode.toASCII(this.hostname);
- }
- var p = this.port ? ':' + this.port : '';
- var h = this.hostname || '';
- this.host = h + p;
- this.href += this.host;
- // strip [ and ] from the hostname
- // the host field still retains them, though
- if (ipv6Hostname) {
- this.hostname = this.hostname.substr(1, this.hostname.length - 2);
- if (rest[0] !== '/') {
- rest = '/' + rest;
- }
- }
- }
- // now rest is set to the post-host stuff.
- // chop off any delim chars.
- if (!unsafeProtocol[lowerProto]) {
- // First, make 100% sure that any "autoEscape" chars get
- // escaped, even if encodeURIComponent doesn't think they
- // need to be.
- for (var i = 0, l = autoEscape.length; i < l; i++) {
- var ae = autoEscape[i];
- if (rest.indexOf(ae) === -1)
- continue;
- var esc = encodeURIComponent(ae);
- if (esc === ae) {
- esc = escape(ae);
- }
- rest = rest.split(ae).join(esc);
- }
- }
- // chop off from the tail first.
- var hash = rest.indexOf('#');
- if (hash !== -1) {
- // got a fragment string.
- this.hash = rest.substr(hash);
- rest = rest.slice(0, hash);
- }
- var qm = rest.indexOf('?');
- if (qm !== -1) {
- this.search = rest.substr(qm);
- this.query = rest.substr(qm + 1);
- if (parseQueryString) {
- this.query = querystring.parse(this.query);
- }
- rest = rest.slice(0, qm);
- } else if (parseQueryString) {
- // no query string, but parseQueryString still requested
- this.search = '';
- this.query = {};
- }
- if (rest) this.pathname = rest;
- if (slashedProtocol[lowerProto] &&
- this.hostname && !this.pathname) {
- this.pathname = '/';
- }
- //to support http.request
- if (this.pathname || this.search) {
- var p = this.pathname || '';
- var s = this.search || '';
- this.path = p + s;
- }
- // finally, reconstruct the href based on what has been validated.
- this.href = this.format();
- return this;
- };
- // format a parsed object into a url string
- function urlFormat(obj) {
- // ensure it's an object, and not a string url.
- // If it's an obj, this is a no-op.
- // this way, you can call url_format() on strings
- // to clean up potentially wonky urls.
- if (util.isString(obj)) obj = urlParse(obj);
- if (!(obj instanceof Url)) return Url.prototype.format.call(obj);
- return obj.format();
- }
- Url.prototype.format = function() {
- var auth = this.auth || '';
- if (auth) {
- auth = encodeURIComponent(auth);
- auth = auth.replace(/%3A/i, ':');
- auth += '@';
- }
- var protocol = this.protocol || '',
- pathname = this.pathname || '',
- hash = this.hash || '',
- host = false,
- query = '';
- if (this.host) {
- host = auth + this.host;
- } else if (this.hostname) {
- host = auth + (this.hostname.indexOf(':') === -1 ?
- this.hostname :
- '[' + this.hostname + ']');
- if (this.port) {
- host += ':' + this.port;
- }
- }
- if (this.query &&
- util.isObject(this.query) &&
- Object.keys(this.query).length) {
- query = querystring.stringify(this.query);
- }
- var search = this.search || (query && ('?' + query)) || '';
- if (protocol && protocol.substr(-1) !== ':') protocol += ':';
- // only the slashedProtocols get the //. Not mailto:, xmpp:, etc.
- // unless they had them to begin with.
- if (this.slashes ||
- (!protocol || slashedProtocol[protocol]) && host !== false) {
- host = '//' + (host || '');
- if (pathname && pathname.charAt(0) !== '/') pathname = '/' + pathname;
- } else if (!host) {
- host = '';
- }
- if (hash && hash.charAt(0) !== '#') hash = '#' + hash;
- if (search && search.charAt(0) !== '?') search = '?' + search;
- pathname = pathname.replace(/[?#]/g, function(match) {
- return encodeURIComponent(match);
- });
- search = search.replace('#', '%23');
- return protocol + host + pathname + search + hash;
- };
- function urlResolve(source, relative) {
- return urlParse(source, false, true).resolve(relative);
- }
- Url.prototype.resolve = function(relative) {
- return this.resolveObject(urlParse(relative, false, true)).format();
- };
- function urlResolveObject(source, relative) {
- if (!source) return relative;
- return urlParse(source, false, true).resolveObject(relative);
- }
- Url.prototype.resolveObject = function(relative) {
- if (util.isString(relative)) {
- var rel = new Url();
- rel.parse(relative, false, true);
- relative = rel;
- }
- var result = new Url();
- var tkeys = Object.keys(this);
- for (var tk = 0; tk < tkeys.length; tk++) {
- var tkey = tkeys[tk];
- result[tkey] = this[tkey];
- }
- // hash is always overridden, no matter what.
- // even href="" will remove it.
- result.hash = relative.hash;
- // if the relative url is empty, then there's nothing left to do here.
- if (relative.href === '') {
- result.href = result.format();
- return result;
- }
- // hrefs like //foo/bar always cut to the protocol.
- if (relative.slashes && !relative.protocol) {
- // take everything except the protocol from relative
- var rkeys = Object.keys(relative);
- for (var rk = 0; rk < rkeys.length; rk++) {
- var rkey = rkeys[rk];
- if (rkey !== 'protocol')
- result[rkey] = relative[rkey];
- }
- //urlParse appends trailing / to urls like http://www.example.com
- if (slashedProtocol[result.protocol] &&
- result.hostname && !result.pathname) {
- result.path = result.pathname = '/';
- }
- result.href = result.format();
- return result;
- }
- if (relative.protocol && relative.protocol !== result.protocol) {
- // if it's a known url protocol, then changing
- // the protocol does weird things
- // first, if it's not file:, then we MUST have a host,
- // and if there was a path
- // to begin with, then we MUST have a path.
- // if it is file:, then the host is dropped,
- // because that's known to be hostless.
- // anything else is assumed to be absolute.
- if (!slashedProtocol[relative.protocol]) {
- var keys = Object.keys(relative);
- for (var v = 0; v < keys.length; v++) {
- var k = keys[v];
- result[k] = relative[k];
- }
- result.href = result.format();
- return result;
- }
- result.protocol = relative.protocol;
- if (!relative.host && !hostlessProtocol[relative.protocol]) {
- var relPath = (relative.pathname || '').split('/');
- while (relPath.length && !(relative.host = relPath.shift()));
- if (!relative.host) relative.host = '';
- if (!relative.hostname) relative.hostname = '';
- if (relPath[0] !== '') relPath.unshift('');
- if (relPath.length < 2) relPath.unshift('');
- result.pathname = relPath.join('/');
- } else {
- result.pathname = relative.pathname;
- }
- result.search = relative.search;
- result.query = relative.query;
- result.host = relative.host || '';
- result.auth = relative.auth;
- result.hostname = relative.hostname || relative.host;
- result.port = relative.port;
- // to support http.request
- if (result.pathname || result.search) {
- var p = result.pathname || '';
- var s = result.search || '';
- result.path = p + s;
- }
- result.slashes = result.slashes || relative.slashes;
- result.href = result.format();
- return result;
- }
- var isSourceAbs = (result.pathname && result.pathname.charAt(0) === '/'),
- isRelAbs = (
- relative.host ||
- relative.pathname && relative.pathname.charAt(0) === '/'
- ),
- mustEndAbs = (isRelAbs || isSourceAbs ||
- (result.host && relative.pathname)),
- removeAllDots = mustEndAbs,
- srcPath = result.pathname && result.pathname.split('/') || [],
- relPath = relative.pathname && relative.pathname.split('/') || [],
- psychotic = result.protocol && !slashedProtocol[result.protocol];
- // if the url is a non-slashed url, then relative
- // links like ../.. should be able
- // to crawl up to the hostname, as well. This is strange.
- // result.protocol has already been set by now.
- // Later on, put the first path part into the host field.
- if (psychotic) {
- result.hostname = '';
- result.port = null;
- if (result.host) {
- if (srcPath[0] === '') srcPath[0] = result.host;
- else srcPath.unshift(result.host);
- }
- result.host = '';
- if (relative.protocol) {
- relative.hostname = null;
- relative.port = null;
- if (relative.host) {
- if (relPath[0] === '') relPath[0] = relative.host;
- else relPath.unshift(relative.host);
- }
- relative.host = null;
- }
- mustEndAbs = mustEndAbs && (relPath[0] === '' || srcPath[0] === '');
- }
- if (isRelAbs) {
- // it's absolute.
- result.host = (relative.host || relative.host === '') ?
- relative.host : result.host;
- result.hostname = (relative.hostname || relative.hostname === '') ?
- relative.hostname : result.hostname;
- result.search = relative.search;
- result.query = relative.query;
- srcPath = relPath;
- // fall through to the dot-handling below.
- } else if (relPath.length) {
- // it's relative
- // throw away the existing file, and take the new path instead.
- if (!srcPath) srcPath = [];
- srcPath.pop();
- srcPath = srcPath.concat(relPath);
- result.search = relative.search;
- result.query = relative.query;
- } else if (!util.isNullOrUndefined(relative.search)) {
- // just pull out the search.
- // like href='?foo'.
- // Put this after the other two cases because it simplifies the booleans
- if (psychotic) {
- result.hostname = result.host = srcPath.shift();
- //occationaly the auth can get stuck only in host
- //this especially happens in cases like
- //url.resolveObject('mailto:local1@domain1', 'local2@domain2')
- var authInHost = result.host && result.host.indexOf('@') > 0 ?
- result.host.split('@') : false;
- if (authInHost) {
- result.auth = authInHost.shift();
- result.host = result.hostname = authInHost.shift();
- }
- }
- result.search = relative.search;
- result.query = relative.query;
- //to support http.request
- if (!util.isNull(result.pathname) || !util.isNull(result.search)) {
- result.path = (result.pathname ? result.pathname : '') +
- (result.search ? result.search : '');
- }
- result.href = result.format();
- return result;
- }
- if (!srcPath.length) {
- // no path at all. easy.
- // we've already handled the other stuff above.
- result.pathname = null;
- //to support http.request
- if (result.search) {
- result.path = '/' + result.search;
- } else {
- result.path = null;
- }
- result.href = result.format();
- return result;
- }
- // if a url ENDs in . or .., then it must get a trailing slash.
- // however, if it ends in anything else non-slashy,
- // then it must NOT get a trailing slash.
- var last = srcPath.slice(-1)[0];
- var hasTrailingSlash = (
- (result.host || relative.host || srcPath.length > 1) &&
- (last === '.' || last === '..') || last === '');
- // strip single dots, resolve double dots to parent dir
- // if the path tries to go above the root, `up` ends up > 0
- var up = 0;
- for (var i = srcPath.length; i >= 0; i--) {
- last = srcPath[i];
- if (last === '.') {
- srcPath.splice(i, 1);
- } else if (last === '..') {
- srcPath.splice(i, 1);
- up++;
- } else if (up) {
- srcPath.splice(i, 1);
- up--;
- }
- }
- // if the path is allowed to go above the root, restore leading ..s
- if (!mustEndAbs && !removeAllDots) {
- for (; up--; up) {
- srcPath.unshift('..');
- }
- }
- if (mustEndAbs && srcPath[0] !== '' &&
- (!srcPath[0] || srcPath[0].charAt(0) !== '/')) {
- srcPath.unshift('');
- }
- if (hasTrailingSlash && (srcPath.join('/').substr(-1) !== '/')) {
- srcPath.push('');
- }
- var isAbsolute = srcPath[0] === '' ||
- (srcPath[0] && srcPath[0].charAt(0) === '/');
- // put the host back
- if (psychotic) {
- result.hostname = result.host = isAbsolute ? '' :
- srcPath.length ? srcPath.shift() : '';
- //occationaly the auth can get stuck only in host
- //this especially happens in cases like
- //url.resolveObject('mailto:local1@domain1', 'local2@domain2')
- var authInHost = result.host && result.host.indexOf('@') > 0 ?
- result.host.split('@') : false;
- if (authInHost) {
- result.auth = authInHost.shift();
- result.host = result.hostname = authInHost.shift();
- }
- }
- mustEndAbs = mustEndAbs || (result.host && srcPath.length);
- if (mustEndAbs && !isAbsolute) {
- srcPath.unshift('');
- }
- if (!srcPath.length) {
- result.pathname = null;
- result.path = null;
- } else {
- result.pathname = srcPath.join('/');
- }
- //to support request.http
- if (!util.isNull(result.pathname) || !util.isNull(result.search)) {
- result.path = (result.pathname ? result.pathname : '') +
- (result.search ? result.search : '');
- }
- result.auth = relative.auth || result.auth;
- result.slashes = result.slashes || relative.slashes;
- result.href = result.format();
- return result;
- };
- Url.prototype.parseHost = function() {
- var host = this.host;
- var port = portPattern.exec(host);
- if (port) {
- port = port[0];
- if (port !== ':') {
- this.port = port.substr(1);
- }
- host = host.substr(0, host.length - port.length);
- }
- if (host) this.hostname = host;
- };
- /***/ }),
- /***/ "./node_modules/url/util.js":
- /*!**********************************!*\
- !*** ./node_modules/url/util.js ***!
- \**********************************/
- /*! dynamic exports provided */
- /*! all exports used */
- /***/ (function(module, exports, __webpack_require__) {
- "use strict";
- module.exports = {
- isString: function(arg) {
- return typeof(arg) === 'string';
- },
- isObject: function(arg) {
- return typeof(arg) === 'object' && arg !== null;
- },
- isNull: function(arg) {
- return arg === null;
- },
- isNullOrUndefined: function(arg) {
- return arg == null;
- }
- };
- /***/ }),
- /***/ "./node_modules/value-equal/esm/value-equal.js":
- /*!*****************************************************!*\
- !*** ./node_modules/value-equal/esm/value-equal.js ***!
- \*****************************************************/
- /*! exports provided: default */
- /*! exports used: default */
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
- "use strict";
- function valueOf(obj) {
- return obj.valueOf ? obj.valueOf() : Object.prototype.valueOf.call(obj);
- }
- function valueEqual(a, b) {
- // Test for strict equality first.
- if (a === b) return true;
- // Otherwise, if either of them == null they are not equal.
- if (a == null || b == null) return false;
- if (Array.isArray(a)) {
- return (
- Array.isArray(b) &&
- a.length === b.length &&
- a.every(function(item, index) {
- return valueEqual(item, b[index]);
- })
- );
- }
- if (typeof a === 'object' || typeof b === 'object') {
- var aValue = valueOf(a);
- var bValue = valueOf(b);
- if (aValue !== a || bValue !== b) return valueEqual(aValue, bValue);
- return Object.keys(Object.assign({}, a, b)).every(function(key) {
- return valueEqual(a[key], b[key]);
- });
- }
- return false;
- }
- /* harmony default export */ __webpack_exports__["a"] = (valueEqual);
- /***/ }),
- /***/ "./node_modules/warning/warning.js":
- /*!*****************************************!*\
- !*** ./node_modules/warning/warning.js ***!
- \*****************************************/
- /*! dynamic exports provided */
- /*! exports used: default */
- /***/ (function(module, exports, __webpack_require__) {
- "use strict";
- /**
- * Copyright (c) 2014-present, Facebook, Inc.
- *
- * This source code is licensed under the MIT license found in the
- * LICENSE file in the root directory of this source tree.
- */
- /**
- * Similar to invariant but only logs a warning if the condition is not met.
- * This can be used to log issues in development environments in critical
- * paths. Removing the logging code for production environments will keep the
- * same logic and follow the same code paths.
- */
- var __DEV__ = "development" !== 'production';
- var warning = function() {};
- if (__DEV__) {
- var printWarning = function printWarning(format, args) {
- var len = arguments.length;
- args = new Array(len > 1 ? len - 1 : 0);
- for (var key = 1; key < len; key++) {
- args[key - 1] = arguments[key];
- }
- var argIndex = 0;
- var message = 'Warning: ' +
- format.replace(/%s/g, function() {
- return args[argIndex++];
- });
- if (typeof console !== 'undefined') {
- console.error(message);
- }
- try {
- // --- Welcome to debugging React ---
- // This error was thrown as a convenience so that you can use this stack
- // to find the callsite that caused this warning to fire.
- throw new Error(message);
- } catch (x) {}
- }
- warning = function(condition, format, args) {
- var len = arguments.length;
- args = new Array(len > 2 ? len - 2 : 0);
- for (var key = 2; key < len; key++) {
- args[key - 2] = arguments[key];
- }
- if (format === undefined) {
- throw new Error(
- '`warning(condition, format, ...args)` requires a warning ' +
- 'message argument'
- );
- }
- if (!condition) {
- printWarning.apply(null, [format].concat(args));
- }
- };
- }
- module.exports = warning;
- /***/ }),
- /***/ "./node_modules/webpack/buildin/amd-options.js":
- /*!****************************************!*\
- !*** (webpack)/buildin/amd-options.js ***!
- \****************************************/
- /*! dynamic exports provided */
- /*! all exports used */
- /***/ (function(module, exports) {
- /* WEBPACK VAR INJECTION */(function(__webpack_amd_options__) {/* globals __webpack_amd_options__ */
- module.exports = __webpack_amd_options__;
- /* WEBPACK VAR INJECTION */}.call(exports, {}))
- /***/ }),
- /***/ "./node_modules/webpack/buildin/global.js":
- /*!***********************************!*\
- !*** (webpack)/buildin/global.js ***!
- \***********************************/
- /*! dynamic exports provided */
- /*! all exports used */
- /***/ (function(module, exports) {
- var g;
- // This works in non-strict mode
- g = (function() {
- return this;
- })();
- try {
- // This works if eval is allowed (see CSP)
- g = g || Function("return this")() || (1,eval)("this");
- } catch(e) {
- // This works if the window reference is available
- if(typeof window === "object")
- g = window;
- }
- // g can still be undefined, but nothing to do about it...
- // We return undefined, instead of nothing here, so it's
- // easier to handle this case. if(!global) { ...}
- module.exports = g;
- /***/ }),
- /***/ "./node_modules/webpack/buildin/harmony-module.js":
- /*!*******************************************!*\
- !*** (webpack)/buildin/harmony-module.js ***!
- \*******************************************/
- /*! dynamic exports provided */
- /*! all exports used */
- /***/ (function(module, exports) {
- module.exports = function(originalModule) {
- if(!originalModule.webpackPolyfill) {
- var module = Object.create(originalModule);
- // module.parent = undefined by default
- if(!module.children) module.children = [];
- Object.defineProperty(module, "loaded", {
- enumerable: true,
- get: function() {
- return module.l;
- }
- });
- Object.defineProperty(module, "id", {
- enumerable: true,
- get: function() {
- return module.i;
- }
- });
- Object.defineProperty(module, "exports", {
- enumerable: true,
- });
- module.webpackPolyfill = 1;
- }
- return module;
- };
- /***/ }),
- /***/ "./node_modules/webpack/buildin/module.js":
- /*!***********************************!*\
- !*** (webpack)/buildin/module.js ***!
- \***********************************/
- /*! dynamic exports provided */
- /*! all exports used */
- /***/ (function(module, exports) {
- module.exports = function(module) {
- if(!module.webpackPolyfill) {
- module.deprecate = function() {};
- module.paths = [];
- // module.parent = undefined by default
- if(!module.children) module.children = [];
- Object.defineProperty(module, "loaded", {
- enumerable: true,
- get: function() {
- return module.l;
- }
- });
- Object.defineProperty(module, "id", {
- enumerable: true,
- get: function() {
- return module.i;
- }
- });
- module.webpackPolyfill = 1;
- }
- return module;
- };
- /***/ }),
- /***/ "./node_modules/whatwg-fetch/fetch.js":
- /*!********************************************!*\
- !*** ./node_modules/whatwg-fetch/fetch.js ***!
- \********************************************/
- /*! dynamic exports provided */
- /*! all exports used */
- /***/ (function(module, exports) {
- (function(self) {
- 'use strict';
- if (self.fetch) {
- return
- }
- var support = {
- searchParams: 'URLSearchParams' in self,
- iterable: 'Symbol' in self && 'iterator' in Symbol,
- blob: 'FileReader' in self && 'Blob' in self && (function() {
- try {
- new Blob()
- return true
- } catch(e) {
- return false
- }
- })(),
- formData: 'FormData' in self,
- arrayBuffer: 'ArrayBuffer' in self
- }
- if (support.arrayBuffer) {
- var viewClasses = [
- '[object Int8Array]',
- '[object Uint8Array]',
- '[object Uint8ClampedArray]',
- '[object Int16Array]',
- '[object Uint16Array]',
- '[object Int32Array]',
- '[object Uint32Array]',
- '[object Float32Array]',
- '[object Float64Array]'
- ]
- var isDataView = function(obj) {
- return obj && DataView.prototype.isPrototypeOf(obj)
- }
- var isArrayBufferView = ArrayBuffer.isView || function(obj) {
- return obj && viewClasses.indexOf(Object.prototype.toString.call(obj)) > -1
- }
- }
- function normalizeName(name) {
- if (typeof name !== 'string') {
- name = String(name)
- }
- if (/[^a-z0-9\-#$%&'*+.\^_`|~]/i.test(name)) {
- throw new TypeError('Invalid character in header field name')
- }
- return name.toLowerCase()
- }
- function normalizeValue(value) {
- if (typeof value !== 'string') {
- value = String(value)
- }
- return value
- }
- // Build a destructive iterator for the value list
- function iteratorFor(items) {
- var iterator = {
- next: function() {
- var value = items.shift()
- return {done: value === undefined, value: value}
- }
- }
- if (support.iterable) {
- iterator[Symbol.iterator] = function() {
- return iterator
- }
- }
- return iterator
- }
- function Headers(headers) {
- this.map = {}
- if (headers instanceof Headers) {
- headers.forEach(function(value, name) {
- this.append(name, value)
- }, this)
- } else if (Array.isArray(headers)) {
- headers.forEach(function(header) {
- this.append(header[0], header[1])
- }, this)
- } else if (headers) {
- Object.getOwnPropertyNames(headers).forEach(function(name) {
- this.append(name, headers[name])
- }, this)
- }
- }
- Headers.prototype.append = function(name, value) {
- name = normalizeName(name)
- value = normalizeValue(value)
- var oldValue = this.map[name]
- this.map[name] = oldValue ? oldValue+','+value : value
- }
- Headers.prototype['delete'] = function(name) {
- delete this.map[normalizeName(name)]
- }
- Headers.prototype.get = function(name) {
- name = normalizeName(name)
- return this.has(name) ? this.map[name] : null
- }
- Headers.prototype.has = function(name) {
- return this.map.hasOwnProperty(normalizeName(name))
- }
- Headers.prototype.set = function(name, value) {
- this.map[normalizeName(name)] = normalizeValue(value)
- }
- Headers.prototype.forEach = function(callback, thisArg) {
- for (var name in this.map) {
- if (this.map.hasOwnProperty(name)) {
- callback.call(thisArg, this.map[name], name, this)
- }
- }
- }
- Headers.prototype.keys = function() {
- var items = []
- this.forEach(function(value, name) { items.push(name) })
- return iteratorFor(items)
- }
- Headers.prototype.values = function() {
- var items = []
- this.forEach(function(value) { items.push(value) })
- return iteratorFor(items)
- }
- Headers.prototype.entries = function() {
- var items = []
- this.forEach(function(value, name) { items.push([name, value]) })
- return iteratorFor(items)
- }
- if (support.iterable) {
- Headers.prototype[Symbol.iterator] = Headers.prototype.entries
- }
- function consumed(body) {
- if (body.bodyUsed) {
- return Promise.reject(new TypeError('Already read'))
- }
- body.bodyUsed = true
- }
- function fileReaderReady(reader) {
- return new Promise(function(resolve, reject) {
- reader.onload = function() {
- resolve(reader.result)
- }
- reader.onerror = function() {
- reject(reader.error)
- }
- })
- }
- function readBlobAsArrayBuffer(blob) {
- var reader = new FileReader()
- var promise = fileReaderReady(reader)
- reader.readAsArrayBuffer(blob)
- return promise
- }
- function readBlobAsText(blob) {
- var reader = new FileReader()
- var promise = fileReaderReady(reader)
- reader.readAsText(blob)
- return promise
- }
- function readArrayBufferAsText(buf) {
- var view = new Uint8Array(buf)
- var chars = new Array(view.length)
- for (var i = 0; i < view.length; i++) {
- chars[i] = String.fromCharCode(view[i])
- }
- return chars.join('')
- }
- function bufferClone(buf) {
- if (buf.slice) {
- return buf.slice(0)
- } else {
- var view = new Uint8Array(buf.byteLength)
- view.set(new Uint8Array(buf))
- return view.buffer
- }
- }
- function Body() {
- this.bodyUsed = false
- this._initBody = function(body) {
- this._bodyInit = body
- if (!body) {
- this._bodyText = ''
- } else if (typeof body === 'string') {
- this._bodyText = body
- } else if (support.blob && Blob.prototype.isPrototypeOf(body)) {
- this._bodyBlob = body
- } else if (support.formData && FormData.prototype.isPrototypeOf(body)) {
- this._bodyFormData = body
- } else if (support.searchParams && URLSearchParams.prototype.isPrototypeOf(body)) {
- this._bodyText = body.toString()
- } else if (support.arrayBuffer && support.blob && isDataView(body)) {
- this._bodyArrayBuffer = bufferClone(body.buffer)
- // IE 10-11 can't handle a DataView body.
- this._bodyInit = new Blob([this._bodyArrayBuffer])
- } else if (support.arrayBuffer && (ArrayBuffer.prototype.isPrototypeOf(body) || isArrayBufferView(body))) {
- this._bodyArrayBuffer = bufferClone(body)
- } else {
- throw new Error('unsupported BodyInit type')
- }
- if (!this.headers.get('content-type')) {
- if (typeof body === 'string') {
- this.headers.set('content-type', 'text/plain;charset=UTF-8')
- } else if (this._bodyBlob && this._bodyBlob.type) {
- this.headers.set('content-type', this._bodyBlob.type)
- } else if (support.searchParams && URLSearchParams.prototype.isPrototypeOf(body)) {
- this.headers.set('content-type', 'application/x-www-form-urlencoded;charset=UTF-8')
- }
- }
- }
- if (support.blob) {
- this.blob = function() {
- var rejected = consumed(this)
- if (rejected) {
- return rejected
- }
- if (this._bodyBlob) {
- return Promise.resolve(this._bodyBlob)
- } else if (this._bodyArrayBuffer) {
- return Promise.resolve(new Blob([this._bodyArrayBuffer]))
- } else if (this._bodyFormData) {
- throw new Error('could not read FormData body as blob')
- } else {
- return Promise.resolve(new Blob([this._bodyText]))
- }
- }
- this.arrayBuffer = function() {
- if (this._bodyArrayBuffer) {
- return consumed(this) || Promise.resolve(this._bodyArrayBuffer)
- } else {
- return this.blob().then(readBlobAsArrayBuffer)
- }
- }
- }
- this.text = function() {
- var rejected = consumed(this)
- if (rejected) {
- return rejected
- }
- if (this._bodyBlob) {
- return readBlobAsText(this._bodyBlob)
- } else if (this._bodyArrayBuffer) {
- return Promise.resolve(readArrayBufferAsText(this._bodyArrayBuffer))
- } else if (this._bodyFormData) {
- throw new Error('could not read FormData body as text')
- } else {
- return Promise.resolve(this._bodyText)
- }
- }
- if (support.formData) {
- this.formData = function() {
- return this.text().then(decode)
- }
- }
- this.json = function() {
- return this.text().then(JSON.parse)
- }
- return this
- }
- // HTTP methods whose capitalization should be normalized
- var methods = ['DELETE', 'GET', 'HEAD', 'OPTIONS', 'POST', 'PUT']
- function normalizeMethod(method) {
- var upcased = method.toUpperCase()
- return (methods.indexOf(upcased) > -1) ? upcased : method
- }
- function Request(input, options) {
- options = options || {}
- var body = options.body
- if (input instanceof Request) {
- if (input.bodyUsed) {
- throw new TypeError('Already read')
- }
- this.url = input.url
- this.credentials = input.credentials
- if (!options.headers) {
- this.headers = new Headers(input.headers)
- }
- this.method = input.method
- this.mode = input.mode
- if (!body && input._bodyInit != null) {
- body = input._bodyInit
- input.bodyUsed = true
- }
- } else {
- this.url = String(input)
- }
- this.credentials = options.credentials || this.credentials || 'omit'
- if (options.headers || !this.headers) {
- this.headers = new Headers(options.headers)
- }
- this.method = normalizeMethod(options.method || this.method || 'GET')
- this.mode = options.mode || this.mode || null
- this.referrer = null
- if ((this.method === 'GET' || this.method === 'HEAD') && body) {
- throw new TypeError('Body not allowed for GET or HEAD requests')
- }
- this._initBody(body)
- }
- Request.prototype.clone = function() {
- return new Request(this, { body: this._bodyInit })
- }
- function decode(body) {
- var form = new FormData()
- body.trim().split('&').forEach(function(bytes) {
- if (bytes) {
- var split = bytes.split('=')
- var name = split.shift().replace(/\+/g, ' ')
- var value = split.join('=').replace(/\+/g, ' ')
- form.append(decodeURIComponent(name), decodeURIComponent(value))
- }
- })
- return form
- }
- function parseHeaders(rawHeaders) {
- var headers = new Headers()
- rawHeaders.split(/\r?\n/).forEach(function(line) {
- var parts = line.split(':')
- var key = parts.shift().trim()
- if (key) {
- var value = parts.join(':').trim()
- headers.append(key, value)
- }
- })
- return headers
- }
- Body.call(Request.prototype)
- function Response(bodyInit, options) {
- if (!options) {
- options = {}
- }
- this.type = 'default'
- this.status = 'status' in options ? options.status : 200
- this.ok = this.status >= 200 && this.status < 300
- this.statusText = 'statusText' in options ? options.statusText : 'OK'
- this.headers = new Headers(options.headers)
- this.url = options.url || ''
- this._initBody(bodyInit)
- }
- Body.call(Response.prototype)
- Response.prototype.clone = function() {
- return new Response(this._bodyInit, {
- status: this.status,
- statusText: this.statusText,
- headers: new Headers(this.headers),
- url: this.url
- })
- }
- Response.error = function() {
- var response = new Response(null, {status: 0, statusText: ''})
- response.type = 'error'
- return response
- }
- var redirectStatuses = [301, 302, 303, 307, 308]
- Response.redirect = function(url, status) {
- if (redirectStatuses.indexOf(status) === -1) {
- throw new RangeError('Invalid status code')
- }
- return new Response(null, {status: status, headers: {location: url}})
- }
- self.Headers = Headers
- self.Request = Request
- self.Response = Response
- self.fetch = function(input, init) {
- return new Promise(function(resolve, reject) {
- var request = new Request(input, init)
- var xhr = new XMLHttpRequest()
- xhr.onload = function() {
- var options = {
- status: xhr.status,
- statusText: xhr.statusText,
- headers: parseHeaders(xhr.getAllResponseHeaders() || '')
- }
- options.url = 'responseURL' in xhr ? xhr.responseURL : options.headers.get('X-Request-URL')
- var body = 'response' in xhr ? xhr.response : xhr.responseText
- resolve(new Response(body, options))
- }
- xhr.onerror = function() {
- reject(new TypeError('Network request failed'))
- }
- xhr.ontimeout = function() {
- reject(new TypeError('Network request failed'))
- }
- xhr.open(request.method, request.url, true)
- if (request.credentials === 'include') {
- xhr.withCredentials = true
- }
- if ('responseType' in xhr && support.blob) {
- xhr.responseType = 'blob'
- }
- request.headers.forEach(function(value, name) {
- xhr.setRequestHeader(name, value)
- })
- xhr.send(typeof request._bodyInit === 'undefined' ? null : request._bodyInit)
- })
- }
- self.fetch.polyfill = true
- })(typeof self !== 'undefined' ? self : this);
- /***/ }),
- /***/ "./src/assets/css/common.css":
- /*!***********************************!*\
- !*** ./src/assets/css/common.css ***!
- \***********************************/
- /*! dynamic exports provided */
- /***/ (function(module, exports, __webpack_require__) {
- // style-loader: Adds some css to the DOM by adding a <style> tag
- // load the styles
- var content = __webpack_require__(/*! !../../../node_modules/css-loader??ref--1-oneOf-2-1!../../../node_modules/postcss-loader/lib??postcss!./common.css */ "./node_modules/css-loader/index.js?{\"importLoaders\":1}!./node_modules/postcss-loader/lib/index.js?{\"ident\":\"postcss\"}!./src/assets/css/common.css");
- if(typeof content === 'string') content = [[module.i, content, '']];
- // Prepare cssTransformation
- var transform;
- var options = {"hmr":true}
- options.transform = transform
- // add the styles to the DOM
- var update = __webpack_require__(/*! ../../../node_modules/style-loader/lib/addStyles.js */ "./node_modules/style-loader/lib/addStyles.js")(content, options);
- if(content.locals) module.exports = content.locals;
- // Hot Module Replacement
- if(true) {
- // When the styles change, update the <style> tags
- if(!content.locals) {
- module.hot.accept(/*! !../../../node_modules/css-loader??ref--1-oneOf-2-1!../../../node_modules/postcss-loader/lib??postcss!./common.css */ "./node_modules/css-loader/index.js?{\"importLoaders\":1}!./node_modules/postcss-loader/lib/index.js?{\"ident\":\"postcss\"}!./src/assets/css/common.css", function() {
- var newContent = __webpack_require__(/*! !../../../node_modules/css-loader??ref--1-oneOf-2-1!../../../node_modules/postcss-loader/lib??postcss!./common.css */ "./node_modules/css-loader/index.js?{\"importLoaders\":1}!./node_modules/postcss-loader/lib/index.js?{\"ident\":\"postcss\"}!./src/assets/css/common.css");
- if(typeof newContent === 'string') newContent = [[module.i, newContent, '']];
- update(newContent);
- });
- }
- // When the module is disposed, remove the <style> tags
- module.hot.dispose(function() { update(); });
- }
- /***/ }),
- /***/ "./src/assets/images/arrow.png":
- /*!*************************************!*\
- !*** ./src/assets/images/arrow.png ***!
- \*************************************/
- /*! dynamic exports provided */
- /*! all exports used */
- /***/ (function(module, exports) {
- module.exports = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACIAAADACAYAAABhy7FLAAAHtElEQVR4nO2c6Y8cxRnGf+8e3gvbrNY2lh0nJpxBgANJlAQCJCCIIAmXgCAkEEJCAgHhE39FPiUkSqJISRQkcoAI5MACxH0kiJhbHAZjc1k+sPCuvYd3Z6f48HTH1TUzPdO9PSga1fNlV69qup9+q97n6aqubnPOURITwE3AJuBl4DfAvjIHMjOsJJHvAzcAo15sBvgd8NDnQWQtcBtwak6bV4E7gV3dINIH/Ai4Fhjy4gvAU8DZwKAXPwTcBfwDqFdFZAPwE+DEIP4G8DNgJ7AOuB04KWjzFvBz4MOlEOkHrgCuBga8+BzwB+BBwP+xARcB1wPDXrwG/Bm4F1gsSuQYdIVHB/GXgF8Ae1qxB9YAtwKnBfHtKIPbOiEyCFwDXI7GRYpp4LfAozkEQpwH3AiMebE6cB9wNxpfTYl8BY2FLwQH/DfwK+DTAiRSjAM3A98O4h+hsfOmT2QYuA74IernFPuBXwPPliAQ4kwkfkd6MQf8E/ijmc2Zc+6nNFbE46grDuQcfCVwGXAcsBW4H5jMab8cddX3gvhbZnaHOed+D6xKgp8AvwT+m3NAgG8iXfGrYw7pxvNtfvt14BbvnHvN7AZzzq1FA3QfcA+S6laYAK4Ejs1p825ynDzfGU2OMwHcbWa7iijrd4ALySpoDRneV8lqzQKwGXiGCpX1KOAq4EtBfDvwV2AvsDppE+rO+0mb3Ush0o8G1vnJ/ynmgX8Bz9GorGcAPwCWefFF4BFUAIWVdT3wY+QhPrai/s/TlHHU/8cH8Z3AX4CPOyEyAFwAfJesss4CfwdeyCEQ4hvAxcCIF6sDTwAPo/HVlMhGlIXVwQFfA/4GTBUgkWIF0ppTgvhelJ0dPpEhVA1nklXWgwmBV0oQCLEpIXSEF3NItTeb2SFzzt1GY0VsAR4gX1OKYhS4BPhaEH/fzO4cIKv/k+i+4c0KCaSYAf6EdOcKZBGkf805N4EG6CTwGJLqbmMYODch8bCZ7St7F18pzCwjy0VR1H3zyZTMyFLct5FEiXlNVe5bmkh0X4juK0T37Qn3HUPk16N+fxZNTVuhK+57IvAtDlfHRjSw/4OWIpqhUvddgRZlwmrysRMt3uSNqdLua8DJqBJ8BV1EywzHkNWaGqqw18lqTfODd6is48A5aN3Dxy7gSZTJlUmbtUGbPUmb3JWEdkT6kIecTlZTashh36BRWU9CzuxnrQ68iMZGU9/JI7IKXeFEEP8I9f/BVuxRiZ5N4zrLPpSdTzoh0o/KaxNZTZlH3rI1h0CI45H3+L7jkC5twfOdkMja5Er8cgap3zOUu6MfRbcPG4P4fpTZXT6RQVQNJweNZ5FIvVeCQIgvI/EbCeKvAy+Y2YI55y6lsSLeQWtnVd7RD6O1tOOC+B4zu3+A7KrfNPA08EGFBFLMoXuSbcBZ3nlHQcq6Ag3QaVRi810gEWIZkoYxYIuZTfXEvKao++aTKZmR0H1BXZrnvq1JlJjXVOW+pYlE94XovkJ0355w3yHkpOOoKt5Bj1lboSvuu46sdqxKCG1DgtYMlbrvCHACjePIx37gbdS1rVDafQ2V49FkNaWORGtNk/h2VO6VKesYysKKID6JrnwGpfcEDk8jU0wlbXJduRNl3YBKz9eURVRJO2lU1nWoQnzfcUgCPqSEsi5HV3hEEP8UXWFeNQ0nvx0P4geT3zY8OW1GpA9lYAPZLNTQsmXHWzGQQB5L1nccyswOvOyERFYmV+JvTgF5QzuNaIVUa1YF8RmUnUmfSD/q1/VB44WEQN6GhE6xJiE0GMQ/Bt4zs0Vzzp1OY0XsRl2xQHUYRF11VBCfMrMXB8jukDmEHLbUpqU2WEArUXuQM6fnHQIp6wgaoIeQtNcaj1E5BoAvJiR2mNlsT8xrirpvPpmSGQndFw7f0bdy39YkSsxrqnLf0kSi+0J0XyG6b0+4bz/K4hDK1iQtHh4m6Ir7jiXk03E0nBxnitalWqn7pg+aluW0mUfq2u44pdzXUBaWk60mkJSHc1qHynSaCpV1EGUhHGj+lbfK1ELSJvdOrx0RQ4K2PIg7NBZmaFTWUbJjJ8UBJGhNT5ZHZBApY3i/klZHu/5Pq8lHDSlzQ3aaETGUgVDaXUKgyGLNaEIozM5BlKH/nTgksgz1c5iFOdprRCukWjMcxGto7Mz7RPpQFsaCxvWEQMc3ODkYSQj1BfFp4ICZ1c05t5rGiphNSLTdhFIAfQmZsNQXzGzvANl7hzpKWTe2gNXRYJ1FQyDNTh9IWQdQ1yyigVRlFlqhDxVEP+qaWk/Ma4q6bz6ZkhkJ3RcOK27hh0dl5jVVuW9pItF9IbpvEiO6bw+4b9EVo1z3TV9rSZl26r5LWTEaJuu+i2a2u6j7VrViVNp944oRxBUjIa4Y9cSKUVHE5zV5iM9r2pOJz2tKEonuC9F9hei+PeG+RXf4dsV9y7xfU6n7VrXDd0nPa+IO37jDF+IO3x7Z4VsU8f2aPMT3a9qTie/XlCQS3Rei+wrRfXvCfYt+kaUr7ht+keWU5AR5X2Sp1H2r+iJLafeNX2SB+EUWIX6RpSe+yFIU8XtoeejN76HFeQ3EeY0Q5zUQ5zVCnNfEeQ1xXtMGcV5ThEic10Cc18R5zf/5vOZzOGdn+Awy41HF8ePswwAAAABJRU5ErkJggg=="
- /***/ }),
- /***/ "./src/assets/images/close.png":
- /*!*************************************!*\
- !*** ./src/assets/images/close.png ***!
- \*************************************/
- /*! dynamic exports provided */
- /*! all exports used */
- /***/ (function(module, exports) {
- module.exports = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwEAYAAAAHkiXEAAAABGdBTUEAALGPC/xhBQAAAAFzUkdCAK7OHOkAAAAgY0hSTQAAeiYAAICEAAD6AAAAgOgAAHUwAADqYAAAOpgAABdwnLpRPAAAAAZiS0dEAAAAAAAA+UO7fwAAAAlwSFlzAAAASAAAAEgARslrPgAAAchJREFUeNrt2UGuwUAcBvDpmzoAERJ7FhJburBpxMYFunUDi8Yp7LmCukLTTqMbV8DKgqULaDpv0fwthHh5YWa89/2WIpnP969RU8YAAAAAAAAAAADgb0nTNE3TcllIIYVcLsNKWAkrjYbuXJSDclFOVet/qVoo62f9rL9YsIQlLPG8klNySo4QugZB61IOynXNqYitaqG8l/fy3mTCa7zGa52OnMqpnLbbdmAHdpAkkRM5keO6g/FgPBgfj+/KEXWjbtSt14scYSh96Uu/1WIBC1iw3+eH/JAffF9VL5aqhe4XEMdFAe32tQAnd/I3DELXus8oH4DqQkwtnmgbwLsLMr14on0Ary7sU4onxgyA/LbATyueGDcA8tNC2ZzN2TzLPq14YuwAyO39enH72mpZM2tmzXY7et/t65fNZXPZuO7wPDwPz6eT7s/xiPEDIA+/EeRDrvhbyv4Jw33GD4C2IF7lVV5dr+nKp63muhV5zGNes8lXfMVXcWzKWdMzxm5B+BHWBLehmuCPmCY4itAEh3EFHEf/l+NoUwowJYdy9MxVCCGEkDIZJaNktN3qfiRJOSgX5dTd18vhoTwAAAAAAAAAAABo9Q1dIQnjg/qehgAAACV0RVh0ZGF0ZTpjcmVhdGUAMjAxNy0xMi0yNVQxMTo0MTozNCswODowMADgOrkAAAAldEVYdGRhdGU6bW9kaWZ5ADIwMTctMTItMjVUMTE6NDE6MzQrMDg6MDBxvYIFAAAATHRFWHRzdmc6YmFzZS11cmkAZmlsZTovLy9ob21lL2FkbWluL2ljb24tZm9udC90bXAvaWNvbl9keTJ5YTIzbm96cDhwdmkvY2xvc2Uuc3ZnUNgRCAAAAABJRU5ErkJggg=="
- /***/ }),
- /***/ "./src/assets/images/earp.png":
- /*!************************************!*\
- !*** ./src/assets/images/earp.png ***!
- \************************************/
- /*! dynamic exports provided */
- /*! all exports used */
- /***/ (function(module, exports) {
- module.exports = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAaEAYAAACGC4J8AAAABGdBTUEAALGPC/xhBQAAAAFzUkdCAK7OHOkAAAAgY0hSTQAAeiYAAICEAAD6AAAAgOgAAHUwAADqYAAAOpgAABdwnLpRPAAAAAZiS0dEAAAAAAAA+UO7fwAAAAlwSFlzAAAASAAAAEgARslrPgAAAvlJREFUWMPlWTtLM0EUnUniM6BGReMDwV7sVVCCBHwUWgi2KRRL09hpav+BlRbBH2CQmMKI/gMF+wjGRAkqPhPEMMfi7ubLJBszeegI32kOd/bOnXvu3Z3MbjirMwAAaG4ma3qagYFhcZHskRHGGWd8cJDsnh55dipFHI8TX14Sh0IU5+SE27iN2z4+6p13jYKdTggIiM1Nsp+f8SN4epLXcTprzZ/XJnx2lqzdXeK+PtnL7NTpKXE0SpxIUEcTibxMOOMDA2SY7PUSezzEjY1y/Ntb4pUVzjnn/OioTn0tJ9zvJ85m5Q69vBBvbVGn2tpqXk9AQLS3U9xAgPj1VV43myW/jY2fE24sYH1rnp3R9d7e32mA251b1xKBQJ0XnJuz7ngwSMILb82fB63b0EB57O3JeQlB15eWahTuchE/PPyLDQERjRI7HL8t3DpPu504ErF+JN3uKgNvb8sBUynizk7dwovylfaKRELOe2enwkDd3TQxnZYDra/rFqqW/+qqnPfnJ40PDZUPAADw+eQA9/cUoKlJt0C1AjgclHc8Luvw+wv9bdZhzJObicPDP3cCKwHKM5sl6+Dge11WFQQAJJNy5ZaXdQurFJT3/LysI5Mh5rkDYO4OkHf1vDM6GBiurnQLqg6xmGyb7yguV1EB6ChqCrfb5Yl3d7qlVAwwMCST1uP9/cUFAANDa6t1tExGt57qkE5bj7e0FBfgP0VBAdbWijw444yPjupOtGJwxhmfnLQe9/lyNu2KU1P4FrHYXzn6loN5XqG8b26+1+XxGAXY34cSZmZ0CyxbAADAwoKanmDQeAQmJtTCq/rpxvi4mt/YmFEAhfd4MLBq3qq0oPBbYym43UYBSv1c5IEzzvjbm25panh/V/WzUWfNr7DlcH2tW5oa1PUYd0AkojZB1U8jwMAQDqs5h8PGrjk8TFzqc3YopFtXxXUQEBDHx9Z6Hh/puvn/RG6C10sOFxemcOKODt2CKi4AAKCrizgcJn3n5+a5x/T7AkfwNo4jsYYoAAAAJXRFWHRkYXRlOmNyZWF0ZQAyMDE3LTEyLTIxVDE1OjU1OjE3KzA4OjAwr8B+8gAAACV0RVh0ZGF0ZTptb2RpZnkAMjAxNy0xMi0yMVQxNTo1NToxNyswODowMN6dxk4AAABadEVYdHN2ZzpiYXNlLXVyaQBmaWxlOi8vL2hvbWUvYWRtaW4vaWNvbi1mb250L3RtcC9pY29uX25mcXc0azNtZ3h3dXE1bWkvJUU4JTgwJUIzJUU2JTlDJUJBLnN2Z/n71JwAAAAASUVORK5CYII="
- /***/ }),
- /***/ "./src/assets/images/hot_music_bg_2x.jpg":
- /*!***********************************************!*\
- !*** ./src/assets/images/hot_music_bg_2x.jpg ***!
- \***********************************************/
- /*! dynamic exports provided */
- /*! all exports used */
- /***/ (function(module, exports) {
- module.exports = "data:image/jpeg;base64,/9j/4AAQSkZJRgABAQEASABIAAD/2wBDAAYEBQYFBAYGBQYHBwYIChAKCgkJChQODwwQFxQYGBcUFhYaHSUfGhsjHBYWICwgIyYnKSopGR8tMC0oMCUoKSj/2wBDAQcHBwoIChMKChMoGhYaKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCj/wAARCAEkAu4DASIAAhEBAxEB/8QAGQABAQEBAQEAAAAAAAAAAAAAAQACAwQF/8QAMRABAQACAQMEAgEEAgEDBQAAAAECETEDIVESMkFhE3EiBIGRoSNSQjNi8BSCsdHh/8QAGgEBAQEBAQEBAAAAAAAAAAAAAAECBAMFBv/EABwRAQEBAQEAAwEAAAAAAAAAAAABESESAjFRQf/aAAwDAQACEQMRAD8A+9n7sv2y3n78v2zp8R+yApSKzRpqgVkVoVFYq00NKrNDTNiA0ihWLBpqhFZ0K2zQZGmtAVnQa0hWLA3YyKzoWNiisaGmhQA00LEViprQ0DOlYUKzoNaQM6WmhoUaDWloGQ3pnQBFaRWU1oaAaWjpaAI6WgGitLQJLR0ARWgC0dHQM6J0tKgKOgBOOFyusZa36cMPdfVfGP8A+xNYmNt1Ju/Tf45j/wCplJ9TvVepdax1jPEYB0mcx9mMn3e9ZyyuV3lbRo6RAdHSBQxaMgLR0joRQ6MjUxviiWsyNyGY3xWvRl4RNZOjMMvB9N8KmiRpavg6+kFEdHgR0nQ6np3qfrbp0sZ0sL1M53+I6Y9fC47t1fDz9XO9TLfxOIjHbyqdTOZXKXvXWZdPq++enLzHBrGC2Ot6WXT7y7nmOsu+nvqSfTPQ9Xe7/jGepl68vqcIz9sHRSqm+nO7LfT5GaM/df2y3l7r+2dPdACkUA1Cs6Fa0KgyGrAKyK1oUVnQa0AZRqRWdM1us0VnQrSBhNDQ0zRprQBmwVqrRquYbsGgZ0GtKorLOm9AVnQsa0rBWBWloGU1oAEVoAKdLQMprSFZ0tNABpaOloBpaOloBpaOkA0mloGSVpAaWjpaUGlpqTd1Jut+iY++9/8ArBNYxxuV1jNt+nHH3X1XxOFllbNTWOPiM6QOWds1xj4jOigGjpGQAdOmPSzy+NT7a/H08ffnu+MRNcmscbeJa6fkwx9mH96MurnfnX6EM6Ofzqfun8eE93U/w583v3IddP8AinEypmeM9uEczER0/JfiSf2XryvyzpqRUO8vNW75oMiBmz/dHQi7nukIdmBqANHRkakEtGGNucl4tev8WGtSaeaR1/JlrW0Zu0dTqYz+Evacsyy8Val5FwxvwDRjEwynty/yt54847/Qjppvp8uU6mN+r9uvT5Eoz91/Yay91/bOnuzAGhRQCKioUpBkNDQrOhW2aKzoNAVmhqsiihoVBkaaWhWKmqBRoVoVFY0mtDQMUabsGhWRY3+xYDGhprSFZ0NNLSKwG7BYozpaOlpAaDSBnS00NCjSnay63o0A6/1HVnVuNmOtOJQTgWjtbAaWjtbAaRQDS0V3BaWjo443LgGdNTDtvK+mNdseO981m97u96Ibnqawmp/tgkGToumPSut5axn2GuWm8Onll7Z/dv1YYe3H1XzWcs8sub28QNa9GGPvy3fEX5Jj/wCnjMftzkKJhyyyy91tGjpaAHRWlFIWpDpE0SNRJUTQhgEjRiITARCdCNaANQNSCGQoyIih0UIlo6MEUKQguMy5kqw6Wsv45XFpvpzuGs5+6/sHP35fsPesoEUVlFIDQIoqGiiqGa0KgxUVoVmxlusihmxvQqDCaFFFBWkFpmxoDUZ0GtLQMUabo0KyrCkGNLTQVWdBrQ0KyjpCshrSEZWikVnS01paBkNaGgCOloULR0tANLR0tAEdLQBNTG1rcx9vPkQemTvl/gXK3txPCWgCM+nSdPU3ndQNcpN3s6Tpam87qG9STthNfbF3bu9w6365j26eOvusW3K97aCA0dIgpCpHTHpZX4/yjNrmXb8Mnvykawx6dzmMltomu39L05OjvKS3Lv3Z6v8ATT3dOf8A2vTuSyceIYmvP1d14J0svGj+LzlI9nU6eOfO5fMcv/pZv33/AAa16cfRhOczrp+a7z+mw85MZ9LpztOpq/a6mxz/AOPxVLh/1ZyxuN1UNN+rH/qd4/8AViERrePg7x8MrQNfxOp5EMmxGpNHahiIOzUWl6YITGfTfir+U+xGyx69cytTLG/IYdFvCdttWbiM656aw5Zb6c7qVjP35fsN5z+V/bD3SJJAEQKKCEUaRAo0qRUGUdBFFZbrOiDKpsArKOloVhNDQAfLQqEFgKFZ5DdZGoNI6SDNg00tCs6TWgDGQbsGlNY0tNaWkNZ0GtIVnQbZoAaaAo0igCKAImTd7Ay1Mdd8v8Htjx3o55BW2/U8M6aaxwuX68gej0vXu3iN9ToTGb3rH52unnj0+07+Wer1PXNfCM91n1THthP71i97u96SNMnRaxwyy4gMaUjt+PHH35f2h/JMe2GMhqb+MY9LK/Gp9t+jp4+7Ld8RjLLLLmiCddfySezCRm55XnL/AAIdCYHo/pMf5XLx2cHs6c/F0N3nW/7lT5fTh/U5erq9uMezXT/qMse2X8o497ToM/j1T+pw+ZlFf6mf+ON/u8phieY6Z9TPPm9vEYUIq73W/hFaBQpCFGIE1jFMWpEQ6RWhFCkM0nShghZuGN+GlA1dPeHHeeFn1bO3puvJME1nDPHL5/y7dP3OWXTxvx3+h08c8b/C7gcreV/nl+xyc/fl+2XuyryFbtCiogWIaKQZSQq0KVUVlHQAVlqhACxqs0WMogVlGwDSFKRGdJEBQVpFlZ0ihWdLRQrKOloBWWgKBppaBnQ01paBnVFjeheDRjQ00laZ0tNLSDOlprR1PkGZjv8ASvGpwb3WkGdGTd7NTH5vaG5amsZqGpo9OOPu73wMsrf14SAIt49O3ve0U1z/ALOmPTyy+p9tbxx9s3fLOVyy5vYRr/jw/wDdRl1Mrx2n0xo6MODR0igNGI6BOmHRyzm+J9jHC2ztdPajHyufTzToZTOb1Z86b/qsv4zGfPd2cOpl07lu97wJLtcDq34dfyYzjFflvxFa2sTDLxTOnl4P5MvoevLyJ1qdPL6P4r5jPqy81bvmh1udO+Yvx3zGN3zT380Otfjv0fRfpmb80y3zROn0UzG+Fu+WpbpE6lFs7EUKQGEKURowSwiVGCNCKEQwRSbdOnO7Jw5RGM/fl+2G8/fl+2dbdKhGwIJJAERUUUGgUgxIMo1kVVloUGVSqisCytIVhNZMioEVALZGgQOgEGkUis1GjQ0kkAoKAaWktAEdLQBLSBlX9FCs/wBhy2v0is8fsNmTyDEm+Gu2P3Tb8TtGQFu+V2aMxt+oDDc6dvPaNbmPtm6xbbyI1vHH2zdZtt5qQYNFLngEm8elleezfpwx913RNcpN8d28elleezV6kntjFzt5oddPRhj7qfXhj7cXGIMdL1crxqNYdfKT+U25ETI659a2ak05JQPopHQBEwEUgKGjATUDUEbwxuU7LVa6ecxx1Vld21GWZDpQiIwNQRLRQD0rVnFaUmxBMrOYfVL9Ns3GVAmOfos9tMzsv8oqY6N9LlzmUvFdOnO4lc8/fl+xDn78v2y9xpmxoXgRlJCpJAFpCoqQNFFBCKma0EGU0KDIuvk1nQ0qzooUCmmzsgylpAkgipJaAVlqgWBFChEANLRAIHQ0ipbWqtUAkgFUmzJ5VvgF2n3Re6UlvAIzG1rUx571nLK39A1uY/dZuVvIQJdk3jhb9AyZjbxG9YYc96L1L8TQhnTk75U/kmPtjlbvlBn61lnleayloVI6OgBKkt4gg0Wp0878Nzo5fNglrlpqR1nRnzWvx4Tm/wCzU2OCd/8AinhevpziT/CGuDUdfy4fEP5Z4qptcdHTr+X6X5Z4DrloyOv5fo/kngOuUjbczl+D6sfH+kTXOTu01/E6xE1gxr0xekTQYvStAVFCIdEGCFJAjrfKkaiI55dKXjtVhlnhe/d1aw5DXHP35ftlrP35ftl0kR2EgEQCSQAU1a2isn4SiKElsVVmkVAArQrNRFRRZ2ZatZFVBoAVQoVaGikAltC4KNmjQBLSFQIoJJAkkgkFoFVxyr9DQK8gzG36O5OBVMdd8lcvidoze6BJSWtzD5yoMNzC/PZeqY+2M3K3kOt7xx471nLO36ZQYkkCTWOFvDpj0fN/wGxxMlvEtd/T08OeVerJ7cRN/GMelledRudKT3ZVi9TK/Ov0ze/Ina7b6ePj/wDK/LJxHFB5db1cvjUZueV/8qygw7t5qUaBk6KBaiR0CiRBQ6UIhxalE4CI2ojBE1NiHaIdlmFUKEIh2YNLQNNOe7GpnPlGbGjBO7QJrDllvDkSuOfuv7Zsay91/Yt06CMogVKpUAkhRVDlwECz+koigaaAoFaZqCCoRUqkKNM1ti8gKiBRVDYNCpJIDSOxsUUNVkEqkKEdBAaRQBBbFKGzJ5EWtrUnPKt7dme4LK2hctzD5tFYk3w1MfJuUntZtt5Br1Se2M228hBiSaxwyvxoGTJbxHWYY498qL1JPbBN/Bj0reezWsMeeWLnb8shldL1P+sYuWV5oQuRHYQHZZIFIyW8RESanTyvxW50svpTXOF0nSvmNTo/+5E9RyWnadGeafxY+aJ6jjE7fiw+/wDJ/Hh/8pp6jgnf8WH/AMp/Fj9/5NT1HGF2/Fj9r8U80PUczI3+PXyvR9jOsk+ir03wGqJaIIoy6GVI1B8mIiKIBalJgM+mziqZ2e6NHnkFjlLw6YcuN6f/AFrXTyyxur/sSxjO/wAr+2Wsvdf2y6UiSSKlUgCVAqtSSKEltBUIUVKpVADSW0UC0qisinQooSQJbVCKkkKNLR2Ngqy0yKlUqgEkC2glEpNnWuRage0A21J5AGY+V6pOGLlvkG7lJwxbv5CFSMxtbmEnIaxJbw3j0/NVzk7Yxi5W80Trp/HHjkXO3js5oXDe/NWggOloNzHK/AMp1nT83/DWsMedf3E9OMlvE23OnlfjTd6uM47s3q34kiG1qdLzWvx4Tn/dcLnlfmoTK776ePg/lx+JXnIeXW9bxP8AY/Ll9RzIvmN/ly8r13zWEGRrdvzVq/NGzLsCkoqEhA01jb5rm3jwiVr1XzWpllrlhoZameX01M/piJEx29UW8b4c1BMdPTBcPAh3RMWrDF6vJllApIRENQA1IiJU1hyy1hyI4Ze6/tlrP35ftl0qkkglUKKkkCs7A2hlWUioARUWIJICg0I0lVWQO2aRRQkgVBoRpKpBoSAIECpJVAJK9gRZ2ZNgFIe0+6zbaK1uThm3YMlvAAOkw8r1Y48BrMwt57Naxx/bNytZQxq534jNtvKQuLuu6amFvwDLdx/jMse/lqdOfNPqxw4/0Jv4544ZX41+3SdKfNWed9MuPHlyuVvNE7XbeGPGv7M3qeI5IMbuWV5rI2dqqS2gMIhQRBBGDV8VqYZX/wAapoTU6efgzpZfSJsYaxa/Dl9NTpZa+BLYwt6dPxZeYp0r9CbGIWvx5fRnTy+jTYy0fx5eD6cvFE1k7Wr4qEaMZMQKRipSQZNolTXwy2II0kIjKogalhY0t2CNtYcsTKN4ciPPl7r+wr7r+06FSSBAgWIJIIUioqWwgQIFGkthFCSFTJtZqLEqFRUFtbDEkkEqhsVIADsEIsSsG13oq3od6deRaIe05FytZamNorJkta1jjyLn4QMxk5qucnEY3vlBitt5CMlvEVQm5h5p/jihrExt4jc6fm/4Fz8Rm5W80TrpvHEXqeI5oXDcreaEgdulcZ0+9n24pBJiTUwyvw1Ol5obHNO8wxn/APV6scfmf2E1ymGV+K1Oll86jV6s+JWb1b8SCdanS85Nzp4/bl68r8i23m0TK76wng+vCfMedB5ej8uP2PzTxXDZDzHb830vzXxHFB5jt+XL6P5cvpwb2Fjp+XL6/wAL82X0xsBI6zq2+Gp1cvEcceWhLI6zq3xGvy/ThK18iZHedSfZ9eNcDETzHf8AjfC9GN4cTBMdPx+KvRWZbPmt450TouNN7TTXq7dzvGiMTk1qYz4FxoapwVOEITAYBSQguPhrp7l0msORHmy99/aXUn88v2JXupW1sKqVQqCSQqFIQCQFNZpFQSGwipJCis0i8iwBrQorOikKgQipJAEkCrPem6FqLFqTlWjWz6Z8gFrydycM22g1uYs3O1lSbDEmphflrUiLrElvEamHmq5+GblaHXTWOIuc+HOgMauVvyAkXCgZjb8Ak1On5rfpxxE1zkt4jUwvzdG5ycd2b1L8dg63MMZ9n1Y48f6cbbeaNh5db1PEZueV+WNnamK23lJCpJAUkiHa2CoSyQwobIhQhAkQiHEswwGoYPg48iNQwGDJhnPYRrG6sqI36O3Kxx792pZRll21Bnoyu6hCKZdNzJiGCV035WoxGojOHSW0oVBowQtYcstYckT+OGfuv7c63lf539i93u1BEOFsCEhUkBSyQgqENgWaRUWBJIotCvIFI+VsCw7ZIFSR0gAaNAkl3RRaDryNycCrW1qQXKjkDcmbdtenytSAyfSfVPgXKop1JyLlJwwlMNyv6G1paTVxbG2pjfDXo800452jveI62YyfH9xc5DRmYZfUamHnuzc/EZuVvNFx13MfEZvU8RzQeWrnlfoboQYdrYQpLKBrS0ydgdFndO/oCkhMKWkiYkjFEUgWiCIYlEIYRCCl01Ltk4iNKIyiGUickZrSgMQaaYaEMIhEMMBEMIhRDEogM5IhVmprDllrDkK8+Xuv7Bz91/bLoVrlnWkdoBKwJqqhJVSoSAqQqKgkKlboWgXBQaoioEUWAqJBDaq2C7jRttZsFO5BclqLciDOrT6Vcmd0VrtBcgNC4blay16avT9gym9SC5SIM6p9K9XiM3Ki5W9SH1SOWwi46XP6Fyvlja2GHKskKqSSKkkCSQJJAiEJh2thASyga2Yzsy9waW1tCJBKjULMrQJRIQnbOyDULMKIVEhGjGJy0qVqVqXbE7mciNwgohhZhEbUGzBGkCBjTMMRGogREdhKjTWHLEbw5QebP35fsHP35fsOkiSSKlsCopFgWwWlVtWxBkNIVkVrQqKzpJChECqj+y7ruipLuNfYLUVsWouyAtZttatjNyFWqtVeoXKin0/a1GN0Ct7guTItRca9VG75Z2SkiFuizUaW1sJRJJFxJIEhUotraSC2tpAdrYQHa2EB2ggKCApbWwRgQNIbWxGkDAOJ0ydiFLZESSUMpESI2oNmCKctMpUbh2IRGoYxG4jNMIUEaajOzBGkIQaMZIjSGyiFKIQxvDlhvDkK82fvy/YOfvv7DoVBAVUJCoJIJk0IJIWim1jdVAsh2thI1itW6ELh3RbUEFtIUAKdgqoKpFQq2KKtjaQIaLNRo9oNhAdhIEhtCna2EB2NpAkgC2tpIq2tpAtraQLa2kB2ggKCNMKG1sQpICggJlBBpCERGA4iHZGlBDCIQJjJlErSUIyZwhvRio1K0xDKiWOiEvYiFqMbagjS2IRCQYITBCgYQRE30+WGsOSJXDL3X9s1J0LAEhpBJBCpIBJCspIaZoSFhgqSKkkgqEgTNSFASQFCQ0lUgZSQ0qEkAkhUqkASQKjaSKkkCFSAJIVJIEkgRSBbUSApIRJIEokBSQhSShjSTNSpJAZWkhKlEliExIQtRIqUVRIRqNJCGNRISkxIZaKQGJIQmJIhhSEMaw5SEr//2Q=="
- /***/ }),
- /***/ "./src/assets/images/index_icon_2x.png":
- /*!*********************************************!*\
- !*** ./src/assets/images/index_icon_2x.png ***!
- \*********************************************/
- /*! dynamic exports provided */
- /*! all exports used */
- /***/ (function(module, exports, __webpack_require__) {
- module.exports = __webpack_require__.p + "static/media/index_icon_2x.5207a28c.png";
- /***/ }),
- /***/ "./src/assets/images/logo.png":
- /*!************************************!*\
- !*** ./src/assets/images/logo.png ***!
- \************************************/
- /*! dynamic exports provided */
- /*! all exports used */
- /***/ (function(module, exports) {
- module.exports = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAMgAAAAiCAYAAAAah5Z6AAAJ/klEQVR4Ae3dA5AjTRsH8D7bvte2bZ5t27Zt27Zt27aNtZNbb7a//011ZZ501c5NMNnc985T9dvbme5kUrPzZFrJMRr+6QpW8k+T/6B/mnxRfmnycU97/rzK8+M4wEwmX6f8CC5QILt/2vyLycVsuOfHe35cYL7KZFJ+0OTwdpIA81Umk9Ks8sTFHtG8E0+894AnJydzW1g4j1m1gQd//+8LH+fLzS2TiT3vE7ibHNYxU5TEAEdJSTy8VjPtBMHxgenFOa8CGYD5iKqQMcVykxzMTR/AabgBFgiAK3AC9sNO2AobYT1sEDbCFtgBe+AInBGPvQ8hEAuMYs50yAMKvM8tA0fx6KWredDnvyn7cJdwTIq4OIfthPOXXthxB6aXOMnJgqcjCHbAX8B08tTrCYG9UNJMEE01wahIBkYxXcmRrgCP6j2EJ8fE2C/8+HMXlTLL8An2fbE793G/jIV54Btf8Oh5S3lybCy3jp2qJ/mYXtx7URyYDkZEWWAagsHoCIMWKRw/BIyMWxpvFL1IvQhID1khB+SC3JBHyEt+zy3Kc4q62cXjMkNG8TxpnE4Q/6yv8riDR0USqKL6DVfKreOn2/dZRk3STgRjEoR5SE6I4moccSFBmAsywt9A4xgwDS0gDIyO4BSO3w4iwMh4msKxp5I6F4EZSTtBMhZW7go0MRJv3+Wh5Wrb64TXa6XeQbbueikThKAR6sJjjD+2aR1XY0PqJQiaVTFrNqnJYbPxyG4DuF+GQg71gj79xV7HFh3NowaM5GFVGnD/3G95M0FKQSWoCEz4ASoJeeFvsp0RGHxJ9hV2KfkMCM1jmw5yNSYa2P/RTpDIdj3onUMZxqXlAYU/4s9mL1L7JRKbxaL0P/yzveaNBDlOtnOIfQfIvoKwnmx/AAyWkX2fmQniEjmMfvwVUrdjaiSI8u5vi4iU+xt2wd/8zZOe+otybQmXr/HAt782OkHGke0Pxb4nYvu62O5A6pSW3o0skM4DCWL8hWYmiD+pWyFVEiSyfU+1z/HoiUOzyj/vOzwpINAxCS5cVu8cURYef+a8Q3mSfwAPKPqJkQlSlmxXhHxke4J9/FyN3mJfoNje6sYJpZ3VMpDpP5Ygd7gaVhceb+Vq3HGy/hepkiDxp8+pTavW3RzKns1coF74fv48+Idi3C9TEY4mlX1/QJGPeVi1RkqfxD4sfPIs90ub36gEyQLRYrsflCTlvwITrpLOXUFSp4UbJ3Tbf7yJVQdofK/3saIujTo6HpNE6uf2eoL4Z39dmQEXHXNlmJd23G2hYfaLPuSXUvaymLWb1aRq0l7ZF/xjcZ4cH2/fH163pZGjWBvE9h7S5HoqjW33F/sjyYRTMhRx44S+CdshwksJ4gfeiAho6+U5GBr+ImG0mliNIJNXE4TOjCfef+hQFvTxT2qz6voth7LwRm3tZTEr1tn3R/UYRJtiRiUIfSeLhpvi9zHAiPfIjPd58e9h108oTT6vKQN3wBsRAkzSCsLBGxEITDIFjIxJmgkSWqamOq+xfY9j8nz9l70s7sARh7LAD36QEkG9I9msVtr8MipBMkkzvDZ4C5hkO9Co7WKCvA5JZFAgNRQFGluB/Z9LD93gjEGTlX7aCVK6hv1iRrPJMQne+krtjIdHcL8sr6jJ8+0/avIcPu7wuNhd++1loSWqGjlROJLsX0/LiOLS2quMLiZIAzAirHBVPD97gepAoxowL7rkwWUnoXAYOru/GNXAJlbQl3+oHevjp7lcnnj3vr3cMmi0ss8/15s8bs9B+37rhBmOHfu5S2g/xMgE+ZDsL0bLJPfoCJcLJzQNXARPxzOgUQWYBtrciIfswLzGuJjpswmCYVz1LmG1KiNUtDyyQy/HCcGISLUjLlbzBn30o8NjopetsZeHVW1oZIJ0JPuH0DLiLUgQda5BWidPaDqYT+o8gHJSnSGk/KBU9gPQOCclXqTeNVlSku5+iVfqppXOS4DPJgjQeQylTyKXx27eIcolNhsZFlYlXLxir4NhYaMSJDsEQRLEggXyAZPMB07G0+s5cUKLwQVRdg96QRapzijpjvCVVL4KaLR0cU1WTrCRul2AuSlKmpMwPkFcn3StROo+duP1PaFzaLoSJKrvMLU/ceiYVA5p8yt3ksRbd+xrsFCPB/9cktaTR76UZSl+mYsalSAjxPYw6CR+nwKM+BIS4TJ8BjHwCHLoOKHp4Rz0JEtV5HJ6Z4kDedn6r0DDD3K4eNEVBxqfAXPTGa7GJR9PkD2k7io3Xh99w9qjJ0GUkSZc9JrNIjpKhfmRFMvj9qp9E3zQyqhh3p8gCS5ABkgLhyEZ/iGjXJchEb5Sl20rMd/NP3h2aXQsDH6T6hSAu9KHc4q7cdENNKBJsvgluYO8Bcl0JNKN11db+pu8pZ0ggmXIWIe+SNBnvzr/OfWmHRzuHvgglREJkgXuQBR8Akx4B0LhMeQgI1w9pDb/FrG/nIt/8A/guvQ5kjekOlnhFNAYlUL/hkasxnFpQi4B5gHdnVpyb2wwDeOl15nFjQTJAqGkznjNBKF3hoSrN9RlJcEhPOSPcrqTI7JTHzU5AM02o9ZifQux8EcKSxmewe9wHSYDk2SFozDXhQSpDBay4LELpAW56bVJYzKKyqwxJi8LlGaUmQfQJToJPpog8gfbGnjgDkeH7C2QUzNB6LwHEkO90BMTuXXKHIfJPlnIb2V47LbdDskRd+SEGA0zJEHeh/LAUlAMPodOGjPfuaGJEyc0DywkfY1ZZLkK9RoclW7hgzWe9yONES7qM6DxJjAPKAw03vPBJlZ/2mfw4OujfZr+2gkizYskPnysXvAiUeKOnuTW0ZOVpST4Igfla34SbtxSyqmYjdtIx/yl+kRhWAp1qsA9OA99oWgK9SpAmLRso6SeeQ0SY1OoV4PUsXlwYi070CjjYwnyFsSI8tvwugdf3+viObk4xlu6v9UkIP97ZGhXp9hYJYHQgTfgW00MSZBsEMPVOAFMklfH83wOK6QLeA7kB6ahnjRsGw2v6fziht6QC5gbMomE1FoHJYvycoJsFmWHIB8wDe8CjbM6jp8PDgMXx9L7vVik+bRjL5kYJMjnQSwjJ/KAQh/qek4cfzswnTydIGngQ+gDj4BGLWBO+BW2cjWSYBV8pXFBFoGKIPdRwrVWAggrwcjQ0/GXBx5+hLQGJUgGcbx6GnfMtPApDJfWadl0fLiKHqeeOFYGl75Z0T/HG8oXN0S27c4tQ8fxqD5DeVjFejzwve/IHUOfgPT5/wSmj8cT5BzQiILzpOOnV3tyYR+B7tJIluxtoBEDT2A/9NR6dyQKiASMMGCZ+3Kdd8uf4CLE+sDnYdLBE6ARBYegFDBXKD9S77t5C/QB5qtMJuWHxre7m8lhMhNE8Nb/D7KDNKt8msmkUWgymf4He4sPmbqL0+kAAAAASUVORK5CYII="
- /***/ }),
- /***/ "./src/assets/images/needle-ip6.png":
- /*!******************************************!*\
- !*** ./src/assets/images/needle-ip6.png ***!
- \******************************************/
- /*! dynamic exports provided */
- /*! all exports used */
- /***/ (function(module, exports) {
- module.exports = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAASAAAAGbCAMAAABTUL0EAAAC9FBMVEUAAAAHAQMHAAIHAAIHAAIEAAEHAAIFAAEHAAIEAQIGAQILBQYHAAIDAAEGAAIJAwQEAAEEAQIGAAIGAAIHAAIHAAIHAAIHAAIGAAEHAAIHAAIEAAEHAAIHAAIHAAIGAAEHAAIGAAH09PT9/f0GAAH4+Pn////29vb8/PwdFxmHh4fw8PD5+fn9/f39/f3e3t/w8PD29vb29vb////19fUzLS/9/f39/f39/f0pIyUIAgT6+vr39/fu7e7j4uI9Nzn8/PympqbNzc37+/vy8vLu7e3T0tP///93c3RgW1z8/Pz6+vr4+Pjz8/P9/f3d3Nz9/f3W1dWvra6VkpOBfn9wbG1QSkv8/Pz39/f7+/vn5ubNzMz9/f2qqKibmJmMiYr9/f37+/v8/Pzr6url5OTZ2Njw8PHIxsb+/v65t7hoY2X6+vpKSkpnZmf9/f38/Pz8/Py/vb79/f21s7SloqP8/PwHAQP7+/szMjL29vb9/f39/f3y8vPc29v9/f3Pzs7+/v7+/v7+/v6Gg4RZVFX6+vr5+fn39/f////////6+vrg39/Kycn9/f3d3d1GQUPGxcX6+vrz8/Pv7+/9/f3DwcH7+/udnJ3w8PH6+vrs7Ozp6erm5uaem5z4+PihoKGVlZXl5eXo5+fY19hjX2A2MDLq6ur09PXz8/Pa2dqsqqvp6eno6OjR0dK5ubqJiIhta2zBwMDv7++hn5/t7e06NTcjHR/Ew8MnIiTn5+fc29vHxscqJCb////39/jc3Nve3t7k5OPi4uLf39/p6ejd3dzg4ODu7u3h4eHs7Ozq6unm5ubl5eX9/f34+Pj09PPn5+fe3t+ysrLv7+/r6+r29vbx8fHw8PD7+/v6+vnz8/P19fXy8vL6+vrn5+bd3d3X19ba2to9PT07OzvZ2djz8/LS0tHU1NTOzs61tbXHx8e9vb3BwcG6uro/Pz+3t7dZWVnKysrExMRubm5ERESKiopNTUyrq6qfn551dXV9fX1gYGAVDWfXAAAAvXRSTlMABAdKRxFBGEUSDkwKDzgMFhQyGh01QygiID8VPTsmLy0rAwEq4QYNClARCPoECeHlKhb671bNfW1TU/X14cpZTxEP7+ndtYNvZSP8+OzXxMG5kH10bF5cEejSrpCNgXtmRN3Yzr62pqWZaD4YFeK4oJ2WlIh5TzET8tHGxr+7tK2biXZiVjob8uvXxqp0XltQNR/BtKNJOdOuqJ2Uh2JKKOfVdCsr9N/Y1ZuOgFZRMyAd9pGGYkY3N7qxkD84LzG4AAAaf0lEQVR42uTXyYvTUBwH8LjEmGqnjR3XuLY66WRoVPBU9ZAexP2k4ILoQYuHFkFkqDigCJ7UccTDyKjMgIjivisor9N2pm0c0ZFu2Nal4B/iS6Z5Sdrn0h5fPuecvvx+3/cL5ZVijG5gDcbmtRibcV8OMLqY5KVI4fVHPLrHACP3BSMHMB57dBE/mQENA4wyLqAywBgmMyAp6tE9ATjJ5nySAOeJRxclacWkKINsAhhKc0AKwNjEIEQF1CMyyHWAUWgaoWwBYFxnELGHnIB8XTKDDAGcYsqaT6oIcIYYRO7yUaTwdQkMchtg5VKWfHIA6zaDCAQFRAUEntENArxS1rRfJYA3yOh4IUCRw+uPupG7AK+gZOvxKAWAd9eNRAl65bWWdiMPwB9VM/m8UgV/9MCNkNTRagmF3MggaNugGwmRVEGULyBwPHINtOkaj3BCgKSA1FORRwZAmwZ4hKQzsb5jvKEPtKWPN5C1YeqO+WMcMtDmAHFIzE/WhqnvmMwZhkAbhjgDWW9Y/ZhmOWRkA2jZhhEOYYk6o/WaFjnDI9CyR5xBJKyi0QgZboIW3eTIHiDtmuZMwqAlYY7wAdJGKMYaIn0tvfAR1hAjcoDUEQqxJk/7WsjnKWsSIu4JQ7eQyJpEwv+9XxHWRCTuBjIvGW3C3gD/5QZLm5C6YJAPLhlt0f8f99DpftoCLhipAcGEJJm2GAn/c71GaAtZIjefqRqirR7dA39ReEhbkVtAeg01JsTy/dfBH5Rz1ZeN+RBbQHXexoRYzu0ZvrELNKkoiUS+GLbmI3SR+cIbfE0JcTzTuWjh8LuL6wBSziTiP2upxFjp3oh1fkguICMh2WmACTGexctXzl82q3vv4Vv3n1eV76naT0gLqNDvRGQ75ANZE6JpuGOdy1fP65g1c0ZvMHismP+YjsOEftVGE2OZygNTPsTvF3rLpJDLSIjVdmxFx5LZakD3P2cmk6PxXz9r8dHkZKYSpp0aV0gi+/1quBgF0QgI7tiihSvnL10wc04wuBeUPnxMj9d+wQnKTijlNW+cKlEg+D7EF1HI5dA4TTs2pzf4anM1PwFHqKYFlK9+7YffuEI2qR9TQoEeQXao6ju2Wt+xLZ8zY4nUeK1W+5H++KEEXjocstATsFc+U0MkCaID0t4xWEJwx2bAHXuh7lh2NB6Pj6YTY7nKiWeCZLPxMUckuxxO9NBrO7b1WxnWdGo8Hh9PJyYznzdetWc8kA9G1COERKfloX91oAJ3LK2OUCo5oVS/XvDZNB+9i6SQHI101nestzd4ydixrFpC5ylb83lhRqIYfXrnztupHXvxqapMJFOohM7so2zON23a3FjEAxN6//p1d/ee0/BWTKTVEkrBEirv2E7Z3bRp0100o/b0UlhD3UcrOaOE8sVPFyi7UwNy8p2LVs3rWLJg5oyDDSV00sYlrSc0fa6Dg7fQvI6ls2bPOPQV/tGjEspUdvspu4Mj5GCZxfAhgwHN3LbOKKHkpFLeuJ6yO62E3J3asQh3rKGEwBHK7mBAc00ldBaU8qYSKhynbE8tIdazuF5Cp3bqJfRjqoQo27OW0JWGEtp/lbI77aE3SuhAAZZQ1riELlN2N1VCHr2ELoFifsJUQuco2/vNzrmzNBYFcXzkFrts2t1mYV+wsIRNsSy+wIhC4gN84RMUH2gKFcEHFqKgFhEF7UQFGwu/iUaRWMRCrhKCWt3v4Tnn5ubcmUhsrJz5f4TA+WVm/j9uVZUPoR8GQv1xBKGbNZmE9BvzIfRNQaimS58VLYQSk8A9AYR+FSchBaHiH72BUB1wD4HQYU5B6DyA0K17DOxjIPQhgNBAzMsGd1cDoR3gniKEvv80EGpKhiD0mPVyzcA9IQipNxZdd2+vBUJlEFInj98+hJbDELoQCJVBSJU/CEJTcnf1766fixAa+mcg9GS2jUdV/hwB9/gQ0icPDaFIr2vvrvomJOuYhtAnC6ExA6GM+YF0+XMg2waZhAyEbAOdkLtr6O6qb0KpgkDopfIngJCz6eLyRyYhBKGPTp+BkG2gN/4A95Qg9MVAKE40mH3gHgyhKNVgZB0jDXQraaBHgX1sA/1VvbFlosHUvqcPBr1B+eMMJhWEzjIlDSYh6xiGkHMabqCzd7ET4B4CoV4CoUVgH6zB9MXCELoqrAH74AZ6KxlqoBWEhleAe4gGkyIuXj1wj942iIsnGkwFDWYcazAyCZVpMKtEg5kD7sEaTGSkIBpMxQZ6mmgwMgkRDSadxxpM7X/gHtNAWwhVYw2mQzQYrMFE96wGI5PQSxCaxRqMQIiWP+m8pyF0GUBoV+6uAYT8k8dWEkHIy8skhDWYiNZgBELlELIaDIHQzF/gHgyhiQfs4s0LhIgG0+JrMIGLl98G7sEajKM0GIFQJQ1miQrBAiECoU7s4g3LOobLn5oUhlBMIEQgtO7eixD8OoQyJSF4AdgHazDpagyhefGEiAbTglw8Ly43IeLi9WAhONcG7INdvFkCoQ1gHwyhdgKhbvafy6EaTCMWghvExXtm79p1m4ii4CLoItHTUq+Qi7iwCLhIkGJB7NjmISgCElgCF0EipgAUIRSqKBINKSjyLxENQkh2kRjJDqbzf7B7vbt3Z/ZhUd+5/zBzz5lzzgytwfSIhBy3pCISCtdgxkhCXz3nH+7i9akdO9R9JpJQbUFCpzEJ3RUJZRaC8TRKlRAtBA+wEpJTBZNQYzj9AfeZOo1CEqo/T5OQrhJyfPGIhN56zj8iIbjPlDCd2cXb9PE06rFIiITpYBcPSEiaEJHQkUio7CrBkBCcRr2W7kok9M6cRtkjcY3oqR0TCS0hoY/pq4RzHYlnSGiPSGhblRCR0BaRkEb0dBpFJOSrHaPTqLaOxPNJ6JoloXPISvCcf0hCD4iEdiVMEwndQRK6qawEIqEeZyV4zj8koY5PlZDn/KOshNU0Cck4cCkJDR95rj9VQv9HQgOyy9GyIjtV+KMUCWk6liGhGjhVBJqQSIhISNF1S5wquhMioRue648qoTWMrluXXQ6SUPUFkpCi65iEjoPUKJFQGQlRdN0H6a5IQv0ttMuZiYTILqeFqVFqxzKBLWSX80mWVGiXszP5A04VTZEQpkZ9rpBThaLrKDWqRU4VWoNhzy57JG528bave64/PBLvrlFWgoY/mBpVi5wq4m7D10cPdjkhCckhuCA1ynp2ySG4hISiCbQyagt28WD4IyMGdqrIZiXo/BCdKgKMnUQOwckNtPZd8Ui8HptzmgGrZhtZEro9PtOAtWwh+BWHIqnbsBNoioc0UQDrclxC3bV+iz76Z57rD7qN+PxQBriF5pxdkhV3tcSA3UZjNbF904lvriXVPn708hngj36POno53V/Cy5/7/hTnh+ro8aOv2SWGU8Vt8EfPcRtmZdr5mGP66Hcm87R0P/X10eNHXw28PJSrVdbRt6WalX/0nbCYlody9qOPMfawovFYadwGq2bjb57rD6R766GcJLY4b1VB0n1/NVVM/xXGWLq/smLOEjSCLj4eO7J7MItoNucdcGlR6CBy50xEIS2VYzFdq5iGVdOfgmLaKNNhwypRqKiYPrANq9nnlPBqPnq7EfylYhrW2NZMwist4yWWSxZjzq8r2mLaYCxaKk+EV6X7kTLd2BilMfZbrl1Wmc7D2NnFe/1jkTIdNawDwpjC66hhbVQsxr7LqDynYW2PEWNNDTfCYtpOfzqIsbmvfyw1/THCK/xj8lzKYKxFtWLT+W28pGGNMDZEjCn1hzBWCzAGmsdLz/VHGNtHjI0OpSsixk7uzVFXdH6hkzG2cQEYGwtjXCtaXVGZLXkYezpMafe/fmrPgzFWRe1euUiMscvH0Qw63qWaqd0IMWY1j83ZYgatC8QijD0JDGFSLb3GPwZjVleMrqNsu6FACasrXjUY86ndeON6x0ra/UoPZDO5Vfxr70xjo6qiOD6jYlNHRawGqiIa0aSGGLSugUqM4BJUVKRGUUgUVPjg7gfEXWNAjPsW16DGLUajX4wmb9qhpdNO22nTdqZ0pkOnWNqyirK4ffHc8+59590773X44pd33glhacKXX84953+Wex/17uV87E7RNiMpFN4fM+dj9XXuckOEae7PUhkLnbGr4m4p1JabE0ohnEE7u1TLrtOkUH/82QhzM/Y8YnfbK69UsXLvCgEgrdy4V3wYicJ0+HCXWdLXz3dLofCDCSXlRmwRdoXsrWkxhA6/jGSUG4tho1OF6bCx6CGFasSjQu4wfRv3R151KXRUDG4mKDUdNj28pNC1c11hOtEcfrZFSSEM06Smaf6T/jjC20wpdAs2FlWmD/tmJIVkmL5ohWp6YKYP36ugrhCGaWx64PzHGW88xX2bSnaFVJiur3Nnemi9LnwnwtvMMH0vZXpbLHL/NhIA0tT0aizIlAuFy0IqTFPT4yox3iAXCktWGaYp09vvLikXCrWQ2fSAmt5wobXMP5gtmx5y/gObHmtcLgRyOhtn3jiLYtODMn3scnIhuyLj/vkoyvQ43jhyMQ1Zh6CoF6me93sDTqaXLlSzQrqQitPs2x7UN7PF4vNblBbCON2czDEvyUyxWPMkymk7TotD1ptn/gqlWyyKKHTNwrwYkalDtrUvm7mR9ZBMiUXlQrGlA9tlXwgzGchF5q96mC5UX5fphzgtMxmGId6BmlxIaqE7C129zXjIVBjqYv2oe5RcyJbTsZXp7ZjJ7DCEgXoO56080kKyIps3O5Ptk5lsMwbq/jznMVlUaaGZyoWWXQeZDOSiVENCL2YeZzwFAkCyIhN9IUHo3oFcUoShISIUv5HvkANdCIt6GaePrNkAFxGbEzJQYyobjL/FVw5JF3LF6RcgDLUJNSRTGRDann7mnAhXw76QSPXikCGhW67LoxpSqQzlEN+NDxWn4ZCJTAZyMXYzqKEU6kWV7IEQ39VF7ZBhGIotxUAtU5lNqGuA7TNntgtNgUzmhKHYovR2jRBKaraPe6hMJuSiDEPzPo3bqWzITYhtkxoP2SQKQ0BodR2mMkz2KKnb+3q7FnJ9/T7qhKGZqIYwlV1vENoqCHG900phiAL1YpHsgVCjTagVCRW4XnVRYUgFakHo0QIQ2oqCEYsOUbhyJnTEsdD4QL2oCK0COdTXHhJyhyEI1E4qE3UrCkYi1A2EZjGNQxSoMZXZcmhpSMgIQzKVqWQfu8qDENtcplIZrHYSoZXpXLKE0ABTPQSABCFMZYpQzSKDEGb7AZ6jDgxDTrKXgrFmQykhtnWZTWiSkkOS0OWehJ5jeb/eTmUoh4jQZd6E7uBO6AyH0EWlhERt/zDLLqwjGN2E5hmEoLYHQulneROa5u9DjUgol36G5ZqnRsgnDqk+9VMsd/S8Ca3wJMRzooiSmgiRHiohNBhfy3Iq7U3oyXQO6rKEi5CYuV7McrPBm9BNWLlSF1ZMFAczd3EmVKEIUW3ft1UjBLsft7F8DJ98yJPQkJvQlSyXhT0JYQdNdPLlRLFJEOrPz2HZhvUmBF3YfkUIt2MS3UCowLL94U3ooULeIIQttOfOivAzL0JHxh6Zle9vMwhB6cqyMNMJTZeEbp6bz7aJzQYUREOiuMfCjONFcocQ9oegC4uEProwg4RaHEJYdrC8tSDrMoPQcknIKDsu5njzRRGSnXw5UVwCmw1JRYjKjhs4rpx7E7p2fnww2axKVxLVHK8t+BBaEN+eTJmE8ixnitSnxomiJPTC7dj+SLQ0bVaiGiUjx3mQJHSqRggb1b0pVZiRZOT43rKL0MwZsPsBG1Y4dMXS1ZSMLAWRTUjMXMVmA+6gYXFPpauSjNipZthlVFNpezuGStcClR1yHoSC6PUIO5OEphgttFULgVCJIMrcz1AQeRKCO5xzUVSbgmgOw8+zR+3tmEqD0DIS1UQI0j1DQaQRosLsmtnxQZKMQhCJHhrLBRkkJNsfULoqQVRflxaiWgki6hDxG7tGqf3hLjvm3Y6SkQQRdogG4w/wS/eSkFmYXbSyRBBBMsvmX+I3MotS6YplhxLVL1MvX4VqOGbb13BN907ZQb38WZogGmpCRZSdy/ClOCJEotoURMNwzjBWJ3MM75hR2aEJouVrMlnVQxseRkQoie5gmcw0US0EEfZhlSASgEZGhoeHIBSlkvfw+5wSEiLJ6HQZ75Y9NHChkWKxODIMjy/DOXuPXzNfiWqUjJTu6zeku3rxnbjhom0jDY1wzmbz2/8gUa0LIlwhAkIN4EHj/+zbvwsQNSXav+BXu5JkJEFkd4gEodYhcKG/9+7de+DPseLI5paO5m/ZfZQrSr18TRA9Eoc41NG6eaR4YO+2bdv2HhwdKw43bmr/gN/c1UcQLZ6bgzes4JDtA0Bgf4+Pjo00tCTefAP+Q4SV2YRKBNEtswWhxuE/D9iE/v0DnSix8fxo9MWHb1i3fu0lXJaHSRBpHaLVK8QXpBtHdhzahnaoRzjR0KYvXrnPsm0dl5U0XRBR/2MlfGOhtWHkj32Cz6+/HvgLj1miYDnGZZ2IBFG1WxDFlg72tbc0FMf3Ax+wbQfHx8eKectlXHb0kZBHul/V35doGS6OHgRAwvbvHG+zNOPybXsSRJTuccvqx1SiCQj9dcAmtG/EMmwdk093RH3S/fMbIZWNjI32HLJdqNMyrZbL5MNM9yqZfW0T2rVPOFCX5WEPM9HXRrqnyswmtHP/r4cSlqc9xURfu9K9lszebk4MDY+Njh8ct3zsBiaTD0r3ejK7sx18qDjaZvnaeiZfTjbSPTViN0JZ1mxNYLVMVLVfMlvydUfKmtiYvFHgEDI2ZOYt6rTK2FtM+vo+O0QrrbL2+BsRFqbVruq1uMsWWuVtPZOuNbWqgZD6qJJ1OFbLZAXdIURv5z5qHZ5dzePGWdT10pftQssOj09n5zPnRTgYEsJ3rOSn3ZYcHh74dTGTEaz6FoX6Ltf88nwAj7D7mawPGx9Kfqg8H2lbuCzHSheS376rWVAWj4V4hD3GIlTLh2HVJ0rr68qFH+SDVniQxZtE+hmLXbRiAkA6n0KBRTff/ERp7Kpy8UfhGRgYOJtBN1+eMZnHcMpR63vAEA/xSafnBr+br/IYfasjtniO3/kiPognHY9nAt/NRymkP5IfWz2/3Pmy8QCfTCbw3Xz19rLrVVj40oK3A23R+WTA8vk3A97NpyfgXT38mpsMPob/KPfJd+Vyua8CHqrpVVj3lOOhTp8ATXwAT1ducDCbnR/sbr52l5z2z5bNsshMPo77DGb7+3t724K9pe+zobfkeuOAER/lPognmUy2tX0YBbvg1kuuvjSI542mHFqH+tW7PRyI+ACebD/S6etLpX6+4ocHbQF1cQAPnDGyd0L1k5KPFqCJj/AeQadZ2IL1Tk82gJc+aMphDKTJgeiAOXzQe5rRulPuoH5f8MpYSYgG0vKYPboQHcg8YIoPek93d3tHe8Fy29rglbE0kNZD9TUXSkDGAbP5IJ6OjkQiY+kWwG+XqxuK9kCaQnX9AgLkOmAQf5AP4tk0aDFYSqOBtB6qL9tgOhAeMMUH8LQmvcZnAfyihz6QplD9cokDER/A09rdacfy7Bb4PdD7wzSQxrqDdodm6Q6EBywl+TQlJJedPXuSQV9Ko1Ct1x23XIiAMIXlu+QBk3xaZAJL9/T07GjV94eDt5Tml8xeWEAnDCKQ7UDtgk8jJDDlQWCjWpG7PniXzb1DdQy+JWCfMIxA5EBNjVmHxpZxQeiPgaAvpfmF6qV4wsiB7AOm7TQ2CEJ7BDKyAH4WRl+EpVB9cx5PmB2ipQN1W5qlfhOBqEP72QPBW0rzC9XPX4iA5Alr79jUmjB39rp29YAVOwO+P+wXqq+ty+QdQOBAdGuKAtHvgtDvhYDvD9MirPvOQgw+jAMxWuYw0NBxr/FQURDa1RXwpTRJqOTOQuzpXM6J0QRBs44dQOg3feM6gM+g+4Xqb7IKUL/lY1kMRA3az+4LZjKjOwsUiJZ/YQNKWr42gJpxXCvNAvhQml+oXr1RAGrrnGgPZFQQ2p1xx6Hg5TL3nQUtVM/7ui2VQvfwt9YdQjMmg+1CTqg2646ap1MFqXtaMj6EknuEZmxx7ehHgmhGN18Rii2y0OI7KF2ZFt+tF6/rI4E0rZtPhK6XbkLpqtQ69eJ1XSSYRqHaJoSR+hrFgNKVlw2hqlYVRySgpr03KPfQ7nS8ZMxIV6XF625V1keCai5C+IV7cKFHiMEm1M1+Nzm7du5Wmez8AD8oQx+blNuwy/zSlb/dEegXdyShCnWr49VO73Tlb2vPDTQgtYfm3Oq43CNdpSfgc/8PRwQbkPtWx3Q4Y0tqS9PVnn5fPut+OjbogJyN8zPtjfObvXqtCb9Liq8cwwLQsbRxDi/C1nr0Wse8A9G3lZMDz0cQcp8xeABtjUevdWfBg8/7px7HA5A8Y7iSL4aJxtWgEey15kr4PFFRyeCEyTM2pQpX8vEWOQwTdRLdO0QgMovXsz8XDsTg4UFaycflIbtDrbMYxEA0rCewd0/g4UDOxaBq7J2pYWKtR6/19y2uBPaaOGAcHEi60CTjY67LryQYVLySZvysagqPA+aqN3RC185GEHrxOqr+9UGVCEAsDphTb0hCNEy8vbTXOib//uZJJ0zicsBoEGQ+b27e4oyPFWUQeunzE9gEICLkMUxc5S2gr3yXT4D23/vwv8VZ+10FnwBddpg4n8BQAmOiEMsME/1ucX4o+PBQiDohv6tB6n0vngms7DCRbnEyTWDew0TfW5xnf88ugZUN1eBFS9TrMfd8zjCBTRSq8X6ZsMW/vPflEx9+Us2oAitDSG1Tn3bK0cJOm37yiWeeXs2qAjucUA3HbPppYNOPP3mG4MM2gfmFauFEJx9//PEnnzhjZsinNFQLJzpjxoknzjjjzKnTqqsYJ3jfQFQ97fSpU2dOnXr6tJMqTg39hwipYwaIqqdNq64+qQrye8jHDETHTAJEFVVVVRUnnFp53OSQj0FIIDqusnLKlMrKSccdM/mIkI9GSCFCmzz52JCPSQgRASNh8Gc05OOBCBkhnJCPP6IQz8QWsgntf7f/AACDRxe+qBzsAAAAAElFTkSuQmCC"
- /***/ }),
- /***/ "./src/assets/images/play.png":
- /*!************************************!*\
- !*** ./src/assets/images/play.png ***!
- \************************************/
- /*! dynamic exports provided */
- /*! all exports used */
- /***/ (function(module, exports) {
- module.exports = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAKgAAACoCAMAAABDlVWGAAABJlBMVEUAAAAAAAD////l5eX///9iYmKDg4Pn5+f///9YWFj////09PT////4+Pjt7e3///////9oaGhBQUH////////////////CwsIaGhr///8xMTEkJCT////7+/vp6en///////////////+srKyoqKienp58fHz////y8vKTk5P///8EBAT////////////////V1dW3t7f////////////////////v7++jo6N9fX3///////+UlJT////s7Oz////Nzc3///////+RkZGPj495eXkTExP////////29vb////k5OTPz882Njb////////////c3Nz///////9ycnJsbGz///9dXV3////////Q0ND///9QUFD///////////////////9FeiN6AAAAYXRSTlNmAP3c+oWT3ueB9vA19ealRId5EQbuurpu83RxD/nh05dfAquooo+M7JtzaSolE+vMspJ3Wj7w6KSQj6ucKeXNxLWnmpmObVYd8t3axXZRSt7TvbKLideCeSzHnn4V3Nh6YarbPAAABlRJREFUeNrU14lWEmEYh/GXcdj3HQTZRCkS913UNE2zbLd9Oc/930Q2LmVpwPAC03MD/M5835n/IC6dkqHnzcVoZvdkLp2HfHruZDcTXWw+DyVdOilAt6uNjI8782Ua1W2XjTShtdDSmzRdlH6zFKq5bKQBTS5H57gqXJrP1tsb7kShkBPJFQoJ90a7np0vhblqLrrc8R7oQ4vVPZOLIp8mp8flzsanJ59FuMjcqxZdHVKFxvYDWK1lPQXpooInu4ZVYD/m6pAWNLn0DSvvekJ6KLHuxerb0qyrQwrQViV/oZzKSc/lpi6sgUrLdSN16MyWARBcOBWbnS4EAYytj67r1KGtqMUseaSvPCWLGr14u+pDZysmwFhc+i4+BmBWZgcATTXTFvO9qOS3qOlmShu68g7A6xa13F6A7yuq0ORnA9jZENU2dgDjc1IPGvMB4QNR7+AJ4IspQVObBjDmF+Wur6qxmdKAbpeBoEcGlCcIlLf7hx7lOzxOlYeaP+oTmmoYQFsGWhswGql+oMUMEInLgItHgEzRPvS43OHYVY+/fGwXGvIBkzKU6oAvZA8aywOPZEg9AvIxO9AXAZg4lKF1OAGBF71DX5jw5EyG2NkTMJ/3Co2ZcM8tQ819D8xYb9CVgA2nijSw0gs0tArBzk59aRBWQ91Dj30QjssIiofBd9wttFiGiTMZSWcTUC52B629Bg5lRB0Cr2tdQRvAfRlZ94FGN9AjA+oywupgHHWGzuRhTEbaGORnOkFTZYj4ZaT5I1BOdYBuAnEZcXFg89/QmAFtGXltMGL/ghZ9I7+g19fUV/wHtAJBvzggfxAqd0NXDPCII/KAsXIXNPXOIQd/efjvUndAmxB2xMH/zB+G5u3Qr2k4EMd0AOmvt0IrsCMOagcqt0FbJkyLg5oGs3ULNApecVReiP4NnTHALY7KDcbHv6BbDno1XTUGW39CWwa8F4flB6P1B3TRgQ/UeqSLN6GzAQd83f1dHAKzN6AfoCQOrARLN6Andr9GpiITT9/KwPLAye/QGATFTusAxsOCDKogxH6D7sOC2GkNq+B9GVALsP8LWgzAqdjJ4LJXCRlIpxAoXkOrtteT6yYmH8gg8kL1GroHU/1CoTSQBZ6CvSto0oRc/1DM7GNRLwdm8hK6DF5RgMI9j6jnheVLaBTWdaAwPy7KrUP0Alqbg4QWlPCU6JaAuZoFDcGaqEHh6RdRLQIhC/oBsppQzAXVN1UWlixoBjyqUIhozr8H3vyE1lYhpwnVnv8CpH9CZyAi2lAIPtK8pDPn0Cp8UoWqz/8zqJ5DGzCpCdWf/0lonEMzMK0J1Z//acicQ30wrgnVn/9x8LkkCWFRherPfxiSEgKvLlR//r0QkmWY14Xqz/88LEsTsqpQ/fm3RlQWoa4L1Z//OixKFNq6UP35vw9RycDGMKAYD3P9vEhlF9y6UP35d8OuvISELlR//hPwUqxh0oTqz781TbIKueFB4em4rb/Mq5IfMpRn0nOPIS+ADBUatvcz/w/0B/X2VgMACMNQ9AMnWOADKwT/QuahyZYcDcte7e146X9W+vFmWmEzOeOJGfjMCmWOEubMYw7no7wizHPHvMuMAMFIOo5IxsiOjJDLSOOM2cDYN44hxliMjGnL2OAOWMCgGgz84uBEDKDFIG8ORLhzLPO2Y5kK6PpMdJiBsR28nQkMOBEMJtTixISY4JUTZWPCgVXevesgCINhGG7dZPLEIg7GRRsMTsaoMTEOnmLUuBgn+e//JuTHGt0aKT3y3QIFpj6vO9ctnbnAmr9PIysefn0E0PfhkjW92HFtnQHULn5AAG9aISZGF3NaQYxVrInRrcVYBW4H5vkPEPIfuIV5UGXhClHT8Qv9oXQ/MckoTfb+wVTGqK8ZUl9+4mmUnpGj03pOmzlH5y/w5w6ZiAil+G9qA0KpkfWMTxKsJ6530wel3try9CwjSscg27BTDcw321gHjzyuEjj9IbwP1hPeDqHo2abP0pn5XMR/NhTB/fyo2gv3q0gh1JSkEHCrUuMSG1VxCdxDOtfR1ZDr4AGUwIUACi5JJZMyx1RHUgY3kIn0LBuFQk2EFlv7J3t0+id7JPi86wlJsfm9FUVbQrZR1LrPmQ0hKZfSXC7Fzr5LeD7uGoYBQBCGV56PS2g5ewGy+NkUNbjr9gAAAABJRU5ErkJggg=="
- /***/ }),
- /***/ "./src/assets/images/play_bg.jpg":
- /*!***************************************!*\
- !*** ./src/assets/images/play_bg.jpg ***!
- \***************************************/
- /*! dynamic exports provided */
- /*! all exports used */
- /***/ (function(module, exports, __webpack_require__) {
- module.exports = __webpack_require__.p + "static/media/play_bg.5636b7ab.jpg";
- /***/ }),
- /***/ "./src/assets/images/play_disc.png":
- /*!*****************************************!*\
- !*** ./src/assets/images/play_disc.png ***!
- \*****************************************/
- /*! dynamic exports provided */
- /*! all exports used */
- /***/ (function(module, exports, __webpack_require__) {
- module.exports = __webpack_require__.p + "static/media/play_disc.c34e4343.png";
- /***/ }),
- /***/ "./src/assets/images/recommand_bg_2x.png":
- /*!***********************************************!*\
- !*** ./src/assets/images/recommand_bg_2x.png ***!
- \***********************************************/
- /*! dynamic exports provided */
- /*! all exports used */
- /***/ (function(module, exports, __webpack_require__) {
- module.exports = __webpack_require__.p + "static/media/recommand_bg_2x.d045fafc.png";
- /***/ }),
- /***/ "./src/assets/images/search.png":
- /*!**************************************!*\
- !*** ./src/assets/images/search.png ***!
- \**************************************/
- /*! dynamic exports provided */
- /*! all exports used */
- /***/ (function(module, exports) {
- module.exports = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwEAYAAAAHkiXEAAAABGdBTUEAALGPC/xhBQAAAAFzUkdCAK7OHOkAAAAgY0hSTQAAeiYAAICEAAD6AAAAgOgAAHUwAADqYAAAOpgAABdwnLpRPAAAAAZiS0dEAAAAAAAA+UO7fwAAAAlwSFlzAAAASAAAAEgARslrPgAACCBJREFUeNrtmm1MU2cbx6/rlDUFAhiDCnPIySQDEoxKl6G8ZSggDgTFUD8ofsDXhUV8K1AUDabhpQWtZm5uIdPAQpC4MDdRoLxso8YO1MUXEAIuDQPWxmyEWR1Uzrn24Tz1eUJiHpVy+jzx/L407Yf7uv7X/5z7vntfN4CEhISEhISEhISE6KC7E5hJeVl5WXmZnx9zgDnAHIiKIjWpSR0YiLmYi7mLFkELtEDL339DNERD9NgYZmEWZg0Oqi1qi9py9667839V3GYAERERoj5Nn6ZPU6lgASyABTk5kAu5kPvhh9AJndApl7/0gNmQDdkWC9jABrbGRo+9Hns99lZVHTQfNB80j466S+d/Q3QDdP26fl1/TAyshJWw8vRpKIESKFEqgQUW2IEB6IIu6GpsBCMYwdjczEQz0Uy0xSIfk4/Jx6xWh9ahdWh9fKiP+qgvIIAUpCDF++9DOqRDekaGYEBKCpRCKZQSoS/6oq/BYNfZdXbdiRMlWIIlODnp7sKLboDOU+ep89y9G5SgBOWnn6IJTWj67TeaR/No3tGj6nH1uHq8vh4REZHodeNUxVXFVcUFBXGrudXc6hMnIBzCIXz7dsiADMjo7oY2aIO2TZvyVfmqfJXVKpb+FzHnBlRoK7QVWo0G5ShHeWmp8GR+/z2ZyUzmrVsLwgrCCsIeP56z+P0V/RX96eloRCMav/4amqAJmv78E3IgB3JWrXK3EXNmQEV2RXZFdmYmXsWrePXSJQzGYAyuqbHfst+y38rJEaYCnhdLaJVflV+V38qVnJbTctoffwQTmMB0/75iQjGhmEhI2Ne8r3lf89SUWPk4kbl6QH2NvkZfs3Ah+IM/+Hd0YC/2Ym9Pj/2u/a79blaWUPjpabGFtk61TrVOWa3JPsk+yT59fbAe1sP6Q4eexT+LfxbPMG31bfVt9R0dYuflcgOS/JL8kvwqKoTFNCqKs3E2zpacXHyo+FDxoUePxBY4E2OvsdfYOzCQJE+SJ8mXLsURHMGRnTtTvFK8UrxqalqHW4dbh//6S6x8GFcNVHmz8mblTX9/YRu5axeEQAiEfPmlZlQzqhkdGhJL0MvCR/KRfGRxMRRBERQhckbOyBnz8sTOw2UG8HV8HV+Xnu7cv/OhfCgf+sUXYgt6WQo1hZpCzfAwbIANsKGlBcZhHMY3bxY7D5cZgHVYh3Wpqc4/RILAe/fEFvSqkC/5ku/ly1ALtVDLssIaFhEhVnyXGUDX6TpdDw3FTMzEzJs3xRIw6wKMMCPMyK1bzu+8kTfyxvfeEy2+y0baBbtgV2Agf5Q/yh8dGxNLwGzBS3gJL/1HvkEQBEFvvy1WfNcZcB7Ow3kvL2zGZmx++lQsAbPlsfKx8rHSbn/+gxKUoPT2Fiu+6wzYA3tgj80GnuAJngEBYgmYLYpyRbmi/N9PPEZhFEb9/rtY8T1cNRB2YRd2jY6SiUxkYlmxBMy6AIs9FnssZlmykpWsALgbd+Nu8aZQ1y3COZRDOT/9BCtgBayIiTlFp+gUzZsnlpDXzvsYHaNj69eDGcxgnpriT/In+ZM//yxWfNcZcI2u0bXLl4Vj4bfecgw4BhwDqaliCXlVjtNxOk4Mgw50oGPjRiqlUirt6Jjrw8GZuMyAp4NPB58OdnfDZtgMm3t78RE+wkdHjghCPVw21bkKrxqvGq+arVtpP+2n/SEhkAZpkPbVV2Ln4TIDnp9uxkEcxBUWwg24ATfCw73PeJ/xPvPxx2ILexHOlicuw2W4TKuFFEiBlO7u/MH8wfzBb74ROx/X7YL+Rf5Y/lj+2JUrsByWw/IrV4TebWWlIDw2VmyBThoaGhoaGmQyxp/xZ/zr6oADDriAAMqkTMrMy5ttI+h1cbkBTvjb/G3+9rZtMAmTMPnwIXOHucPcaWzUFeuKdcVxcWIJFKZAhcKis+gsugsXhDOfjz7CaqzG6k8+KRgqGCoYMpvFymcmc94RK6MyKiOWlUXJomRRTU1wFs7C2ZAQfIAP8IFabc+2Z9uzP/vM1X0CoRMWGooLcSEuvHABqqEaqletEnrPExNcFpfFZa1YoUENatBimes6vIg5ewOcOAUq5ivmK+avXg0+4AM+zc3Cvvv0ae9g72Dv4Hv39Kye1bPbtjnn6FeNo4vVxepiIyP1HnoPvcfnn+NDfIgP79+HeIiH+LAwMIABDKOjYAELWPz8ZFaZVWbt7HQ+IG6pPrjxWop+Qj+hn0hNpe20nbaXl0MMxEBMRAQkQAIkOBwUSqEUajbjDtyBOywW7MEe7LHZaCftpJ0KBRyGw3A4KAj6oA/6IiOFZvuSJbAFtsCWyUlaRItoUW3t9Lnpc9PniouZPCaPyfP0dBbeefrpPL3lArgALiAhQew3wu0Xs5z3gyprK2sraz/4gHqoh3o2bhSa6LGx1Emd1PnOO0KjJzBQ6OVOTcEROAJHbDZaR+to3S+/IIsssj/8MG2aNk2bGhqKEosSixL/+GNmvOdT4v+IEW43wF0IU92SJTKNTCPTdHaSjnSke/ddSIRESBwe5lq4Fq4lIUGj0Wg0ml9/nas8XN4T/n+hrb2tva19YmJt2dqytWXffssUMoVMYUYGLIWlsJRlmWQmmUnetGkNu4Zdw373XXt7e3t7+/i4q/N4Yw1w4m4j3ngDnLjLCMmAGYhtxBu7CL8sL9o1oQENaBgaCjYEG4INYWEqlUqlUnHcq44vGfCSOI0QGjhGI12ki3Tx2bMnsU9in8RGRIh91fKNxdlHcH66Ox8JCQkJCQkJCQmJ1+AftC7wCSxDskEAAAAldEVYdGRhdGU6Y3JlYXRlADIwMTctMTItMjVUMTE6Mjc6NDArMDg6MDAbwa23AAAAJXRFWHRkYXRlOm1vZGlmeQAyMDE3LTEyLTI1VDExOjI3OjQwKzA4OjAwapwVCwAAAE50RVh0c3ZnOmJhc2UtdXJpAGZpbGU6Ly8vaG9tZS9hZG1pbi9pY29uLWZvbnQvdG1wL2ljb25fc3VrbjFwc3c4bGNnemFvci9zZWFyY2guc3ZncCd/SwAAAABJRU5ErkJggg=="
- /***/ }),
- /***/ "./src/assets/images/stop.png":
- /*!************************************!*\
- !*** ./src/assets/images/stop.png ***!
- \************************************/
- /*! dynamic exports provided */
- /*! all exports used */
- /***/ (function(module, exports) {
- module.exports = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAKgAAACoEAYAAAAk23n3AAAABGdBTUEAALGPC/xhBQAAAAFzUkdCAK7OHOkAAAAgY0hSTQAAeiYAAICEAAD6AAAAgOgAAHUwAADqYAAAOpgAABdwnLpRPAAAAAZiS0dEAAAAAAAA+UO7fwAAAAlwSFlzAAAASAAAAEgARslrPgAAGHpJREFUeNrtnXmQVMUdx7sXFJZbFuRWMAa5lkOjhiNyagClkioUKiGGMigqpKiK8b9UJURBiDFWJIlWUqhIQgyoGDWEK9y73EfBBkMO5WYjQoA9XFjY98sf3+1l32y/2ZnZme15M9/PP7967828+fWvu7/Tr18fShFCCCGEEEIIIYQQQgghhBASgXbtAMkMREREcnNx1KuX33buDNuhgxIlSjp0UFpppfPycNyqFY61xnG7doE/pJVW+uJFfE4Ex2VlOD5/Hh86exbnzXFxMeyxY7BHj2qttdaXL7uOGwk3FFBiBYLYvDmOBg+GHTjQb/PzYe+4A7ZTJ9d+x4cR1iNHYIuKIMRFRTg+eBD20CGdo3N0zpUrrj0m6QUFNEuBQJqW3ujREI4RI9ByGzoU5++6C/bGG1376xbTUt23D7awEPEqKMDx5s0Q2NJS156SxoUCmuGIJ554gwZBGCdOxNkJE2CNUDZt2vAfUqKkvBy/c/1RGfbUKdhz52qseeTWSitdXo7jSAGKfMQ2LWJV/SjfurW/CyAvDxeN7dABtkcP2J49YU3XQosWyYlyZSWsEdbVq+HPqlXoKvj44+T8Dkk3KKAZAoRywABU3ClTcHbqVNjevRO7a1WV/5F2/37c3xxff+RFC+zsWddxiC9enTohPQMG4Gxk18Sdd8Ka602aJPZrhw/DrlhhLITVdB0QQhoFVPy2bfEIPmsWjg8ckIS4ehV282bYn/wE9xs3DrZ1a9fpdY2JA+z99yNOc+fCbtvmj2O87NqF+z7xBONNSAowj+CocG+8AVteHl9FPXcOdvFi2MmTjRC7Tl/YMX3JiOfDD/vz6fz5+PKptBT3+d3vcNyvn+v0ERIKUGG0hh0/HhVp/fr4KuClS7Bvvum/zw03uE5ftmHijnyYMMGfLyaf6sPzYFetgh0zxnW6CEkrah6ZRURk7974BNN8fuZM3KdVK9fpIdFBfjVvjvx65JG4/yg98cTbuRN20iTX6SGkUfH3Me7cGVutuXwZ9o038D3zsoNkCv6umiVLYK9cia18bN2K73/ta67TQUhSQcHu3RsF/aOPYqsQFy/Czp8Pa2bykGwB+d61K+yCBbAlJbGVn3fegTXDtQgJCf63ti+9FFtLorTUL5jt27tOB0kvUC7y8mAXLkT5KiuLXq4qKvzlyky1JSTNQAGdOBH2+PHoBdsMe1m0CBWhY0fX/pNwgXJz880oR7/5jb9cWfDEE+8//8EBX0YRx/hbBMuWxfZotWYNLIenkORiJlLE9lLK8/C511/ncDbSqPgHVJ8+Hb2gnjoF+41vuPabZBcod5Mnw545E72cHjvGl1AkJaBgNWsG+4tf1PyDB/2zi4jIa6/xn52kAyiPZqC/GaAfVH6vXYOdPx+fT8IaCSQ7QQHq0QMFateu6P/gJ07Ajh7t2m9CooFyOnas/wkpiC1bYDkKhMQIhPO++1BwioujF7B334XlW3MSLvxrKvzxj9HLuemqGjbMtd8kTUGB+v73UVCC3maaYSEzZrj2l5BkgvL/5JMo32biRiRmON73vufaX+IYFAQz99ysrhPEyZMoYPfc49pvQlIJyvudd8IePRq9XrzyCmxOjmu/SSOBDM/NhV25MrBseOKJt2kTrFmYl5DswIxP9veFBrFsGT6f7TsXZDDI6JYtYxsnt3w5bK0V0AnJQowwoj78/vfRGxx//atpoLj2myQJZGi7drCFhdGF0zzKa67UT0gt/F1ezz8f25MbF4gOLf63jEHLxJnxcLNnu/aXkDCB+jVnjr8eRVJYyGUWQwYyrkUL2K1b7RlrBgzzbSIhDQEC+Z3voD4FjV4pKDBdaK79JQGYvhfYjRujC+e3vuXaX0IyCdSradP89czSR8qXTekFcicnBzborbp5xHjsMdf+EpLJoJ7NmBH90f4Pf4Dluwbn4B/t5ZclKs8849pPQrIJ/8SUIJ5/3rWfWQsyYPbs6Bk0d65rPwnJZlAPzYLOQfBdRKOBgI8eDRvUaf3223xEIMQ9ph7CLl1qr6+VlVxOL8X4V0f67LO63Zy1x5+xk5qQdKJmWUgRCR4dY1aH4upPScMf+KBl5cyCsJxySUg6g3raqRPq7cmT9vq8ZQvXI00S/oWMI6mowPW773btJyEkdlBv770X9Tho9afnnnPtZ2ip2T9dRESqquwB5rJyhIQZ1OOnn7bX72vX2DcaJwic2awtaM+h5ctd+0kISR6o1++/H72Ljlvk1AsCFrTLpelk5grwhGQSqNc33QRrtsipRfWeTq79TFsQJbOvep3oVc9o4J5DhGQy/l1vI2cyUQfqgIC0bAn76ad2AX3tNdd+EkIaj5p9663861+wXHe0OlAvvRT4yM6+D0KyDv8jfdDmjj/9qWs/3QXIE0+8L38ZgTCbVUXyzW+69pMQ4g7owJQpdn344gvoyK23uvbTUWA++sjeWbx+vWv/CCHpA3Rh3Tq7kGbRqBwkeOxYeyDM3PZ+/Vz7SQhJHyCgAwdCHyzrjYqIyPDhrv1spEDs2GEPwKJFrv0jhKQv0IlXX7U/uW7a5Nq/1CXcE0+8hx6yJ7ysDPbmm137SQhJXyAanTvDlpfbG2Jjxrj2M8kJNstZ7dtnT/D8+a79JISEBzS4XnzRrieFha79S15CRURk/Hh7Qi9ehOXMIkJI7EA3zJTvkhK7vowc6drPhic06tsztjwJIYkTvSX60Ueu/WtgwvLzqzs6I6ZkmeWrunRx7SchJLxAR7p1g40cT250J4SjeqJPxXrjDdf+EUIyB+hK0JYhIZoKbqZe1rxdj6R6PJdrP7Md5MOkSciUDz/E8Sef2O3f/obPTZ8Om5Pj2v+kx6M6XbDTppkJHYFxqX5EhOWMOdcgHwYPtgvopUuwLVu69jPGhMyaZU/I9u2u/ctW/FujLF8uDWLzZth27VynKzlxadsW6dm4sWFxefddE2fX6cpWkA+7d9vzJwS7f6IA7d9vT8Bjj7n2L1tB/N98s2ECUQtPPPE2bMBB+Fqkxu/oLzkTZelS1+nLVpCfjz9uL687drj2L9hxERHp399eoELUhM4w/HvPpIopU1ynM+64iIjI5MmpjcvQoa7TmW2gvLdqhfhbhjd54ol3++3J+r0ktxymTrWff+89rbXWurw8lcEjFrTSSn/726n9kWnTXCczPf0Oa1zCi87ROTqnrAxHH3xQ9wNKKx2kU/GTZAF9+OE6p0SJyqbVUtINUaJSOYxDlCjp3991MhODcclYoupOGgmo/616377+q+fPw27cmJookXrRSivdokVq7x/WlyYpXNE81HHJFNatg7140X/ejE/v06ehv9DwFqhWWukHH6xzXpQo+eADNKmvXm2UeBFHiLj2ID1hXFwB3amsxNGHH9o/NXFiQ38nSY/wEybUTYHSSq9albIIEUJITKxeXeeUKFFi0a04SVhA8ejepg2OvvpV/9Vr1+Dghg2NHClCCIlg7VrYqqqaU1pppe+7z7y1T/TOibdAtdJKm3X3brjBf3H7djShL11yFzRCSLaD0T8XLuBo1y7/1RtvNEKa6P0TF1BRogKX0GfLkxCSbgStWJ/4ViAN7AMdMcJ+PoMWNCWEZAhBuhSkY/UTt4DWzPXVSis9ZIj/alUVWqa7d7sNFCGE1EKUqJqV6mv1hSqllLr33kTXMEiwBTp4MGytHxQlSoqK0PdZWuo6XoQQYoAulZTg6OOP/VdNgzD+iQ/xC6hWWulBg+zn9+1zHShCCInOgQP28xZdq4cEW6D5+fbzRUWuQkIIIfVS/aRsPx+ka8FQQAkhWcbBg/bz8S/0nqCA3nFHnVOiRMnhw07jQggh0dBKK23RKa200r17x3u7mAUUk+/N4gudOl2/oERJeTk6aT/7zHV8CCEkOsXFsJcv+8936xbv2/g4W6A9e8JqXXNKK6300aOuQ0IIIfWBmUkiaPgdO+a/anZWuOWWWO+XoIBGEukIIYSkMVpppT/91H6xV69YbxOngAbt437qlOt4EEJIzIgSJadP2y927hzrbeIU0I4d7ec//9x1PAghJGa00kpbdEsrrXSQztUldgEVJUry8uwXzcrzhBASFiy6FVXn6hJnC9RyY1GihAJKCAkRokTJuXP2i6logWqllbYsPKqVVtrMMSWEkBCglVbasmaHVlrp2Ldfj7MFeuON9vNm7xFCCAkLV67UOSVKlKRsHCgFlBCSKVgEVCutdPPmsd4hzpdIFgEVJUoooISQsBE5E0lV61kqBJQQQjIFUaIkJ0D/Yt+OOs6XSJaWplZa6aBHe0IISVcsfZ1aaaUtj/YBxNkCDXpUp4ASQkJE1IYfBZQQQuoh6G177O904hRQy7gpUaKkbVvXoSCEkPiw6JYoURL7nm5xCqhlxpFWWunYpz4RQohzRImSDh3qnNdKKx00Q6kuDRdQpZR1iichhKQrQQ2/OKemxymgQcpsUXJCCElXghYN0UornTIBNUvhR9Kjh+t4EEJIzGillQ5aeT5I5+oSp4AGrTwftFI9IYSkK5aV50WJkqCV6uuSoIDWGqkvSpRQQAkh6Q82xzR7ukW2QEXQMj1xItb7xSyg2IypogJHtXbfrF7+CbvZ1dqtkxBC0g1RoqRbNxxEznkvLobOWebIBxD/XHhRouTIkTrntdJKDxjgOj6EEBKIVlrp/Pw654N0rR7iF1CttNJFRfaLAwe6jg8hhETHolNaaaUPHYr3Tgm2QIME1KLshBCSVgTpVJCuBZPgcnYHD9Y5JUqUDBniNC6EEFIvFp2K2jAMpoECWquztbpvAS+TODeeEJI+4O37TTfhqE8f/1Wz+lIjPMLrHJ2jc8wP7t/vv9qkCew997gNFyGE1EKUKBk+HAeRCynv2ePXtdhJfEV6UaKksLDOea200sZRQghJA6Lq0vbtid42cQHVSittEVCllFJjxjRqcAghpF7Gjq1zSpQoKShI9I4NbIFu2oSDq1f9F4cORZ9Du3ZO4kQIIUopvJMxix3ddZf/qtGtrVsTvX/CAoo+g5ISHO3Y4b/atCkEdty4xg8Z8SFKlFy6lNofuXDBdTITw5TfVBHWuGQa48fDRvZ9FhRAxxKvH0nalXP16jqntNJKT5zYaDEidrTSSu/dm7L7ixIlKbx/Skm132GNSwahlVZ6wgT7xTVrXLtX3UTOzxcr58/jOvdMcgXyoVcv2MpKSSqeh/wN36gL+G+6mjwvuXG5cgVxCVoujaQa5ENuLmxJiT2f+vd37WeEw4cP2x1lS9Q1qNDPPps87RRPvJdfdp2uBsdFREReeSW5AvqDH7hOV7aDfJg82V5u//EP1/4FODx3rr1ALVni2j8CkB/PPAN7+XJ8wnDtGuy8ebBmWbDwgnTk5MAuXAhbVRVfXCoqUDHnzHGdHgKQHytW2PPrxz9O1u8krQLAsX79cHT4sP9qSYlZRgqdtmVljRNGEgQKWI8e6CP67ndxduBA5FMtYdRKK/3Pf+L80qXIv3//27X/KYuLiIjccQeOHn0U6e7d2x8Psx6umZH31ltYBu30adf+ZzvIPzP658wZ2Nxc/6f69kV+xb/6UiMlYN8+u/LPmOHaP0JI5gKdmT3b/ui+Z49r/2JMwFNP2RMQOdyJEEKSB3Rm/357A27mTNf+xZiANm1gy8rsQjpokGs/CSGZgxkNYtebsjKjS679jDNBr79u/yfgSyVCSPKArvzpT3a9WbzYtX/xJ8gTT7wBA6r/BiLG2VVW4nr37q79JISEF+hJz56wV69m3BMvUrF2rf2fYcEC1/4RQsILdCRoHK9lhmTYwD/AAw/YE1haiusdO7r2kxASHqAfXbrAlpfb9SUDVoVDQrQ2wwjsCV240LWfhJDwAN1YtMiuJ7t2ufYvRQmeODH6WzLuK08ICcZMAIF4WGbSVT/xuvYzdQEQEZHCQvs/x69/7do/Qkj6Ap148027fmzb5tq/RgrA6NH2AFy9at7eu/aTEJI+QBfuvhs6EbRWwciRrv1svICIiMif/2xvgm/Y4No/Qoh7at6hVLcw7cL57ruu/Wz8wHjiiXf77YF9GSIiMnmyaz8JIe6ADkyfbteHigrY225z7afjAP3sZ/YAnTkDy72VCMkmzPBG1P9z5+xPqi+84NpP5yAaLVogIJ98YhfS3/7WtZ+EkMYD9X7ZMrseHD0KvWjVyrWfaQMC8vWv2wNmpoJatiUlhGQM0IFJkyQITzzx7r/ftZ9pC6K0dKk9eqdOweblufaTEJI8IIw334z6/d//2us/FyGqF9PnCXv8uD2QK1e69pMQ0nBQn81b9r/8hQ2nJIGAjRkDaxn35Ykn3pNPuvaTEJI40Tc7NPV+9GjXfoYWBPjFF+0BNtv0Dh/u2k9CSOwYYYS1LEMnIlytLQmYfeUR0O3b7YE+ccL0obj2lxASjFkHGPX2s8/s9bmgAJ+74QbX/mYMCGy3btE7mbdsQeCbNXPtLyHkOqifLVrA7t5tr7/FxbBdu7r2N2NBgIcNg71yxZ4RZmn/8O9bTkiYQT3MyYFdudJeX80aGPfd59rfrAGBf/ppicq8ea79JCSbQT385S8DqyhfBrsFGfDzn0fPoGefde0nIdkEKt+PfhS9gcOF1J3jf0R4550AFfUgpI8/7tpfQjIZ1LM5c6I3aFasMPXWtb+kGmRI8+bIoPXr7bl37RrstGmu/SUkk0C9e+KJmgaLVTjXreNL3jQHuWXe9m3ZYhfSqiq2SAlpOKhPs2bV1Csr27dz8Y+QgQxr2xYZGDRswjzaz5nj2l9CwkRsfZy7d5t66NpfkiB+IQ1a0dowbx4shz8RUhvUiyZNYIP2YTds20bhzDD8j/Zr10YvAOZlVG6ua78JcYm/3li24Kl5mBNPvE2b+Kie4SC3mzf3C2UQW7dyiijJRvxTLoO6wOT6W3W+HMouzKM67Ny50YXULKc1dKhrvwlJJWZGEMq7mVoZhHmU53CkrAcF4amnYINWhzGb3z39tGt/CUkG/obED38YvfxXVnLmEIkKCsiIESgwZlO7IN5/H5/v0MG134TEg38F+KCFjA1nz8KOGePabxISUGC6doUtLIxewE6f5l4tJAz49xwywhhEQYGpB679JiHFvx6p2X45aMCwmYGxeDHsTTe59p9kN/6WZtAulwZTrhcs4HqcJCWggJmVtE+ejF4gi4tREB95xLXfJDtAuTN9mtOnw1r2Vfdx4gTsqFGu/SdZAgpc+/awQbuI1m6ciifehg2w+fmu/SeZBcrV3XejsAXt3BDJW2/xSYmkBSjADzyAAvnpp9ELrlnU5NVXYTt3du0/CRcob7fcgvKzZIn/ETzoD/yTT9hXT9IalNaWLWv6kkTk+vCnIMrLazbP41t9YgHlxLzU/NWvYitXFRUoTy+8gOMWLVyng5C4QMH90pdgg7Y0iKSkBNa8tOrWzXU6SOOCfO/VC3bRItgvvqi36Hjiiffeezi47TbX6SAkqaBgjxoFa4aJ1IfZ+8n0WQ0e7DodJLlA+O69F/m7fDms6eqpD7NIzsiRrtNBSKOCijNuHCrArl2xVRjD3r2wM2fiPq1bu04PiY5/dTCTb/v3x5zlnnji7dxpxnO6Tg8haYVfUNesqa41Xmy1q7QUdulS3Oehh8w4VtfpyjaQD7m5sJMn+7eyiOFR3Jfvq1fDjh3rOl2EhAoz7AkVaPFiHJeVxddS/d//YM3b2ilTYDl8paHUDFT3xBPv0UcR17ff9v+hxYr5vMnnAQNcp4+QjAIVq00bs6gD7J498VVUg+ljM1NVn3sOdvx48zuu0+saxKN9e/8UyIUL/XGPMnwoKmaZOHbBhBWuvJ4hoCL26YOjqVNhp0yB7dcvsbtWVcEePgx74ABsUZESJUoOHVJaaaUPH9Zaa63PnHEdh9jipDX8794d/vfvj6uDBsGaiQ5DhsD27Qub6E4FJn4rVhiLeB054joepGFQQDMcCIYRiAcfhB0/HnbECNhkzXm+fBn26NEaK0qUnD4NoTp7FufPn8f58+dxXFEBe+GC/35XrviPmzXDfZo2xfdbt8Zxy5a4npcHa8bRduwI2707bK9esLfeWnO/pFBZCX8KCnC8Zg38WrUKQvnxx8n5HZJuUECzFP8j46hRqPBGUIcNg/3KV2CbN3ftr1vMH8PevbCFhRDMwkIcb96sc3SOziktde0paVwooMSKf4uG/HwIbK1HXFGixJw3XQddusCm+6Z8IrBnziAdR44gHUVFOP/3v+P8wYM4PnQIAllZ6dpzkl6keUEnYaFGcLXSSvfsCQHq2RPHRlgtj9iiREmtl1VaaaVbt8b5pk39569dw/nIlt6lS7Cff47Pma4B01VQXIxj07Vw/DgEMbKLgBBCCCGEEEIIIYQQQgghhBBCGsj/AW6I3epCxYCDAAAAJXRFWHRkYXRlOmNyZWF0ZQAyMDE3LTEyLTI4VDE0OjA0OjI0KzA4OjAwjt9zqwAAACV0RVh0ZGF0ZTptb2RpZnkAMjAxNy0xMi0yOFQxNDowNDoyNCswODowMP+CyxcAAABadEVYdHN2ZzpiYXNlLXVyaQBmaWxlOi8vL2hvbWUvYWRtaW4vaWNvbi1mb250L3RtcC9pY29uX2J2cmMwYzBscmp0YzV3bWkvJUU2JTlBJTgyJUU1JTgxJTlDLnN2ZwIcpRYAAAAASUVORK5CYII="
- /***/ }),
- /***/ "./src/assets/images/time.png":
- /*!************************************!*\
- !*** ./src/assets/images/time.png ***!
- \************************************/
- /*! dynamic exports provided */
- /*! all exports used */
- /***/ (function(module, exports) {
- module.exports = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwEAYAAAAHkiXEAAAABGdBTUEAALGPC/xhBQAAAAFzUkdCAK7OHOkAAAAgY0hSTQAAeiYAAICEAAD6AAAAgOgAAHUwAADqYAAAOpgAABdwnLpRPAAAAAZiS0dEAAAAAAAA+UO7fwAAAAlwSFlzAAAASAAAAEgARslrPgAAChZJREFUeNrtm3tMU9cfwL/ftqB0oMHwEF9LXIzDgWSKwW7gSgfNIMrmGmRmGVMZsuyFLCBxWJdNHRAM7iEzk2yJbuJkYTKNimB7LhREYTjHQw3LgDHJkvHaqAqV9n73x/3dMt2P2ELh7tHPP825Ped8v+f7Peee1/cCuHHjxo0bN24kAaVW4F7q59fPr5/v5TVsHjYPm1UqfA1fw9dUKtgLe2FvcDDoQAe6efOgDMqgbNYse0Ed6EA3NARPwVPwVE8PdEEXdF2/TgfoAB2or/fy8fLx8qmvV/WoelQ9w8NSt1NEcgcwYsRIrRZSL72ET+KT+OT69aQnPemVSpc1dDfuxt23b5OBDGQ4cYKsZCVrcbHGQ+Oh8aiulqr90+4AQ4OhwdDw2GOy/bL9sv379sFW2ApbVSp7BjWoQd3fD8VQDMVnz0IqpEJqdTVdpat0taXF+pz1OetznZ0ezR7NHs23b4vFRpePLh9drlQKzxcvxiN4BI+EhlIyJVPyE09gLMZibFwc5VAO5cyZc7e8ujohkZkZjdEYjRcv/mscIL5SRrJHskeyCwuhD/qgLy0NoiEaohHxA/wAP2hooBN0gk4UFPSW9pb2lp48uSFpQ9KGpDt3XKXHmfYz7WfaZ8xQ9ih7lD0JCTRIgzS4fTv4gi/4hoeDHvSg53kwgQlMBw8KpUSHjIxMtZ1cjmHAMGAYePBBlsJSWEpzM2OMMUbEzrKz7OzPPzMVUzGVTie1nsZ3je8a392wQXgV3rhh15MYMbpypSa8JrwmfOFCqfV0mOrC6sLqwuDg/9+g8nKTyWQymXx9pdbzXiq6K7oruufMYZ+zz9nnp079pcMQI0YPPyy1nuNSVVlVWVW5aJFd4bsM//77b9Pb9DbJZFLreT9EPdkitogt+vBDezveYG+wN7q7hfYsWCC1nnbEdyv3NPc093RTk6gw9zr3Ovd6UZHU+k0WsQPd3aG+/VZst9T6/UVBbiO3kdt4+vRU9XhBnp8fy2JZLCs72/77v+eulmcfEcSIUUXF3Y7Yt2+y9U94FWQ0Go1G48qVGI3RGH3pkvC0r0/4DQkRVg9i2nUIk+Yjj2AURmFUa6v4nExkIlNIiGaXZpdmV1ubq+VWhlaGVoYGBHhoPbQe2tZWiId4iPf1pR7qoZ7wcE2yJlmT/P33ztY74R4qLB9zc4EDDji5HMuxHMuzsqbK8FKjbdG2aFt+/RVX4SpclZ0NMpCBTKHA43gcj+fmTrRepx0g9nzYBttgW2yssJFpa2PPsGfYM0ePSm2oqYYlsSSWdPgw3ISbcPP6dciETMiMi6teV72uet2jjzpbn9MOwK24FbempIhp+oa+oW8KC9/Bd/Ad5HmpDTTViO3EARzAgcJC8Tmv4TW8ZssWZ+tz2AH2SbUIiqAoMVE8W/F83PNxz8e/+kpqw0w3o0GjQaNBpaVgAxvYRkaEN0JiIhERETo8tzrsAE2CJkGTEBYGnuAJnn5+EAiBEMhxkf6R/pH+ZrPUBpluYrWx2ljt779jMRZjcU2NMBcGBhojjBHGiNBQR+tx2AH8Sf4kfzIiQkxTCZVQickktSGkhi/mi/nisdNUzMM8zFu92tHyTs4BY1txbMM2bHP9cu+fBvqgD/pcvSqmZadlp2Wnly51tLzDDsDNuBk3BwWJaf4yf5m/3N0ttQGkRpYgS5Al/PSTmKZltIyWzZvnaHmFw5IsYAGLt7c9nQ/5kH/zptQGEEE96lGfkcH0TM/0k9+HKGoVtYra/PyoqKioqKjBwfHy2TpsHbaOoSEEBAQAPI/n8fyfburuJ8fRjBRP8RQ/tsyU75fvl++XyUALWtBOoWUdhQMOuLHl8WSx7LTstOw8dEhIje8APovP4rPkcjnIQQ4ANEADNGCzOSrH8RHwMXwMH5vN8B68B+8B2BQ2hU3huKddBX+OP8efGx6W6+V6ub6paarkYCqmYqrFAnVQB3Xj5/M44HHA48Ds2XwBX8AXAEAFVEDF0BCIQ+I+OO6AC3ABLnR3Cz0NQIYylOHixcKfU2eIe4mpi6mLqevoEBoYHj5dcseDb+Qb+caHHhLtgjmYgzljc8L9cHwVpAMd6K5dE5PC4dfy5VIbQGoEg/9p3b8KVsGq69cdLe+4A8qgDMrqxgZjMARDsBjN8N+FVtAKWqHRiGlUoxrVtbVTJpCL4+K4uB9/FM7DrdaawprCmsKx5el/BfFmjEWySBZps7GX2cvs5fZ2Z+tx+jCOVKQiVUmJeAxty7Bl2DJefFFqg0w3ZCYzmZOTYTfsht0yGRyEg3CwpMTZepy/D9CDHvSffgoGMIBhdBTOwTk4l54uhp9IbZip5tSKUytOrVAqZTqZTqZLTxftYK2yVlmrPvvM2fqcdoBw4dLVBQtgASw4ehRmwAyYMXeuJc2SZknLzJTaQFONz1qftT5rs7PpLXqL3goIgCAIgqDDh4XDOedPBiZ+Z5sGaZCm1wvrXrOZRmiERnbsOG8+bz5vXrZMakO5GuGdHxJCa2gNrdm+HffgHtwzNCS3yC1yy65dE613wg4QRsKNGzAIgzC4YwfEQizEennJveXecu/S0tre2t7aXh8fqQ03WYToh1mzhA5XWgpykIN85kxaSAtp4fbta95c8+aaN3/5RTIFxQsI7gXuBe6FsjJ71MAxdowdq6r624RvOIk93CaRS+QSDQZ71McmbhO36fhxV8mZdNgIIiIi0Z0rd67cuZKcDP3QD/0XL8JcmAtzY2KUOcocZc6ZM/ae9DdHCDCbPdvrO6/vvL6rqKBX6BV6RaPBj/Aj/OjCBXOzudncvHmzq+S5LG5HiBq4dUsRqAhUBMbHiwqLDfBa4rXEa0lDg/GI8YjxSFiYNOYdH/FSXfG14mvF142NEAABEKBWC8HEtbXyDHmGPGPt2nWX111ed3ksKnuyuDxwSjy+NXeZu8xdsbHQAR3Q8eWXwr5h6VJsx3Zsb2wUJrW8PKlGhtjTWT7LZ/kFBXwYH8aHXboESZAESUuWwA/wA/zwxRczt83cNnObVnu/Y+m/PcZyY7mxfMsWLoaL4WL6++1zRSWrZJWDg2wv28v25uZOVRDs3UHDeXnC72+/3R3p1tfHnmXPsmenb2M57R9omB4wPWB6wN/flmpLtaXu3ElKUpIyNVVcRdkzinE3ndAJnRxHq2k1rW5pkfnL/GX+nZ0YgiEYMnYhRK3USq3e3pRLuZS7eDF8Ap/AJ+IhmVotjkB7w8UvZuIpnuIPHbL52fxsfnv2xGyK2RSzqb//X+uAexFD/jxTPFM8U55/npqoiZo2bhQMv3Klfas/UdSgBrXNhutxPa5vahI+BDl2TOGt8FZ4Hz0adSvqVtSt3l6p2i+5A8ZD/I7AGmmNtEZGRAihkMHBlE7plD5/Pr6Kr+KrY/sMKqIiKjKbhXw9PUK+a9eEq8VLl/7x73A3bty4cePGjWv5A++XZiUanSzcAAAAJXRFWHRkYXRlOmNyZWF0ZQAyMDE3LTEyLTI1VDExOjQxOjM0KzA4OjAwAOA6uQAAACV0RVh0ZGF0ZTptb2RpZnkAMjAxNy0xMi0yNVQxMTo0MTozNCswODowMHG9ggUAAABLdEVYdHN2ZzpiYXNlLXVyaQBmaWxlOi8vL2hvbWUvYWRtaW4vaWNvbi1mb250L3RtcC9pY29uX2R5MnlhMjNub3pwOHB2aS90aW1lLnN2Z2uSJuUAAAAASUVORK5CYII="
- /***/ }),
- /***/ "./src/assets/images/usericn_2x.png":
- /*!******************************************!*\
- !*** ./src/assets/images/usericn_2x.png ***!
- \******************************************/
- /*! dynamic exports provided */
- /*! all exports used */
- /***/ (function(module, exports) {
- module.exports = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAJYAAAAyCAYAAAC+jCIaAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAA3hpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuNi1jMTExIDc5LjE1ODMyNSwgMjAxNS8wOS8xMC0wMToxMDoyMCAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wTU09Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9tbS8iIHhtbG5zOnN0UmVmPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvc1R5cGUvUmVzb3VyY2VSZWYjIiB4bWxuczp4bXA9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC8iIHhtcE1NOk9yaWdpbmFsRG9jdW1lbnRJRD0ieG1wLmRpZDphZGVkNDMwOS1jZjk5LTQxMzctODk0MC05NjYwNjEwZmVlYTIiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6Qjk4QkZDRkFBMUM0MTFFNjhGQTQ5QkY2MTUwNUU2RDEiIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6Qjk4QkZDRjlBMUM0MTFFNjhGQTQ5QkY2MTUwNUU2RDEiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENDIDIwMTUgKE1hY2ludG9zaCkiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDphZGVkNDMwOS1jZjk5LTQxMzctODk0MC05NjYwNjEwZmVlYTIiIHN0UmVmOmRvY3VtZW50SUQ9InhtcC5kaWQ6YWRlZDQzMDktY2Y5OS00MTM3LTg5NDAtOTY2MDYxMGZlZWEyIi8+IDwvcmRmOkRlc2NyaXB0aW9uPiA8L3JkZjpSREY+IDwveDp4bXBtZXRhPiA8P3hwYWNrZXQgZW5kPSJyIj8+7C5auwAAC/NJREFUeNrsW3twVUcZ/+25yc07DI+ABRpCeAyvoWo74NRiiW0RqKHgOKQ8OrXUqqODTKuZ2ql2plpaSgUKHTUV6h9qkWAFCa3AWBIcrBooBDuE2kITwjClvBsSyOvmrN8+zjl7bvKPc28uc539Zk52z949e779zm+/124Y5xzxdGX2DFVhrJj+LgV4Gd1MYUAR9e6htrNUb6FnD1C9mq5m6kvdOBUMg+vqkSxqnXuXZoXB49WoS/7ovozup1BZRGUPlWc5eAsDO0Cl4o/Df1aQN9agvX9PjMH9Jd7ARqNX51p+IPnxKYBTRCXJj5+legvgHiC+qsGcZoDHPe+q6pdPIx2J9QussplCIGtoeoupjEgRGVNWde4J0GUKXD+i64xoSAGwiqm+hsrFVEZMxsx+oo3A5UpwccVfioAl5UdvIfmxSBg0JvAkuWpxcl9+/w/AcuIbrpbNXEDFcbqW0AeJiA9gioWrryI+mG7gju7bSH2XpIDnBfSu4/R68a6IAIq8EADGA49oo74OlUuorVHwmQr+CBQkP3dJ/6DSUuSuBx6H6qJvqvhLPbAIVKtoyjvpsxQwQ02xuMsEmFipSnexfKq/TtXHB5DfVQSQnfTCAsWDpzu5DygW0hz6G6rf81kK+KNL8+do8HAlJ1He+qi6pFAdU80KkOVTfaD5Sz2wyPxVkPg3hMAmJiyBoz4c9wDFtH5gLAQ00ZvKdQTQigHgtYKAIfmT4OFKI7HiMWB5+QGOiM+s5Y8g+9sr1W9am2kTKdhdJ8YaCP4g5UcaXILGA4yjVyQpr1EPAaMf0aByPYbNTyEmNlD8pR5YwqeiGW2Bsd656Qlo34WFBKHXmzSLqt0DFxVbrpTNKE4in8U0+hYBDAlw8c5oJrK/9wTy11fBGT4i5DdlLVuBrEUVKKj6LbJX/hAsKxr2K2ks7fgnjT9I+Tks8EKZ4ZmSmIfcDeSOAXJGgQ+9R4ueafAxwwyIMZLO383SWPwFEnY+Mz6OAgr3zR0MbRUCl2cKNfC0ViMVwl5MSnShzNsLNGi+708RqHJ/+hLFWCPQtqICbnNTEPHpb9S9649Aby+i8x9AzrNrgcyMAHw0FvVLCn9KGxF/cs6mCXYN35xo9HLDtf+G8ZvhqAdmXMmPpy+w2JXZM8YQ/03MMIGFr72OSOn4UEf31Em0PrY8pMkKq2sQ0dqi9+oVtC6a6/8oojEqSilCbEmEwWvzZtEyd5tIWTmePs0iTeUMHoKO55+hn1wjWuRyrRTuOSijyci4CQTAtXCGFqF79w50/GK9CQh6EKUUFSbEH2pLiD+HkO06SoSuXq880Fw51OULtdoE6iVa/xXg+qlwvzCJiZXintMtaamxaEoP6tKYUt+lwnlvyCcQ2qy1ohw9Rw7h+oYX0fq1ecaKY+bYiRKN4figcsaUIPrF2eh4eQ04aaSw0+74Dr24d5tO4fozlUBPD6L3L4RTMjboy6WvliT+uOOvy4xC0jeTgWFzyFFfAUwk8E97RYHqkx3Ax1uVfCaTFh37fWDkYmBoGXjuBIpx802Aka+WFP5uCmWo5F04nXBNaCYS/qDNv5OrXoCpfe1qHzPc00kjRyNj4iS0/7gyzhHl8nmmxk7I5HCZnA3clcy55eh6awd4W1sov+WXTjiD4n50Ct17diG64OuI0rOdVZuCeXCeMH/EV1nIGf38GwSsif2o3veAD54m1d5NMfdtpO4/qy5zKV7/kDTZHANcLHH+bpbGoilMM51vPxdE143Xqnzbn0ORlk4r+ILILV9IH+1N8M4OP0oMfAU53rTEXRg2zfQ1Mm+fidi/3umTNOUFBcgjs1dYUxuKEEWf7rq3/Wfj8l4J80dInhZy2I9R5Nd2Qv0mTN3JZ4F3F6irt1OZysPl4A3LgOaNQPtJ1bftfeDoMg/x3ujT0lVjieU9jIccxyDB2PPPg4g1vifr0S/NRqS4JABfJBOZ981Dx47tffLJzAcgL0qcRXeY+QLnlpFwz7b0yVflPv4UMmbcSTo4A7yrU8La6+M2faAmS89yHZToZZQE/viwkL7vPg80kAVrrQfyyE8d810S5Kd9Y+0b5DqNWkrabYLq21BB/S7rSNHXukXpDCzTkYpzIhk6fK3lIGvJQ/5qEkCL/ecE+PlzfaK4wB1liX82znRUzoxsv28mfcBl3D7DfyZW/46fGPUWgSx7YqGsfPIobp8v1k5AeRi4uJcERdiYtFrL1fH7sknPqd8u7lN9Y9cMR56Ho8W0dN45vyS1VD8JT/E31nAEPQ2H5V02aSjnllESXFnli9D1xh/iPrShuZRpvZiEdMMlM0flnvsYzriJXtrAB1xs31tSU/XU/RUdr/w8yLpTv8iYserZC5/4z+nxLiYB+ZeCRWnkr9wu4MQPVNph8Cz4SVPPOgydre4bn6C+3Qp0nAdmUKYr2MW0BZbYQ5N7apz3Aw5V79j8K1WJRJDz4HI4ZBJZfh4B7khob87PfQUgPZ4EHhtNhRA7ekhGeP5msv6x45cbcO2Be3FjLfk07ddCijc6+171bMO7Qb5LUeL8MafR0+h9DICI9ER76zFy2KcDxd+k61uq3npUSpkXTNKayfV3Ogw/9Xj6aiygNrRN423dGInR2PuN6P7HQeUAzytHzsOPouvPO0KC4P4WBjP9rbok8Fhr3nTv3S2BEiHTZ/pZfi5LmxxvG8cpLUV0/kKZ7+rZtzt4RpnXJPDn1gb6mhuJUVpwgz6nnXiK9u7YCYynqHD8U6p+XTntqo8Tl3H163VpCyy6qpk6+qLB1DdVJ+47fvOqFJoTjSJ6x0z07N+LkKej0GiaUpENq04Cj2IM14sAe5ub0LWnBrk/WY2Mu+42zVqfs1ZsbCnyfraeVkMmuv6ySz7r7XtS4VKZBP5YdeAMmYuLRFt4m2oWuSq3BzizWV1ujNr0dqDs4yVVWbBxrRLM1WkLrCF19adpGtu5t4rBQuaNa+j0nvoQXXX7ZVtnzZ/gdnaGzCX0dorhaWwXYyeBx9M02HYzEdr56kb0njiO3KefQ97z65B55yw4wyg4y4yAZWchMnEysr+zCgWbtsAZOgyxfx9B1683hQIAqm+XYyeDP5prOCbW4Cicrpou/w04fD9wipz4k6vBD89XbYLyp/uJ9sCkSh8rWfzdFJKbulfLZhYLNxJyv5D12WDwvK/IrSUo3PJ7fLpsEXDpUiiA9pOU6r6d7qcOOXDoTKIM6oN+xdLXgtovVDY5AzmPrUTmVxea4XmcY+2S6XwTnVUvg3d3m9Gg5I/KMwkf9KstNfgTR1/0to4TJZNHAcVHL4FdfhvBviALNFTRHGBcJVBPQOPdWppyLhRWupK/tD9BSuAS2wdb5dES45hxCDxBzl3liQwQGmAUIy4lbbUtGQx6J0ihtoe2Ms2U2iCneKJkLDLnLkAmmWfnMyPBYzG458+h99gRAlUN3NPN4SPNyokUx4Ulf0kCluBI8ifzI0yfxTJPLgRhanjPMN7p4K7YPiD+XCW/NAVWhlcZTEC4UjZjBAljvT4V2n8evF8nM5QJq0wWqOJoGwFD7HivJ6DIvUPOyFFqOS1NY2eVkYlnYfAbvheneiW1Dwh/9FYlP3kmS2fQ+zisxnGaEMg8jx+VHujTmUKzGlJ3aCPNbREJvy10djw4axWXTIWxFcTbqVzO1EG6gSLiD2SH0eanR8xj0v0sA+NMP5kXiLMrKeCPtfkg8pLOfp4rLgMftKWCv5uUeVfgqtF7fEJDuOZ2j7mX6J0sFX1kX7CpTJiCgacaCP4YrWquo0WEz4d52kqDytUaYCpSyR/YNvnu0GlSU+zcA16q+UutKYyjM+IfI+gjPcn0vy8JZ5fuh+uvd0E4q/QB66hdRC9N8eAbYBJBwRLCz5MQ/HGUEW9TiZfhGlwXiLdGgladjv6aUixXxR+IP+4uJYbEv88J4AzXErqg/3miju5vBn+pc94tWRpQU2jJkgWWJQssSxZYlixZYFmywLJkgWXJkgWWJQssSxZYlixZYFmywLJkgWXJkgWWJQssSxZYlixZYFmywLJkgWXJkgWWJQssSxZYlixZYFmywLJkgWXJ0v9C/xVgAOJxA9sU/5U5AAAAAElFTkSuQmCC"
- /***/ }),
- /***/ "./src/index.css":
- /*!***********************!*\
- !*** ./src/index.css ***!
- \***********************/
- /*! dynamic exports provided */
- /***/ (function(module, exports, __webpack_require__) {
- // style-loader: Adds some css to the DOM by adding a <style> tag
- // load the styles
- var content = __webpack_require__(/*! !../node_modules/css-loader??ref--1-oneOf-2-1!../node_modules/postcss-loader/lib??postcss!./index.css */ "./node_modules/css-loader/index.js?{\"importLoaders\":1}!./node_modules/postcss-loader/lib/index.js?{\"ident\":\"postcss\"}!./src/index.css");
- if(typeof content === 'string') content = [[module.i, content, '']];
- // Prepare cssTransformation
- var transform;
- var options = {"hmr":true}
- options.transform = transform
- // add the styles to the DOM
- var update = __webpack_require__(/*! ../node_modules/style-loader/lib/addStyles.js */ "./node_modules/style-loader/lib/addStyles.js")(content, options);
- if(content.locals) module.exports = content.locals;
- // Hot Module Replacement
- if(true) {
- // When the styles change, update the <style> tags
- if(!content.locals) {
- module.hot.accept(/*! !../node_modules/css-loader??ref--1-oneOf-2-1!../node_modules/postcss-loader/lib??postcss!./index.css */ "./node_modules/css-loader/index.js?{\"importLoaders\":1}!./node_modules/postcss-loader/lib/index.js?{\"ident\":\"postcss\"}!./src/index.css", function() {
- var newContent = __webpack_require__(/*! !../node_modules/css-loader??ref--1-oneOf-2-1!../node_modules/postcss-loader/lib??postcss!./index.css */ "./node_modules/css-loader/index.js?{\"importLoaders\":1}!./node_modules/postcss-loader/lib/index.js?{\"ident\":\"postcss\"}!./src/index.css");
- if(typeof newContent === 'string') newContent = [[module.i, newContent, '']];
- update(newContent);
- });
- }
- // When the module is disposed, remove the <style> tags
- module.hot.dispose(function() { update(); });
- }
- /***/ }),
- /***/ "./src/index.js":
- /*!**********************!*\
- !*** ./src/index.js ***!
- \**********************/
- /*! no exports provided */
- /*! all exports used */
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
- "use strict";
- Object.defineProperty(__webpack_exports__, "__esModule", { value: true });
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react__ = __webpack_require__(/*! react */ "./node_modules/react/index.js");
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_react__);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_react_dom__ = __webpack_require__(/*! react-dom */ "./node_modules/react-dom/index.js");
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_react_dom___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_react_dom__);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_react_redux__ = __webpack_require__(/*! react-redux */ "./node_modules/react-redux/es/index.js");
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__redux_store__ = __webpack_require__(/*! ./redux/store */ "./src/redux/store.js");
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__router_index__ = __webpack_require__(/*! ./router/index */ "./src/router/index.js");
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__index_css__ = __webpack_require__(/*! ./index.css */ "./src/index.css");
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__index_css___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_5__index_css__);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_6__assets_css_common_css__ = __webpack_require__(/*! ./assets/css/common.css */ "./src/assets/css/common.css");
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_6__assets_css_common_css___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_6__assets_css_common_css__);
- var _jsxFileName = 'D:\\react\\nbjk-h5\\src\\index.js';
- /* css */
- __WEBPACK_IMPORTED_MODULE_3__redux_store__["a" /* default */].subscribe(function () {
- console.log(__WEBPACK_IMPORTED_MODULE_3__redux_store__["a" /* default */].getState());
- });
- __WEBPACK_IMPORTED_MODULE_1_react_dom___default.a.render(__WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(
- __WEBPACK_IMPORTED_MODULE_2_react_redux__["a" /* Provider */],
- { store: __WEBPACK_IMPORTED_MODULE_3__redux_store__["a" /* default */], __source: {
- fileName: _jsxFileName,
- lineNumber: 18
- },
- __self: this
- },
- __WEBPACK_IMPORTED_MODULE_4__router_index__["a" /* default */]
- ), document.getElementById('root'));
- /***/ }),
- /***/ "./src/redux/actionTypes.js":
- /*!**********************************!*\
- !*** ./src/redux/actionTypes.js ***!
- \**********************************/
- /*! exports provided: IS_SHOW_COVER_PAGE, IS_SHOW_MENU, IS_PLAY */
- /*! exports used: IS_PLAY, IS_SHOW_COVER_PAGE, IS_SHOW_MENU */
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
- "use strict";
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return IS_SHOW_COVER_PAGE; });
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "c", function() { return IS_SHOW_MENU; });
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return IS_PLAY; });
- /*
- *
- * actionTypes by wuwc on 2017-12-21
- *
- * */
- var IS_SHOW_COVER_PAGE = "IS_SHOW_COVER_PAGE";
- var IS_SHOW_MENU = "IS_SHOW_MENU";
- var IS_PLAY = "IS_PLAY";
- /***/ }),
- /***/ "./src/redux/reducers.js":
- /*!*******************************!*\
- !*** ./src/redux/reducers.js ***!
- \*******************************/
- /*! exports provided: default */
- /*! exports used: default */
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
- "use strict";
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__actionTypes__ = __webpack_require__(/*! ./actionTypes */ "./src/redux/actionTypes.js");
- /*
- *
- * reducers by wuwc on 2017-12-21
- *
- * */
- var initialState = {
- isShowCoverPage: false,
- isShowMenu: false,
- isPlay: true
- };
- /* a状态的reducer, 通过此reducer改变a的状态 */
- var a = function a() {
- var isShowCoverPage = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : initialState.isShowCoverPage;
- var action = arguments[1];
- switch (action.type) {
- case __WEBPACK_IMPORTED_MODULE_0__actionTypes__["b" /* IS_SHOW_COVER_PAGE */]:
- return action.isShowCoverPage;
- default:
- return isShowCoverPage;
- }
- };
- /* b状态的reducer, 通过此reducer改变b的状态 */
- var b = function b() {
- var isShowMenu = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : initialState.isShowMenu;
- var action = arguments[1];
- switch (action.type) {
- case __WEBPACK_IMPORTED_MODULE_0__actionTypes__["c" /* IS_SHOW_MENU */]:
- return action.isShowMenu;
- default:
- return isShowMenu;
- }
- };
- var isPlay = function isPlay() {
- var isPlay = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : initialState.isPlay;
- var action = arguments[1];
- switch (action.type) {
- case __WEBPACK_IMPORTED_MODULE_0__actionTypes__["a" /* IS_PLAY */]:
- return action.isPlay;
- default:
- return isPlay;
- }
- };
- /* harmony default export */ __webpack_exports__["a"] = ({ a: a, b: b, isPlay: isPlay });
- /***/ }),
- /***/ "./src/redux/store.js":
- /*!****************************!*\
- !*** ./src/redux/store.js ***!
- \****************************/
- /*! exports provided: default */
- /*! exports used: default */
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
- "use strict";
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_redux__ = __webpack_require__(/*! redux */ "./node_modules/redux/es/index.js");
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_redux_thunk__ = __webpack_require__(/*! redux-thunk */ "./node_modules/redux-thunk/es/index.js");
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__reducers__ = __webpack_require__(/*! ./reducers */ "./src/redux/reducers.js");
- /*
- *
- * store by wuwc on 2017-12-21
- *
- * */
- var store = Object(__WEBPACK_IMPORTED_MODULE_0_redux__["d" /* createStore */])(Object(__WEBPACK_IMPORTED_MODULE_0_redux__["c" /* combineReducers */])(__WEBPACK_IMPORTED_MODULE_2__reducers__["a" /* default */]), Object(__WEBPACK_IMPORTED_MODULE_0_redux__["a" /* applyMiddleware */])(__WEBPACK_IMPORTED_MODULE_1_redux_thunk__["a" /* default */]));
- /* harmony default export */ __webpack_exports__["a"] = (store);
- /***/ }),
- /***/ "./src/router/index.js":
- /*!*****************************!*\
- !*** ./src/router/index.js ***!
- \*****************************/
- /*! exports provided: default */
- /*! exports used: default */
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
- "use strict";
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react__ = __webpack_require__(/*! react */ "./node_modules/react/index.js");
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_react__);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_react_router_dom__ = __webpack_require__(/*! react-router-dom */ "./node_modules/react-router-dom/es/index.js");
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__utils_asyncComponent__ = __webpack_require__(/*! ../utils/asyncComponent */ "./src/utils/asyncComponent.js");
- var _jsxFileName = 'D:\\react\\nbjk-h5\\src\\router\\index.js',
- _this = this;
- /*
- *
- * router by wuwc 2017-12-20
- *
- * */
- var routes = [{
- path: '/',
- exact: true,
- component: Object(__WEBPACK_IMPORTED_MODULE_2__utils_asyncComponent__["a" /* asyncComponent */])(function () {
- return __webpack_require__.e/* import() */(0/* duplicate */).then(__webpack_require__.bind(null, /*! ../views/videoKindList/videoKindList */ "./src/views/videoKindList/videoKindList.js"));
- })
- }, {
- path: '/videoKindList',
- exact: true,
- component: Object(__WEBPACK_IMPORTED_MODULE_2__utils_asyncComponent__["a" /* asyncComponent */])(function () {
- return __webpack_require__.e/* import() */(0/* duplicate */).then(__webpack_require__.bind(null, /*! ../views/videoKindList/videoKindList */ "./src/views/videoKindList/videoKindList.js"));
- })
- }, {
- path: '/videoList',
- exact: true,
- component: Object(__WEBPACK_IMPORTED_MODULE_2__utils_asyncComponent__["a" /* asyncComponent */])(function () {
- return __webpack_require__.e/* import() */(1).then(__webpack_require__.bind(null, /*! ../views/videoList/videoList */ "./src/views/videoList/videoList.js"));
- })
- }, {
- path: '/login',
- exact: true,
- component: Object(__WEBPACK_IMPORTED_MODULE_2__utils_asyncComponent__["a" /* asyncComponent */])(function () {
- return __webpack_require__.e/* import() */(2).then(__webpack_require__.bind(null, /*! ../views/login/login */ "./src/views/login/login.js"));
- })
- // {
- // path: '/play/:songId',
- // exact: false,
- // component: asyncComponent(() => import('../containers/Play'))
- // }
- }];
- /* 本地环境使用BrowserRouter, 线上环境使用HashRouter */
- var Router = true ? __WEBPACK_IMPORTED_MODULE_1_react_router_dom__["a" /* BrowserRouter */] : HashRouter;
- var RouterConfig = __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(
- Router,
- {
- __source: {
- fileName: _jsxFileName,
- lineNumber: 43
- },
- __self: this
- },
- __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(
- __WEBPACK_IMPORTED_MODULE_1_react_router_dom__["d" /* Switch */],
- {
- __source: {
- fileName: _jsxFileName,
- lineNumber: 44
- },
- __self: this
- },
- routes.map(function (route, index) {
- return __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_1_react_router_dom__["c" /* Route */], {
- key: index,
- path: route.path,
- exact: route.exact,
- component: route.component,
- __source: {
- fileName: _jsxFileName,
- lineNumber: 47
- },
- __self: _this
- });
- }),
- __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_1_react_router_dom__["b" /* Redirect */], { from: '', to: '/', __source: {
- fileName: _jsxFileName,
- lineNumber: 55
- },
- __self: this
- })
- )
- );
- /* harmony default export */ __webpack_exports__["a"] = (RouterConfig);
- /***/ }),
- /***/ "./src/utils/asyncComponent.js":
- /*!*************************************!*\
- !*** ./src/utils/asyncComponent.js ***!
- \*************************************/
- /*! exports provided: asyncComponent */
- /*! exports used: asyncComponent */
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
- "use strict";
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return asyncComponent; });
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react__ = __webpack_require__(/*! react */ "./node_modules/react/index.js");
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_react__);
- var _jsxFileName = 'D:\\react\\nbjk-h5\\src\\utils\\asyncComponent.js';
- var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
- function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
- function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
- function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
- /**
- * Created by Administrator on 2017/11/13.
- */
- var asyncComponent = function asyncComponent(loadComponent) {
- return function (_React$Component) {
- _inherits(AsyncComponent, _React$Component);
- function AsyncComponent() {
- var _ref;
- var _temp, _this, _ret;
- _classCallCheck(this, AsyncComponent);
- for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {
- args[_key] = arguments[_key];
- }
- return _ret = (_temp = (_this = _possibleConstructorReturn(this, (_ref = AsyncComponent.__proto__ || Object.getPrototypeOf(AsyncComponent)).call.apply(_ref, [this].concat(args))), _this), _this.state = {
- Component: null
- }, _temp), _possibleConstructorReturn(_this, _ret);
- }
- _createClass(AsyncComponent, [{
- key: 'componentWillMount',
- value: function componentWillMount() {
- var _this2 = this;
- if (this.hasLoadedComponent()) {
- return;
- }
- loadComponent().then(function (module) {
- return module.default;
- }).then(function (Component) {
- _this2.setState({ Component: Component });
- }).catch(function (err) {
- console.error('Cannot load component in <AsyncComponent />');
- throw err;
- });
- }
- }, {
- key: 'hasLoadedComponent',
- value: function hasLoadedComponent() {
- return this.state.Component !== null;
- }
- }, {
- key: 'render',
- value: function render() {
- var Component = this.state.Component;
- return Component ? __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(Component, Object.assign({}, this.props, {
- __source: {
- fileName: _jsxFileName,
- lineNumber: 34
- },
- __self: this
- })) : null;
- }
- }]);
- return AsyncComponent;
- }(__WEBPACK_IMPORTED_MODULE_0_react___default.a.Component);
- };
- /***/ }),
- /***/ 0:
- /*!********************************************************************************************************!*\
- !*** multi ./config/polyfills.js ./node_modules/react-dev-utils/webpackHotDevClient.js ./src/index.js ***!
- \********************************************************************************************************/
- /*! dynamic exports provided */
- /*! all exports used */
- /***/ (function(module, exports, __webpack_require__) {
- __webpack_require__(/*! D:\react\nbjk-h5\config\polyfills.js */"./config/polyfills.js");
- __webpack_require__(/*! D:\react\nbjk-h5\node_modules\react-dev-utils\webpackHotDevClient.js */"./node_modules/react-dev-utils/webpackHotDevClient.js");
- module.exports = __webpack_require__(/*! D:\react\nbjk-h5\src\index.js */"./src/index.js");
- /***/ })
- /******/ });
- //# sourceMappingURL=bundle.js.map
|