vendors-node_modules_taro_weapp_prebundle_taro-ui_js.js 327 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648264926502651265226532654265526562657265826592660266126622663266426652666266726682669267026712672267326742675267626772678267926802681268226832684268526862687268826892690269126922693269426952696269726982699270027012702270327042705270627072708270927102711271227132714271527162717271827192720272127222723272427252726272727282729273027312732273327342735273627372738273927402741274227432744274527462747274827492750275127522753275427552756275727582759276027612762276327642765276627672768276927702771277227732774277527762777277827792780278127822783278427852786278727882789279027912792279327942795279627972798279928002801280228032804280528062807280828092810281128122813281428152816281728182819282028212822282328242825282628272828282928302831283228332834283528362837283828392840284128422843284428452846284728482849285028512852285328542855285628572858285928602861286228632864286528662867286828692870287128722873287428752876287728782879288028812882288328842885288628872888288928902891289228932894289528962897289828992900290129022903290429052906290729082909291029112912291329142915291629172918291929202921292229232924292529262927292829292930293129322933293429352936293729382939294029412942294329442945294629472948294929502951295229532954295529562957295829592960296129622963296429652966296729682969297029712972297329742975297629772978297929802981298229832984298529862987298829892990299129922993299429952996299729982999300030013002300330043005300630073008300930103011301230133014301530163017301830193020302130223023302430253026302730283029303030313032303330343035303630373038303930403041304230433044304530463047304830493050305130523053305430553056305730583059306030613062306330643065306630673068306930703071307230733074307530763077307830793080308130823083308430853086308730883089309030913092309330943095309630973098309931003101310231033104310531063107310831093110311131123113311431153116311731183119312031213122312331243125312631273128312931303131313231333134313531363137313831393140314131423143314431453146314731483149315031513152315331543155315631573158315931603161316231633164316531663167316831693170317131723173317431753176317731783179318031813182318331843185318631873188318931903191319231933194319531963197319831993200320132023203320432053206320732083209321032113212321332143215321632173218321932203221322232233224322532263227322832293230323132323233323432353236323732383239324032413242324332443245324632473248324932503251325232533254325532563257325832593260326132623263326432653266326732683269327032713272327332743275327632773278327932803281328232833284328532863287328832893290329132923293329432953296329732983299330033013302330333043305330633073308330933103311331233133314331533163317331833193320332133223323332433253326332733283329333033313332333333343335333633373338333933403341334233433344334533463347334833493350335133523353335433553356335733583359336033613362336333643365336633673368336933703371337233733374337533763377337833793380338133823383338433853386338733883389339033913392339333943395339633973398339934003401340234033404340534063407340834093410341134123413341434153416341734183419342034213422342334243425342634273428342934303431343234333434343534363437343834393440344134423443344434453446344734483449345034513452345334543455345634573458345934603461346234633464346534663467346834693470347134723473347434753476347734783479348034813482348334843485348634873488348934903491349234933494349534963497349834993500350135023503350435053506350735083509351035113512351335143515351635173518351935203521352235233524352535263527352835293530353135323533353435353536353735383539354035413542354335443545354635473548354935503551355235533554355535563557355835593560356135623563356435653566356735683569357035713572357335743575357635773578357935803581358235833584358535863587358835893590359135923593359435953596359735983599360036013602360336043605360636073608360936103611361236133614361536163617361836193620362136223623362436253626362736283629363036313632363336343635363636373638363936403641364236433644364536463647364836493650365136523653365436553656365736583659366036613662366336643665366636673668366936703671367236733674367536763677367836793680368136823683368436853686368736883689369036913692369336943695369636973698369937003701370237033704370537063707370837093710371137123713371437153716371737183719372037213722372337243725372637273728372937303731373237333734373537363737373837393740374137423743374437453746374737483749375037513752375337543755375637573758375937603761376237633764376537663767376837693770377137723773377437753776377737783779378037813782378337843785378637873788378937903791379237933794379537963797379837993800380138023803380438053806380738083809381038113812381338143815381638173818381938203821382238233824382538263827382838293830383138323833383438353836383738383839384038413842384338443845384638473848384938503851385238533854385538563857385838593860386138623863386438653866386738683869387038713872387338743875387638773878387938803881388238833884388538863887388838893890389138923893389438953896389738983899390039013902390339043905390639073908390939103911391239133914391539163917391839193920392139223923392439253926392739283929393039313932393339343935393639373938393939403941394239433944394539463947394839493950395139523953395439553956395739583959396039613962396339643965396639673968396939703971397239733974397539763977397839793980398139823983398439853986398739883989399039913992399339943995399639973998399940004001400240034004400540064007400840094010401140124013401440154016401740184019402040214022402340244025402640274028402940304031403240334034403540364037403840394040404140424043404440454046404740484049405040514052405340544055405640574058405940604061406240634064406540664067406840694070407140724073407440754076407740784079408040814082408340844085408640874088408940904091409240934094409540964097409840994100410141024103410441054106410741084109411041114112411341144115411641174118411941204121412241234124412541264127412841294130413141324133413441354136413741384139414041414142414341444145414641474148414941504151415241534154415541564157415841594160416141624163416441654166416741684169417041714172417341744175417641774178417941804181418241834184418541864187418841894190419141924193419441954196419741984199420042014202420342044205420642074208420942104211421242134214421542164217421842194220422142224223422442254226422742284229423042314232423342344235423642374238423942404241424242434244424542464247424842494250425142524253425442554256425742584259426042614262426342644265426642674268426942704271427242734274427542764277427842794280428142824283428442854286428742884289429042914292429342944295429642974298429943004301430243034304430543064307430843094310431143124313431443154316431743184319432043214322432343244325432643274328432943304331433243334334433543364337433843394340434143424343434443454346434743484349435043514352435343544355435643574358435943604361436243634364436543664367436843694370437143724373437443754376437743784379438043814382438343844385438643874388438943904391439243934394439543964397439843994400440144024403440444054406440744084409441044114412441344144415441644174418441944204421442244234424442544264427442844294430443144324433443444354436443744384439444044414442444344444445444644474448444944504451445244534454445544564457445844594460446144624463446444654466446744684469447044714472447344744475447644774478447944804481448244834484448544864487448844894490449144924493449444954496449744984499450045014502450345044505450645074508450945104511451245134514451545164517451845194520452145224523452445254526452745284529453045314532453345344535453645374538453945404541454245434544454545464547454845494550455145524553455445554556455745584559456045614562456345644565456645674568456945704571457245734574457545764577457845794580458145824583458445854586458745884589459045914592459345944595459645974598459946004601460246034604460546064607460846094610461146124613461446154616461746184619462046214622462346244625462646274628462946304631463246334634463546364637463846394640464146424643464446454646464746484649465046514652465346544655465646574658465946604661466246634664466546664667466846694670467146724673467446754676467746784679468046814682468346844685468646874688468946904691469246934694469546964697469846994700470147024703470447054706470747084709471047114712471347144715471647174718471947204721472247234724472547264727472847294730473147324733473447354736473747384739474047414742474347444745474647474748474947504751475247534754475547564757475847594760476147624763476447654766476747684769477047714772477347744775477647774778477947804781478247834784478547864787478847894790479147924793479447954796479747984799480048014802480348044805480648074808480948104811481248134814481548164817481848194820482148224823482448254826482748284829483048314832483348344835483648374838483948404841484248434844484548464847484848494850485148524853485448554856485748584859486048614862486348644865486648674868486948704871487248734874487548764877487848794880488148824883488448854886488748884889489048914892489348944895489648974898489949004901490249034904490549064907490849094910491149124913491449154916491749184919492049214922492349244925492649274928492949304931493249334934493549364937493849394940494149424943494449454946494749484949495049514952495349544955495649574958495949604961496249634964496549664967496849694970497149724973497449754976497749784979498049814982498349844985498649874988498949904991499249934994499549964997499849995000500150025003500450055006500750085009501050115012501350145015501650175018501950205021502250235024502550265027502850295030503150325033503450355036503750385039504050415042504350445045504650475048504950505051505250535054505550565057505850595060506150625063506450655066506750685069507050715072507350745075507650775078507950805081508250835084508550865087508850895090509150925093509450955096509750985099510051015102510351045105510651075108510951105111511251135114511551165117511851195120512151225123512451255126512751285129513051315132513351345135513651375138513951405141514251435144514551465147514851495150515151525153515451555156515751585159516051615162516351645165516651675168516951705171517251735174517551765177517851795180518151825183518451855186518751885189519051915192519351945195519651975198519952005201520252035204520552065207520852095210521152125213521452155216521752185219522052215222522352245225522652275228522952305231523252335234523552365237523852395240524152425243524452455246524752485249525052515252525352545255525652575258525952605261526252635264526552665267526852695270527152725273527452755276527752785279528052815282528352845285528652875288528952905291529252935294529552965297529852995300530153025303530453055306530753085309531053115312531353145315531653175318531953205321532253235324532553265327532853295330533153325333533453355336533753385339534053415342534353445345534653475348534953505351535253535354535553565357535853595360536153625363536453655366536753685369537053715372537353745375537653775378537953805381538253835384538553865387538853895390539153925393539453955396539753985399540054015402540354045405540654075408540954105411541254135414541554165417541854195420542154225423542454255426542754285429543054315432543354345435543654375438543954405441544254435444544554465447544854495450545154525453545454555456545754585459546054615462546354645465546654675468546954705471547254735474547554765477547854795480548154825483548454855486548754885489549054915492549354945495549654975498549955005501550255035504550555065507550855095510551155125513551455155516551755185519552055215522552355245525552655275528552955305531553255335534553555365537553855395540554155425543554455455546554755485549555055515552555355545555555655575558555955605561556255635564556555665567556855695570557155725573557455755576557755785579558055815582558355845585558655875588558955905591559255935594559555965597559855995600560156025603560456055606560756085609561056115612561356145615561656175618561956205621562256235624562556265627562856295630563156325633563456355636563756385639564056415642564356445645564656475648564956505651565256535654565556565657565856595660566156625663566456655666566756685669567056715672567356745675567656775678567956805681568256835684568556865687568856895690569156925693569456955696569756985699570057015702570357045705570657075708570957105711571257135714571557165717571857195720572157225723572457255726572757285729573057315732573357345735573657375738573957405741574257435744574557465747574857495750575157525753575457555756575757585759576057615762576357645765576657675768576957705771577257735774577557765777577857795780578157825783578457855786578757885789579057915792579357945795579657975798579958005801580258035804580558065807580858095810581158125813581458155816581758185819582058215822582358245825582658275828582958305831583258335834583558365837583858395840584158425843584458455846584758485849585058515852585358545855585658575858585958605861586258635864586558665867586858695870587158725873587458755876587758785879588058815882588358845885588658875888588958905891589258935894589558965897589858995900590159025903590459055906590759085909591059115912591359145915591659175918591959205921592259235924592559265927592859295930593159325933593459355936593759385939594059415942594359445945594659475948594959505951595259535954595559565957595859595960596159625963596459655966596759685969597059715972597359745975597659775978597959805981598259835984598559865987598859895990599159925993599459955996599759985999600060016002600360046005600660076008600960106011601260136014601560166017601860196020602160226023602460256026602760286029603060316032603360346035603660376038603960406041604260436044604560466047604860496050605160526053605460556056605760586059606060616062606360646065606660676068606960706071607260736074607560766077607860796080608160826083608460856086608760886089609060916092609360946095609660976098609961006101610261036104610561066107610861096110611161126113611461156116611761186119612061216122612361246125612661276128612961306131613261336134613561366137613861396140614161426143614461456146614761486149615061516152615361546155615661576158615961606161616261636164616561666167616861696170617161726173617461756176617761786179618061816182618361846185618661876188618961906191619261936194619561966197619861996200620162026203620462056206620762086209621062116212621362146215621662176218621962206221622262236224622562266227622862296230623162326233623462356236623762386239624062416242624362446245624662476248624962506251625262536254625562566257625862596260626162626263626462656266626762686269627062716272627362746275627662776278627962806281628262836284628562866287628862896290629162926293629462956296629762986299630063016302630363046305630663076308630963106311631263136314631563166317631863196320632163226323632463256326632763286329633063316332633363346335633663376338633963406341634263436344634563466347634863496350635163526353635463556356635763586359636063616362636363646365636663676368636963706371637263736374637563766377637863796380638163826383638463856386638763886389639063916392639363946395639663976398639964006401640264036404640564066407640864096410641164126413641464156416641764186419642064216422642364246425642664276428642964306431643264336434643564366437643864396440644164426443644464456446644764486449645064516452645364546455645664576458645964606461646264636464646564666467646864696470647164726473647464756476647764786479648064816482648364846485648664876488648964906491649264936494649564966497649864996500650165026503650465056506650765086509651065116512651365146515651665176518651965206521652265236524652565266527652865296530653165326533653465356536653765386539654065416542654365446545654665476548654965506551655265536554655565566557655865596560656165626563656465656566656765686569657065716572657365746575657665776578657965806581658265836584658565866587658865896590659165926593659465956596659765986599660066016602660366046605660666076608660966106611661266136614661566166617661866196620662166226623662466256626662766286629663066316632663366346635663666376638663966406641664266436644664566466647664866496650665166526653665466556656665766586659666066616662666366646665666666676668666966706671667266736674667566766677667866796680668166826683668466856686668766886689669066916692669366946695669666976698669967006701670267036704670567066707670867096710671167126713671467156716671767186719672067216722672367246725672667276728672967306731673267336734673567366737673867396740674167426743674467456746674767486749675067516752675367546755675667576758675967606761676267636764676567666767676867696770677167726773677467756776677767786779678067816782678367846785678667876788678967906791679267936794679567966797679867996800680168026803680468056806680768086809681068116812681368146815681668176818681968206821682268236824682568266827682868296830683168326833683468356836683768386839684068416842684368446845684668476848684968506851685268536854685568566857685868596860686168626863686468656866686768686869687068716872687368746875687668776878687968806881688268836884688568866887688868896890689168926893689468956896689768986899690069016902690369046905690669076908690969106911691269136914691569166917691869196920692169226923692469256926692769286929693069316932693369346935693669376938693969406941694269436944694569466947694869496950695169526953695469556956695769586959696069616962696369646965696669676968696969706971697269736974697569766977697869796980698169826983698469856986698769886989699069916992699369946995699669976998699970007001700270037004700570067007700870097010701170127013701470157016701770187019702070217022702370247025702670277028702970307031703270337034703570367037703870397040704170427043704470457046704770487049705070517052705370547055705670577058705970607061706270637064706570667067706870697070707170727073707470757076707770787079708070817082708370847085708670877088708970907091709270937094709570967097709870997100710171027103710471057106710771087109711071117112711371147115711671177118711971207121712271237124712571267127712871297130713171327133713471357136713771387139714071417142714371447145714671477148714971507151715271537154715571567157715871597160716171627163716471657166716771687169717071717172717371747175717671777178717971807181718271837184718571867187718871897190719171927193719471957196719771987199720072017202720372047205720672077208720972107211721272137214721572167217721872197220722172227223722472257226722772287229723072317232723372347235723672377238723972407241724272437244724572467247724872497250725172527253725472557256725772587259726072617262726372647265726672677268726972707271727272737274727572767277727872797280728172827283728472857286728772887289729072917292729372947295729672977298729973007301730273037304730573067307730873097310731173127313731473157316731773187319732073217322732373247325732673277328732973307331733273337334733573367337733873397340734173427343734473457346734773487349735073517352735373547355735673577358735973607361736273637364736573667367736873697370737173727373737473757376737773787379738073817382738373847385738673877388738973907391739273937394739573967397739873997400740174027403740474057406740774087409741074117412741374147415741674177418741974207421742274237424742574267427742874297430743174327433743474357436743774387439744074417442744374447445744674477448744974507451745274537454745574567457745874597460746174627463746474657466746774687469747074717472747374747475747674777478747974807481748274837484748574867487748874897490749174927493749474957496749774987499750075017502750375047505750675077508750975107511751275137514751575167517751875197520752175227523752475257526752775287529753075317532753375347535753675377538753975407541754275437544754575467547754875497550755175527553755475557556755775587559756075617562756375647565756675677568756975707571757275737574757575767577757875797580758175827583758475857586758775887589759075917592759375947595759675977598759976007601760276037604760576067607760876097610761176127613761476157616761776187619762076217622762376247625762676277628762976307631763276337634763576367637763876397640764176427643764476457646764776487649765076517652765376547655765676577658765976607661766276637664766576667667766876697670767176727673767476757676767776787679768076817682768376847685768676877688768976907691769276937694769576967697769876997700770177027703770477057706770777087709771077117712771377147715771677177718771977207721772277237724772577267727772877297730773177327733773477357736773777387739774077417742774377447745774677477748774977507751775277537754775577567757775877597760776177627763776477657766776777687769777077717772777377747775777677777778777977807781778277837784778577867787778877897790779177927793779477957796779777987799780078017802780378047805780678077808780978107811781278137814781578167817781878197820782178227823782478257826782778287829783078317832783378347835783678377838783978407841784278437844784578467847784878497850785178527853785478557856785778587859786078617862786378647865786678677868786978707871787278737874787578767877787878797880788178827883788478857886788778887889789078917892789378947895789678977898789979007901790279037904790579067907790879097910791179127913791479157916791779187919792079217922792379247925792679277928792979307931793279337934793579367937793879397940794179427943794479457946794779487949795079517952795379547955795679577958795979607961796279637964796579667967796879697970797179727973797479757976797779787979798079817982798379847985798679877988798979907991799279937994799579967997799879998000800180028003800480058006800780088009801080118012801380148015801680178018801980208021802280238024802580268027802880298030803180328033803480358036803780388039804080418042804380448045804680478048804980508051805280538054805580568057
  1. "use strict";
  2. (wx["webpackJsonp"] = wx["webpackJsonp"] || []).push([["vendors-node_modules_taro_weapp_prebundle_taro-ui_js"],{
  3. /***/ "./node_modules/.taro/weapp/prebundle/taro-ui.js":
  4. /*!*******************************************************!*\
  5. !*** ./node_modules/.taro/weapp/prebundle/taro-ui.js ***!
  6. \*******************************************************/
  7. /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
  8. __webpack_require__.r(__webpack_exports__);
  9. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  10. /* harmony export */ AtAccordion: function() { return /* binding */ AtAccordion; },
  11. /* harmony export */ AtActionSheet: function() { return /* binding */ AtActionSheet; },
  12. /* harmony export */ AtActionSheetItem: function() { return /* binding */ AtActionSheetItem; },
  13. /* harmony export */ AtActivityIndicator: function() { return /* binding */ AtActivityIndicator; },
  14. /* harmony export */ AtAvatar: function() { return /* binding */ AtAvatar; },
  15. /* harmony export */ AtBadge: function() { return /* binding */ AtBadge; },
  16. /* harmony export */ AtButton: function() { return /* binding */ AtButton; },
  17. /* harmony export */ AtCalendar: function() { return /* binding */ AtCalendar; },
  18. /* harmony export */ AtCard: function() { return /* binding */ AtCard; },
  19. /* harmony export */ AtCheckbox: function() { return /* binding */ AtCheckbox; },
  20. /* harmony export */ AtComponent: function() { return /* binding */ AtComponent; },
  21. /* harmony export */ AtCountdown: function() { return /* binding */ AtCountdown; },
  22. /* harmony export */ AtCurtain: function() { return /* binding */ AtCurtain; },
  23. /* harmony export */ AtDivider: function() { return /* binding */ AtDivider; },
  24. /* harmony export */ AtDrawer: function() { return /* binding */ AtDrawer; },
  25. /* harmony export */ AtFab: function() { return /* binding */ AtFab; },
  26. /* harmony export */ AtFloatLayout: function() { return /* binding */ AtFloatLayout; },
  27. /* harmony export */ AtForm: function() { return /* binding */ AtForm; },
  28. /* harmony export */ AtGrid: function() { return /* binding */ AtGrid; },
  29. /* harmony export */ AtIcon: function() { return /* binding */ AtIcon; },
  30. /* harmony export */ AtImagePicker: function() { return /* binding */ AtImagePicker; },
  31. /* harmony export */ AtIndexes: function() { return /* binding */ AtIndexes; },
  32. /* harmony export */ AtInput: function() { return /* binding */ AtInput; },
  33. /* harmony export */ AtInputNumber: function() { return /* binding */ AtInputNumber; },
  34. /* harmony export */ AtList: function() { return /* binding */ AtList; },
  35. /* harmony export */ AtListItem: function() { return /* binding */ AtListItem; },
  36. /* harmony export */ AtLoadMore: function() { return /* binding */ AtLoadMore; },
  37. /* harmony export */ AtLoading: function() { return /* binding */ AtLoading; },
  38. /* harmony export */ AtMessage: function() { return /* binding */ AtMessage; },
  39. /* harmony export */ AtModal: function() { return /* binding */ AtModal; },
  40. /* harmony export */ AtModalAction: function() { return /* binding */ AtModalAction; },
  41. /* harmony export */ AtModalContent: function() { return /* binding */ AtModalContent; },
  42. /* harmony export */ AtModalHeader: function() { return /* binding */ AtModalHeader; },
  43. /* harmony export */ AtNavBar: function() { return /* binding */ AtNavBar; },
  44. /* harmony export */ AtNoticebar: function() { return /* binding */ AtNoticebar; },
  45. /* harmony export */ AtPagination: function() { return /* binding */ AtPagination; },
  46. /* harmony export */ AtProgress: function() { return /* binding */ AtProgress; },
  47. /* harmony export */ AtRadio: function() { return /* binding */ AtRadio; },
  48. /* harmony export */ AtRange: function() { return /* binding */ AtRange; },
  49. /* harmony export */ AtRate: function() { return /* binding */ AtRate; },
  50. /* harmony export */ AtSearchBar: function() { return /* binding */ AtSearchBar; },
  51. /* harmony export */ AtSegmentedControl: function() { return /* binding */ AtSegmentedControl; },
  52. /* harmony export */ AtSlider: function() { return /* binding */ AtSlider; },
  53. /* harmony export */ AtSteps: function() { return /* binding */ AtSteps; },
  54. /* harmony export */ AtSwipeAction: function() { return /* binding */ AtSwipeAction; },
  55. /* harmony export */ AtSwitch: function() { return /* binding */ AtSwitch; },
  56. /* harmony export */ AtTabBar: function() { return /* binding */ AtTabBar; },
  57. /* harmony export */ AtTabs: function() { return /* binding */ AtTabs; },
  58. /* harmony export */ AtTabsPane: function() { return /* binding */ AtTabsPane; },
  59. /* harmony export */ AtTag: function() { return /* binding */ AtTag; },
  60. /* harmony export */ AtTextarea: function() { return /* binding */ AtTextarea; },
  61. /* harmony export */ AtTimeline: function() { return /* binding */ AtTimeline; },
  62. /* harmony export */ AtToast: function() { return /* binding */ AtToast; }
  63. /* harmony export */ });
  64. /* harmony import */ var _chunk_6GAVBEBQ_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./chunk-6GAVBEBQ.js */ "./node_modules/.taro/weapp/prebundle/chunk-6GAVBEBQ.js");
  65. /* harmony import */ var _chunk_3EXGJ5BE_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./chunk-3EXGJ5BE.js */ "./node_modules/.taro/weapp/prebundle/chunk-3EXGJ5BE.js");
  66. /* harmony import */ var _chunk_77KB62LY_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./chunk-77KB62LY.js */ "./node_modules/.taro/weapp/prebundle/chunk-77KB62LY.js");
  67. /* harmony import */ var _chunk_LNJCN3VW_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./chunk-LNJCN3VW.js */ "./node_modules/.taro/weapp/prebundle/chunk-LNJCN3VW.js");
  68. /* harmony import */ var _chunk_SOUSFT7N_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./chunk-SOUSFT7N.js */ "./node_modules/.taro/weapp/prebundle/chunk-SOUSFT7N.js");
  69. /* harmony import */ var _chunk_P7VEE7PG_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./chunk-P7VEE7PG.js */ "./node_modules/.taro/weapp/prebundle/chunk-P7VEE7PG.js");
  70. /* provided dependency */ var window = __webpack_require__(/*! ./node_modules/.taro/weapp/prebundle/chunk-3EXGJ5BE.js */ "./node_modules/.taro/weapp/prebundle/chunk-3EXGJ5BE.js")["window$1"];
  71. /* provided dependency */ var document = __webpack_require__(/*! ./node_modules/.taro/weapp/prebundle/chunk-3EXGJ5BE.js */ "./node_modules/.taro/weapp/prebundle/chunk-3EXGJ5BE.js")["document$1"];
  72. // node_modules/taro-ui/dist/index.esm.js
  73. var import_react = (0,_chunk_P7VEE7PG_js__WEBPACK_IMPORTED_MODULE_5__.__toESM)((0,_chunk_LNJCN3VW_js__WEBPACK_IMPORTED_MODULE_3__.require_react_production_min)());
  74. // node_modules/@tarojs/plugin-platform-weapp/dist/components-react.js
  75. var View = "view";
  76. var Text = "text";
  77. var Button = "button";
  78. var Form = "form";
  79. var Input = "input";
  80. var Label = "label";
  81. var Picker = "picker";
  82. var Slider = "slider";
  83. var Switch = "switch";
  84. var Textarea = "textarea";
  85. var MovableArea = "movable-area";
  86. var MovableView = "movable-view";
  87. var ScrollView = "scroll-view";
  88. var Swiper = "swiper";
  89. var SwiperItem = "swiper-item";
  90. var Image = "image";
  91. var OpenData = "open-data";
  92. // node_modules/taro-ui/dist/index.esm.js
  93. var import_taro = (0,_chunk_P7VEE7PG_js__WEBPACK_IMPORTED_MODULE_5__.__toESM)((0,_chunk_6GAVBEBQ_js__WEBPACK_IMPORTED_MODULE_0__.require_taro)());
  94. var extendStatics = function(d2, b2) {
  95. extendStatics = Object.setPrototypeOf || ({
  96. __proto__: []
  97. }) instanceof Array && function(d3, b3) {
  98. d3.__proto__ = b3;
  99. } || function(d3, b3) {
  100. for(var p2 in b3)if (Object.prototype.hasOwnProperty.call(b3, p2)) d3[p2] = b3[p2];
  101. };
  102. return extendStatics(d2, b2);
  103. };
  104. function __extends(d2, b2) {
  105. if (typeof b2 !== "function" && b2 !== null) throw new TypeError("Class extends value " + String(b2) + " is not a constructor or null");
  106. extendStatics(d2, b2);
  107. function __() {
  108. this.constructor = d2;
  109. }
  110. d2.prototype = b2 === null ? Object.create(b2) : (__.prototype = b2.prototype, new __());
  111. }
  112. var __assign = function() {
  113. __assign = Object.assign || function __assign2(t2) {
  114. for(var s, i = 1, n2 = arguments.length; i < n2; i++){
  115. s = arguments[i];
  116. for(var p2 in s)if (Object.prototype.hasOwnProperty.call(s, p2)) t2[p2] = s[p2];
  117. }
  118. return t2;
  119. };
  120. return __assign.apply(this, arguments);
  121. };
  122. function __awaiter(thisArg, _arguments, P, generator) {
  123. function adopt(value) {
  124. return value instanceof P ? value : new P(function(resolve) {
  125. resolve(value);
  126. });
  127. }
  128. return new (P || (P = Promise))(function(resolve, reject) {
  129. function fulfilled(value) {
  130. try {
  131. step(generator.next(value));
  132. } catch (e2) {
  133. reject(e2);
  134. }
  135. }
  136. function rejected(value) {
  137. try {
  138. step(generator["throw"](value));
  139. } catch (e2) {
  140. reject(e2);
  141. }
  142. }
  143. function step(result) {
  144. result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected);
  145. }
  146. step((generator = generator.apply(thisArg, _arguments || [])).next());
  147. });
  148. }
  149. function __generator(thisArg, body) {
  150. var _ = {
  151. label: 0,
  152. sent: function() {
  153. if (t2[0] & 1) throw t2[1];
  154. return t2[1];
  155. },
  156. trys: [],
  157. ops: []
  158. }, f2, y2, t2, g2;
  159. return g2 = {
  160. next: verb(0),
  161. "throw": verb(1),
  162. "return": verb(2)
  163. }, typeof Symbol === "function" && (g2[Symbol.iterator] = function() {
  164. return this;
  165. }), g2;
  166. function verb(n2) {
  167. return function(v2) {
  168. return step([
  169. n2,
  170. v2
  171. ]);
  172. };
  173. }
  174. function step(op) {
  175. if (f2) throw new TypeError("Generator is already executing.");
  176. while(g2 && (g2 = 0, op[0] && (_ = 0)), _)try {
  177. if (f2 = 1, y2 && (t2 = op[0] & 2 ? y2["return"] : op[0] ? y2["throw"] || ((t2 = y2["return"]) && t2.call(y2), 0) : y2.next) && !(t2 = t2.call(y2, op[1])).done) return t2;
  178. if (y2 = 0, t2) op = [
  179. op[0] & 2,
  180. t2.value
  181. ];
  182. switch(op[0]){
  183. case 0:
  184. case 1:
  185. t2 = op;
  186. break;
  187. case 4:
  188. _.label++;
  189. return {
  190. value: op[1],
  191. done: false
  192. };
  193. case 5:
  194. _.label++;
  195. y2 = op[1];
  196. op = [
  197. 0
  198. ];
  199. continue;
  200. case 7:
  201. op = _.ops.pop();
  202. _.trys.pop();
  203. continue;
  204. default:
  205. if (!(t2 = _.trys, t2 = t2.length > 0 && t2[t2.length - 1]) && (op[0] === 6 || op[0] === 2)) {
  206. _ = 0;
  207. continue;
  208. }
  209. if (op[0] === 3 && (!t2 || op[1] > t2[0] && op[1] < t2[3])) {
  210. _.label = op[1];
  211. break;
  212. }
  213. if (op[0] === 6 && _.label < t2[1]) {
  214. _.label = t2[1];
  215. t2 = op;
  216. break;
  217. }
  218. if (t2 && _.label < t2[2]) {
  219. _.label = t2[2];
  220. _.ops.push(op);
  221. break;
  222. }
  223. if (t2[2]) _.ops.pop();
  224. _.trys.pop();
  225. continue;
  226. }
  227. op = body.call(thisArg, _);
  228. } catch (e2) {
  229. op = [
  230. 6,
  231. e2
  232. ];
  233. y2 = 0;
  234. } finally{
  235. f2 = t2 = 0;
  236. }
  237. if (op[0] & 5) throw op[1];
  238. return {
  239. value: op[0] ? op[1] : void 0,
  240. done: true
  241. };
  242. }
  243. }
  244. function __read(o, n2) {
  245. var m2 = typeof Symbol === "function" && o[Symbol.iterator];
  246. if (!m2) return o;
  247. var i = m2.call(o), r2, ar = [], e2;
  248. try {
  249. while((n2 === void 0 || n2-- > 0) && !(r2 = i.next()).done)ar.push(r2.value);
  250. } catch (error2) {
  251. e2 = {
  252. error: error2
  253. };
  254. } finally{
  255. try {
  256. if (r2 && !r2.done && (m2 = i["return"])) m2.call(i);
  257. } finally{
  258. if (e2) throw e2.error;
  259. }
  260. }
  261. return ar;
  262. }
  263. function __spread() {
  264. for(var ar = [], i = 0; i < arguments.length; i++)ar = ar.concat(__read(arguments[i]));
  265. return ar;
  266. }
  267. var commonjsGlobal = typeof globalThis !== "undefined" ? globalThis : typeof window !== "undefined" ? window : typeof __webpack_require__.g !== "undefined" ? __webpack_require__.g : typeof self !== "undefined" ? self : {};
  268. function createCommonjsModule(fn, module) {
  269. return module = {
  270. exports: {}
  271. }, fn(module, module.exports), module.exports;
  272. }
  273. var classnames = createCommonjsModule(function(module) {
  274. (function() {
  275. var hasOwn = {}.hasOwnProperty;
  276. function classNames() {
  277. var classes = [];
  278. for(var i = 0; i < arguments.length; i++){
  279. var arg = arguments[i];
  280. if (!arg) continue;
  281. var argType = typeof arg;
  282. if (argType === "string" || argType === "number") {
  283. classes.push(arg);
  284. } else if (Array.isArray(arg)) {
  285. if (arg.length) {
  286. var inner = classNames.apply(null, arg);
  287. if (inner) {
  288. classes.push(inner);
  289. }
  290. }
  291. } else if (argType === "object") {
  292. if (arg.toString !== Object.prototype.toString && !arg.toString.toString().includes("[native code]")) {
  293. classes.push(arg.toString());
  294. continue;
  295. }
  296. for(var key in arg){
  297. if (hasOwn.call(arg, key) && arg[key]) {
  298. classes.push(key);
  299. }
  300. }
  301. }
  302. }
  303. return classes.join(" ");
  304. }
  305. if (module.exports) {
  306. classNames.default = classNames;
  307. module.exports = classNames;
  308. } else {
  309. window.classNames = classNames;
  310. }
  311. })();
  312. });
  313. var b = "function" === typeof Symbol && Symbol.for;
  314. var c = b ? Symbol.for("react.element") : 60103;
  315. var d = b ? Symbol.for("react.portal") : 60106;
  316. var e = b ? Symbol.for("react.fragment") : 60107;
  317. var f = b ? Symbol.for("react.strict_mode") : 60108;
  318. var g = b ? Symbol.for("react.profiler") : 60114;
  319. var h = b ? Symbol.for("react.provider") : 60109;
  320. var k = b ? Symbol.for("react.context") : 60110;
  321. var l = b ? Symbol.for("react.async_mode") : 60111;
  322. var m = b ? Symbol.for("react.concurrent_mode") : 60111;
  323. var n = b ? Symbol.for("react.forward_ref") : 60112;
  324. var p = b ? Symbol.for("react.suspense") : 60113;
  325. var q = b ? Symbol.for("react.suspense_list") : 60120;
  326. var r = b ? Symbol.for("react.memo") : 60115;
  327. var t = b ? Symbol.for("react.lazy") : 60116;
  328. var v = b ? Symbol.for("react.block") : 60121;
  329. var w = b ? Symbol.for("react.fundamental") : 60117;
  330. var x = b ? Symbol.for("react.responder") : 60118;
  331. var y = b ? Symbol.for("react.scope") : 60119;
  332. var reactIs_development = createCommonjsModule(function(module, exports) {
  333. if (true) {
  334. (function() {
  335. var hasSymbol = typeof Symbol === "function" && Symbol.for;
  336. var REACT_ELEMENT_TYPE = hasSymbol ? Symbol.for("react.element") : 60103;
  337. var REACT_PORTAL_TYPE = hasSymbol ? Symbol.for("react.portal") : 60106;
  338. var REACT_FRAGMENT_TYPE = hasSymbol ? Symbol.for("react.fragment") : 60107;
  339. var REACT_STRICT_MODE_TYPE = hasSymbol ? Symbol.for("react.strict_mode") : 60108;
  340. var REACT_PROFILER_TYPE = hasSymbol ? Symbol.for("react.profiler") : 60114;
  341. var REACT_PROVIDER_TYPE = hasSymbol ? Symbol.for("react.provider") : 60109;
  342. var REACT_CONTEXT_TYPE = hasSymbol ? Symbol.for("react.context") : 60110;
  343. var REACT_ASYNC_MODE_TYPE = hasSymbol ? Symbol.for("react.async_mode") : 60111;
  344. var REACT_CONCURRENT_MODE_TYPE = hasSymbol ? Symbol.for("react.concurrent_mode") : 60111;
  345. var REACT_FORWARD_REF_TYPE = hasSymbol ? Symbol.for("react.forward_ref") : 60112;
  346. var REACT_SUSPENSE_TYPE = hasSymbol ? Symbol.for("react.suspense") : 60113;
  347. var REACT_SUSPENSE_LIST_TYPE = hasSymbol ? Symbol.for("react.suspense_list") : 60120;
  348. var REACT_MEMO_TYPE = hasSymbol ? Symbol.for("react.memo") : 60115;
  349. var REACT_LAZY_TYPE = hasSymbol ? Symbol.for("react.lazy") : 60116;
  350. var REACT_BLOCK_TYPE = hasSymbol ? Symbol.for("react.block") : 60121;
  351. var REACT_FUNDAMENTAL_TYPE = hasSymbol ? Symbol.for("react.fundamental") : 60117;
  352. var REACT_RESPONDER_TYPE = hasSymbol ? Symbol.for("react.responder") : 60118;
  353. var REACT_SCOPE_TYPE = hasSymbol ? Symbol.for("react.scope") : 60119;
  354. function isValidElementType(type) {
  355. return typeof type === "string" || typeof type === "function" || 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);
  356. }
  357. function typeOf(object) {
  358. if (typeof object === "object" && object !== null) {
  359. var $$typeof = object.$$typeof;
  360. switch($$typeof){
  361. case REACT_ELEMENT_TYPE:
  362. var type = object.type;
  363. switch(type){
  364. case REACT_ASYNC_MODE_TYPE:
  365. case REACT_CONCURRENT_MODE_TYPE:
  366. case REACT_FRAGMENT_TYPE:
  367. case REACT_PROFILER_TYPE:
  368. case REACT_STRICT_MODE_TYPE:
  369. case REACT_SUSPENSE_TYPE:
  370. return type;
  371. default:
  372. var $$typeofType = type && type.$$typeof;
  373. switch($$typeofType){
  374. case REACT_CONTEXT_TYPE:
  375. case REACT_FORWARD_REF_TYPE:
  376. case REACT_LAZY_TYPE:
  377. case REACT_MEMO_TYPE:
  378. case REACT_PROVIDER_TYPE:
  379. return $$typeofType;
  380. default:
  381. return $$typeof;
  382. }
  383. }
  384. case REACT_PORTAL_TYPE:
  385. return $$typeof;
  386. }
  387. }
  388. return void 0;
  389. }
  390. var AsyncMode = REACT_ASYNC_MODE_TYPE;
  391. var ConcurrentMode = REACT_CONCURRENT_MODE_TYPE;
  392. var ContextConsumer = REACT_CONTEXT_TYPE;
  393. var ContextProvider = REACT_PROVIDER_TYPE;
  394. var Element = REACT_ELEMENT_TYPE;
  395. var ForwardRef = REACT_FORWARD_REF_TYPE;
  396. var Fragment = REACT_FRAGMENT_TYPE;
  397. var Lazy = REACT_LAZY_TYPE;
  398. var Memo = REACT_MEMO_TYPE;
  399. var Portal = REACT_PORTAL_TYPE;
  400. var Profiler = REACT_PROFILER_TYPE;
  401. var StrictMode = REACT_STRICT_MODE_TYPE;
  402. var Suspense = REACT_SUSPENSE_TYPE;
  403. var hasWarnedAboutDeprecatedIsAsyncMode = false;
  404. function isAsyncMode(object) {
  405. {
  406. if (!hasWarnedAboutDeprecatedIsAsyncMode) {
  407. hasWarnedAboutDeprecatedIsAsyncMode = true;
  408. 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.");
  409. }
  410. }
  411. return isConcurrentMode(object) || typeOf(object) === REACT_ASYNC_MODE_TYPE;
  412. }
  413. function isConcurrentMode(object) {
  414. return typeOf(object) === REACT_CONCURRENT_MODE_TYPE;
  415. }
  416. function isContextConsumer(object) {
  417. return typeOf(object) === REACT_CONTEXT_TYPE;
  418. }
  419. function isContextProvider(object) {
  420. return typeOf(object) === REACT_PROVIDER_TYPE;
  421. }
  422. function isElement(object) {
  423. return typeof object === "object" && object !== null && object.$$typeof === REACT_ELEMENT_TYPE;
  424. }
  425. function isForwardRef(object) {
  426. return typeOf(object) === REACT_FORWARD_REF_TYPE;
  427. }
  428. function isFragment(object) {
  429. return typeOf(object) === REACT_FRAGMENT_TYPE;
  430. }
  431. function isLazy(object) {
  432. return typeOf(object) === REACT_LAZY_TYPE;
  433. }
  434. function isMemo(object) {
  435. return typeOf(object) === REACT_MEMO_TYPE;
  436. }
  437. function isPortal(object) {
  438. return typeOf(object) === REACT_PORTAL_TYPE;
  439. }
  440. function isProfiler(object) {
  441. return typeOf(object) === REACT_PROFILER_TYPE;
  442. }
  443. function isStrictMode(object) {
  444. return typeOf(object) === REACT_STRICT_MODE_TYPE;
  445. }
  446. function isSuspense(object) {
  447. return typeOf(object) === REACT_SUSPENSE_TYPE;
  448. }
  449. exports.AsyncMode = AsyncMode;
  450. exports.ConcurrentMode = ConcurrentMode;
  451. exports.ContextConsumer = ContextConsumer;
  452. exports.ContextProvider = ContextProvider;
  453. exports.Element = Element;
  454. exports.ForwardRef = ForwardRef;
  455. exports.Fragment = Fragment;
  456. exports.Lazy = Lazy;
  457. exports.Memo = Memo;
  458. exports.Portal = Portal;
  459. exports.Profiler = Profiler;
  460. exports.StrictMode = StrictMode;
  461. exports.Suspense = Suspense;
  462. exports.isAsyncMode = isAsyncMode;
  463. exports.isConcurrentMode = isConcurrentMode;
  464. exports.isContextConsumer = isContextConsumer;
  465. exports.isContextProvider = isContextProvider;
  466. exports.isElement = isElement;
  467. exports.isForwardRef = isForwardRef;
  468. exports.isFragment = isFragment;
  469. exports.isLazy = isLazy;
  470. exports.isMemo = isMemo;
  471. exports.isPortal = isPortal;
  472. exports.isProfiler = isProfiler;
  473. exports.isStrictMode = isStrictMode;
  474. exports.isSuspense = isSuspense;
  475. exports.isValidElementType = isValidElementType;
  476. exports.typeOf = typeOf;
  477. })();
  478. }
  479. });
  480. reactIs_development.AsyncMode;
  481. reactIs_development.ConcurrentMode;
  482. reactIs_development.ContextConsumer;
  483. reactIs_development.ContextProvider;
  484. reactIs_development.Element;
  485. reactIs_development.ForwardRef;
  486. reactIs_development.Fragment;
  487. reactIs_development.Lazy;
  488. reactIs_development.Memo;
  489. reactIs_development.Portal;
  490. reactIs_development.Profiler;
  491. reactIs_development.StrictMode;
  492. reactIs_development.Suspense;
  493. reactIs_development.isAsyncMode;
  494. reactIs_development.isConcurrentMode;
  495. reactIs_development.isContextConsumer;
  496. reactIs_development.isContextProvider;
  497. reactIs_development.isElement;
  498. reactIs_development.isForwardRef;
  499. reactIs_development.isFragment;
  500. reactIs_development.isLazy;
  501. reactIs_development.isMemo;
  502. reactIs_development.isPortal;
  503. reactIs_development.isProfiler;
  504. reactIs_development.isStrictMode;
  505. reactIs_development.isSuspense;
  506. reactIs_development.isValidElementType;
  507. reactIs_development.typeOf;
  508. var reactIs = createCommonjsModule(function(module) {
  509. if (false) {} else {
  510. module.exports = reactIs_development;
  511. }
  512. });
  513. var getOwnPropertySymbols = Object.getOwnPropertySymbols;
  514. var hasOwnProperty$7 = Object.prototype.hasOwnProperty;
  515. var propIsEnumerable = Object.prototype.propertyIsEnumerable;
  516. function toObject(val) {
  517. if (val === null || val === void 0) {
  518. throw new TypeError("Object.assign cannot be called with null or undefined");
  519. }
  520. return Object(val);
  521. }
  522. function shouldUseNative() {
  523. try {
  524. if (!Object.assign) {
  525. return false;
  526. }
  527. var test1 = new String("abc");
  528. test1[5] = "de";
  529. if (Object.getOwnPropertyNames(test1)[0] === "5") {
  530. return false;
  531. }
  532. var test2 = {};
  533. for(var i = 0; i < 10; i++){
  534. test2["_" + String.fromCharCode(i)] = i;
  535. }
  536. var order2 = Object.getOwnPropertyNames(test2).map(function(n2) {
  537. return test2[n2];
  538. });
  539. if (order2.join("") !== "0123456789") {
  540. return false;
  541. }
  542. var test3 = {};
  543. "abcdefghijklmnopqrst".split("").forEach(function(letter) {
  544. test3[letter] = letter;
  545. });
  546. if (Object.keys(Object.assign({}, test3)).join("") !== "abcdefghijklmnopqrst") {
  547. return false;
  548. }
  549. return true;
  550. } catch (err) {
  551. return false;
  552. }
  553. }
  554. var objectAssign = shouldUseNative() ? Object.assign : function(target, source) {
  555. var from;
  556. var to = toObject(target);
  557. var symbols;
  558. for(var s = 1; s < arguments.length; s++){
  559. from = Object(arguments[s]);
  560. for(var key in from){
  561. if (hasOwnProperty$7.call(from, key)) {
  562. to[key] = from[key];
  563. }
  564. }
  565. if (getOwnPropertySymbols) {
  566. symbols = getOwnPropertySymbols(from);
  567. for(var i = 0; i < symbols.length; i++){
  568. if (propIsEnumerable.call(from, symbols[i])) {
  569. to[symbols[i]] = from[symbols[i]];
  570. }
  571. }
  572. }
  573. }
  574. return to;
  575. };
  576. var ReactPropTypesSecret$2 = "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";
  577. var ReactPropTypesSecret_1 = ReactPropTypesSecret$2;
  578. var has$2 = Function.call.bind(Object.prototype.hasOwnProperty);
  579. var ReactPropTypesSecret$1 = ReactPropTypesSecret_1;
  580. var has$1 = has$2;
  581. var printWarning$1 = function() {};
  582. if (true) {
  583. ReactPropTypesSecret = ReactPropTypesSecret$1;
  584. loggedTypeFailures = {};
  585. has = has$1;
  586. printWarning$1 = function(text) {
  587. var message = "Warning: " + text;
  588. if (typeof console !== "undefined") {
  589. console.error(message);
  590. }
  591. try {
  592. throw new Error(message);
  593. } catch (x2) {}
  594. };
  595. }
  596. var ReactPropTypesSecret;
  597. var loggedTypeFailures;
  598. var has;
  599. function checkPropTypes$1(typeSpecs, values, location, componentName, getStack) {
  600. if (true) {
  601. for(var typeSpecName in typeSpecs){
  602. if (has(typeSpecs, typeSpecName)) {
  603. var error2;
  604. try {
  605. if (typeof typeSpecs[typeSpecName] !== "function") {
  606. 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`.");
  607. err.name = "Invariant Violation";
  608. throw err;
  609. }
  610. error2 = typeSpecs[typeSpecName](values, typeSpecName, componentName, location, null, ReactPropTypesSecret);
  611. } catch (ex) {
  612. error2 = ex;
  613. }
  614. if (error2 && !(error2 instanceof Error)) {
  615. printWarning$1((componentName || "React class") + ": type specification of " + location + " `" + typeSpecName + "` is invalid; the type checker function must return `null` or an `Error` but returned a " + typeof error2 + ". You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).");
  616. }
  617. if (error2 instanceof Error && !(error2.message in loggedTypeFailures)) {
  618. loggedTypeFailures[error2.message] = true;
  619. var stack = getStack ? getStack() : "";
  620. printWarning$1("Failed " + location + " type: " + error2.message + (stack != null ? stack : ""));
  621. }
  622. }
  623. }
  624. }
  625. }
  626. checkPropTypes$1.resetWarningCache = function() {
  627. if (true) {
  628. loggedTypeFailures = {};
  629. }
  630. };
  631. var checkPropTypes_1 = checkPropTypes$1;
  632. var checkPropTypes = checkPropTypes_1;
  633. var printWarning = function() {};
  634. if (true) {
  635. printWarning = function(text) {
  636. var message = "Warning: " + text;
  637. if (typeof console !== "undefined") {
  638. console.error(message);
  639. }
  640. try {
  641. throw new Error(message);
  642. } catch (x2) {}
  643. };
  644. }
  645. function emptyFunctionThatReturnsNull() {
  646. return null;
  647. }
  648. var factoryWithTypeCheckers = function(isValidElement, throwOnDirectAccess) {
  649. var ITERATOR_SYMBOL = typeof Symbol === "function" && Symbol.iterator;
  650. var FAUX_ITERATOR_SYMBOL = "@@iterator";
  651. function getIteratorFn(maybeIterable) {
  652. var iteratorFn = maybeIterable && (ITERATOR_SYMBOL && maybeIterable[ITERATOR_SYMBOL] || maybeIterable[FAUX_ITERATOR_SYMBOL]);
  653. if (typeof iteratorFn === "function") {
  654. return iteratorFn;
  655. }
  656. }
  657. var ANONYMOUS = "<<anonymous>>";
  658. var ReactPropTypes = {
  659. array: createPrimitiveTypeChecker("array"),
  660. bigint: createPrimitiveTypeChecker("bigint"),
  661. bool: createPrimitiveTypeChecker("boolean"),
  662. func: createPrimitiveTypeChecker("function"),
  663. number: createPrimitiveTypeChecker("number"),
  664. object: createPrimitiveTypeChecker("object"),
  665. string: createPrimitiveTypeChecker("string"),
  666. symbol: createPrimitiveTypeChecker("symbol"),
  667. any: createAnyTypeChecker(),
  668. arrayOf: createArrayOfTypeChecker,
  669. element: createElementTypeChecker(),
  670. elementType: createElementTypeTypeChecker(),
  671. instanceOf: createInstanceTypeChecker,
  672. node: createNodeChecker(),
  673. objectOf: createObjectOfTypeChecker,
  674. oneOf: createEnumTypeChecker,
  675. oneOfType: createUnionTypeChecker,
  676. shape: createShapeTypeChecker,
  677. exact: createStrictShapeTypeChecker
  678. };
  679. function is(x2, y2) {
  680. if (x2 === y2) {
  681. return x2 !== 0 || 1 / x2 === 1 / y2;
  682. } else {
  683. return x2 !== x2 && y2 !== y2;
  684. }
  685. }
  686. function PropTypeError(message, data) {
  687. this.message = message;
  688. this.data = data && typeof data === "object" ? data : {};
  689. this.stack = "";
  690. }
  691. PropTypeError.prototype = Error.prototype;
  692. function createChainableTypeChecker(validate) {
  693. if (true) {
  694. var manualPropTypeCallCache = {};
  695. var manualPropTypeWarningCount = 0;
  696. }
  697. function checkType(isRequired, props, propName, componentName, location, propFullName, secret) {
  698. componentName = componentName || ANONYMOUS;
  699. propFullName = propFullName || propName;
  700. if (secret !== ReactPropTypesSecret$1) {
  701. if (throwOnDirectAccess) {
  702. 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");
  703. err.name = "Invariant Violation";
  704. throw err;
  705. } else if (typeof console !== "undefined") {
  706. var cacheKey = componentName + ":" + propName;
  707. if (!manualPropTypeCallCache[cacheKey] && manualPropTypeWarningCount < 3) {
  708. 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.");
  709. manualPropTypeCallCache[cacheKey] = true;
  710. manualPropTypeWarningCount++;
  711. }
  712. }
  713. }
  714. if (props[propName] == null) {
  715. if (isRequired) {
  716. if (props[propName] === null) {
  717. return new PropTypeError("The " + location + " `" + propFullName + "` is marked as required " + ("in `" + componentName + "`, but its value is `null`."));
  718. }
  719. return new PropTypeError("The " + location + " `" + propFullName + "` is marked as required in " + ("`" + componentName + "`, but its value is `undefined`."));
  720. }
  721. return null;
  722. } else {
  723. return validate(props, propName, componentName, location, propFullName);
  724. }
  725. }
  726. var chainedCheckType = checkType.bind(null, false);
  727. chainedCheckType.isRequired = checkType.bind(null, true);
  728. return chainedCheckType;
  729. }
  730. function createPrimitiveTypeChecker(expectedType) {
  731. function validate(props, propName, componentName, location, propFullName, secret) {
  732. var propValue = props[propName];
  733. var propType = getPropType(propValue);
  734. if (propType !== expectedType) {
  735. var preciseType = getPreciseType(propValue);
  736. return new PropTypeError("Invalid " + location + " `" + propFullName + "` of type " + ("`" + preciseType + "` supplied to `" + componentName + "`, expected ") + ("`" + expectedType + "`."), {
  737. expectedType
  738. });
  739. }
  740. return null;
  741. }
  742. return createChainableTypeChecker(validate);
  743. }
  744. function createAnyTypeChecker() {
  745. return createChainableTypeChecker(emptyFunctionThatReturnsNull);
  746. }
  747. function createArrayOfTypeChecker(typeChecker) {
  748. function validate(props, propName, componentName, location, propFullName) {
  749. if (typeof typeChecker !== "function") {
  750. return new PropTypeError("Property `" + propFullName + "` of component `" + componentName + "` has invalid PropType notation inside arrayOf.");
  751. }
  752. var propValue = props[propName];
  753. if (!Array.isArray(propValue)) {
  754. var propType = getPropType(propValue);
  755. return new PropTypeError("Invalid " + location + " `" + propFullName + "` of type " + ("`" + propType + "` supplied to `" + componentName + "`, expected an array."));
  756. }
  757. for(var i = 0; i < propValue.length; i++){
  758. var error2 = typeChecker(propValue, i, componentName, location, propFullName + "[" + i + "]", ReactPropTypesSecret$1);
  759. if (error2 instanceof Error) {
  760. return error2;
  761. }
  762. }
  763. return null;
  764. }
  765. return createChainableTypeChecker(validate);
  766. }
  767. function createElementTypeChecker() {
  768. function validate(props, propName, componentName, location, propFullName) {
  769. var propValue = props[propName];
  770. if (!isValidElement(propValue)) {
  771. var propType = getPropType(propValue);
  772. return new PropTypeError("Invalid " + location + " `" + propFullName + "` of type " + ("`" + propType + "` supplied to `" + componentName + "`, expected a single ReactElement."));
  773. }
  774. return null;
  775. }
  776. return createChainableTypeChecker(validate);
  777. }
  778. function createElementTypeTypeChecker() {
  779. function validate(props, propName, componentName, location, propFullName) {
  780. var propValue = props[propName];
  781. if (!reactIs.isValidElementType(propValue)) {
  782. var propType = getPropType(propValue);
  783. return new PropTypeError("Invalid " + location + " `" + propFullName + "` of type " + ("`" + propType + "` supplied to `" + componentName + "`, expected a single ReactElement type."));
  784. }
  785. return null;
  786. }
  787. return createChainableTypeChecker(validate);
  788. }
  789. function createInstanceTypeChecker(expectedClass) {
  790. function validate(props, propName, componentName, location, propFullName) {
  791. if (!(props[propName] instanceof expectedClass)) {
  792. var expectedClassName = expectedClass.name || ANONYMOUS;
  793. var actualClassName = getClassName(props[propName]);
  794. return new PropTypeError("Invalid " + location + " `" + propFullName + "` of type " + ("`" + actualClassName + "` supplied to `" + componentName + "`, expected ") + ("instance of `" + expectedClassName + "`."));
  795. }
  796. return null;
  797. }
  798. return createChainableTypeChecker(validate);
  799. }
  800. function createEnumTypeChecker(expectedValues) {
  801. if (!Array.isArray(expectedValues)) {
  802. if (true) {
  803. if (arguments.length > 1) {
  804. 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]).");
  805. } else {
  806. printWarning("Invalid argument supplied to oneOf, expected an array.");
  807. }
  808. }
  809. return emptyFunctionThatReturnsNull;
  810. }
  811. function validate(props, propName, componentName, location, propFullName) {
  812. var propValue = props[propName];
  813. for(var i = 0; i < expectedValues.length; i++){
  814. if (is(propValue, expectedValues[i])) {
  815. return null;
  816. }
  817. }
  818. var valuesString = JSON.stringify(expectedValues, function replacer(key, value) {
  819. var type = getPreciseType(value);
  820. if (type === "symbol") {
  821. return String(value);
  822. }
  823. return value;
  824. });
  825. return new PropTypeError("Invalid " + location + " `" + propFullName + "` of value `" + String(propValue) + "` " + ("supplied to `" + componentName + "`, expected one of " + valuesString + "."));
  826. }
  827. return createChainableTypeChecker(validate);
  828. }
  829. function createObjectOfTypeChecker(typeChecker) {
  830. function validate(props, propName, componentName, location, propFullName) {
  831. if (typeof typeChecker !== "function") {
  832. return new PropTypeError("Property `" + propFullName + "` of component `" + componentName + "` has invalid PropType notation inside objectOf.");
  833. }
  834. var propValue = props[propName];
  835. var propType = getPropType(propValue);
  836. if (propType !== "object") {
  837. return new PropTypeError("Invalid " + location + " `" + propFullName + "` of type " + ("`" + propType + "` supplied to `" + componentName + "`, expected an object."));
  838. }
  839. for(var key in propValue){
  840. if (has$1(propValue, key)) {
  841. var error2 = typeChecker(propValue, key, componentName, location, propFullName + "." + key, ReactPropTypesSecret$1);
  842. if (error2 instanceof Error) {
  843. return error2;
  844. }
  845. }
  846. }
  847. return null;
  848. }
  849. return createChainableTypeChecker(validate);
  850. }
  851. function createUnionTypeChecker(arrayOfTypeCheckers) {
  852. if (!Array.isArray(arrayOfTypeCheckers)) {
  853. true ? printWarning("Invalid argument supplied to oneOfType, expected an instance of array.") : 0;
  854. return emptyFunctionThatReturnsNull;
  855. }
  856. for(var i = 0; i < arrayOfTypeCheckers.length; i++){
  857. var checker = arrayOfTypeCheckers[i];
  858. if (typeof checker !== "function") {
  859. printWarning("Invalid argument supplied to oneOfType. Expected an array of check functions, but received " + getPostfixForTypeWarning(checker) + " at index " + i + ".");
  860. return emptyFunctionThatReturnsNull;
  861. }
  862. }
  863. function validate(props, propName, componentName, location, propFullName) {
  864. var expectedTypes = [];
  865. for(var i2 = 0; i2 < arrayOfTypeCheckers.length; i2++){
  866. var checker2 = arrayOfTypeCheckers[i2];
  867. var checkerResult = checker2(props, propName, componentName, location, propFullName, ReactPropTypesSecret$1);
  868. if (checkerResult == null) {
  869. return null;
  870. }
  871. if (checkerResult.data && has$1(checkerResult.data, "expectedType")) {
  872. expectedTypes.push(checkerResult.data.expectedType);
  873. }
  874. }
  875. var expectedTypesMessage = expectedTypes.length > 0 ? ", expected one of type [" + expectedTypes.join(", ") + "]" : "";
  876. return new PropTypeError("Invalid " + location + " `" + propFullName + "` supplied to " + ("`" + componentName + "`" + expectedTypesMessage + "."));
  877. }
  878. return createChainableTypeChecker(validate);
  879. }
  880. function createNodeChecker() {
  881. function validate(props, propName, componentName, location, propFullName) {
  882. if (!isNode(props[propName])) {
  883. return new PropTypeError("Invalid " + location + " `" + propFullName + "` supplied to " + ("`" + componentName + "`, expected a ReactNode."));
  884. }
  885. return null;
  886. }
  887. return createChainableTypeChecker(validate);
  888. }
  889. function invalidValidatorError(componentName, location, propFullName, key, type) {
  890. 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 + "`.");
  891. }
  892. function createShapeTypeChecker(shapeTypes) {
  893. function validate(props, propName, componentName, location, propFullName) {
  894. var propValue = props[propName];
  895. var propType = getPropType(propValue);
  896. if (propType !== "object") {
  897. return new PropTypeError("Invalid " + location + " `" + propFullName + "` of type `" + propType + "` " + ("supplied to `" + componentName + "`, expected `object`."));
  898. }
  899. for(var key in shapeTypes){
  900. var checker = shapeTypes[key];
  901. if (typeof checker !== "function") {
  902. return invalidValidatorError(componentName, location, propFullName, key, getPreciseType(checker));
  903. }
  904. var error2 = checker(propValue, key, componentName, location, propFullName + "." + key, ReactPropTypesSecret$1);
  905. if (error2) {
  906. return error2;
  907. }
  908. }
  909. return null;
  910. }
  911. return createChainableTypeChecker(validate);
  912. }
  913. function createStrictShapeTypeChecker(shapeTypes) {
  914. function validate(props, propName, componentName, location, propFullName) {
  915. var propValue = props[propName];
  916. var propType = getPropType(propValue);
  917. if (propType !== "object") {
  918. return new PropTypeError("Invalid " + location + " `" + propFullName + "` of type `" + propType + "` " + ("supplied to `" + componentName + "`, expected `object`."));
  919. }
  920. var allKeys = objectAssign({}, props[propName], shapeTypes);
  921. for(var key in allKeys){
  922. var checker = shapeTypes[key];
  923. if (has$1(shapeTypes, key) && typeof checker !== "function") {
  924. return invalidValidatorError(componentName, location, propFullName, key, getPreciseType(checker));
  925. }
  926. if (!checker) {
  927. 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, " "));
  928. }
  929. var error2 = checker(propValue, key, componentName, location, propFullName + "." + key, ReactPropTypesSecret$1);
  930. if (error2) {
  931. return error2;
  932. }
  933. }
  934. return null;
  935. }
  936. return createChainableTypeChecker(validate);
  937. }
  938. function isNode(propValue) {
  939. switch(typeof propValue){
  940. case "number":
  941. case "string":
  942. case "undefined":
  943. return true;
  944. case "boolean":
  945. return !propValue;
  946. case "object":
  947. if (Array.isArray(propValue)) {
  948. return propValue.every(isNode);
  949. }
  950. if (propValue === null || isValidElement(propValue)) {
  951. return true;
  952. }
  953. var iteratorFn = getIteratorFn(propValue);
  954. if (iteratorFn) {
  955. var iterator = iteratorFn.call(propValue);
  956. var step;
  957. if (iteratorFn !== propValue.entries) {
  958. while(!(step = iterator.next()).done){
  959. if (!isNode(step.value)) {
  960. return false;
  961. }
  962. }
  963. } else {
  964. while(!(step = iterator.next()).done){
  965. var entry = step.value;
  966. if (entry) {
  967. if (!isNode(entry[1])) {
  968. return false;
  969. }
  970. }
  971. }
  972. }
  973. } else {
  974. return false;
  975. }
  976. return true;
  977. default:
  978. return false;
  979. }
  980. }
  981. function isSymbol2(propType, propValue) {
  982. if (propType === "symbol") {
  983. return true;
  984. }
  985. if (!propValue) {
  986. return false;
  987. }
  988. if (propValue["@@toStringTag"] === "Symbol") {
  989. return true;
  990. }
  991. if (typeof Symbol === "function" && propValue instanceof Symbol) {
  992. return true;
  993. }
  994. return false;
  995. }
  996. function getPropType(propValue) {
  997. var propType = typeof propValue;
  998. if (Array.isArray(propValue)) {
  999. return "array";
  1000. }
  1001. if (propValue instanceof RegExp) {
  1002. return "object";
  1003. }
  1004. if (isSymbol2(propType, propValue)) {
  1005. return "symbol";
  1006. }
  1007. return propType;
  1008. }
  1009. function getPreciseType(propValue) {
  1010. if (typeof propValue === "undefined" || propValue === null) {
  1011. return "" + propValue;
  1012. }
  1013. var propType = getPropType(propValue);
  1014. if (propType === "object") {
  1015. if (propValue instanceof Date) {
  1016. return "date";
  1017. } else if (propValue instanceof RegExp) {
  1018. return "regexp";
  1019. }
  1020. }
  1021. return propType;
  1022. }
  1023. function getPostfixForTypeWarning(value) {
  1024. var type = getPreciseType(value);
  1025. switch(type){
  1026. case "array":
  1027. case "object":
  1028. return "an " + type;
  1029. case "boolean":
  1030. case "date":
  1031. case "regexp":
  1032. return "a " + type;
  1033. default:
  1034. return type;
  1035. }
  1036. }
  1037. function getClassName(propValue) {
  1038. if (!propValue.constructor || !propValue.constructor.name) {
  1039. return ANONYMOUS;
  1040. }
  1041. return propValue.constructor.name;
  1042. }
  1043. ReactPropTypes.checkPropTypes = checkPropTypes;
  1044. ReactPropTypes.resetWarningCache = checkPropTypes.resetWarningCache;
  1045. ReactPropTypes.PropTypes = ReactPropTypes;
  1046. return ReactPropTypes;
  1047. };
  1048. function emptyFunction() {}
  1049. function emptyFunctionWithReset() {}
  1050. emptyFunctionWithReset.resetWarningCache = emptyFunction;
  1051. var require$$1 = factoryWithTypeCheckers;
  1052. var propTypes = createCommonjsModule(function(module) {
  1053. if (true) {
  1054. var ReactIs = reactIs;
  1055. var throwOnDirectAccess = true;
  1056. module.exports = require$$1(ReactIs.isElement, throwOnDirectAccess);
  1057. } else {}
  1058. });
  1059. var PropTypes = propTypes;
  1060. var AtActionSheetBody = function(_super) {
  1061. __extends(AtActionSheetBody2, _super);
  1062. function AtActionSheetBody2() {
  1063. return _super !== null && _super.apply(this, arguments) || this;
  1064. }
  1065. AtActionSheetBody2.prototype.render = function() {
  1066. var rootClass = classnames("at-action-sheet__body", this.props.className);
  1067. return import_react.default.createElement(View, {
  1068. className: rootClass
  1069. }, this.props.children);
  1070. };
  1071. return AtActionSheetBody2;
  1072. }(import_react.default.Component);
  1073. var AtActionSheetFooter = function(_super) {
  1074. __extends(AtActionSheetFooter2, _super);
  1075. function AtActionSheetFooter2() {
  1076. var _this = _super !== null && _super.apply(this, arguments) || this;
  1077. _this.handleClick = function() {
  1078. var _a2;
  1079. var args = [];
  1080. for(var _i = 0; _i < arguments.length; _i++){
  1081. args[_i] = arguments[_i];
  1082. }
  1083. if (typeof _this.props.onClick === "function") {
  1084. (_a2 = _this.props).onClick.apply(_a2, __spread(args));
  1085. }
  1086. };
  1087. return _this;
  1088. }
  1089. AtActionSheetFooter2.prototype.render = function() {
  1090. var rootClass = classnames("at-action-sheet__footer", this.props.className);
  1091. return import_react.default.createElement(View, {
  1092. onClick: this.handleClick,
  1093. className: rootClass
  1094. }, this.props.children);
  1095. };
  1096. return AtActionSheetFooter2;
  1097. }(import_react.default.Component);
  1098. AtActionSheetFooter.propTypes = {
  1099. onClick: PropTypes.func
  1100. };
  1101. var AtActionSheetHeader = function(_super) {
  1102. __extends(AtActionSheetHeader2, _super);
  1103. function AtActionSheetHeader2() {
  1104. return _super !== null && _super.apply(this, arguments) || this;
  1105. }
  1106. AtActionSheetHeader2.prototype.render = function() {
  1107. var rootClass = classnames("at-action-sheet__header", this.props.className);
  1108. return import_react.default.createElement(View, {
  1109. className: rootClass
  1110. }, this.props.children);
  1111. };
  1112. return AtActionSheetHeader2;
  1113. }(import_react.default.Component);
  1114. var AtActionSheet = function(_super) {
  1115. __extends(AtActionSheet2, _super);
  1116. function AtActionSheet2(props) {
  1117. var _this = _super.call(this, props) || this;
  1118. _this.handleClose = function() {
  1119. if (typeof _this.props.onClose === "function") {
  1120. _this.props.onClose();
  1121. }
  1122. };
  1123. _this.handleCancel = function() {
  1124. if (typeof _this.props.onCancel === "function") {
  1125. return _this.props.onCancel();
  1126. }
  1127. _this.close();
  1128. };
  1129. _this.close = function() {
  1130. _this.setState({
  1131. _isOpened: false
  1132. }, _this.handleClose);
  1133. };
  1134. _this.handleTouchMove = function(e2) {
  1135. e2.stopPropagation();
  1136. e2.preventDefault();
  1137. };
  1138. var isOpened = props.isOpened;
  1139. _this.state = {
  1140. _isOpened: isOpened
  1141. };
  1142. return _this;
  1143. }
  1144. AtActionSheet2.prototype.UNSAFE_componentWillReceiveProps = function(nextProps) {
  1145. var isOpened = nextProps.isOpened;
  1146. if (isOpened !== this.state._isOpened) {
  1147. this.setState({
  1148. _isOpened: isOpened
  1149. });
  1150. !isOpened && this.handleClose();
  1151. }
  1152. };
  1153. AtActionSheet2.prototype.render = function() {
  1154. var _a2 = this.props, title = _a2.title, cancelText = _a2.cancelText, className = _a2.className;
  1155. var _isOpened = this.state._isOpened;
  1156. var rootClass = classnames("at-action-sheet", {
  1157. "at-action-sheet--active": _isOpened
  1158. }, className);
  1159. return import_react.default.createElement(View, {
  1160. className: rootClass,
  1161. onTouchMove: this.handleTouchMove
  1162. }, import_react.default.createElement(View, {
  1163. onClick: this.close,
  1164. className: "at-action-sheet__overlay"
  1165. }), import_react.default.createElement(View, {
  1166. className: "at-action-sheet__container"
  1167. }, title && import_react.default.createElement(AtActionSheetHeader, null, title), import_react.default.createElement(AtActionSheetBody, null, this.props.children), cancelText && import_react.default.createElement(AtActionSheetFooter, {
  1168. onClick: this.handleCancel
  1169. }, cancelText)));
  1170. };
  1171. return AtActionSheet2;
  1172. }(import_react.default.Component);
  1173. AtActionSheet.defaultProps = {
  1174. title: "",
  1175. cancelText: "",
  1176. isOpened: false
  1177. };
  1178. AtActionSheet.propTypes = {
  1179. title: PropTypes.string,
  1180. onClose: PropTypes.func,
  1181. onCancel: PropTypes.func,
  1182. isOpened: PropTypes.bool.isRequired,
  1183. cancelText: PropTypes.string
  1184. };
  1185. var AtActionSheetItem = function(_super) {
  1186. __extends(AtActionSheetItem2, _super);
  1187. function AtActionSheetItem2() {
  1188. var _this = _super !== null && _super.apply(this, arguments) || this;
  1189. _this.handleClick = function(args) {
  1190. if (typeof _this.props.onClick === "function") {
  1191. _this.props.onClick(args);
  1192. }
  1193. };
  1194. return _this;
  1195. }
  1196. AtActionSheetItem2.prototype.render = function() {
  1197. var rootClass = classnames("at-action-sheet__item", this.props.className);
  1198. return import_react.default.createElement(View, {
  1199. className: rootClass,
  1200. onClick: this.handleClick
  1201. }, this.props.children);
  1202. };
  1203. return AtActionSheetItem2;
  1204. }(import_react.default.Component);
  1205. AtActionSheetItem.propTypes = {
  1206. onClick: PropTypes.func
  1207. };
  1208. var ENV$4 = import_taro.default.getEnv();
  1209. function delay(delayTime) {
  1210. if (delayTime === void 0) {
  1211. delayTime = 25;
  1212. }
  1213. return new Promise(function(resolve) {
  1214. setTimeout(function() {
  1215. resolve();
  1216. }, delayTime);
  1217. });
  1218. }
  1219. function delayQuerySelector(selectorStr, delayTime) {
  1220. if (delayTime === void 0) {
  1221. delayTime = 500;
  1222. }
  1223. return new Promise(function(resolve) {
  1224. var selector = import_taro.default.createSelectorQuery();
  1225. delay(delayTime).then(function() {
  1226. selector.select(selectorStr).boundingClientRect().exec(function(res) {
  1227. resolve(res);
  1228. });
  1229. });
  1230. });
  1231. }
  1232. function delayGetClientRect(_a2) {
  1233. var selectorStr = _a2.selectorStr, _b = _a2.delayTime, delayTime = _b === void 0 ? 500 : _b;
  1234. var selector = import_taro.default.createSelectorQuery();
  1235. return new Promise(function(resolve) {
  1236. delay(delayTime).then(function() {
  1237. selector.select(selectorStr).boundingClientRect().exec(function(res) {
  1238. resolve(res);
  1239. });
  1240. });
  1241. });
  1242. }
  1243. function uuid(len, radix) {
  1244. if (len === void 0) {
  1245. len = 8;
  1246. }
  1247. if (radix === void 0) {
  1248. radix = 16;
  1249. }
  1250. var chars = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz".split("");
  1251. var value = [];
  1252. var i = 0;
  1253. radix = radix || chars.length;
  1254. if (len) {
  1255. for(i = 0; i < len; i++)value[i] = chars[0 | Math.random() * radix];
  1256. } else {
  1257. var r2 = void 0;
  1258. value[8] = value[13] = value[18] = value[23] = "-";
  1259. value[14] = "4";
  1260. for(i = 0; i < 36; i++){
  1261. if (!value[i]) {
  1262. r2 = 0 | Math.random() * 16;
  1263. value[i] = chars[i === 19 ? r2 & 3 | 8 : r2];
  1264. }
  1265. }
  1266. }
  1267. return value.join("");
  1268. }
  1269. function getEventDetail(event) {
  1270. var detail;
  1271. switch(ENV$4){
  1272. case import_taro.default.ENV_TYPE.WEB:
  1273. detail = {
  1274. pageX: event.pageX,
  1275. pageY: event.pageY,
  1276. clientX: event.clientX,
  1277. clientY: event.clientY,
  1278. offsetX: event.offsetX,
  1279. offsetY: event.offsetY,
  1280. x: event.x,
  1281. y: event.y
  1282. };
  1283. break;
  1284. case import_taro.default.ENV_TYPE.WEAPP:
  1285. detail = {
  1286. pageX: event.touches[0].pageX,
  1287. pageY: event.touches[0].pageY,
  1288. clientX: event.touches[0].clientX,
  1289. clientY: event.touches[0].clientY,
  1290. offsetX: event.target.offsetLeft,
  1291. offsetY: event.target.offsetTop,
  1292. x: event.target.x,
  1293. y: event.target.y
  1294. };
  1295. break;
  1296. case import_taro.default.ENV_TYPE.ALIPAY:
  1297. detail = {
  1298. pageX: event.target.pageX,
  1299. pageY: event.target.pageY,
  1300. clientX: event.target.clientX,
  1301. clientY: event.target.clientY,
  1302. offsetX: event.target.offsetLeft,
  1303. offsetY: event.target.offsetTop,
  1304. x: event.target.x,
  1305. y: event.target.y
  1306. };
  1307. break;
  1308. case import_taro.default.ENV_TYPE.SWAN:
  1309. detail = {
  1310. pageX: event.changedTouches[0].pageX,
  1311. pageY: event.changedTouches[0].pageY,
  1312. clientX: event.target.clientX,
  1313. clientY: event.target.clientY,
  1314. offsetX: event.target.offsetLeft,
  1315. offsetY: event.target.offsetTop,
  1316. x: event.detail.x,
  1317. y: event.detail.y
  1318. };
  1319. break;
  1320. default:
  1321. detail = {
  1322. pageX: 0,
  1323. pageY: 0,
  1324. clientX: 0,
  1325. clientY: 0,
  1326. offsetX: 0,
  1327. offsetY: 0,
  1328. x: 0,
  1329. y: 0
  1330. };
  1331. console.warn("getEventDetail\u6682\u672A\u652F\u6301\u8BE5\u73AF\u5883");
  1332. break;
  1333. }
  1334. return detail;
  1335. }
  1336. function isTest() {
  1337. return false;
  1338. }
  1339. var scrollTop = 0;
  1340. function handleTouchScroll(flag) {
  1341. if (ENV$4 !== import_taro.default.ENV_TYPE.WEB) {
  1342. return;
  1343. }
  1344. if (flag) {
  1345. scrollTop = document.documentElement.scrollTop;
  1346. document.body.classList.add("at-frozen");
  1347. document.body.style.top = -scrollTop + "px";
  1348. } else {
  1349. document.body.style.top = "";
  1350. document.body.classList.remove("at-frozen");
  1351. document.documentElement.scrollTop = scrollTop;
  1352. }
  1353. }
  1354. function pxTransform(size) {
  1355. if (!size) return "";
  1356. var designWidth = 750;
  1357. var deviceRatio = {
  1358. 640: 2.34 / 2,
  1359. 750: 1,
  1360. 828: 1.81 / 2
  1361. };
  1362. return size / deviceRatio[designWidth] + "rpx";
  1363. }
  1364. function objectToString$2(style) {
  1365. if (style && typeof style === "object") {
  1366. var styleStr_1 = "";
  1367. Object.keys(style).forEach(function(key) {
  1368. var lowerCaseKey = key.replace(/([A-Z])/g, "-$1").toLowerCase();
  1369. styleStr_1 += lowerCaseKey + ":" + style[key] + ";";
  1370. });
  1371. return styleStr_1;
  1372. } else if (style && typeof style === "string") {
  1373. return style;
  1374. }
  1375. return "";
  1376. }
  1377. function mergeStyle(style1, style2) {
  1378. if (style1 && typeof style1 === "object" && style2 && typeof style2 === "object") {
  1379. return Object.assign({}, style1, style2);
  1380. }
  1381. return objectToString$2(style1) + objectToString$2(style2);
  1382. }
  1383. var AtLoading = function(_super) {
  1384. __extends(AtLoading2, _super);
  1385. function AtLoading2() {
  1386. return _super !== null && _super.apply(this, arguments) || this;
  1387. }
  1388. AtLoading2.prototype.render = function() {
  1389. var _a2 = this.props, color = _a2.color, size = _a2.size;
  1390. var loadingSize = typeof size === "string" ? size : String(size);
  1391. var sizeStyle = {
  1392. width: size ? "" + pxTransform(parseInt(loadingSize)) : "",
  1393. height: size ? "" + pxTransform(parseInt(loadingSize)) : ""
  1394. };
  1395. var colorStyle = {
  1396. border: color ? "1px solid " + color : "",
  1397. borderColor: color ? color + " transparent transparent transparent" : ""
  1398. };
  1399. var ringStyle = Object.assign({}, colorStyle, sizeStyle);
  1400. return import_react.default.createElement(View, {
  1401. className: "at-loading",
  1402. style: sizeStyle
  1403. }, import_react.default.createElement(View, {
  1404. className: "at-loading__ring",
  1405. style: ringStyle
  1406. }), import_react.default.createElement(View, {
  1407. className: "at-loading__ring",
  1408. style: ringStyle
  1409. }), import_react.default.createElement(View, {
  1410. className: "at-loading__ring",
  1411. style: ringStyle
  1412. }));
  1413. };
  1414. return AtLoading2;
  1415. }(import_react.default.Component);
  1416. AtLoading.defaultProps = {
  1417. size: 0,
  1418. color: ""
  1419. };
  1420. AtLoading.propTypes = {
  1421. size: PropTypes.oneOfType([
  1422. PropTypes.string,
  1423. PropTypes.number
  1424. ]),
  1425. color: PropTypes.oneOfType([
  1426. PropTypes.string,
  1427. PropTypes.number
  1428. ])
  1429. };
  1430. var AtActivityIndicator = function(_super) {
  1431. __extends(AtActivityIndicator2, _super);
  1432. function AtActivityIndicator2() {
  1433. return _super !== null && _super.apply(this, arguments) || this;
  1434. }
  1435. AtActivityIndicator2.prototype.render = function() {
  1436. var _a2 = this.props, color = _a2.color, size = _a2.size, mode = _a2.mode, content = _a2.content, isOpened = _a2.isOpened;
  1437. var rootClass = classnames("at-activity-indicator", {
  1438. "at-activity-indicator--center": mode === "center",
  1439. "at-activity-indicator--isopened": isOpened
  1440. }, this.props.className);
  1441. return import_react.default.createElement(View, {
  1442. className: rootClass
  1443. }, import_react.default.createElement(View, {
  1444. className: "at-activity-indicator__body"
  1445. }, import_react.default.createElement(AtLoading, {
  1446. size,
  1447. color
  1448. })), content && import_react.default.createElement(Text, {
  1449. className: "at-activity-indicator__content"
  1450. }, content));
  1451. };
  1452. return AtActivityIndicator2;
  1453. }(import_react.default.Component);
  1454. AtActivityIndicator.defaultProps = {
  1455. size: 0,
  1456. mode: "normal",
  1457. color: "",
  1458. content: "",
  1459. className: "",
  1460. isOpened: true
  1461. };
  1462. AtActivityIndicator.propTypes = {
  1463. size: PropTypes.number,
  1464. mode: PropTypes.string,
  1465. color: PropTypes.string,
  1466. content: PropTypes.string,
  1467. className: PropTypes.oneOfType([
  1468. PropTypes.array,
  1469. PropTypes.string
  1470. ]),
  1471. isOpened: PropTypes.bool
  1472. };
  1473. var SIZE_CLASS$2 = {
  1474. large: "large",
  1475. normal: "normal",
  1476. small: "small"
  1477. };
  1478. var AtAvatar = function(_super) {
  1479. __extends(AtAvatar2, _super);
  1480. function AtAvatar2(props) {
  1481. var _this = _super.call(this, props) || this;
  1482. _this.state = {
  1483. isWEAPP: import_taro.default.getEnv() === import_taro.default.ENV_TYPE.WEAPP
  1484. };
  1485. return _this;
  1486. }
  1487. AtAvatar2.prototype.render = function() {
  1488. var _a2;
  1489. var _b = this.props, size = _b.size, circle = _b.circle, image = _b.image, text = _b.text, openData = _b.openData, customStyle = _b.customStyle;
  1490. var rootClassName = [
  1491. "at-avatar"
  1492. ];
  1493. var iconSize = SIZE_CLASS$2[size || "normal"];
  1494. var classObject = (_a2 = {}, _a2["at-avatar--" + iconSize] = iconSize, _a2["at-avatar--circle"] = circle, _a2);
  1495. var letter = "";
  1496. if (text) letter = text[0];
  1497. var elem;
  1498. if (openData && openData.type === "userAvatarUrl" && this.state.isWEAPP) {
  1499. elem = import_react.default.createElement(OpenData, {
  1500. type: openData.type
  1501. });
  1502. } else if (image) {
  1503. elem = import_react.default.createElement(Image, {
  1504. className: "at-avatar__img",
  1505. src: image
  1506. });
  1507. } else {
  1508. elem = import_react.default.createElement(Text, {
  1509. className: "at-avatar__text"
  1510. }, letter);
  1511. }
  1512. return import_react.default.createElement(View, {
  1513. className: classnames(rootClassName, classObject, this.props.className),
  1514. style: customStyle
  1515. }, elem);
  1516. };
  1517. return AtAvatar2;
  1518. }(import_react.default.Component);
  1519. AtAvatar.defaultProps = {
  1520. size: "normal",
  1521. circle: false,
  1522. text: "",
  1523. image: "",
  1524. customStyle: {},
  1525. className: ""
  1526. };
  1527. AtAvatar.propTypes = {
  1528. size: PropTypes.oneOf([
  1529. "large",
  1530. "normal",
  1531. "small"
  1532. ]),
  1533. circle: PropTypes.bool,
  1534. text: PropTypes.string,
  1535. image: PropTypes.string,
  1536. openData: PropTypes.object,
  1537. customStyle: PropTypes.oneOfType([
  1538. PropTypes.object,
  1539. PropTypes.string
  1540. ]),
  1541. className: PropTypes.oneOfType([
  1542. PropTypes.array,
  1543. PropTypes.string
  1544. ])
  1545. };
  1546. var AtBadge = function(_super) {
  1547. __extends(AtBadge2, _super);
  1548. function AtBadge2(props) {
  1549. var _this = _super.call(this, props) || this;
  1550. _this.state = {};
  1551. return _this;
  1552. }
  1553. AtBadge2.prototype.formatValue = function(value, maxValue) {
  1554. if (value === "" || value === null || typeof value === "undefined") return "";
  1555. var numValue = +value;
  1556. if (Number.isNaN(numValue)) {
  1557. return value;
  1558. }
  1559. return numValue > maxValue ? maxValue + "+" : numValue;
  1560. };
  1561. AtBadge2.prototype.render = function() {
  1562. var _a2 = this.props, dot = _a2.dot, value = _a2.value, _b = _a2.maxValue, maxValue = _b === void 0 ? 99 : _b, customStyle = _a2.customStyle;
  1563. var rootClassName = [
  1564. "at-badge"
  1565. ];
  1566. var val = this.formatValue(value, maxValue);
  1567. return import_react.default.createElement(View, {
  1568. className: classnames(rootClassName, this.props.className),
  1569. style: customStyle
  1570. }, this.props.children, dot ? import_react.default.createElement(View, {
  1571. className: "at-badge__dot"
  1572. }) : val !== "" && import_react.default.createElement(View, {
  1573. className: "at-badge__num"
  1574. }, val));
  1575. };
  1576. return AtBadge2;
  1577. }(import_react.default.Component);
  1578. AtBadge.defaultProps = {
  1579. dot: false,
  1580. value: "",
  1581. maxValue: 99,
  1582. customStyle: {},
  1583. className: ""
  1584. };
  1585. AtBadge.propTypes = {
  1586. dot: PropTypes.bool,
  1587. value: PropTypes.oneOfType([
  1588. PropTypes.string,
  1589. PropTypes.number
  1590. ]),
  1591. maxValue: PropTypes.number,
  1592. customStyle: PropTypes.oneOfType([
  1593. PropTypes.object,
  1594. PropTypes.string
  1595. ]),
  1596. className: PropTypes.oneOfType([
  1597. PropTypes.array,
  1598. PropTypes.string
  1599. ])
  1600. };
  1601. var SIZE_CLASS$1 = {
  1602. normal: "normal",
  1603. small: "small"
  1604. };
  1605. var TYPE_CLASS$1 = {
  1606. primary: "primary",
  1607. secondary: "secondary"
  1608. };
  1609. var AtButton = function(_super) {
  1610. __extends(AtButton2, _super);
  1611. function AtButton2(props) {
  1612. var _this = _super.call(this, props) || this;
  1613. _this.state = {
  1614. isWEB: import_taro.default.getEnv() === import_taro.default.ENV_TYPE.WEB,
  1615. isWEAPP: import_taro.default.getEnv() === import_taro.default.ENV_TYPE.WEAPP,
  1616. isALIPAY: import_taro.default.getEnv() === import_taro.default.ENV_TYPE.ALIPAY
  1617. };
  1618. return _this;
  1619. }
  1620. AtButton2.prototype.onClick = function(event) {
  1621. if (!this.props.disabled) {
  1622. this.props.onClick && this.props.onClick(event);
  1623. }
  1624. };
  1625. AtButton2.prototype.onGetUserInfo = function(event) {
  1626. this.props.onGetUserInfo && this.props.onGetUserInfo(event);
  1627. };
  1628. AtButton2.prototype.onContact = function(event) {
  1629. this.props.onContact && this.props.onContact(event);
  1630. };
  1631. AtButton2.prototype.onGetPhoneNumber = function(event) {
  1632. this.props.onGetPhoneNumber && this.props.onGetPhoneNumber(event);
  1633. };
  1634. AtButton2.prototype.onError = function(event) {
  1635. this.props.onError && this.props.onError(event);
  1636. };
  1637. AtButton2.prototype.onOpenSetting = function(event) {
  1638. this.props.onOpenSetting && this.props.onOpenSetting(event);
  1639. };
  1640. AtButton2.prototype.render = function() {
  1641. var _a2;
  1642. var _b = this.props, _c = _b.size, size = _c === void 0 ? "normal" : _c, _d = _b.type, type = _d === void 0 ? "" : _d, circle = _b.circle, full = _b.full, loading2 = _b.loading, disabled = _b.disabled, customStyle = _b.customStyle, formType = _b.formType, openType = _b.openType, lang = _b.lang, sessionFrom = _b.sessionFrom, sendMessageTitle = _b.sendMessageTitle, sendMessagePath = _b.sendMessagePath, sendMessageImg = _b.sendMessageImg, showMessageCard = _b.showMessageCard, appParameter = _b.appParameter;
  1643. var _e = this.state, isWEAPP = _e.isWEAPP, isALIPAY = _e.isALIPAY, isWEB = _e.isWEB;
  1644. var rootClassName = [
  1645. "at-button"
  1646. ];
  1647. var classObject = (_a2 = {}, _a2["at-button--" + SIZE_CLASS$1[size]] = SIZE_CLASS$1[size], _a2["at-button--disabled"] = disabled, _a2["at-button--" + type] = TYPE_CLASS$1[type], _a2["at-button--circle"] = circle, _a2["at-button--full"] = full, _a2);
  1648. var loadingColor = type === "primary" ? "#fff" : "";
  1649. var loadingSize = size === "small" ? "30" : 0;
  1650. var loadingComponent = null;
  1651. if (loading2) {
  1652. loadingComponent = import_react.default.createElement(View, {
  1653. className: "at-button__icon"
  1654. }, import_react.default.createElement(AtLoading, {
  1655. color: loadingColor,
  1656. size: loadingSize
  1657. }));
  1658. rootClassName.push("at-button--icon");
  1659. }
  1660. var webButton = import_react.default.createElement(Button, {
  1661. className: "at-button__wxbutton",
  1662. lang,
  1663. formType
  1664. });
  1665. var button = import_react.default.createElement(Button, {
  1666. className: "at-button__wxbutton",
  1667. formType,
  1668. openType,
  1669. lang,
  1670. sessionFrom,
  1671. sendMessageTitle,
  1672. sendMessagePath,
  1673. sendMessageImg,
  1674. showMessageCard,
  1675. appParameter,
  1676. onGetUserInfo: this.onGetUserInfo.bind(this),
  1677. onGetPhoneNumber: this.onGetPhoneNumber.bind(this),
  1678. onOpenSetting: this.onOpenSetting.bind(this),
  1679. onError: this.onError.bind(this),
  1680. onContact: this.onContact.bind(this)
  1681. });
  1682. return import_react.default.createElement(View, {
  1683. className: classnames(rootClassName, classObject, this.props.className),
  1684. style: customStyle,
  1685. onClick: this.onClick.bind(this)
  1686. }, isWEB && !disabled && webButton, isWEAPP && !disabled && button, isALIPAY && !disabled && button, loadingComponent, import_react.default.createElement(View, {
  1687. className: "at-button__text"
  1688. }, this.props.children));
  1689. };
  1690. return AtButton2;
  1691. }(import_react.default.Component);
  1692. AtButton.defaultProps = {
  1693. size: "normal",
  1694. circle: false,
  1695. full: false,
  1696. loading: false,
  1697. disabled: false,
  1698. customStyle: {},
  1699. lang: "en",
  1700. sessionFrom: "",
  1701. sendMessageTitle: "",
  1702. sendMessagePath: "",
  1703. sendMessageImg: "",
  1704. showMessageCard: false,
  1705. appParameter: ""
  1706. };
  1707. AtButton.propTypes = {
  1708. size: PropTypes.oneOf([
  1709. "normal",
  1710. "small"
  1711. ]),
  1712. type: PropTypes.oneOf([
  1713. "primary",
  1714. "secondary",
  1715. ""
  1716. ]),
  1717. circle: PropTypes.bool,
  1718. full: PropTypes.bool,
  1719. loading: PropTypes.bool,
  1720. disabled: PropTypes.bool,
  1721. onClick: PropTypes.func,
  1722. customStyle: PropTypes.oneOfType([
  1723. PropTypes.object,
  1724. PropTypes.string
  1725. ]),
  1726. formType: PropTypes.oneOf([
  1727. "submit",
  1728. "reset",
  1729. ""
  1730. ]),
  1731. openType: PropTypes.oneOf([
  1732. "contact",
  1733. "share",
  1734. "getUserInfo",
  1735. "getPhoneNumber",
  1736. "launchApp",
  1737. "openSetting",
  1738. "feedback",
  1739. "getRealnameAuthInfo",
  1740. "getAuthorize",
  1741. "contactShare",
  1742. ""
  1743. ]),
  1744. lang: PropTypes.string,
  1745. sessionFrom: PropTypes.string,
  1746. sendMessageTitle: PropTypes.string,
  1747. sendMessagePath: PropTypes.string,
  1748. sendMessageImg: PropTypes.string,
  1749. showMessageCard: PropTypes.bool,
  1750. appParameter: PropTypes.string,
  1751. onGetUserInfo: PropTypes.func,
  1752. onContact: PropTypes.func,
  1753. onGetPhoneNumber: PropTypes.func,
  1754. onError: PropTypes.func,
  1755. onOpenSetting: PropTypes.func
  1756. };
  1757. var AtCard = function(_super) {
  1758. __extends(AtCard2, _super);
  1759. function AtCard2() {
  1760. var _this = _super !== null && _super.apply(this, arguments) || this;
  1761. _this.handleClick = function(args) {
  1762. if (typeof _this.props.onClick === "function") {
  1763. _this.props.onClick(args);
  1764. }
  1765. };
  1766. return _this;
  1767. }
  1768. AtCard2.prototype.render = function() {
  1769. var _a2;
  1770. var _b = this.props, title = _b.title, note = _b.note, extra = _b.extra, extraStyle = _b.extraStyle, thumb = _b.thumb, isFull = _b.isFull, icon = _b.icon, renderIcon = _b.renderIcon;
  1771. var rootClass = classnames("at-card", {
  1772. "at-card--full": isFull
  1773. }, this.props.className);
  1774. var iconClass = classnames((_a2 = {
  1775. "at-icon": true
  1776. }, _a2["at-icon-" + (icon && icon.value)] = icon && icon.value, _a2["at-card__header-icon"] = true, _a2));
  1777. var iconStyle = {
  1778. color: icon && icon.color || "",
  1779. fontSize: icon && icon.size + "px" || ""
  1780. };
  1781. return import_react.default.createElement(View, {
  1782. onClick: this.handleClick,
  1783. className: rootClass
  1784. }, import_react.default.createElement(View, {
  1785. className: "at-card__header"
  1786. }, thumb && import_react.default.createElement(View, {
  1787. className: "at-card__header-thumb"
  1788. }, import_react.default.createElement(Image, {
  1789. className: "at-card__header-thumb-info",
  1790. mode: "scaleToFill",
  1791. src: thumb
  1792. })), renderIcon || "", !thumb && icon && icon.value && import_react.default.createElement(Text, {
  1793. className: iconClass,
  1794. style: iconStyle
  1795. }), import_react.default.createElement(Text, {
  1796. className: "at-card__header-title"
  1797. }, title), extra && import_react.default.createElement(Text, {
  1798. style: __assign({}, extraStyle),
  1799. className: "at-card__header-extra"
  1800. }, extra)), import_react.default.createElement(View, {
  1801. className: "at-card__content"
  1802. }, import_react.default.createElement(View, {
  1803. className: "at-card__content-info"
  1804. }, this.props.children), note && import_react.default.createElement(View, {
  1805. className: "at-card__content-note"
  1806. }, note)));
  1807. };
  1808. return AtCard2;
  1809. }(import_react.default.Component);
  1810. AtCard.defaultProps = {
  1811. note: "",
  1812. isFull: false,
  1813. thumb: "",
  1814. title: "",
  1815. extra: "",
  1816. extraStyle: {}
  1817. };
  1818. AtCard.propTypes = {
  1819. note: PropTypes.string,
  1820. isFull: PropTypes.bool,
  1821. thumb: PropTypes.string,
  1822. title: PropTypes.string,
  1823. extra: PropTypes.string,
  1824. icon: PropTypes.object,
  1825. onClick: PropTypes.func,
  1826. renderIcon: PropTypes.oneOfType([
  1827. PropTypes.string,
  1828. PropTypes.element
  1829. ]),
  1830. extraStyle: PropTypes.object
  1831. };
  1832. var AtCheckbox = function(_super) {
  1833. __extends(AtCheckbox2, _super);
  1834. function AtCheckbox2() {
  1835. return _super !== null && _super.apply(this, arguments) || this;
  1836. }
  1837. AtCheckbox2.prototype.handleClick = function(idx) {
  1838. var _a2 = this.props, selectedList = _a2.selectedList, options = _a2.options;
  1839. var option = options[idx];
  1840. var disabled = option.disabled, value = option.value;
  1841. if (disabled) return;
  1842. var selectedSet = new Set(selectedList);
  1843. if (!selectedSet.has(value)) {
  1844. selectedSet.add(value);
  1845. } else {
  1846. selectedSet.delete(value);
  1847. }
  1848. this.props.onChange(__spread(selectedSet));
  1849. };
  1850. AtCheckbox2.prototype.render = function() {
  1851. var _this = this;
  1852. var _a2 = this.props, customStyle = _a2.customStyle, className = _a2.className, options = _a2.options, selectedList = _a2.selectedList;
  1853. var rootCls = classnames("at-checkbox", className);
  1854. return import_react.default.createElement(View, {
  1855. className: rootCls,
  1856. style: customStyle
  1857. }, options.map(function(option, idx) {
  1858. var value = option.value, disabled = option.disabled, label = option.label, desc = option.desc;
  1859. var optionCls = classnames("at-checkbox__option", {
  1860. "at-checkbox__option--disabled": disabled,
  1861. "at-checkbox__option--selected": selectedList.includes(value)
  1862. });
  1863. return import_react.default.createElement(View, {
  1864. className: optionCls,
  1865. key: value,
  1866. onClick: _this.handleClick.bind(_this, idx)
  1867. }, import_react.default.createElement(View, {
  1868. className: "at-checkbox__option-wrap"
  1869. }, import_react.default.createElement(View, {
  1870. className: "at-checkbox__option-cnt"
  1871. }, import_react.default.createElement(View, {
  1872. className: "at-checkbox__icon-cnt"
  1873. }, import_react.default.createElement(Text, {
  1874. className: "at-icon at-icon-check"
  1875. })), import_react.default.createElement(View, {
  1876. className: "at-checkbox__title"
  1877. }, label)), desc && import_react.default.createElement(View, {
  1878. className: "at-checkbox__desc"
  1879. }, desc)));
  1880. }));
  1881. };
  1882. return AtCheckbox2;
  1883. }(import_react.default.Component);
  1884. AtCheckbox.defaultProps = {
  1885. customStyle: "",
  1886. className: "",
  1887. options: [],
  1888. selectedList: [],
  1889. onChange: function() {}
  1890. };
  1891. AtCheckbox.propTypes = {
  1892. customStyle: PropTypes.oneOfType([
  1893. PropTypes.object,
  1894. PropTypes.string
  1895. ]),
  1896. className: PropTypes.oneOfType([
  1897. PropTypes.array,
  1898. PropTypes.string
  1899. ]),
  1900. options: PropTypes.array,
  1901. selectedList: PropTypes.array,
  1902. onChange: PropTypes.func
  1903. };
  1904. var AtList = function(_super) {
  1905. __extends(AtList2, _super);
  1906. function AtList2() {
  1907. return _super !== null && _super.apply(this, arguments) || this;
  1908. }
  1909. AtList2.prototype.render = function() {
  1910. var rootClass = classnames("at-list", {
  1911. "at-list--no-border": !this.props.hasBorder
  1912. }, this.props.className);
  1913. return import_react.default.createElement(View, {
  1914. className: rootClass
  1915. }, this.props.children);
  1916. };
  1917. return AtList2;
  1918. }(import_react.default.Component);
  1919. AtList.defaultProps = {
  1920. hasBorder: true
  1921. };
  1922. AtList.propTypes = {
  1923. hasBorder: PropTypes.bool
  1924. };
  1925. var AtListItem = function(_super) {
  1926. __extends(AtListItem2, _super);
  1927. function AtListItem2() {
  1928. var _this = _super !== null && _super.apply(this, arguments) || this;
  1929. _this.handleClick = function(event) {
  1930. if (typeof _this.props.onClick === "function" && !_this.props.disabled) {
  1931. _this.props.onClick(event);
  1932. }
  1933. };
  1934. _this.handleSwitchChange = function(event) {
  1935. if (typeof _this.props.onSwitchChange === "function" && !_this.props.disabled) {
  1936. _this.props.onSwitchChange(event);
  1937. }
  1938. };
  1939. return _this;
  1940. }
  1941. AtListItem2.prototype.handleSwitchClick = function(e2) {
  1942. e2.stopPropagation();
  1943. };
  1944. AtListItem2.prototype.render = function() {
  1945. var _a2;
  1946. var _b = this.props, note = _b.note, arrow = _b.arrow, thumb = _b.thumb, iconInfo = _b.iconInfo, disabled = _b.disabled, isSwitch = _b.isSwitch, hasBorder = _b.hasBorder, extraThumb = _b.extraThumb, switchColor = _b.switchColor, switchIsCheck = _b.switchIsCheck;
  1947. var _c = this.props, extraText = _c.extraText, title = _c.title;
  1948. extraText = String(extraText);
  1949. title = String(title);
  1950. var rootClass = classnames("at-list__item", {
  1951. "at-list__item--thumb": thumb,
  1952. "at-list__item--multiple": note,
  1953. "at-list__item--disabled": disabled,
  1954. "at-list__item--no-border": !hasBorder
  1955. }, this.props.className);
  1956. var iconClass = classnames(iconInfo && iconInfo.prefixClass || "at-icon", (_a2 = {}, _a2[(iconInfo && iconInfo.prefixClass || "at-icon") + "-" + (iconInfo && iconInfo.value)] = iconInfo && iconInfo.value, _a2), iconInfo && iconInfo.className);
  1957. return import_react.default.createElement(View, {
  1958. className: rootClass,
  1959. onClick: this.handleClick
  1960. }, import_react.default.createElement(View, {
  1961. className: "at-list__item-container"
  1962. }, thumb && import_react.default.createElement(View, {
  1963. className: "at-list__item-thumb item-thumb"
  1964. }, import_react.default.createElement(Image, {
  1965. className: "item-thumb__info",
  1966. mode: "scaleToFill",
  1967. src: thumb
  1968. })), iconInfo && iconInfo.value && import_react.default.createElement(View, {
  1969. className: "at-list__item-icon item-icon"
  1970. }, import_react.default.createElement(Text, {
  1971. className: iconClass,
  1972. style: mergeStyle({
  1973. color: iconInfo.color || "",
  1974. fontSize: (iconInfo.size || 24) + "px"
  1975. }, iconInfo.customStyle || "")
  1976. })), import_react.default.createElement(View, {
  1977. className: "at-list__item-content item-content"
  1978. }, import_react.default.createElement(View, {
  1979. className: "item-content__info"
  1980. }, import_react.default.createElement(View, {
  1981. className: "item-content__info-title"
  1982. }, title), note && import_react.default.createElement(View, {
  1983. className: "item-content__info-note"
  1984. }, note))), import_react.default.createElement(View, {
  1985. className: "at-list__item-extra item-extra"
  1986. }, extraText && import_react.default.createElement(View, {
  1987. className: "item-extra__info"
  1988. }, extraText), extraThumb && !extraText && import_react.default.createElement(View, {
  1989. className: "item-extra__image"
  1990. }, import_react.default.createElement(Image, {
  1991. className: "item-extra__image-info",
  1992. mode: "aspectFit",
  1993. src: extraThumb
  1994. })), isSwitch && !extraThumb && !extraText && import_react.default.createElement(View, {
  1995. className: "item-extra__switch",
  1996. onClick: this.handleSwitchClick
  1997. }, import_react.default.createElement(Switch, {
  1998. color: switchColor,
  1999. disabled,
  2000. checked: switchIsCheck,
  2001. onChange: this.handleSwitchChange
  2002. })), arrow ? import_react.default.createElement(View, {
  2003. className: "item-extra__icon"
  2004. }, import_react.default.createElement(Text, {
  2005. className: "at-icon item-extra__icon-arrow at-icon-chevron-" + arrow
  2006. })) : null)));
  2007. };
  2008. return AtListItem2;
  2009. }(import_react.default.Component);
  2010. AtListItem.defaultProps = {
  2011. note: "",
  2012. disabled: false,
  2013. title: "",
  2014. thumb: "",
  2015. isSwitch: false,
  2016. hasBorder: true,
  2017. switchColor: "#6190E8",
  2018. switchIsCheck: false,
  2019. extraText: "",
  2020. extraThumb: "",
  2021. iconInfo: {
  2022. value: ""
  2023. }
  2024. };
  2025. AtListItem.propTypes = {
  2026. note: PropTypes.string,
  2027. disabled: PropTypes.bool,
  2028. title: PropTypes.string,
  2029. thumb: PropTypes.string,
  2030. onClick: PropTypes.func,
  2031. isSwitch: PropTypes.bool,
  2032. hasBorder: PropTypes.bool,
  2033. switchColor: PropTypes.string,
  2034. switchIsCheck: PropTypes.bool,
  2035. extraText: PropTypes.string,
  2036. extraThumb: PropTypes.string,
  2037. onSwitchChange: PropTypes.func,
  2038. arrow: PropTypes.oneOf([
  2039. "up",
  2040. "down",
  2041. "right"
  2042. ]),
  2043. iconInfo: PropTypes.shape({
  2044. size: PropTypes.number,
  2045. value: PropTypes.string,
  2046. color: PropTypes.string,
  2047. prefixClass: PropTypes.string,
  2048. customStyle: PropTypes.oneOfType([
  2049. PropTypes.object,
  2050. PropTypes.string
  2051. ]),
  2052. className: PropTypes.oneOfType([
  2053. PropTypes.array,
  2054. PropTypes.string
  2055. ])
  2056. })
  2057. };
  2058. var AtDrawer = function(_super) {
  2059. __extends(AtDrawer2, _super);
  2060. function AtDrawer2(props) {
  2061. var _this = _super.call(this, props) || this;
  2062. _this.state = {
  2063. animShow: false,
  2064. _show: props.show
  2065. };
  2066. return _this;
  2067. }
  2068. AtDrawer2.prototype.componentDidMount = function() {
  2069. var _show = this.state._show;
  2070. if (_show) this.animShow();
  2071. };
  2072. AtDrawer2.prototype.onItemClick = function(index) {
  2073. this.props.onItemClick && this.props.onItemClick(index);
  2074. this.animHide();
  2075. };
  2076. AtDrawer2.prototype.onHide = function() {
  2077. var _this = this;
  2078. this.setState({
  2079. _show: false
  2080. }, function() {
  2081. _this.props.onClose && _this.props.onClose();
  2082. });
  2083. };
  2084. AtDrawer2.prototype.animHide = function() {
  2085. var _this = this;
  2086. this.setState({
  2087. animShow: false
  2088. });
  2089. setTimeout(function() {
  2090. _this.onHide();
  2091. }, 300);
  2092. };
  2093. AtDrawer2.prototype.animShow = function() {
  2094. var _this = this;
  2095. this.setState({
  2096. _show: true
  2097. });
  2098. setTimeout(function() {
  2099. _this.setState({
  2100. animShow: true
  2101. });
  2102. }, 200);
  2103. };
  2104. AtDrawer2.prototype.onMaskClick = function() {
  2105. this.animHide();
  2106. };
  2107. AtDrawer2.prototype.UNSAFE_componentWillReceiveProps = function(nextProps) {
  2108. var show = nextProps.show;
  2109. if (show !== this.state._show) {
  2110. show ? this.animShow() : this.animHide();
  2111. }
  2112. };
  2113. AtDrawer2.prototype.render = function() {
  2114. var _this = this;
  2115. var _a2 = this.props, mask = _a2.mask, width = _a2.width, right = _a2.right, items = _a2.items;
  2116. var _b = this.state, animShow = _b.animShow, _show = _b._show;
  2117. var rootClassName = [
  2118. "at-drawer"
  2119. ];
  2120. var maskStyle = {
  2121. display: mask ? "block" : "none",
  2122. opacity: animShow ? 1 : 0
  2123. };
  2124. var listStyle = {
  2125. width,
  2126. transition: animShow ? "all 225ms cubic-bezier(0, 0, 0.2, 1)" : "all 195ms cubic-bezier(0.4, 0, 0.6, 1)"
  2127. };
  2128. var classObject = {
  2129. "at-drawer--show": animShow,
  2130. "at-drawer--right": right,
  2131. "at-drawer--left": !right
  2132. };
  2133. return _show ? import_react.default.createElement(View, {
  2134. className: classnames(rootClassName, classObject, this.props.className)
  2135. }, import_react.default.createElement(View, {
  2136. className: "at-drawer__mask",
  2137. style: maskStyle,
  2138. onClick: this.onMaskClick.bind(this)
  2139. }), import_react.default.createElement(View, {
  2140. className: "at-drawer__content",
  2141. style: listStyle
  2142. }, !!items && items.length ? import_react.default.createElement(AtList, null, items.map(function(name, index) {
  2143. return import_react.default.createElement(AtListItem, {
  2144. key: name + "-" + index,
  2145. "data-index": index,
  2146. onClick: _this.onItemClick.bind(_this, index),
  2147. title: name,
  2148. arrow: "right"
  2149. });
  2150. })) : this.props.children)) : import_react.default.createElement(View, null);
  2151. };
  2152. return AtDrawer2;
  2153. }(import_react.default.Component);
  2154. AtDrawer.defaultProps = {
  2155. show: false,
  2156. mask: true,
  2157. width: "",
  2158. right: false,
  2159. items: []
  2160. };
  2161. AtDrawer.propTypes = {
  2162. show: PropTypes.bool,
  2163. mask: PropTypes.bool,
  2164. width: PropTypes.string,
  2165. items: PropTypes.arrayOf(PropTypes.string),
  2166. onItemClick: PropTypes.func,
  2167. onClose: PropTypes.func
  2168. };
  2169. var AtFloatLayout = function(_super) {
  2170. __extends(AtFloatLayout2, _super);
  2171. function AtFloatLayout2(props) {
  2172. var _this = _super.call(this, props) || this;
  2173. _this.handleClose = function() {
  2174. if (typeof _this.props.onClose === "function") {
  2175. _this.props.onClose();
  2176. }
  2177. };
  2178. _this.close = function() {
  2179. _this.setState({
  2180. _isOpened: false
  2181. }, _this.handleClose);
  2182. };
  2183. _this.handleTouchMove = function(e2) {
  2184. e2.stopPropagation();
  2185. };
  2186. var isOpened = props.isOpened;
  2187. _this.state = {
  2188. _isOpened: isOpened
  2189. };
  2190. return _this;
  2191. }
  2192. AtFloatLayout2.prototype.UNSAFE_componentWillReceiveProps = function(nextProps) {
  2193. var isOpened = nextProps.isOpened;
  2194. if (this.props.isOpened !== isOpened) {
  2195. handleTouchScroll(isOpened);
  2196. }
  2197. if (isOpened !== this.state._isOpened) {
  2198. this.setState({
  2199. _isOpened: isOpened
  2200. });
  2201. }
  2202. };
  2203. AtFloatLayout2.prototype.render = function() {
  2204. var _isOpened = this.state._isOpened;
  2205. var _a2 = this.props, title = _a2.title, scrollY = _a2.scrollY, scrollX = _a2.scrollX, scrollTop2 = _a2.scrollTop, scrollLeft = _a2.scrollLeft, upperThreshold = _a2.upperThreshold, lowerThreshold = _a2.lowerThreshold, scrollWithAnimation = _a2.scrollWithAnimation;
  2206. var rootClass = classnames("at-float-layout", {
  2207. "at-float-layout--active": _isOpened
  2208. }, this.props.className);
  2209. return import_react.default.createElement(View, {
  2210. className: rootClass,
  2211. onTouchMove: this.handleTouchMove
  2212. }, import_react.default.createElement(View, {
  2213. onClick: this.close,
  2214. className: "at-float-layout__overlay"
  2215. }), import_react.default.createElement(View, {
  2216. className: "at-float-layout__container layout"
  2217. }, title ? import_react.default.createElement(View, {
  2218. className: "layout-header"
  2219. }, import_react.default.createElement(Text, {
  2220. className: "layout-header__title"
  2221. }, title), import_react.default.createElement(View, {
  2222. className: "layout-header__btn-close",
  2223. onClick: this.close
  2224. })) : null, import_react.default.createElement(View, {
  2225. className: "layout-body"
  2226. }, import_react.default.createElement(ScrollView, {
  2227. scrollY,
  2228. scrollX,
  2229. scrollTop: scrollTop2,
  2230. scrollLeft,
  2231. upperThreshold,
  2232. lowerThreshold,
  2233. scrollWithAnimation,
  2234. onScroll: this.props.onScroll,
  2235. onScrollToLower: this.props.onScrollToLower,
  2236. onScrollToUpper: this.props.onScrollToUpper,
  2237. className: "layout-body__content"
  2238. }, this.props.children))));
  2239. };
  2240. return AtFloatLayout2;
  2241. }(import_react.default.Component);
  2242. AtFloatLayout.defaultProps = {
  2243. title: "",
  2244. isOpened: false,
  2245. scrollY: true,
  2246. scrollX: false,
  2247. scrollWithAnimation: false
  2248. };
  2249. AtFloatLayout.propTypes = {
  2250. title: PropTypes.string,
  2251. isOpened: PropTypes.bool,
  2252. scrollY: PropTypes.bool,
  2253. scrollX: PropTypes.bool,
  2254. scrollTop: PropTypes.number,
  2255. scrollLeft: PropTypes.number,
  2256. upperThreshold: PropTypes.number,
  2257. lowerThreshold: PropTypes.number,
  2258. scrollWithAnimation: PropTypes.bool,
  2259. onClose: PropTypes.func,
  2260. onScroll: PropTypes.func,
  2261. onScrollToLower: PropTypes.func,
  2262. onScrollToUpper: PropTypes.func
  2263. };
  2264. var AtForm = function(_super) {
  2265. __extends(AtForm2, _super);
  2266. function AtForm2() {
  2267. return _super !== null && _super.apply(this, arguments) || this;
  2268. }
  2269. AtForm2.prototype.onSubmit = function() {
  2270. this.props.onSubmit && this.props.onSubmit(arguments);
  2271. };
  2272. AtForm2.prototype.onReset = function() {
  2273. this.props.onReset && this.props.onReset(arguments);
  2274. };
  2275. AtForm2.prototype.render = function() {
  2276. var _a2 = this.props, customStyle = _a2.customStyle, className = _a2.className, reportSubmit = _a2.reportSubmit;
  2277. var rootCls = classnames("at-form", className);
  2278. return import_react.default.createElement(Form, {
  2279. className: rootCls,
  2280. style: customStyle,
  2281. onSubmit: this.onSubmit.bind(this),
  2282. reportSubmit,
  2283. onReset: this.onReset.bind(this)
  2284. }, this.props.children);
  2285. };
  2286. return AtForm2;
  2287. }(import_react.default.Component);
  2288. AtForm.defaultProps = {
  2289. customStyle: "",
  2290. className: "",
  2291. reportSubmit: false
  2292. };
  2293. AtForm.propTypes = {
  2294. customStyle: PropTypes.oneOfType([
  2295. PropTypes.object,
  2296. PropTypes.string
  2297. ]),
  2298. className: PropTypes.oneOfType([
  2299. PropTypes.array,
  2300. PropTypes.string
  2301. ]),
  2302. reportSubmit: PropTypes.bool,
  2303. onSubmit: PropTypes.func,
  2304. onReset: PropTypes.func
  2305. };
  2306. function baseSlice(array, start, end) {
  2307. var index = -1, length = array.length;
  2308. if (start < 0) {
  2309. start = -start > length ? 0 : length + start;
  2310. }
  2311. end = end > length ? length : end;
  2312. if (end < 0) {
  2313. end += length;
  2314. }
  2315. length = start > end ? 0 : end - start >>> 0;
  2316. start >>>= 0;
  2317. var result = Array(length);
  2318. while(++index < length){
  2319. result[index] = array[index + start];
  2320. }
  2321. return result;
  2322. }
  2323. var _baseSlice = baseSlice;
  2324. function eq(value, other) {
  2325. return value === other || value !== value && other !== other;
  2326. }
  2327. var eq_1 = eq;
  2328. var freeGlobal = typeof commonjsGlobal == "object" && commonjsGlobal && commonjsGlobal.Object === Object && commonjsGlobal;
  2329. var _freeGlobal = freeGlobal;
  2330. var freeSelf = typeof self == "object" && self && self.Object === Object && self;
  2331. var root = _freeGlobal || freeSelf || Function("return this")();
  2332. var _root = root;
  2333. var Symbol$1 = _root.Symbol;
  2334. var _Symbol = Symbol$1;
  2335. var objectProto$8 = Object.prototype;
  2336. var hasOwnProperty$6 = objectProto$8.hasOwnProperty;
  2337. var nativeObjectToString$1 = objectProto$8.toString;
  2338. var symToStringTag$1 = _Symbol ? _Symbol.toStringTag : void 0;
  2339. function getRawTag(value) {
  2340. var isOwn = hasOwnProperty$6.call(value, symToStringTag$1), tag = value[symToStringTag$1];
  2341. try {
  2342. value[symToStringTag$1] = void 0;
  2343. var unmasked = true;
  2344. } catch (e2) {}
  2345. var result = nativeObjectToString$1.call(value);
  2346. if (unmasked) {
  2347. if (isOwn) {
  2348. value[symToStringTag$1] = tag;
  2349. } else {
  2350. delete value[symToStringTag$1];
  2351. }
  2352. }
  2353. return result;
  2354. }
  2355. var _getRawTag = getRawTag;
  2356. var objectProto$7 = Object.prototype;
  2357. var nativeObjectToString = objectProto$7.toString;
  2358. function objectToString$1(value) {
  2359. return nativeObjectToString.call(value);
  2360. }
  2361. var _objectToString = objectToString$1;
  2362. var nullTag = "[object Null]";
  2363. var undefinedTag = "[object Undefined]";
  2364. var symToStringTag = _Symbol ? _Symbol.toStringTag : void 0;
  2365. function baseGetTag(value) {
  2366. if (value == null) {
  2367. return value === void 0 ? undefinedTag : nullTag;
  2368. }
  2369. return symToStringTag && symToStringTag in Object(value) ? _getRawTag(value) : _objectToString(value);
  2370. }
  2371. var _baseGetTag = baseGetTag;
  2372. function isObject(value) {
  2373. var type = typeof value;
  2374. return value != null && (type == "object" || type == "function");
  2375. }
  2376. var isObject_1 = isObject;
  2377. var asyncTag = "[object AsyncFunction]";
  2378. var funcTag$1 = "[object Function]";
  2379. var genTag = "[object GeneratorFunction]";
  2380. var proxyTag = "[object Proxy]";
  2381. function isFunction(value) {
  2382. if (!isObject_1(value)) {
  2383. return false;
  2384. }
  2385. var tag = _baseGetTag(value);
  2386. return tag == funcTag$1 || tag == genTag || tag == asyncTag || tag == proxyTag;
  2387. }
  2388. var isFunction_1 = isFunction;
  2389. var MAX_SAFE_INTEGER$1 = 9007199254740991;
  2390. function isLength(value) {
  2391. return typeof value == "number" && value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER$1;
  2392. }
  2393. var isLength_1 = isLength;
  2394. function isArrayLike(value) {
  2395. return value != null && isLength_1(value.length) && !isFunction_1(value);
  2396. }
  2397. var isArrayLike_1 = isArrayLike;
  2398. var MAX_SAFE_INTEGER = 9007199254740991;
  2399. var reIsUint = /^(?:0|[1-9]\d*)$/;
  2400. function isIndex(value, length) {
  2401. var type = typeof value;
  2402. length = length == null ? MAX_SAFE_INTEGER : length;
  2403. return !!length && (type == "number" || type != "symbol" && reIsUint.test(value)) && value > -1 && value % 1 == 0 && value < length;
  2404. }
  2405. var _isIndex = isIndex;
  2406. function isIterateeCall(value, index, object) {
  2407. if (!isObject_1(object)) {
  2408. return false;
  2409. }
  2410. var type = typeof index;
  2411. if (type == "number" ? isArrayLike_1(object) && _isIndex(index, object.length) : type == "string" && index in object) {
  2412. return eq_1(object[index], value);
  2413. }
  2414. return false;
  2415. }
  2416. var _isIterateeCall = isIterateeCall;
  2417. var reWhitespace = /\s/;
  2418. function trimmedEndIndex(string) {
  2419. var index = string.length;
  2420. while(index-- && reWhitespace.test(string.charAt(index))){}
  2421. return index;
  2422. }
  2423. var _trimmedEndIndex = trimmedEndIndex;
  2424. var reTrimStart = /^\s+/;
  2425. function baseTrim(string) {
  2426. return string ? string.slice(0, _trimmedEndIndex(string) + 1).replace(reTrimStart, "") : string;
  2427. }
  2428. var _baseTrim = baseTrim;
  2429. function isObjectLike(value) {
  2430. return value != null && typeof value == "object";
  2431. }
  2432. var isObjectLike_1 = isObjectLike;
  2433. var symbolTag = "[object Symbol]";
  2434. function isSymbol(value) {
  2435. return typeof value == "symbol" || isObjectLike_1(value) && _baseGetTag(value) == symbolTag;
  2436. }
  2437. var isSymbol_1 = isSymbol;
  2438. var NAN = 0 / 0;
  2439. var reIsBadHex = /^[-+]0x[0-9a-f]+$/i;
  2440. var reIsBinary = /^0b[01]+$/i;
  2441. var reIsOctal = /^0o[0-7]+$/i;
  2442. var freeParseInt = parseInt;
  2443. function toNumber(value) {
  2444. if (typeof value == "number") {
  2445. return value;
  2446. }
  2447. if (isSymbol_1(value)) {
  2448. return NAN;
  2449. }
  2450. if (isObject_1(value)) {
  2451. var other = typeof value.valueOf == "function" ? value.valueOf() : value;
  2452. value = isObject_1(other) ? other + "" : other;
  2453. }
  2454. if (typeof value != "string") {
  2455. return value === 0 ? value : +value;
  2456. }
  2457. value = _baseTrim(value);
  2458. var isBinary = reIsBinary.test(value);
  2459. return isBinary || reIsOctal.test(value) ? freeParseInt(value.slice(2), isBinary ? 2 : 8) : reIsBadHex.test(value) ? NAN : +value;
  2460. }
  2461. var toNumber_1 = toNumber;
  2462. var INFINITY$1 = 1 / 0;
  2463. var MAX_INTEGER = 17976931348623157e292;
  2464. function toFinite(value) {
  2465. if (!value) {
  2466. return value === 0 ? value : 0;
  2467. }
  2468. value = toNumber_1(value);
  2469. if (value === INFINITY$1 || value === -INFINITY$1) {
  2470. var sign = value < 0 ? -1 : 1;
  2471. return sign * MAX_INTEGER;
  2472. }
  2473. return value === value ? value : 0;
  2474. }
  2475. var toFinite_1 = toFinite;
  2476. function toInteger(value) {
  2477. var result = toFinite_1(value), remainder = result % 1;
  2478. return result === result ? remainder ? result - remainder : result : 0;
  2479. }
  2480. var toInteger_1 = toInteger;
  2481. var nativeCeil = Math.ceil;
  2482. var nativeMax$1 = Math.max;
  2483. function chunk(array, size, guard) {
  2484. if (guard ? _isIterateeCall(array, size, guard) : size === void 0) {
  2485. size = 1;
  2486. } else {
  2487. size = nativeMax$1(toInteger_1(size), 0);
  2488. }
  2489. var length = array == null ? 0 : array.length;
  2490. if (!length || size < 1) {
  2491. return [];
  2492. }
  2493. var index = 0, resIndex = 0, result = Array(nativeCeil(length / size));
  2494. while(index < length){
  2495. result[resIndex++] = _baseSlice(array, index, index += size);
  2496. }
  2497. return result;
  2498. }
  2499. var chunk_1 = chunk;
  2500. var AtGrid = function(_super) {
  2501. __extends(AtGrid2, _super);
  2502. function AtGrid2() {
  2503. var _this = _super !== null && _super.apply(this, arguments) || this;
  2504. _this.handleClick = function(item, index, row, event) {
  2505. var _a2 = _this.props, onClick = _a2.onClick, _b = _a2.columnNum, columnNum = _b === void 0 ? 3 : _b;
  2506. if (typeof onClick === "function") {
  2507. var clickIndex = row * columnNum + index;
  2508. onClick(item, clickIndex, event);
  2509. }
  2510. };
  2511. return _this;
  2512. }
  2513. AtGrid2.prototype.render = function() {
  2514. var _this = this;
  2515. var _a2 = this.props, data = _a2.data, mode = _a2.mode, _b = _a2.columnNum, columnNum = _b === void 0 ? 3 : _b, hasBorder = _a2.hasBorder;
  2516. if (Array.isArray(data) && data.length === 0) {
  2517. return null;
  2518. }
  2519. var gridGroup = chunk_1(data, columnNum);
  2520. var bodyClass = classnames([
  2521. "at-grid__flex-item",
  2522. "at-grid-item",
  2523. "at-grid-item--" + mode
  2524. ], {
  2525. "at-grid-item--no-border": !hasBorder
  2526. });
  2527. return import_react.default.createElement(View, {
  2528. className: classnames("at-grid", this.props.className)
  2529. }, gridGroup.map(function(item, i) {
  2530. return import_react.default.createElement(View, {
  2531. className: "at-grid__flex",
  2532. key: "at-grid-group-" + i
  2533. }, item.map(function(childItem, index) {
  2534. var _a3;
  2535. return import_react.default.createElement(View, {
  2536. key: "at-grid-item-" + index,
  2537. className: classnames(bodyClass, {
  2538. "at-grid-item--last": index === columnNum - 1
  2539. }),
  2540. onClick: _this.handleClick.bind(_this, childItem, index, i),
  2541. style: {
  2542. flex: "0 0 " + 100 / columnNum + "%"
  2543. }
  2544. }, import_react.default.createElement(View, {
  2545. className: "at-grid-item__content"
  2546. }, import_react.default.createElement(View, {
  2547. className: "at-grid-item__content-inner"
  2548. }, import_react.default.createElement(View, {
  2549. className: "content-inner__icon"
  2550. }, childItem.image && import_react.default.createElement(Image, {
  2551. className: "content-inner__img",
  2552. src: childItem.image,
  2553. mode: "scaleToFill"
  2554. }), childItem.iconInfo && !childItem.image && import_react.default.createElement(Text, {
  2555. className: classnames(childItem.iconInfo.prefixClass || "at-icon", (_a3 = {}, _a3[(childItem.iconInfo.prefixClass || "at-icon") + "-" + childItem.iconInfo.value] = childItem.iconInfo.value, _a3), childItem.iconInfo.className),
  2556. style: mergeStyle({
  2557. color: childItem.iconInfo.color,
  2558. fontSize: (childItem.iconInfo.size || 24) + "px"
  2559. }, childItem.iconInfo.customStyle)
  2560. })), import_react.default.createElement(Text, {
  2561. className: "content-inner__text"
  2562. }, childItem.value))));
  2563. }));
  2564. }));
  2565. };
  2566. return AtGrid2;
  2567. }(import_react.default.Component);
  2568. AtGrid.defaultProps = {
  2569. data: [],
  2570. columnNum: 3,
  2571. mode: "square",
  2572. hasBorder: true
  2573. };
  2574. AtGrid.propTypes = {
  2575. mode: PropTypes.string,
  2576. onClick: PropTypes.func,
  2577. hasBorder: PropTypes.bool,
  2578. columnNum: PropTypes.number,
  2579. data: PropTypes.arrayOf(PropTypes.shape({
  2580. image: PropTypes.string,
  2581. value: PropTypes.string,
  2582. iconInfo: PropTypes.shape({
  2583. size: PropTypes.number,
  2584. value: PropTypes.string,
  2585. color: PropTypes.string,
  2586. prefixClass: PropTypes.string,
  2587. customStyle: PropTypes.oneOfType([
  2588. PropTypes.object,
  2589. PropTypes.string
  2590. ]),
  2591. className: PropTypes.oneOfType([
  2592. PropTypes.array,
  2593. PropTypes.string
  2594. ])
  2595. })
  2596. }))
  2597. };
  2598. var AtIcon = function(_super) {
  2599. __extends(AtIcon2, _super);
  2600. function AtIcon2() {
  2601. return _super !== null && _super.apply(this, arguments) || this;
  2602. }
  2603. AtIcon2.prototype.handleClick = function() {
  2604. this.props.onClick && this.props.onClick(arguments);
  2605. };
  2606. AtIcon2.prototype.render = function() {
  2607. var _a2 = this.props, _b = _a2.customStyle, customStyle = _b === void 0 ? {} : _b, className = _a2.className, prefixClass = _a2.prefixClass, value = _a2.value, size = _a2.size, color = _a2.color;
  2608. var rootStyle = {
  2609. fontSize: "" + pxTransform(parseInt(String(size)) * 2),
  2610. color
  2611. };
  2612. var iconName = value ? prefixClass + "-" + value : "";
  2613. return import_react.default.createElement(Text, {
  2614. className: classnames(prefixClass, iconName, className),
  2615. style: mergeStyle(rootStyle, customStyle),
  2616. onClick: this.handleClick.bind(this)
  2617. });
  2618. };
  2619. return AtIcon2;
  2620. }(import_react.default.Component);
  2621. AtIcon.defaultProps = {
  2622. customStyle: "",
  2623. className: "",
  2624. prefixClass: "at-icon",
  2625. value: "",
  2626. color: "",
  2627. size: 24
  2628. };
  2629. AtIcon.propTypes = {
  2630. customStyle: PropTypes.oneOfType([
  2631. PropTypes.object,
  2632. PropTypes.string
  2633. ]),
  2634. className: PropTypes.oneOfType([
  2635. PropTypes.array,
  2636. PropTypes.string
  2637. ]),
  2638. prefixClass: PropTypes.string,
  2639. value: PropTypes.string,
  2640. color: PropTypes.string,
  2641. size: PropTypes.oneOfType([
  2642. PropTypes.string,
  2643. PropTypes.number
  2644. ]),
  2645. onClick: PropTypes.func
  2646. };
  2647. function getInputProps(props) {
  2648. var actualProps = {
  2649. type: props.type,
  2650. maxLength: props.maxLength || props.maxlength,
  2651. disabled: props.disabled,
  2652. password: false
  2653. };
  2654. switch(actualProps.type){
  2655. case "phone":
  2656. actualProps.type = "number";
  2657. actualProps.maxLength = 11;
  2658. break;
  2659. case "password":
  2660. actualProps.type = "text";
  2661. actualProps.password = true;
  2662. break;
  2663. }
  2664. if (!props.disabled && !props.editable) {
  2665. actualProps.disabled = true;
  2666. }
  2667. return actualProps;
  2668. }
  2669. var AtInput = function(_super) {
  2670. __extends(AtInput2, _super);
  2671. function AtInput2() {
  2672. var _this = _super !== null && _super.apply(this, arguments) || this;
  2673. _this.inputClearing = false;
  2674. _this.handleInput = function(event) {
  2675. var _a2, _b;
  2676. return (_b = (_a2 = _this.props).onChange) === null || _b === void 0 ? void 0 : _b.call(_a2, event.detail.value, event);
  2677. };
  2678. _this.handleFocus = function(event) {
  2679. if (typeof _this.props.onFocus === "function") {
  2680. _this.props.onFocus(event.detail.value, event);
  2681. }
  2682. };
  2683. _this.handleBlur = function(event) {
  2684. var _a2, _b;
  2685. if (typeof _this.props.onBlur === "function") {
  2686. _this.props.onBlur(event.detail.value, event);
  2687. }
  2688. if (event.type === "blur" && !_this.inputClearing) {
  2689. (_b = (_a2 = _this.props).onChange) === null || _b === void 0 ? void 0 : _b.call(_a2, event.detail.value, event);
  2690. }
  2691. _this.inputClearing = false;
  2692. };
  2693. _this.handleConfirm = function(event) {
  2694. if (typeof _this.props.onConfirm === "function") {
  2695. _this.props.onConfirm(event.detail.value, event);
  2696. }
  2697. };
  2698. _this.handleClick = function(event) {
  2699. if (!_this.props.editable && typeof _this.props.onClick === "function") {
  2700. _this.props.onClick(event);
  2701. }
  2702. };
  2703. _this.handleClearValue = function(event) {
  2704. var _a2, _b;
  2705. _this.inputClearing = true;
  2706. (_b = (_a2 = _this.props).onChange) === null || _b === void 0 ? void 0 : _b.call(_a2, "", event);
  2707. };
  2708. _this.handleKeyboardHeightChange = function(event) {
  2709. if (typeof _this.props.onKeyboardHeightChange === "function") {
  2710. _this.props.onKeyboardHeightChange(event);
  2711. }
  2712. };
  2713. _this.handleErrorClick = function(event) {
  2714. if (typeof _this.props.onErrorClick === "function") {
  2715. _this.props.onErrorClick(event);
  2716. }
  2717. };
  2718. return _this;
  2719. }
  2720. AtInput2.prototype.render = function() {
  2721. var _a2 = this.props, className = _a2.className, customStyle = _a2.customStyle, name = _a2.name, cursorSpacing = _a2.cursorSpacing, confirmType = _a2.confirmType, cursor = _a2.cursor, selectionStart = _a2.selectionStart, selectionEnd = _a2.selectionEnd, adjustPosition = _a2.adjustPosition, border = _a2.border, title = _a2.title, error2 = _a2.error, clear = _a2.clear, placeholder = _a2.placeholder, placeholderStyle = _a2.placeholderStyle, placeholderClass = _a2.placeholderClass, _b = _a2.autoFocus, autoFocus = _b === void 0 ? false : _b, _c = _a2.focus, focus = _c === void 0 ? false : _c, value = _a2.value, required = _a2.required;
  2722. var _d = getInputProps(this.props), type = _d.type, maxLength = _d.maxLength, disabled = _d.disabled, password = _d.password;
  2723. var rootCls = classnames("at-input", {
  2724. "at-input--without-border": !border
  2725. }, className);
  2726. var containerCls = classnames("at-input__container", {
  2727. "at-input--error": error2,
  2728. "at-input--disabled": disabled
  2729. });
  2730. var overlayCls = classnames("at-input__overlay", {
  2731. "at-input__overlay--hidden": !disabled
  2732. });
  2733. var placeholderCls = classnames("placeholder", placeholderClass);
  2734. var id = name && {
  2735. id: name
  2736. };
  2737. return import_react.default.createElement(View, {
  2738. className: rootCls,
  2739. style: customStyle
  2740. }, import_react.default.createElement(View, {
  2741. className: containerCls
  2742. }, import_react.default.createElement(View, {
  2743. className: overlayCls,
  2744. onClick: this.handleClick
  2745. }), title && import_react.default.createElement(Label, {
  2746. className: "at-input__title " + (required && "at-input__title--required"),
  2747. for: name
  2748. }, title), import_react.default.createElement(Input, __assign({
  2749. className: "at-input__input"
  2750. }, id, {
  2751. name,
  2752. type,
  2753. disabled,
  2754. password,
  2755. placeholderStyle,
  2756. placeholderClass: placeholderCls,
  2757. placeholder,
  2758. cursorSpacing,
  2759. maxlength: maxLength,
  2760. autoFocus
  2761. }, focus ? {
  2762. focus
  2763. } : {}, {
  2764. value,
  2765. confirmType,
  2766. cursor,
  2767. selectionStart,
  2768. selectionEnd,
  2769. adjustPosition,
  2770. onInput: this.handleInput,
  2771. onFocus: this.handleFocus,
  2772. onBlur: this.handleBlur,
  2773. onConfirm: this.handleConfirm,
  2774. onKeyboardHeightChange: this.handleKeyboardHeightChange
  2775. })), clear && value && import_react.default.createElement(View, {
  2776. className: "at-input__icon",
  2777. onTouchEnd: this.handleClearValue
  2778. }, import_react.default.createElement(Text, {
  2779. className: "at-icon at-icon-close-circle at-input__icon-close"
  2780. })), error2 && import_react.default.createElement(View, {
  2781. className: "at-input__icon",
  2782. onTouchStart: this.handleErrorClick
  2783. }, import_react.default.createElement(Text, {
  2784. className: "at-icon at-icon-alert-circle at-input__icon-alert"
  2785. })), import_react.default.createElement(View, {
  2786. className: "at-input__children"
  2787. }, this.props.children)));
  2788. };
  2789. return AtInput2;
  2790. }(import_react.default.Component);
  2791. AtInput.defaultProps = {
  2792. className: "",
  2793. customStyle: "",
  2794. value: "",
  2795. name: "",
  2796. placeholder: "",
  2797. placeholderStyle: "",
  2798. placeholderClass: "",
  2799. title: "",
  2800. cursorSpacing: 50,
  2801. confirmType: "done",
  2802. cursor: 0,
  2803. selectionStart: -1,
  2804. selectionEnd: -1,
  2805. adjustPosition: true,
  2806. maxlength: 140,
  2807. maxLength: 140,
  2808. type: "text",
  2809. disabled: false,
  2810. border: true,
  2811. editable: true,
  2812. error: false,
  2813. clear: false,
  2814. autoFocus: false,
  2815. focus: false,
  2816. required: false,
  2817. onChange: function() {}
  2818. };
  2819. AtInput.propTypes = {
  2820. className: PropTypes.oneOfType([
  2821. PropTypes.string,
  2822. PropTypes.array
  2823. ]),
  2824. customStyle: PropTypes.oneOfType([
  2825. PropTypes.string,
  2826. PropTypes.object
  2827. ]),
  2828. value: PropTypes.oneOfType([
  2829. PropTypes.string,
  2830. PropTypes.number
  2831. ]),
  2832. name: PropTypes.string,
  2833. placeholder: PropTypes.string,
  2834. placeholderStyle: PropTypes.string,
  2835. placeholderClass: PropTypes.string,
  2836. title: PropTypes.string,
  2837. confirmType: PropTypes.string,
  2838. cursor: PropTypes.oneOfType([
  2839. PropTypes.string,
  2840. PropTypes.number
  2841. ]),
  2842. selectionStart: PropTypes.oneOfType([
  2843. PropTypes.string,
  2844. PropTypes.number
  2845. ]),
  2846. selectionEnd: PropTypes.oneOfType([
  2847. PropTypes.string,
  2848. PropTypes.number
  2849. ]),
  2850. adjustPosition: PropTypes.bool,
  2851. cursorSpacing: PropTypes.oneOfType([
  2852. PropTypes.string,
  2853. PropTypes.number
  2854. ]),
  2855. maxlength: PropTypes.oneOfType([
  2856. PropTypes.string,
  2857. PropTypes.number
  2858. ]),
  2859. maxLength: PropTypes.oneOfType([
  2860. PropTypes.string,
  2861. PropTypes.number
  2862. ]),
  2863. type: PropTypes.string,
  2864. disabled: PropTypes.bool,
  2865. border: PropTypes.bool,
  2866. editable: PropTypes.bool,
  2867. error: PropTypes.bool,
  2868. clear: PropTypes.bool,
  2869. autoFocus: PropTypes.bool,
  2870. focus: PropTypes.bool,
  2871. onChange: PropTypes.func,
  2872. onFocus: PropTypes.func,
  2873. onBlur: PropTypes.func,
  2874. onConfirm: PropTypes.func,
  2875. onErrorClick: PropTypes.func,
  2876. onClick: PropTypes.func,
  2877. required: PropTypes.bool
  2878. };
  2879. function arrayMap(array, iteratee) {
  2880. var index = -1, length = array == null ? 0 : array.length, result = Array(length);
  2881. while(++index < length){
  2882. result[index] = iteratee(array[index], index, array);
  2883. }
  2884. return result;
  2885. }
  2886. var _arrayMap = arrayMap;
  2887. var isArray = Array.isArray;
  2888. var isArray_1 = isArray;
  2889. var INFINITY = 1 / 0;
  2890. var symbolProto = _Symbol ? _Symbol.prototype : void 0;
  2891. var symbolToString = symbolProto ? symbolProto.toString : void 0;
  2892. function baseToString(value) {
  2893. if (typeof value == "string") {
  2894. return value;
  2895. }
  2896. if (isArray_1(value)) {
  2897. return _arrayMap(value, baseToString) + "";
  2898. }
  2899. if (isSymbol_1(value)) {
  2900. return symbolToString ? symbolToString.call(value) : "";
  2901. }
  2902. var result = value + "";
  2903. return result == "0" && 1 / value == -INFINITY ? "-0" : result;
  2904. }
  2905. var _baseToString = baseToString;
  2906. function toString(value) {
  2907. return value == null ? "" : _baseToString(value);
  2908. }
  2909. var toString_1 = toString;
  2910. function addNum(num1, num2) {
  2911. var sq1, sq2;
  2912. try {
  2913. sq1 = toString_1(num1).split(".")[1].length;
  2914. } catch (e2) {
  2915. sq1 = 0;
  2916. }
  2917. try {
  2918. sq2 = toString_1(num2).split(".")[1].length;
  2919. } catch (e21) {
  2920. sq2 = 0;
  2921. }
  2922. var m2 = Math.pow(10, Math.max(sq1, sq2));
  2923. return (Math.round(num1 * m2) + Math.round(num2 * m2)) / m2;
  2924. }
  2925. function parseValue(num) {
  2926. if (num === "") return "0";
  2927. var numStr = toString_1(num);
  2928. if (numStr.indexOf("0") === 0 && numStr.indexOf(".") === -1) {
  2929. return toString_1(parseFloat(num));
  2930. }
  2931. return toString_1(num);
  2932. }
  2933. var AtInputNumber = function(_super) {
  2934. __extends(AtInputNumber2, _super);
  2935. function AtInputNumber2() {
  2936. var _this = _super !== null && _super.apply(this, arguments) || this;
  2937. _this.handleValue = function(value) {
  2938. var _a2 = _this.props, _b = _a2.max, max = _b === void 0 ? 100 : _b, _c = _a2.min, min = _c === void 0 ? 0 : _c;
  2939. var resultValue = value === "" ? min : value;
  2940. if (resultValue > max) {
  2941. resultValue = max;
  2942. _this.handleError({
  2943. type: "OVER",
  2944. errorValue: resultValue
  2945. });
  2946. }
  2947. if (resultValue < min) {
  2948. resultValue = min;
  2949. _this.handleError({
  2950. type: "LOW",
  2951. errorValue: resultValue
  2952. });
  2953. }
  2954. if (resultValue && !Number(resultValue)) {
  2955. resultValue = parseFloat(String(resultValue)) || min;
  2956. _this.handleError({
  2957. type: "OVER",
  2958. errorValue: resultValue
  2959. });
  2960. }
  2961. resultValue = parseValue(String(resultValue));
  2962. return resultValue;
  2963. };
  2964. _this.handleInput = function(e2) {
  2965. var value = e2.target.value;
  2966. var disabled = _this.props.disabled;
  2967. if (disabled) return "";
  2968. var newValue = _this.handleValue(value);
  2969. _this.props.onChange(Number(newValue), e2);
  2970. return newValue;
  2971. };
  2972. _this.handleBlur = function(event) {
  2973. return _this.props.onBlur && _this.props.onBlur(event);
  2974. };
  2975. _this.handleError = function(errorValue) {
  2976. if (!_this.props.onErrorInput) {
  2977. return;
  2978. }
  2979. _this.props.onErrorInput(errorValue);
  2980. };
  2981. return _this;
  2982. }
  2983. AtInputNumber2.prototype.handleClick = function(clickType, e2) {
  2984. var _a2 = this.props, disabled = _a2.disabled, value = _a2.value, _b = _a2.min, min = _b === void 0 ? 0 : _b, _c = _a2.max, max = _c === void 0 ? 100 : _c, _d = _a2.step, step = _d === void 0 ? 1 : _d;
  2985. var lowThanMin = clickType === "minus" && value <= min;
  2986. var overThanMax = clickType === "plus" && value >= max;
  2987. if (lowThanMin || overThanMax || disabled) {
  2988. var deltaValue_1 = clickType === "minus" ? -step : step;
  2989. var errorValue = addNum(Number(value), deltaValue_1);
  2990. if (disabled) {
  2991. this.handleError({
  2992. type: "DISABLED",
  2993. errorValue
  2994. });
  2995. } else {
  2996. this.handleError({
  2997. type: lowThanMin ? "LOW" : "OVER",
  2998. errorValue
  2999. });
  3000. }
  3001. return;
  3002. }
  3003. var deltaValue = clickType === "minus" ? -step : step;
  3004. var newValue = addNum(Number(value), deltaValue);
  3005. newValue = Number(this.handleValue(newValue));
  3006. this.props.onChange(newValue, e2);
  3007. };
  3008. AtInputNumber2.prototype.render = function() {
  3009. var _a2 = this.props, customStyle = _a2.customStyle, className = _a2.className, width = _a2.width, disabled = _a2.disabled, value = _a2.value, type = _a2.type, _b = _a2.min, min = _b === void 0 ? 0 : _b, _c = _a2.max, max = _c === void 0 ? 100 : _c, size = _a2.size, disabledInput = _a2.disabledInput;
  3010. var inputStyle = {
  3011. width: width ? "" + pxTransform(width) : ""
  3012. };
  3013. var inputValue = Number(this.handleValue(value));
  3014. var rootCls = classnames("at-input-number", {
  3015. "at-input-number--lg": size === "large"
  3016. }, className);
  3017. var minusBtnCls = classnames("at-input-number__btn", {
  3018. "at-input-number--disabled": inputValue <= min || disabled
  3019. });
  3020. var plusBtnCls = classnames("at-input-number__btn", {
  3021. "at-input-number--disabled": inputValue >= max || disabled
  3022. });
  3023. return import_react.default.createElement(View, {
  3024. className: rootCls,
  3025. style: customStyle
  3026. }, import_react.default.createElement(View, {
  3027. className: minusBtnCls,
  3028. onClick: this.handleClick.bind(this, "minus")
  3029. }, import_react.default.createElement(Text, {
  3030. className: "at-icon at-icon-subtract at-input-number__btn-subtract"
  3031. })), import_react.default.createElement(Input, {
  3032. className: "at-input-number__input",
  3033. style: inputStyle,
  3034. type,
  3035. value: String(inputValue),
  3036. disabled: disabledInput || disabled,
  3037. onInput: this.handleInput,
  3038. onBlur: this.handleBlur
  3039. }), import_react.default.createElement(View, {
  3040. className: plusBtnCls,
  3041. onClick: this.handleClick.bind(this, "plus")
  3042. }, import_react.default.createElement(Text, {
  3043. className: "at-icon at-icon-add at-input-number__btn-add"
  3044. })));
  3045. };
  3046. return AtInputNumber2;
  3047. }(import_react.default.Component);
  3048. AtInputNumber.defaultProps = {
  3049. customStyle: {},
  3050. className: "",
  3051. disabled: false,
  3052. disabledInput: false,
  3053. value: 1,
  3054. type: "number",
  3055. width: 0,
  3056. min: 0,
  3057. max: 100,
  3058. step: 1,
  3059. size: "normal",
  3060. onChange: function() {}
  3061. };
  3062. AtInputNumber.propTypes = {
  3063. customStyle: PropTypes.oneOfType([
  3064. PropTypes.object,
  3065. PropTypes.string
  3066. ]),
  3067. className: PropTypes.oneOfType([
  3068. PropTypes.array,
  3069. PropTypes.string
  3070. ]),
  3071. value: PropTypes.oneOfType([
  3072. PropTypes.number,
  3073. PropTypes.string
  3074. ]),
  3075. type: PropTypes.oneOf([
  3076. "number",
  3077. "digit"
  3078. ]),
  3079. disabled: PropTypes.bool,
  3080. width: PropTypes.number,
  3081. min: PropTypes.number,
  3082. max: PropTypes.number,
  3083. step: PropTypes.number,
  3084. size: PropTypes.oneOf([
  3085. "normal",
  3086. "large"
  3087. ]),
  3088. disabledInput: PropTypes.bool,
  3089. onChange: PropTypes.func,
  3090. onBlur: PropTypes.func,
  3091. onErrorInput: PropTypes.func
  3092. };
  3093. var AtModalAction = function(_super) {
  3094. __extends(AtModalAction2, _super);
  3095. function AtModalAction2() {
  3096. return _super !== null && _super.apply(this, arguments) || this;
  3097. }
  3098. AtModalAction2.prototype.render = function() {
  3099. var rootClass = classnames("at-modal__footer", {
  3100. "at-modal__footer--simple": this.props.isSimple
  3101. }, this.props.className);
  3102. return import_react.default.createElement(View, {
  3103. className: rootClass
  3104. }, import_react.default.createElement(View, {
  3105. className: "at-modal__action"
  3106. }, this.props.children));
  3107. };
  3108. return AtModalAction2;
  3109. }(import_react.default.Component);
  3110. AtModalAction.defaultProps = {
  3111. isSimple: false
  3112. };
  3113. AtModalAction.propTypes = {
  3114. isSimple: PropTypes.bool
  3115. };
  3116. var AtModalContent = function(_super) {
  3117. __extends(AtModalContent2, _super);
  3118. function AtModalContent2() {
  3119. return _super !== null && _super.apply(this, arguments) || this;
  3120. }
  3121. AtModalContent2.prototype.render = function() {
  3122. var rootClass = classnames("at-modal__content", this.props.className);
  3123. return import_react.default.createElement(ScrollView, {
  3124. scrollY: true,
  3125. className: rootClass
  3126. }, this.props.children);
  3127. };
  3128. return AtModalContent2;
  3129. }(import_react.default.Component);
  3130. var AtModalHeader = function(_super) {
  3131. __extends(AtModalHeader2, _super);
  3132. function AtModalHeader2() {
  3133. return _super !== null && _super.apply(this, arguments) || this;
  3134. }
  3135. AtModalHeader2.prototype.render = function() {
  3136. var rootClass = classnames("at-modal__header", this.props.className);
  3137. return import_react.default.createElement(View, {
  3138. className: rootClass
  3139. }, this.props.children);
  3140. };
  3141. return AtModalHeader2;
  3142. }(import_react.default.Component);
  3143. var AtModal = function(_super) {
  3144. __extends(AtModal2, _super);
  3145. function AtModal2(props) {
  3146. var _this = _super.call(this, props) || this;
  3147. _this.handleClickOverlay = function() {
  3148. if (_this.props.closeOnClickOverlay) {
  3149. _this.setState({
  3150. _isOpened: false
  3151. }, _this.handleClose);
  3152. }
  3153. };
  3154. _this.handleClose = function(event) {
  3155. if (typeof _this.props.onClose === "function") {
  3156. _this.props.onClose(event);
  3157. }
  3158. };
  3159. _this.handleCancel = function(event) {
  3160. if (typeof _this.props.onCancel === "function") {
  3161. _this.props.onCancel(event);
  3162. }
  3163. };
  3164. _this.handleConfirm = function(event) {
  3165. if (typeof _this.props.onConfirm === "function") {
  3166. _this.props.onConfirm(event);
  3167. }
  3168. };
  3169. _this.handleTouchMove = function(e2) {
  3170. e2.stopPropagation();
  3171. };
  3172. var isOpened = props.isOpened;
  3173. _this.state = {
  3174. _isOpened: isOpened,
  3175. isWEB: import_taro.default.getEnv() === import_taro.default.ENV_TYPE.WEB
  3176. };
  3177. return _this;
  3178. }
  3179. AtModal2.prototype.UNSAFE_componentWillReceiveProps = function(nextProps) {
  3180. var isOpened = nextProps.isOpened;
  3181. if (this.props.isOpened !== isOpened) {
  3182. handleTouchScroll(isOpened);
  3183. }
  3184. if (isOpened !== this.state._isOpened) {
  3185. this.setState({
  3186. _isOpened: isOpened
  3187. });
  3188. }
  3189. };
  3190. AtModal2.prototype.render = function() {
  3191. var _a2 = this.state, _isOpened = _a2._isOpened, isWEB = _a2.isWEB;
  3192. var _b = this.props, title = _b.title, content = _b.content, cancelText = _b.cancelText, confirmText = _b.confirmText;
  3193. var rootClass = classnames("at-modal", {
  3194. "at-modal--active": _isOpened
  3195. }, this.props.className);
  3196. if (title || content) {
  3197. var isRenderAction = cancelText || confirmText;
  3198. return import_react.default.createElement(View, {
  3199. className: rootClass
  3200. }, import_react.default.createElement(View, {
  3201. onClick: this.handleClickOverlay,
  3202. className: "at-modal__overlay"
  3203. }), import_react.default.createElement(View, {
  3204. className: "at-modal__container"
  3205. }, title && import_react.default.createElement(AtModalHeader, null, import_react.default.createElement(Text, null, title)), content && import_react.default.createElement(AtModalContent, null, import_react.default.createElement(View, {
  3206. className: "content-simple"
  3207. }, isWEB ? import_react.default.createElement(Text, {
  3208. dangerouslySetInnerHTML: {
  3209. __html: content.replace(/\\n/g, "<br/>")
  3210. }
  3211. }) : import_react.default.createElement(Text, null, content))), isRenderAction && import_react.default.createElement(AtModalAction, {
  3212. isSimple: true
  3213. }, cancelText && import_react.default.createElement(Button, {
  3214. onClick: this.handleCancel
  3215. }, cancelText), confirmText && import_react.default.createElement(Button, {
  3216. onClick: this.handleConfirm
  3217. }, confirmText))));
  3218. }
  3219. return import_react.default.createElement(View, {
  3220. onTouchMove: this.handleTouchMove,
  3221. className: rootClass
  3222. }, import_react.default.createElement(View, {
  3223. className: "at-modal__overlay",
  3224. onClick: this.handleClickOverlay
  3225. }), import_react.default.createElement(View, {
  3226. className: "at-modal__container"
  3227. }, this.props.children));
  3228. };
  3229. return AtModal2;
  3230. }(import_react.default.Component);
  3231. AtModal.defaultProps = {
  3232. isOpened: false,
  3233. closeOnClickOverlay: true
  3234. };
  3235. AtModal.propTypes = {
  3236. title: PropTypes.string,
  3237. isOpened: PropTypes.bool,
  3238. onCancel: PropTypes.func,
  3239. onConfirm: PropTypes.func,
  3240. onClose: PropTypes.func,
  3241. content: PropTypes.string,
  3242. closeOnClickOverlay: PropTypes.bool,
  3243. cancelText: PropTypes.string,
  3244. confirmText: PropTypes.string
  3245. };
  3246. var AtNavBar = function(_super) {
  3247. __extends(AtNavBar2, _super);
  3248. function AtNavBar2() {
  3249. return _super !== null && _super.apply(this, arguments) || this;
  3250. }
  3251. AtNavBar2.prototype.handleClickLeftView = function(event) {
  3252. this.props.onClickLeftIcon && this.props.onClickLeftIcon(event);
  3253. };
  3254. AtNavBar2.prototype.handleClickSt = function(event) {
  3255. this.props.onClickRgIconSt && this.props.onClickRgIconSt(event);
  3256. };
  3257. AtNavBar2.prototype.handleClickNd = function(event) {
  3258. this.props.onClickRgIconNd && this.props.onClickRgIconNd(event);
  3259. };
  3260. AtNavBar2.prototype.handleClickTitle = function(event) {
  3261. this.props.onClickTitle && this.props.onClickTitle(event);
  3262. };
  3263. AtNavBar2.prototype.render = function() {
  3264. var _a2, _b, _c;
  3265. var _d = this.props, customStyle = _d.customStyle, className = _d.className, color = _d.color, fixed = _d.fixed, border = _d.border, leftIconType = _d.leftIconType, leftText = _d.leftText, title = _d.title, rightFirstIconType = _d.rightFirstIconType, rightSecondIconType = _d.rightSecondIconType;
  3266. var linkStyle = {
  3267. color
  3268. };
  3269. var defaultIconInfo = {
  3270. customStyle: "",
  3271. className: "",
  3272. prefixClass: "at-icon",
  3273. value: "",
  3274. color: "",
  3275. size: 24
  3276. };
  3277. var leftIconInfo = leftIconType instanceof Object ? __assign(__assign({}, defaultIconInfo), leftIconType) : __assign(__assign({}, defaultIconInfo), {
  3278. value: leftIconType
  3279. });
  3280. var leftIconClass = classnames(leftIconInfo.prefixClass, (_a2 = {}, _a2[leftIconInfo.prefixClass + "-" + leftIconInfo.value] = leftIconInfo.value, _a2), leftIconInfo.className);
  3281. var rightFirstIconInfo = rightFirstIconType instanceof Object ? __assign(__assign({}, defaultIconInfo), rightFirstIconType) : __assign(__assign({}, defaultIconInfo), {
  3282. value: rightFirstIconType
  3283. });
  3284. var rightFirstIconClass = classnames(rightFirstIconInfo.prefixClass, (_b = {}, _b[rightFirstIconInfo.prefixClass + "-" + rightFirstIconInfo.value] = rightFirstIconInfo.value, _b), rightFirstIconInfo.className);
  3285. var rightSecondIconInfo = rightSecondIconType instanceof Object ? __assign(__assign({}, defaultIconInfo), rightSecondIconType) : __assign(__assign({}, defaultIconInfo), {
  3286. value: rightSecondIconType
  3287. });
  3288. var rightSecondIconClass = classnames(rightSecondIconInfo.prefixClass, (_c = {}, _c[rightSecondIconInfo.prefixClass + "-" + rightSecondIconInfo.value] = rightSecondIconInfo.value, _c), rightSecondIconInfo.className);
  3289. return import_react.default.createElement(View, {
  3290. className: classnames({
  3291. "at-nav-bar": true,
  3292. "at-nav-bar--fixed": fixed,
  3293. "at-nav-bar--no-border": !border
  3294. }, className),
  3295. style: customStyle
  3296. }, import_react.default.createElement(View, {
  3297. className: "at-nav-bar__left-view",
  3298. onClick: this.handleClickLeftView.bind(this),
  3299. style: linkStyle
  3300. }, leftIconType && import_react.default.createElement(Text, {
  3301. className: leftIconClass,
  3302. style: mergeStyle({
  3303. color: leftIconInfo.color,
  3304. fontSize: "" + pxTransform(parseInt(leftIconInfo.size.toString()) * 2)
  3305. }, leftIconInfo.customStyle)
  3306. }), import_react.default.createElement(Text, {
  3307. className: "at-nav-bar__text"
  3308. }, leftText)), import_react.default.createElement(View, {
  3309. className: "at-nav-bar__title",
  3310. onClick: this.handleClickTitle.bind(this)
  3311. }, title || this.props.children), import_react.default.createElement(View, {
  3312. className: "at-nav-bar__right-view"
  3313. }, import_react.default.createElement(View, {
  3314. className: classnames({
  3315. "at-nav-bar__container": true,
  3316. "at-nav-bar__container--hide": !rightSecondIconType
  3317. }),
  3318. style: linkStyle,
  3319. onClick: this.handleClickNd.bind(this)
  3320. }, rightSecondIconType && import_react.default.createElement(Text, {
  3321. className: rightSecondIconClass,
  3322. style: mergeStyle({
  3323. color: rightSecondIconInfo.color,
  3324. fontSize: "" + pxTransform(parseInt(rightSecondIconInfo.size.toString()) * 2)
  3325. }, rightSecondIconInfo.customStyle)
  3326. })), import_react.default.createElement(View, {
  3327. className: classnames({
  3328. "at-nav-bar__container": true,
  3329. "at-nav-bar__container--hide": !rightFirstIconType
  3330. }),
  3331. style: linkStyle,
  3332. onClick: this.handleClickSt.bind(this)
  3333. }, rightFirstIconType && import_react.default.createElement(Text, {
  3334. className: rightFirstIconClass,
  3335. style: mergeStyle({
  3336. color: rightFirstIconInfo.color,
  3337. fontSize: "" + pxTransform(parseInt(rightFirstIconInfo.size.toString()) * 2)
  3338. }, rightFirstIconInfo.customStyle)
  3339. }))));
  3340. };
  3341. return AtNavBar2;
  3342. }(import_react.default.Component);
  3343. AtNavBar.defaultProps = {
  3344. customStyle: "",
  3345. className: "",
  3346. fixed: false,
  3347. border: true,
  3348. color: "",
  3349. leftIconType: "",
  3350. leftText: "",
  3351. title: "",
  3352. rightFirstIconType: "",
  3353. rightSecondIconType: ""
  3354. };
  3355. AtNavBar.propTypes = {
  3356. customStyle: PropTypes.oneOfType([
  3357. PropTypes.object,
  3358. PropTypes.string
  3359. ]),
  3360. className: PropTypes.oneOfType([
  3361. PropTypes.array,
  3362. PropTypes.string
  3363. ]),
  3364. fixed: PropTypes.bool,
  3365. border: PropTypes.bool,
  3366. color: PropTypes.string,
  3367. leftIconType: PropTypes.oneOfType([
  3368. PropTypes.string,
  3369. PropTypes.object
  3370. ]),
  3371. leftText: PropTypes.string,
  3372. title: PropTypes.string,
  3373. rightFirstIconType: PropTypes.oneOfType([
  3374. PropTypes.string,
  3375. PropTypes.object
  3376. ]),
  3377. rightSecondIconType: PropTypes.oneOfType([
  3378. PropTypes.string,
  3379. PropTypes.object
  3380. ]),
  3381. onClickLeftIcon: PropTypes.func,
  3382. onClickRgIconSt: PropTypes.func,
  3383. onClickRgIconNd: PropTypes.func,
  3384. onClickTitle: PropTypes.func
  3385. };
  3386. var AtNoticebar = function(_super) {
  3387. __extends(AtNoticebar2, _super);
  3388. function AtNoticebar2(props) {
  3389. var _this = _super.call(this, props) || this;
  3390. var animElemId = "J_" + Math.ceil(Math.random() * 1e6).toString(36);
  3391. _this.state = {
  3392. show: true,
  3393. animElemId,
  3394. animationData: {
  3395. actions: [
  3396. {}
  3397. ]
  3398. },
  3399. dura: 15,
  3400. isWEAPP: import_taro.default.getEnv() === import_taro.default.ENV_TYPE.WEAPP,
  3401. isALIPAY: import_taro.default.getEnv() === import_taro.default.ENV_TYPE.ALIPAY,
  3402. isWEB: import_taro.default.getEnv() === import_taro.default.ENV_TYPE.WEB
  3403. };
  3404. return _this;
  3405. }
  3406. AtNoticebar2.prototype.onClose = function(event) {
  3407. this.setState({
  3408. show: false
  3409. });
  3410. this.props.onClose && this.props.onClose(event);
  3411. };
  3412. AtNoticebar2.prototype.onGotoMore = function(event) {
  3413. this.props.onGotoMore && this.props.onGotoMore(event);
  3414. };
  3415. AtNoticebar2.prototype.UNSAFE_componentWillReceiveProps = function() {
  3416. if (!this.timeout) {
  3417. this.interval && clearInterval(this.interval);
  3418. this.initAnimation();
  3419. }
  3420. };
  3421. AtNoticebar2.prototype.componentDidMount = function() {
  3422. if (!this.props.marquee) return;
  3423. this.initAnimation();
  3424. };
  3425. AtNoticebar2.prototype.initAnimation = function() {
  3426. var _this = this;
  3427. var _a2 = this.state, isWEAPP = _a2.isWEAPP, isALIPAY = _a2.isALIPAY;
  3428. this.timeout = setTimeout(function() {
  3429. _this.timeout = null;
  3430. if (_this.state.isWEB) {
  3431. var _a3 = _this.props.speed, speed = _a3 === void 0 ? 100 : _a3;
  3432. var elem = document.querySelector("." + _this.state.animElemId);
  3433. if (!elem) return;
  3434. var width = elem.getBoundingClientRect().width;
  3435. var dura = width / +speed;
  3436. _this.setState({
  3437. dura
  3438. });
  3439. } else if (isWEAPP || isALIPAY) {
  3440. var query = import_taro.default.createSelectorQuery();
  3441. query.select("." + _this.state.animElemId).boundingClientRect().exec(function(res) {
  3442. var queryRes = res[0];
  3443. if (!queryRes) return;
  3444. var width2 = queryRes.width;
  3445. var _a4 = _this.props.speed, speed2 = _a4 === void 0 ? 100 : _a4;
  3446. var dura2 = width2 / +speed2;
  3447. var animation = import_taro.default.createAnimation({
  3448. duration: dura2 * 1e3,
  3449. timingFunction: "linear"
  3450. });
  3451. var resetAnimation = import_taro.default.createAnimation({
  3452. duration: 0,
  3453. timingFunction: "linear"
  3454. });
  3455. var resetOpacityAnimation = import_taro.default.createAnimation({
  3456. duration: 0,
  3457. timingFunction: "linear"
  3458. });
  3459. var animBody = function() {
  3460. resetOpacityAnimation.opacity(0).step();
  3461. _this.setState({
  3462. animationData: resetOpacityAnimation.export()
  3463. });
  3464. setTimeout(function() {
  3465. resetAnimation.translateX(0).step();
  3466. _this.setState({
  3467. animationData: resetAnimation.export()
  3468. });
  3469. }, 300);
  3470. setTimeout(function() {
  3471. resetOpacityAnimation.opacity(1).step();
  3472. _this.setState({
  3473. animationData: resetOpacityAnimation.export()
  3474. });
  3475. }, 600);
  3476. setTimeout(function() {
  3477. animation.translateX(-width2).step();
  3478. _this.setState({
  3479. animationData: animation.export()
  3480. });
  3481. }, 900);
  3482. };
  3483. animBody();
  3484. _this.interval = setInterval(animBody, dura2 * 1e3 + 1e3);
  3485. });
  3486. }
  3487. }, 1e3);
  3488. };
  3489. AtNoticebar2.prototype.render = function() {
  3490. var _a2 = this.props, single = _a2.single, icon = _a2.icon, marquee = _a2.marquee, customStyle = _a2.customStyle, className = _a2.className, _b = _a2.moreText, moreText = _b === void 0 ? "\u67E5\u770B\u8BE6\u60C5" : _b;
  3491. var _c = this.props, showMore = _c.showMore, close = _c.close;
  3492. var _d = this.state, dura = _d.dura, show = _d.show, animElemId = _d.animElemId, animationData = _d.animationData, isWEAPP = _d.isWEAPP, isALIPAY = _d.isALIPAY;
  3493. var rootClassName = [
  3494. "at-noticebar"
  3495. ];
  3496. if (!single) showMore = false;
  3497. var style = {};
  3498. var innerClassName = [
  3499. "at-noticebar__content-inner"
  3500. ];
  3501. if (marquee) {
  3502. close = false;
  3503. style["animation-duration"] = dura + "s";
  3504. innerClassName.push(animElemId);
  3505. }
  3506. var classObject = {
  3507. "at-noticebar--marquee": marquee,
  3508. "at-noticebar--weapp": marquee && (isWEAPP || isALIPAY),
  3509. "at-noticebar--single": !marquee && single
  3510. };
  3511. var iconClass = [
  3512. "at-icon"
  3513. ];
  3514. if (icon) iconClass.push("at-icon-" + icon);
  3515. return show && import_react.default.createElement(View, {
  3516. className: classnames(rootClassName, classObject, className),
  3517. style: customStyle
  3518. }, close && import_react.default.createElement(View, {
  3519. className: "at-noticebar__close",
  3520. onClick: this.onClose.bind(this)
  3521. }, import_react.default.createElement(Text, {
  3522. className: "at-icon at-icon-close"
  3523. })), import_react.default.createElement(View, {
  3524. className: "at-noticebar__content"
  3525. }, icon && import_react.default.createElement(View, {
  3526. className: "at-noticebar__content-icon"
  3527. }, import_react.default.createElement(Text, {
  3528. className: classnames(iconClass, iconClass)
  3529. })), import_react.default.createElement(View, {
  3530. className: "at-noticebar__content-text"
  3531. }, import_react.default.createElement(View, {
  3532. id: animElemId,
  3533. animation: animationData,
  3534. className: classnames(innerClassName),
  3535. style
  3536. }, this.props.children))), showMore && import_react.default.createElement(View, {
  3537. className: "at-noticebar__more",
  3538. onClick: this.onGotoMore.bind(this)
  3539. }, import_react.default.createElement(Text, {
  3540. className: "text"
  3541. }, moreText), import_react.default.createElement(View, {
  3542. className: "at-noticebar__more-icon"
  3543. }, import_react.default.createElement(Text, {
  3544. className: "at-icon at-icon-chevron-right"
  3545. }))));
  3546. };
  3547. return AtNoticebar2;
  3548. }(import_react.default.Component);
  3549. AtNoticebar.defaultProps = {
  3550. close: false,
  3551. single: false,
  3552. marquee: false,
  3553. speed: 100,
  3554. moreText: "\u67E5\u770B\u8BE6\u60C5",
  3555. showMore: false,
  3556. icon: "",
  3557. customStyle: {}
  3558. };
  3559. AtNoticebar.propTypes = {
  3560. close: PropTypes.bool,
  3561. single: PropTypes.bool,
  3562. marquee: PropTypes.bool,
  3563. speed: PropTypes.number,
  3564. moreText: PropTypes.string,
  3565. showMore: PropTypes.bool,
  3566. icon: PropTypes.string,
  3567. customStyle: PropTypes.oneOfType([
  3568. PropTypes.object,
  3569. PropTypes.string
  3570. ]),
  3571. onClose: PropTypes.func,
  3572. onGotoMore: PropTypes.func
  3573. };
  3574. var MIN_MAXPAGE = 1;
  3575. var getMaxPage = function(maxPage) {
  3576. if (maxPage === void 0) {
  3577. maxPage = 0;
  3578. }
  3579. if (maxPage <= 0) return MIN_MAXPAGE;
  3580. return maxPage;
  3581. };
  3582. var createPickerRange = function(max) {
  3583. var range = new Array(max).fill(0).map(function(_val, index) {
  3584. return index + 1;
  3585. });
  3586. return range;
  3587. };
  3588. var AtPagination = function(_super) {
  3589. __extends(AtPagination2, _super);
  3590. function AtPagination2(props) {
  3591. var _this = _super.call(this, props) || this;
  3592. var _a2 = _this.props, current = _a2.current, _b = _a2.pageSize, pageSize = _b === void 0 ? 20 : _b, total = _a2.total;
  3593. var maxPage = getMaxPage(Math.ceil(total / pageSize));
  3594. _this.state = {
  3595. currentPage: current || 1,
  3596. maxPage,
  3597. pickerRange: createPickerRange(maxPage)
  3598. };
  3599. return _this;
  3600. }
  3601. AtPagination2.prototype.onPrev = function() {
  3602. var currentPage = this.state.currentPage;
  3603. var originCur = currentPage;
  3604. currentPage -= 1;
  3605. currentPage = Math.max(1, currentPage);
  3606. if (originCur === currentPage) return;
  3607. this.props.onPageChange && this.props.onPageChange({
  3608. type: "prev",
  3609. current: currentPage
  3610. });
  3611. this.setState({
  3612. currentPage
  3613. });
  3614. };
  3615. AtPagination2.prototype.onNext = function() {
  3616. var currentPage = this.state.currentPage;
  3617. var originCur = currentPage;
  3618. var maxPage = this.state.maxPage;
  3619. currentPage += 1;
  3620. currentPage = Math.min(maxPage, currentPage);
  3621. if (originCur === currentPage) return;
  3622. this.props.onPageChange && this.props.onPageChange({
  3623. type: "next",
  3624. current: currentPage
  3625. });
  3626. this.setState({
  3627. currentPage
  3628. });
  3629. };
  3630. AtPagination2.prototype.UNSAFE_componentWillReceiveProps = function(props) {
  3631. var total = props.total, _a2 = props.pageSize, pageSize = _a2 === void 0 ? 20 : _a2, current = props.current;
  3632. var maxPage = getMaxPage(Math.ceil(total / pageSize));
  3633. if (maxPage !== this.state.maxPage) {
  3634. this.setState({
  3635. maxPage,
  3636. pickerRange: createPickerRange(maxPage)
  3637. });
  3638. }
  3639. if (typeof current === "number" && current !== this.state.currentPage) {
  3640. this.setState({
  3641. currentPage: current
  3642. });
  3643. }
  3644. };
  3645. AtPagination2.prototype.render = function() {
  3646. var _a2 = this.props, icon = _a2.icon, customStyle = _a2.customStyle;
  3647. var _b = this.state, currentPage = _b.currentPage, maxPage = _b.maxPage;
  3648. var rootClassName = [
  3649. "at-pagination"
  3650. ];
  3651. var prevDisabled = maxPage === MIN_MAXPAGE || currentPage === 1;
  3652. var nextDisabled = maxPage === MIN_MAXPAGE || currentPage === maxPage;
  3653. var classObject = {
  3654. "at-pagination--icon": icon
  3655. };
  3656. return import_react.default.createElement(View, {
  3657. className: classnames(rootClassName, classObject, this.props.className),
  3658. style: customStyle
  3659. }, import_react.default.createElement(View, {
  3660. className: "at-pagination__btn-prev"
  3661. }, icon && import_react.default.createElement(AtButton, {
  3662. onClick: this.onPrev.bind(this),
  3663. size: "small",
  3664. disabled: prevDisabled
  3665. }, import_react.default.createElement(Text, {
  3666. className: "at-icon at-icon-chevron-left"
  3667. })), !icon && import_react.default.createElement(AtButton, {
  3668. onClick: this.onPrev.bind(this),
  3669. size: "small",
  3670. disabled: prevDisabled
  3671. }, "\u4E0A\u4E00\u9875")), import_react.default.createElement(View, {
  3672. className: "at-pagination__number"
  3673. }, import_react.default.createElement(Text, {
  3674. className: "at-pagination__number-current"
  3675. }, currentPage), "/", maxPage), import_react.default.createElement(View, {
  3676. className: "at-pagination__btn-next"
  3677. }, icon && import_react.default.createElement(AtButton, {
  3678. onClick: this.onNext.bind(this),
  3679. size: "small",
  3680. disabled: nextDisabled
  3681. }, import_react.default.createElement(Text, {
  3682. className: "at-icon at-icon-chevron-right"
  3683. })), !icon && import_react.default.createElement(AtButton, {
  3684. onClick: this.onNext.bind(this),
  3685. size: "small",
  3686. disabled: nextDisabled
  3687. }, "\u4E0B\u4E00\u9875")));
  3688. };
  3689. return AtPagination2;
  3690. }(import_react.default.Component);
  3691. AtPagination.defaultProps = {
  3692. current: 1,
  3693. total: 0,
  3694. pageSize: 20,
  3695. icon: false,
  3696. customStyle: {}
  3697. };
  3698. AtPagination.propTypes = {
  3699. current: PropTypes.number,
  3700. total: PropTypes.number,
  3701. pageSize: PropTypes.number,
  3702. icon: PropTypes.bool,
  3703. customStyle: PropTypes.oneOfType([
  3704. PropTypes.object,
  3705. PropTypes.string
  3706. ]),
  3707. onPageChange: PropTypes.func
  3708. };
  3709. var AtProgress = function(_super) {
  3710. __extends(AtProgress2, _super);
  3711. function AtProgress2() {
  3712. return _super !== null && _super.apply(this, arguments) || this;
  3713. }
  3714. AtProgress2.prototype.render = function() {
  3715. var _a2;
  3716. var color = this.props.color;
  3717. var percent = this.props.percent;
  3718. var _b = this.props, strokeWidth = _b.strokeWidth, status = _b.status, isHidePercent = _b.isHidePercent;
  3719. if (typeof percent !== "number") {
  3720. percent = 0;
  3721. }
  3722. if (percent < 0) {
  3723. percent = 0;
  3724. } else if (percent > 100) {
  3725. percent = 100;
  3726. }
  3727. var rootClass = classnames("at-progress", (_a2 = {}, _a2["at-progress--" + status] = !!status, _a2), this.props.className);
  3728. var iconClass = classnames("at-icon", {
  3729. "at-icon-close-circle": status === "error",
  3730. "at-icon-check-circle": status === "success"
  3731. });
  3732. var progressStyle = {
  3733. width: percent && +percent + "%",
  3734. height: strokeWidth && +strokeWidth + "px",
  3735. backgroundColor: color
  3736. };
  3737. return import_react.default.createElement(View, {
  3738. className: rootClass
  3739. }, import_react.default.createElement(View, {
  3740. className: "at-progress__outer"
  3741. }, import_react.default.createElement(View, {
  3742. className: "at-progress__outer-inner"
  3743. }, import_react.default.createElement(View, {
  3744. className: "at-progress__outer-inner-background",
  3745. style: progressStyle
  3746. }))), !isHidePercent && import_react.default.createElement(View, {
  3747. className: "at-progress__content"
  3748. }, !status || status === "progress" ? percent + "%" : import_react.default.createElement(Text, {
  3749. className: iconClass
  3750. })));
  3751. };
  3752. return AtProgress2;
  3753. }(import_react.default.Component);
  3754. AtProgress.propTypes = {
  3755. color: PropTypes.string,
  3756. status: PropTypes.string,
  3757. percent: PropTypes.number,
  3758. strokeWidth: PropTypes.number,
  3759. isHidePercent: PropTypes.bool
  3760. };
  3761. var AtRadio = function(_super) {
  3762. __extends(AtRadio2, _super);
  3763. function AtRadio2() {
  3764. return _super !== null && _super.apply(this, arguments) || this;
  3765. }
  3766. AtRadio2.prototype.handleClick = function(option, event) {
  3767. if (option.disabled) return;
  3768. this.props.onClick(option.value, event);
  3769. };
  3770. AtRadio2.prototype.render = function() {
  3771. var _this = this;
  3772. var _a2 = this.props, customStyle = _a2.customStyle, className = _a2.className, options = _a2.options, value = _a2.value;
  3773. return import_react.default.createElement(View, {
  3774. className: classnames("at-radio", className),
  3775. style: customStyle
  3776. }, options.map(function(option) {
  3777. return import_react.default.createElement(View, {
  3778. key: option.value,
  3779. onClick: _this.handleClick.bind(_this, option),
  3780. className: classnames({
  3781. "at-radio__option": true,
  3782. "at-radio__option--disabled": option.disabled
  3783. })
  3784. }, import_react.default.createElement(View, {
  3785. className: "at-radio__option-wrap"
  3786. }, import_react.default.createElement(View, {
  3787. className: "at-radio__option-container"
  3788. }, import_react.default.createElement(View, {
  3789. className: "at-radio__title"
  3790. }, option.label), import_react.default.createElement(View, {
  3791. className: classnames({
  3792. "at-radio__icon": true,
  3793. "at-radio__icon--checked": value === option.value
  3794. })
  3795. }, import_react.default.createElement(Text, {
  3796. className: "at-icon at-icon-check"
  3797. }))), option.desc && import_react.default.createElement(View, {
  3798. className: "at-radio__desc"
  3799. }, option.desc)));
  3800. }));
  3801. };
  3802. return AtRadio2;
  3803. }(import_react.default.Component);
  3804. AtRadio.defaultProps = {
  3805. customStyle: "",
  3806. className: "",
  3807. value: "",
  3808. options: [],
  3809. onClick: function() {}
  3810. };
  3811. AtRadio.propTypes = {
  3812. customStyle: PropTypes.oneOfType([
  3813. PropTypes.object,
  3814. PropTypes.string
  3815. ]),
  3816. className: PropTypes.oneOfType([
  3817. PropTypes.array,
  3818. PropTypes.string
  3819. ]),
  3820. value: PropTypes.string,
  3821. options: PropTypes.array,
  3822. onClick: PropTypes.func
  3823. };
  3824. var AtRate = function(_super) {
  3825. __extends(AtRate2, _super);
  3826. function AtRate2() {
  3827. return _super !== null && _super.apply(this, arguments) || this;
  3828. }
  3829. AtRate2.prototype.handleClick = function(event) {
  3830. this.props.onChange && this.props.onChange(event);
  3831. };
  3832. AtRate2.prototype.render = function() {
  3833. var _this = this;
  3834. var _a2 = this.props, customStyle = _a2.customStyle, className = _a2.className, _b = _a2.value, value = _b === void 0 ? 0 : _b, _c = _a2.max, max = _c === void 0 ? 5 : _c, size = _a2.size, _d = _a2.margin, margin = _d === void 0 ? 5 : _d;
  3835. var iconStyle = {
  3836. marginRight: pxTransform(margin)
  3837. };
  3838. var starIconStyle = {
  3839. fontSize: size ? size + "px" : ""
  3840. };
  3841. var classNameArr = [];
  3842. var floorValue = Math.floor(value);
  3843. var ceilValue = Math.ceil(value);
  3844. for(var i = 0; i < max; i++){
  3845. if (floorValue > i) {
  3846. classNameArr.push("at-rate__icon at-rate__icon--on");
  3847. } else if (ceilValue - 1 === i) {
  3848. classNameArr.push("at-rate__icon at-rate__icon--half");
  3849. } else {
  3850. classNameArr.push("at-rate__icon at-rate__icon--off");
  3851. }
  3852. }
  3853. return import_react.default.createElement(View, {
  3854. className: classnames("at-rate", className),
  3855. style: customStyle
  3856. }, classNameArr.map(function(cls, i2) {
  3857. return import_react.default.createElement(View, {
  3858. className: cls,
  3859. key: "at-rate-star-" + i2,
  3860. style: iconStyle,
  3861. onClick: _this.handleClick.bind(_this, i2 + 1)
  3862. }, import_react.default.createElement(Text, {
  3863. className: "at-icon at-icon-star-2",
  3864. style: starIconStyle
  3865. }), import_react.default.createElement(View, {
  3866. className: "at-rate__left"
  3867. }, import_react.default.createElement(Text, {
  3868. className: "at-icon at-icon-star-2",
  3869. style: starIconStyle
  3870. })));
  3871. }));
  3872. };
  3873. return AtRate2;
  3874. }(import_react.default.Component);
  3875. AtRate.defaultProps = {
  3876. customStyle: "",
  3877. className: "",
  3878. size: 0,
  3879. value: 0,
  3880. max: 5,
  3881. margin: 5
  3882. };
  3883. AtRate.propTypes = {
  3884. customStyle: PropTypes.oneOfType([
  3885. PropTypes.object,
  3886. PropTypes.string
  3887. ]),
  3888. className: PropTypes.oneOfType([
  3889. PropTypes.array,
  3890. PropTypes.string
  3891. ]),
  3892. size: PropTypes.oneOfType([
  3893. PropTypes.string,
  3894. PropTypes.number
  3895. ]),
  3896. value: PropTypes.number,
  3897. max: PropTypes.number,
  3898. margin: PropTypes.number,
  3899. onChange: PropTypes.func
  3900. };
  3901. var AtSegmentedControl = function(_super) {
  3902. __extends(AtSegmentedControl2, _super);
  3903. function AtSegmentedControl2() {
  3904. return _super !== null && _super.apply(this, arguments) || this;
  3905. }
  3906. AtSegmentedControl2.prototype.handleClick = function(index, event) {
  3907. if (this.props.disabled) return;
  3908. this.props.onClick(index, event);
  3909. };
  3910. AtSegmentedControl2.prototype.render = function() {
  3911. var _this = this;
  3912. var _a2 = this.props, _b = _a2.customStyle, customStyle = _b === void 0 ? "" : _b, className = _a2.className, disabled = _a2.disabled, values = _a2.values, selectedColor = _a2.selectedColor, current = _a2.current, color = _a2.color, _c = _a2.fontSize, fontSize = _c === void 0 ? 28 : _c;
  3913. var rootStyle = {
  3914. borderColor: selectedColor
  3915. };
  3916. var itemStyle = {
  3917. color: selectedColor,
  3918. fontSize: pxTransform(fontSize),
  3919. borderColor: selectedColor,
  3920. backgroundColor: color
  3921. };
  3922. var selectedItemStyle = {
  3923. color,
  3924. fontSize: pxTransform(fontSize),
  3925. borderColor: selectedColor,
  3926. backgroundColor: selectedColor
  3927. };
  3928. var rootCls = classnames("at-segmented-control", {
  3929. "at-segmented-control--disabled": disabled
  3930. }, className);
  3931. return import_react.default.createElement(View, {
  3932. className: rootCls,
  3933. style: mergeStyle(rootStyle, customStyle)
  3934. }, values.map(function(value, i) {
  3935. return import_react.default.createElement(View, {
  3936. className: classnames("at-segmented-control__item", {
  3937. "at-segmented-control__item--active": current === i
  3938. }),
  3939. style: current === i ? selectedItemStyle : itemStyle,
  3940. key: value,
  3941. onClick: _this.handleClick.bind(_this, i)
  3942. }, value);
  3943. }));
  3944. };
  3945. return AtSegmentedControl2;
  3946. }(import_react.default.Component);
  3947. AtSegmentedControl.defaultProps = {
  3948. customStyle: "",
  3949. className: "",
  3950. current: 0,
  3951. color: "",
  3952. fontSize: 28,
  3953. disabled: false,
  3954. selectedColor: "",
  3955. values: [],
  3956. onClick: function() {}
  3957. };
  3958. AtSegmentedControl.propTypes = {
  3959. customStyle: PropTypes.oneOfType([
  3960. PropTypes.object,
  3961. PropTypes.string
  3962. ]),
  3963. className: PropTypes.oneOfType([
  3964. PropTypes.array,
  3965. PropTypes.string
  3966. ]),
  3967. current: PropTypes.number,
  3968. color: PropTypes.string,
  3969. fontSize: PropTypes.oneOfType([
  3970. PropTypes.string,
  3971. PropTypes.number
  3972. ]),
  3973. disabled: PropTypes.bool,
  3974. values: PropTypes.array,
  3975. onClick: PropTypes.func
  3976. };
  3977. var AtSwitch = function(_super) {
  3978. __extends(AtSwitch2, _super);
  3979. function AtSwitch2() {
  3980. var _this = _super !== null && _super.apply(this, arguments) || this;
  3981. _this.handleChange = function(event) {
  3982. var _a2 = event.detail, value = _a2.value, checked = _a2.checked;
  3983. var state = typeof value === "undefined" ? checked : value;
  3984. _this.props.onChange && _this.props.onChange(state);
  3985. };
  3986. return _this;
  3987. }
  3988. AtSwitch2.prototype.render = function() {
  3989. var _a2 = this.props, customStyle = _a2.customStyle, className = _a2.className, disabled = _a2.disabled, border = _a2.border, title = _a2.title, checked = _a2.checked, color = _a2.color;
  3990. var rootCls = classnames("at-switch", {
  3991. "at-switch--without-border": !border
  3992. }, className);
  3993. var containerCls = classnames("at-switch__container", {
  3994. "at-switch--disabled": disabled
  3995. });
  3996. return import_react.default.createElement(View, {
  3997. className: rootCls,
  3998. style: customStyle
  3999. }, import_react.default.createElement(View, {
  4000. className: "at-switch__title"
  4001. }, title), import_react.default.createElement(View, {
  4002. className: containerCls
  4003. }, import_react.default.createElement(View, {
  4004. className: "at-switch__mask"
  4005. }), import_react.default.createElement(Switch, {
  4006. className: "at-switch__switch",
  4007. checked,
  4008. color,
  4009. onChange: this.handleChange
  4010. })));
  4011. };
  4012. return AtSwitch2;
  4013. }(import_react.default.Component);
  4014. AtSwitch.defaultProps = {
  4015. customStyle: "",
  4016. className: "",
  4017. title: "",
  4018. color: "#6190e8",
  4019. border: true,
  4020. disabled: false,
  4021. checked: false
  4022. };
  4023. AtSwitch.propTypes = {
  4024. customStyle: PropTypes.oneOfType([
  4025. PropTypes.object,
  4026. PropTypes.string
  4027. ]),
  4028. className: PropTypes.oneOfType([
  4029. PropTypes.array,
  4030. PropTypes.string
  4031. ]),
  4032. title: PropTypes.string,
  4033. color: PropTypes.string,
  4034. checked: PropTypes.bool,
  4035. border: PropTypes.bool,
  4036. disabled: PropTypes.bool,
  4037. onChange: PropTypes.func
  4038. };
  4039. var AtTabBar = function(_super) {
  4040. __extends(AtTabBar2, _super);
  4041. function AtTabBar2() {
  4042. return _super !== null && _super.apply(this, arguments) || this;
  4043. }
  4044. AtTabBar2.prototype.handleClick = function(index, event) {
  4045. this.props.onClick(index, event);
  4046. };
  4047. AtTabBar2.prototype.render = function() {
  4048. var _this = this;
  4049. var _a2 = this.props, _b = _a2.customStyle, customStyle = _b === void 0 ? "" : _b, className = _a2.className, fixed = _a2.fixed, backgroundColor = _a2.backgroundColor, tabList = _a2.tabList, current = _a2.current, color = _a2.color, iconSize = _a2.iconSize, fontSize = _a2.fontSize, selectedColor = _a2.selectedColor;
  4050. var defaultStyle = {
  4051. color: color || ""
  4052. };
  4053. var selectedStyle = {
  4054. color: selectedColor || ""
  4055. };
  4056. var titleStyle = {
  4057. fontSize: fontSize ? fontSize + "px" : ""
  4058. };
  4059. var rootStyle = {
  4060. backgroundColor: backgroundColor || ""
  4061. };
  4062. var imgStyle = {
  4063. width: iconSize + "px",
  4064. height: iconSize + "px"
  4065. };
  4066. return import_react.default.createElement(View, {
  4067. className: classnames({
  4068. "at-tab-bar": true,
  4069. "at-tab-bar--fixed": fixed
  4070. }, className),
  4071. style: mergeStyle(rootStyle, customStyle)
  4072. }, tabList.map(function(item, i) {
  4073. var _a3;
  4074. return import_react.default.createElement(View, {
  4075. className: classnames("at-tab-bar__item", {
  4076. "at-tab-bar__item--active": current === i
  4077. }),
  4078. style: current === i ? selectedStyle : defaultStyle,
  4079. key: item.title,
  4080. onClick: _this.handleClick.bind(_this, i)
  4081. }, item.iconType ? import_react.default.createElement(AtBadge, {
  4082. dot: !!item.dot,
  4083. value: item.text,
  4084. maxValue: Number(item.max)
  4085. }, import_react.default.createElement(View, {
  4086. className: "at-tab-bar__icon"
  4087. }, import_react.default.createElement(Text, {
  4088. className: classnames("" + (item.iconPrefixClass || "at-icon"), (_a3 = {}, _a3[(item.iconPrefixClass || "at-icon") + "-" + item.selectedIconType] = current === i && item.selectedIconType, _a3[(item.iconPrefixClass || "at-icon") + "-" + item.iconType] = !(current === i && item.selectedIconType), _a3)),
  4089. style: {
  4090. color: current === i ? selectedColor : color,
  4091. fontSize: iconSize ? iconSize + "px" : ""
  4092. }
  4093. }))) : null, item.image ? import_react.default.createElement(AtBadge, {
  4094. dot: !!item.dot,
  4095. value: item.text,
  4096. maxValue: Number(item.max)
  4097. }, import_react.default.createElement(View, {
  4098. className: "at-tab-bar__icon"
  4099. }, import_react.default.createElement(Image, {
  4100. className: classnames("at-tab-bar__inner-img", {
  4101. "at-tab-bar__inner-img--inactive": current !== i
  4102. }),
  4103. mode: "widthFix",
  4104. src: item.selectedImage || item.image,
  4105. style: imgStyle
  4106. }), import_react.default.createElement(Image, {
  4107. className: classnames("at-tab-bar__inner-img", {
  4108. "at-tab-bar__inner-img--inactive": current === i
  4109. }),
  4110. mode: "widthFix",
  4111. src: item.image,
  4112. style: imgStyle
  4113. }))) : null, import_react.default.createElement(View, null, import_react.default.createElement(AtBadge, {
  4114. dot: item.iconType || item.image ? false : !!item.dot,
  4115. value: item.iconType || item.image ? "" : item.text,
  4116. maxValue: item.iconType || item.image ? 0 : Number(item.max)
  4117. }, import_react.default.createElement(View, {
  4118. className: "at-tab-bar__title",
  4119. style: titleStyle
  4120. }, item.title))));
  4121. }));
  4122. };
  4123. return AtTabBar2;
  4124. }(import_react.default.Component);
  4125. AtTabBar.defaultProps = {
  4126. customStyle: "",
  4127. className: "",
  4128. fixed: false,
  4129. current: 0,
  4130. tabList: [],
  4131. onClick: function() {}
  4132. };
  4133. AtTabBar.propTypes = {
  4134. customStyle: PropTypes.oneOfType([
  4135. PropTypes.object,
  4136. PropTypes.string
  4137. ]),
  4138. className: PropTypes.oneOfType([
  4139. PropTypes.array,
  4140. PropTypes.string
  4141. ]),
  4142. fixed: PropTypes.bool,
  4143. backgroundColor: PropTypes.string,
  4144. current: PropTypes.number,
  4145. iconSize: PropTypes.oneOfType([
  4146. PropTypes.number,
  4147. PropTypes.string
  4148. ]),
  4149. fontSize: PropTypes.oneOfType([
  4150. PropTypes.number,
  4151. PropTypes.string
  4152. ]),
  4153. color: PropTypes.string,
  4154. selectedColor: PropTypes.string,
  4155. tabList: PropTypes.array,
  4156. onClick: PropTypes.func
  4157. };
  4158. var ENV$3 = import_taro.default.getEnv();
  4159. var MIN_DISTANCE = 100;
  4160. var MAX_INTERVAL = 10;
  4161. var AtTabs = function(_super) {
  4162. __extends(AtTabs2, _super);
  4163. function AtTabs2(props) {
  4164. var _this = _super.call(this, props) || this;
  4165. _this.updateState = function(idx) {
  4166. if (_this.props.scroll) {
  4167. switch(ENV$3){
  4168. case import_taro.default.ENV_TYPE.WEAPP:
  4169. case import_taro.default.ENV_TYPE.ALIPAY:
  4170. case import_taro.default.ENV_TYPE.SWAN:
  4171. {
  4172. var index = Math.max(idx - 1, 0);
  4173. _this.setState({
  4174. _scrollIntoView: "tab" + _this._tabId + index
  4175. });
  4176. break;
  4177. }
  4178. case import_taro.default.ENV_TYPE.WEB:
  4179. {
  4180. var index = Math.max(idx - 1, 0);
  4181. var prevTabItem = _this.tabHeaderRef.children[index];
  4182. prevTabItem && _this.setState({
  4183. _scrollTop: prevTabItem.offsetTop,
  4184. _scrollLeft: prevTabItem.offsetLeft
  4185. });
  4186. break;
  4187. }
  4188. default:
  4189. {
  4190. console.warn("AtTab \u7EC4\u4EF6\u5728\u8BE5\u73AF\u5883\u8FD8\u672A\u9002\u914D");
  4191. break;
  4192. }
  4193. }
  4194. }
  4195. };
  4196. _this.state = {
  4197. _scrollLeft: 0,
  4198. _scrollTop: 0,
  4199. _scrollIntoView: ""
  4200. };
  4201. _this._tabId = isTest() ? "tabs-AOTU2018" : uuid();
  4202. _this._touchDot = 0;
  4203. _this._timer = null;
  4204. _this._interval = 0;
  4205. _this._isMoving = false;
  4206. return _this;
  4207. }
  4208. AtTabs2.prototype.handleClick = function(index, event) {
  4209. this.props.onClick(index, event);
  4210. };
  4211. AtTabs2.prototype.handleTouchStart = function(e2) {
  4212. var _this = this;
  4213. var _a2 = this.props, swipeable = _a2.swipeable, tabDirection = _a2.tabDirection;
  4214. if (!swipeable || tabDirection === "vertical") return;
  4215. this._touchDot = e2.touches[0].pageX;
  4216. this._timer = setInterval(function() {
  4217. _this._interval++;
  4218. }, 100);
  4219. };
  4220. AtTabs2.prototype.handleTouchMove = function(e2) {
  4221. var _a2 = this.props, swipeable = _a2.swipeable, tabDirection = _a2.tabDirection, current = _a2.current, tabList = _a2.tabList;
  4222. if (!swipeable || tabDirection === "vertical") return;
  4223. var touchMove = e2.touches[0].pageX;
  4224. var moveDistance = touchMove - this._touchDot;
  4225. var maxIndex = tabList.length;
  4226. if (!this._isMoving && this._interval < MAX_INTERVAL && this._touchDot > 20) {
  4227. if (current + 1 < maxIndex && moveDistance <= -MIN_DISTANCE) {
  4228. this._isMoving = true;
  4229. this.handleClick(current + 1, e2);
  4230. } else if (current - 1 >= 0 && moveDistance >= MIN_DISTANCE) {
  4231. this._isMoving = true;
  4232. this.handleClick(current - 1, e2);
  4233. }
  4234. }
  4235. };
  4236. AtTabs2.prototype.handleTouchEnd = function() {
  4237. var _a2 = this.props, swipeable = _a2.swipeable, tabDirection = _a2.tabDirection;
  4238. if (!swipeable || tabDirection === "vertical") return;
  4239. clearInterval(this._timer);
  4240. this._interval = 0;
  4241. this._isMoving = false;
  4242. };
  4243. AtTabs2.prototype.getTabHeaderRef = function() {
  4244. if (ENV$3 === import_taro.default.ENV_TYPE.WEB) {
  4245. this.tabHeaderRef = document.getElementById(this._tabId);
  4246. }
  4247. };
  4248. AtTabs2.prototype.UNSAFE_componentWillReceiveProps = function(nextProps) {
  4249. if (nextProps.scroll !== this.props.scroll) {
  4250. this.getTabHeaderRef();
  4251. }
  4252. if (nextProps.current !== this.props.current) {
  4253. this.updateState(nextProps.current);
  4254. }
  4255. };
  4256. AtTabs2.prototype.componentDidMount = function() {
  4257. this.getTabHeaderRef();
  4258. this.updateState(this.props.current);
  4259. };
  4260. AtTabs2.prototype.componentWillUnmount = function() {
  4261. this.tabHeaderRef = null;
  4262. };
  4263. AtTabs2.prototype.render = function() {
  4264. var _a2;
  4265. var _this = this;
  4266. var _b = this.props, _c = _b.customStyle, customStyle = _c === void 0 ? "" : _c, className = _b.className, height = _b.height, tabDirection = _b.tabDirection, animated = _b.animated, tabList = _b.tabList, scroll = _b.scroll, current = _b.current;
  4267. var _d = this.state, _scrollLeft = _d._scrollLeft, _scrollTop = _d._scrollTop, _scrollIntoView = _d._scrollIntoView;
  4268. var heightStyle = {
  4269. height
  4270. };
  4271. var underlineStyle = {
  4272. height: tabDirection === "vertical" ? tabList.length * 100 + "%" : "1PX",
  4273. width: tabDirection === "horizontal" ? tabList.length * 100 + "%" : "1PX"
  4274. };
  4275. var bodyStyle = {};
  4276. var transformStyle = "translate3d(0px, -" + current * 100 + "%, 0px)";
  4277. if (tabDirection === "horizontal") {
  4278. transformStyle = "translate3d(-" + current * 100 + "%, 0px, 0px)";
  4279. }
  4280. Object.assign(bodyStyle, {
  4281. transform: transformStyle,
  4282. "-webkit-transform": transformStyle
  4283. });
  4284. if (!animated) {
  4285. bodyStyle.transition = "unset";
  4286. }
  4287. var tabItems = tabList.map(function(item, idx) {
  4288. var itemCls = classnames({
  4289. "at-tabs__item": true,
  4290. "at-tabs__item--active": current === idx
  4291. });
  4292. return import_react.default.createElement(View, {
  4293. className: itemCls,
  4294. id: "tab" + _this._tabId + idx,
  4295. key: "at-tabs-item-" + idx,
  4296. onClick: _this.handleClick.bind(_this, idx)
  4297. }, item.title, import_react.default.createElement(View, {
  4298. className: "at-tabs__item-underline"
  4299. }));
  4300. });
  4301. var rootCls = classnames((_a2 = {
  4302. "at-tabs": true,
  4303. "at-tabs--scroll": scroll
  4304. }, _a2["at-tabs--" + tabDirection] = true, _a2["at-tabs--" + ENV$3] = true, _a2), className);
  4305. var scrollX = tabDirection === "horizontal";
  4306. var scrollY = tabDirection === "vertical";
  4307. return import_react.default.createElement(View, {
  4308. className: rootCls,
  4309. style: mergeStyle(heightStyle, customStyle)
  4310. }, scroll ? import_react.default.createElement(ScrollView, {
  4311. id: this._tabId,
  4312. className: "at-tabs__header",
  4313. style: heightStyle,
  4314. scrollX,
  4315. scrollY,
  4316. scrollWithAnimation: true,
  4317. scrollLeft: _scrollLeft,
  4318. scrollTop: _scrollTop,
  4319. scrollIntoView: _scrollIntoView
  4320. }, tabItems) : import_react.default.createElement(View, {
  4321. id: this._tabId,
  4322. className: "at-tabs__header"
  4323. }, tabItems), import_react.default.createElement(View, {
  4324. className: "at-tabs__body",
  4325. onTouchStart: this.handleTouchStart.bind(this),
  4326. onTouchEnd: this.handleTouchEnd.bind(this),
  4327. onTouchMove: this.handleTouchMove.bind(this),
  4328. style: mergeStyle(bodyStyle, heightStyle)
  4329. }, import_react.default.createElement(View, {
  4330. className: "at-tabs__underline",
  4331. style: underlineStyle
  4332. }), this.props.children));
  4333. };
  4334. return AtTabs2;
  4335. }(import_react.default.Component);
  4336. AtTabs.defaultProps = {
  4337. customStyle: "",
  4338. className: "",
  4339. tabDirection: "horizontal",
  4340. height: "",
  4341. current: 0,
  4342. swipeable: true,
  4343. scroll: false,
  4344. animated: true,
  4345. tabList: [],
  4346. onClick: function() {}
  4347. };
  4348. AtTabs.propTypes = {
  4349. customStyle: PropTypes.oneOfType([
  4350. PropTypes.object,
  4351. PropTypes.string
  4352. ]),
  4353. className: PropTypes.oneOfType([
  4354. PropTypes.array,
  4355. PropTypes.string
  4356. ]),
  4357. height: PropTypes.string,
  4358. tabDirection: PropTypes.oneOf([
  4359. "horizontal",
  4360. "vertical"
  4361. ]),
  4362. current: PropTypes.number,
  4363. swipeable: PropTypes.bool,
  4364. scroll: PropTypes.bool,
  4365. animated: PropTypes.bool,
  4366. tabList: PropTypes.array,
  4367. onClick: PropTypes.func
  4368. };
  4369. var AtTabsPane = function(_super) {
  4370. __extends(AtTabsPane2, _super);
  4371. function AtTabsPane2() {
  4372. return _super !== null && _super.apply(this, arguments) || this;
  4373. }
  4374. AtTabsPane2.prototype.render = function() {
  4375. var _a2 = this.props, customStyle = _a2.customStyle, className = _a2.className, tabDirection = _a2.tabDirection, index = _a2.index, current = _a2.current;
  4376. return import_react.default.createElement(View, {
  4377. className: classnames({
  4378. "at-tabs-pane": true,
  4379. "at-tabs-pane--vertical": tabDirection === "vertical",
  4380. "at-tabs-pane--active": index === current,
  4381. "at-tabs-pane--inactive": index !== current
  4382. }, className),
  4383. style: customStyle
  4384. }, this.props.children);
  4385. };
  4386. return AtTabsPane2;
  4387. }(import_react.default.Component);
  4388. AtTabsPane.defaultProps = {
  4389. customStyle: "",
  4390. className: "",
  4391. tabDirection: "horizontal",
  4392. index: 0,
  4393. current: 0
  4394. };
  4395. AtTabsPane.propTypes = {
  4396. customStyle: PropTypes.oneOfType([
  4397. PropTypes.object,
  4398. PropTypes.string
  4399. ]),
  4400. className: PropTypes.oneOfType([
  4401. PropTypes.array,
  4402. PropTypes.string
  4403. ]),
  4404. tabDirection: PropTypes.oneOf([
  4405. "horizontal",
  4406. "vertical"
  4407. ]),
  4408. index: PropTypes.number,
  4409. current: PropTypes.number
  4410. };
  4411. var SIZE_CLASS = {
  4412. normal: "normal",
  4413. small: "small"
  4414. };
  4415. var TYPE_CLASS = {
  4416. primary: "primary"
  4417. };
  4418. var AtTag = function(_super) {
  4419. __extends(AtTag2, _super);
  4420. function AtTag2() {
  4421. return _super !== null && _super.apply(this, arguments) || this;
  4422. }
  4423. AtTag2.prototype.onClick = function(event) {
  4424. var _a2 = this.props, _b = _a2.name, name = _b === void 0 ? "" : _b, _c = _a2.active, active = _c === void 0 ? false : _c, disabled = _a2.disabled, onClick = _a2.onClick;
  4425. if (!disabled) {
  4426. typeof onClick === "function" && onClick({
  4427. name,
  4428. active
  4429. }, event);
  4430. }
  4431. };
  4432. AtTag2.prototype.render = function() {
  4433. var _a2;
  4434. var _b = this.props, _c = _b.size, size = _c === void 0 ? "normal" : _c, _d = _b.type, type = _d === void 0 ? "" : _d, _e = _b.circle, circle = _e === void 0 ? false : _e, _f = _b.disabled, disabled = _f === void 0 ? false : _f, _g = _b.active, active = _g === void 0 ? false : _g, customStyle = _b.customStyle;
  4435. var rootClassName = [
  4436. "at-tag"
  4437. ];
  4438. var classObject = (_a2 = {}, _a2["at-tag--" + SIZE_CLASS[size]] = SIZE_CLASS[size], _a2["at-tag--" + type] = TYPE_CLASS[type], _a2["at-tag--disabled"] = disabled, _a2["at-tag--active"] = active, _a2["at-tag--circle"] = circle, _a2);
  4439. return import_react.default.createElement(View, {
  4440. className: classnames(rootClassName, classObject, this.props.className),
  4441. style: customStyle,
  4442. onClick: this.onClick.bind(this)
  4443. }, this.props.children);
  4444. };
  4445. return AtTag2;
  4446. }(import_react.default.Component);
  4447. AtTag.defaultProps = {
  4448. size: "normal",
  4449. type: "",
  4450. name: "",
  4451. circle: false,
  4452. active: false,
  4453. disabled: false,
  4454. customStyle: {}
  4455. };
  4456. AtTag.propTypes = {
  4457. size: PropTypes.oneOf([
  4458. "normal",
  4459. "small"
  4460. ]),
  4461. type: PropTypes.oneOf([
  4462. "",
  4463. "primary"
  4464. ]),
  4465. name: PropTypes.string,
  4466. circle: PropTypes.bool,
  4467. active: PropTypes.bool,
  4468. disabled: PropTypes.bool,
  4469. customStyle: PropTypes.oneOfType([
  4470. PropTypes.object,
  4471. PropTypes.string
  4472. ]),
  4473. onClick: PropTypes.func
  4474. };
  4475. function getMaxLength(maxLength, textOverflowForbidden) {
  4476. if (!textOverflowForbidden) {
  4477. return maxLength + 500;
  4478. }
  4479. return maxLength;
  4480. }
  4481. var ENV$2 = import_taro.default.getEnv();
  4482. var AtTextarea = function(_super) {
  4483. __extends(AtTextarea2, _super);
  4484. function AtTextarea2() {
  4485. var _this = _super !== null && _super.apply(this, arguments) || this;
  4486. _this.handleInput = function(event) {
  4487. _this.props.onChange(event.detail.value, event);
  4488. };
  4489. _this.handleFocus = function(event) {
  4490. _this.props.onFocus && _this.props.onFocus(event);
  4491. };
  4492. _this.handleBlur = function(event) {
  4493. _this.props.onBlur && _this.props.onBlur(event);
  4494. };
  4495. _this.handleConfirm = function(event) {
  4496. _this.props.onConfirm && _this.props.onConfirm(event);
  4497. };
  4498. _this.handleLinechange = function(event) {
  4499. _this.props.onLinechange && _this.props.onLinechange(event);
  4500. };
  4501. return _this;
  4502. }
  4503. AtTextarea2.prototype.render = function() {
  4504. var _a2 = this.props, customStyle = _a2.customStyle, className = _a2.className, value = _a2.value, cursorSpacing = _a2.cursorSpacing, placeholder = _a2.placeholder, placeholderStyle = _a2.placeholderStyle, placeholderClass = _a2.placeholderClass, _b = _a2.maxLength, maxLength = _b === void 0 ? 200 : _b, count = _a2.count, disabled = _a2.disabled, autoFocus = _a2.autoFocus, focus = _a2.focus, showConfirmBar = _a2.showConfirmBar, selectionStart = _a2.selectionStart, selectionEnd = _a2.selectionEnd, fixed = _a2.fixed, _c = _a2.textOverflowForbidden, textOverflowForbidden = _c === void 0 ? true : _c, height = _a2.height;
  4505. var _maxLength = parseInt(maxLength.toString());
  4506. var actualMaxLength = getMaxLength(_maxLength, textOverflowForbidden);
  4507. var textareaStyle = height ? "height:" + pxTransform(Number(height)) : "";
  4508. var rootCls = classnames("at-textarea", "at-textarea--" + ENV$2, {
  4509. "at-textarea--error": _maxLength < value.length
  4510. }, className);
  4511. var placeholderCls = classnames("placeholder", placeholderClass);
  4512. return import_react.default.createElement(View, {
  4513. className: rootCls,
  4514. style: customStyle
  4515. }, import_react.default.createElement(Textarea, {
  4516. className: "at-textarea__textarea",
  4517. style: textareaStyle,
  4518. placeholderStyle,
  4519. placeholderClass: placeholderCls,
  4520. cursorSpacing,
  4521. value,
  4522. maxlength: actualMaxLength,
  4523. placeholder,
  4524. disabled,
  4525. autoFocus,
  4526. focus,
  4527. showConfirmBar,
  4528. selectionStart,
  4529. selectionEnd,
  4530. fixed,
  4531. onInput: this.handleInput,
  4532. onFocus: this.handleFocus,
  4533. onBlur: this.handleBlur,
  4534. onConfirm: this.handleConfirm,
  4535. onLineChange: this.handleLinechange
  4536. }), count && import_react.default.createElement(View, {
  4537. className: "at-textarea__counter"
  4538. }, value.length, "/", _maxLength));
  4539. };
  4540. return AtTextarea2;
  4541. }(import_react.default.Component);
  4542. AtTextarea.defaultProps = {
  4543. customStyle: "",
  4544. className: "",
  4545. value: "",
  4546. cursorSpacing: 100,
  4547. maxLength: 200,
  4548. placeholder: "",
  4549. disabled: false,
  4550. autoFocus: false,
  4551. focus: false,
  4552. showConfirmBar: false,
  4553. selectionStart: -1,
  4554. selectionEnd: -1,
  4555. count: true,
  4556. fixed: false,
  4557. height: "",
  4558. textOverflowForbidden: true,
  4559. onChange: function() {}
  4560. };
  4561. AtTextarea.propTypes = {
  4562. customStyle: PropTypes.oneOfType([
  4563. PropTypes.object,
  4564. PropTypes.string
  4565. ]),
  4566. className: PropTypes.oneOfType([
  4567. PropTypes.array,
  4568. PropTypes.string
  4569. ]),
  4570. value: PropTypes.string.isRequired,
  4571. cursorSpacing: PropTypes.number,
  4572. maxLength: PropTypes.oneOfType([
  4573. PropTypes.string,
  4574. PropTypes.number
  4575. ]),
  4576. placeholderClass: PropTypes.string,
  4577. placeholderStyle: PropTypes.string,
  4578. placeholder: PropTypes.string,
  4579. disabled: PropTypes.bool,
  4580. autoFocus: PropTypes.bool,
  4581. focus: PropTypes.bool,
  4582. showConfirmBar: PropTypes.bool,
  4583. selectionStart: PropTypes.number,
  4584. selectionEnd: PropTypes.number,
  4585. count: PropTypes.bool,
  4586. textOverflowForbidden: PropTypes.bool,
  4587. fixed: PropTypes.bool,
  4588. height: PropTypes.oneOfType([
  4589. PropTypes.string,
  4590. PropTypes.number
  4591. ]),
  4592. onLinechange: PropTypes.func,
  4593. onChange: PropTypes.func.isRequired,
  4594. onFocus: PropTypes.func,
  4595. onBlur: PropTypes.func,
  4596. onConfirm: PropTypes.func
  4597. };
  4598. var AtTimeline = function(_super) {
  4599. __extends(AtTimeline2, _super);
  4600. function AtTimeline2() {
  4601. return _super !== null && _super.apply(this, arguments) || this;
  4602. }
  4603. AtTimeline2.prototype.render = function() {
  4604. var _a2 = this.props, pending = _a2.pending, items = _a2.items, customStyle = _a2.customStyle;
  4605. var rootClassName = [
  4606. "at-timeline"
  4607. ];
  4608. if (pending) rootClassName.push("at-timeline--pending");
  4609. var rootClassObject = {
  4610. "at-timeline--pending": pending
  4611. };
  4612. var itemElems = items.map(function(item, index) {
  4613. var _a3;
  4614. var _b = item.title, title = _b === void 0 ? "" : _b, color = item.color, icon = item.icon, _c = item.content, content = _c === void 0 ? [] : _c;
  4615. var iconClass = classnames((_a3 = {
  4616. "at-icon": true
  4617. }, _a3["at-icon-" + icon] = icon, _a3));
  4618. var itemRootClassName = [
  4619. "at-timeline-item"
  4620. ];
  4621. if (color) itemRootClassName.push("at-timeline-item--" + color);
  4622. var dotClass = [];
  4623. if (icon) {
  4624. dotClass.push("at-timeline-item__icon");
  4625. } else {
  4626. dotClass.push("at-timeline-item__dot");
  4627. }
  4628. return import_react.default.createElement(View, {
  4629. className: classnames(itemRootClassName),
  4630. key: "at-timeline-item-" + index
  4631. }, import_react.default.createElement(View, {
  4632. className: "at-timeline-item__tail"
  4633. }), import_react.default.createElement(View, {
  4634. className: classnames(dotClass)
  4635. }, icon && import_react.default.createElement(Text, {
  4636. className: iconClass
  4637. })), import_react.default.createElement(View, {
  4638. className: "at-timeline-item__content"
  4639. }, import_react.default.createElement(View, {
  4640. className: "at-timeline-item__content-item"
  4641. }, title), content.map(function(sub, subIndex) {
  4642. return import_react.default.createElement(View, {
  4643. className: "at-timeline-item__content-item at-timeline-item__content--sub",
  4644. key: subIndex
  4645. }, sub);
  4646. })));
  4647. });
  4648. return import_react.default.createElement(View, {
  4649. className: classnames(rootClassName, rootClassObject, this.props.className),
  4650. style: customStyle
  4651. }, itemElems);
  4652. };
  4653. return AtTimeline2;
  4654. }(import_react.default.Component);
  4655. AtTimeline.defaultProps = {
  4656. pending: false,
  4657. items: [],
  4658. customStyle: {}
  4659. };
  4660. AtTimeline.propTypes = {
  4661. pending: PropTypes.bool,
  4662. items: PropTypes.arrayOf(PropTypes.object),
  4663. customStyle: PropTypes.oneOfType([
  4664. PropTypes.object,
  4665. PropTypes.string
  4666. ])
  4667. };
  4668. var error = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAMgAAADICAYAAACtWK6eAAAAAXNSR0IArs4c6QAAGwtJREFUeAHtnUusndV1x7mAIYABG/MUYGzLBCUtFHcCtB3YZgISGaCodOQ4QGGSoJAgV5FiOTAALBowY6tFASoUmYyS0EoRYPEonUUKRETYKNhWEnCwFZvWEIzB/f3v/T773HPP2Wt/79da0v/uc85+rfVfa93vsff5zswpLpUwcPz48aUMvAKsTMpLKC8Ey0bKc3h9JjhjpOTlKUfBpyPlEV4fBAdGyv283gPeUzkzM/NnSpeSGZgpebzBDUciXITR1yW4NilXU54P6pTDTPYueBO8lZRvkjgf8tolJwOeIBmJIyGuoMs6sD7B8oxD1N18LxO+DHaqJGH+ULcCXZ7PE8TwXnKESBNC5ZeNLm2v3oWCacLs9CNM2F2eIBP4ISlu4uM7wM3gr0FfeTqObb8BL4EdJMv/ULqMMNBXx4+YGPeSpFhJyw0JdA0xRNE1zLMCyaKL/8HLoBOEpNCFtI4USox/AIPmA/tT0ZHldaBk0ZFFNwAGKYMLCJLiNDx9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wJktBoqtpgiY1hfcDJYH2VloeBHRu1EuKsvZijzHmt8E6EuMtlq2XziRIz5Mkik4gPwHOBacD7WFM4hnQHuIX4HpwM4nxdnzV9pV0LkH6XUiy7M9vfVhUyfIx0Gk+sL8nOmy8Cygp/pOkeLVX0LWlBUTkcZJlLqs6BBNae2k3MjduocPAdeAGkuKJuEpd2m4JMsTbJMt8Np8NTgF6OURbedKe4gFwG1hPUmxkadLHQFsd32ditlWSRSfEC8GiCGWd4GdTPL61TrSVEMLtJIUuHJjEMGAJEkNM3GYSZjZl/QkzJ65uTbbrkmx/QjxbE70aoYYlSEY3RXuY4+imh2NZ1znM9IxdJ22+jQY6h7gf3NeD7SFgIoNYgmQgz9WUxNFtF4eBudHyEJaawxB68xmage6f89C6RPMhmh/pzY38H+v98ydafxE8CUa1JBFeYWmSMwP/D9ulVgFLdbgRAAAAAElFTkSuQmCC";
  4670. var loading = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAMgAAADICAMAAACahl6sAAAAn1BMVEUAAAD///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////8Kd3m4AAAANHRSTlMA6AN+QRH69xUI7Z7x2sWzcWYvphvj4MxiXVIiGAuH08K9ibepmI+Oc2tKHQ+helY5NykfkF5N9AAABmhJREFUeNrdnWlT4kAQhjt3CARIwg1yH3Lpqv3/f9tabsYJMUGCsM6b56NVVjGV6WP6pLvTijTb8bS2X29U581BaBEmLY9T1LrVpukSGhFn06n2W4SExvn4q2ecL6PxeSbrPwRBxN/iG0NSHyHs55kGB1KdVqTxBTjLnU6qo1csdx+ag8CIujXOxe+pf5QEIzPYNDo5OnlbITD2/WObM9AeHwiOYbDMEB/PgHRiwo3GaWpbKFkR6LvI4RTdF4Lk0JtyihXk/Xrnbe2kRKVHoLjjlImphwSKZXicxH4iVB4eNU6ywPHy01SME1nRTIJluOAEtgFpU/4xaHOC2YhgeRjbJble9Dplid0nXHSDEzQJGFNjyZyAGc1YU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U0UDKpeON7Q8xY3JxQMne8wqp6sLjACtqzxEu8hQ1tBWd4h2sTG5T+oO0S44uHihqpgUHSXtyiHaSpX+Fx/ubdoqLmG5Zty6oeASlqsG4Osz5ZawXLmSYKSptoSl8JIIKSZKOcLXr+3oK7WEJblIBXmdzM9+y5xVuV0/XTZ0VGNlXHL90/FKjafCyrhbLOSq1H9/ZdxtVqRZyZVxLSqKQkvrrPoPdpAqtUYweUO50Ipb1RY76sffWXGbXrV51G8SECt+vVRcftrkotdL1XW0fZsl01f6BoUXBJ98ZXv8QLmovrL5RO64PaAc1F+irRs2J1gMKQuIteYn14sdI0etAyyadxecRHtMiQrQ6v8nm5N4hkU3xTI8TmI/0Z0I63xCbezSzXDHNT6hHtL96Hl8grN+o5vwtnb4BK9Hd8VacYpZ70A/5NCbcYqVRffmpcspnGin09Xou8jhFN0X+g/o2xqn0TbhlWK30ThNbavT3ZHqJY22DIYFTV+wFKcoqAzvpPAl7WN/Txex7x/bLMk1T/ensu1wJp3GJjBHlMvIDDaNvP/dVuj/o/d8zqXWjYxgYIZ716roesVy96E5CIyoW+Nc/J5Ov4O+Wzp8I5zlTqdf5BBM+QZMAwXaC4aGzz/CN5SpdPuznvCVTNaKLatwn1c+F8RfPatZwd7qVzt8IZ1qX6nk9xdcs1kVOjZPM1ebpppf4itWOGjOq42639Y8x7YdT2v79UZ13hyEFt2Fv6Loy9OZgJFyAAAAAElFTkSuQmCC";
  4671. var statusImg = {
  4672. error,
  4673. success,
  4674. loading
  4675. };
  4676. var AtToast = function(_super) {
  4677. __extends(AtToast2, _super);
  4678. function AtToast2(props) {
  4679. var _this = _super.call(this, props) || this;
  4680. _this.handleClick = function(event) {
  4681. var _a2 = _this.props, onClick = _a2.onClick, status = _a2.status;
  4682. if (status === "loading") {
  4683. return;
  4684. }
  4685. if (onClick) {
  4686. return onClick(event);
  4687. }
  4688. _this.close();
  4689. };
  4690. var isOpened = props.isOpened, duration = props.duration;
  4691. if (isOpened) {
  4692. _this.makeTimer(duration || 0);
  4693. }
  4694. _this._timer = null;
  4695. _this.state = {
  4696. _isOpened: isOpened
  4697. };
  4698. return _this;
  4699. }
  4700. AtToast2.prototype.clearTimmer = function() {
  4701. if (this._timer) {
  4702. clearTimeout(this._timer);
  4703. this._timer = null;
  4704. }
  4705. };
  4706. AtToast2.prototype.makeTimer = function(duration) {
  4707. var _this = this;
  4708. if (duration === 0) {
  4709. return;
  4710. }
  4711. this._timer = setTimeout(function() {
  4712. _this.close();
  4713. }, +duration);
  4714. };
  4715. AtToast2.prototype.close = function() {
  4716. var _isOpened = this.state._isOpened;
  4717. if (_isOpened) {
  4718. this.setState({
  4719. _isOpened: false
  4720. }, this.handleClose);
  4721. this.clearTimmer();
  4722. }
  4723. };
  4724. AtToast2.prototype.handleClose = function(event) {
  4725. if (typeof this.props.onClose === "function") {
  4726. this.props.onClose(event);
  4727. }
  4728. };
  4729. AtToast2.prototype.UNSAFE_componentWillReceiveProps = function(nextProps) {
  4730. var isOpened = nextProps.isOpened, duration = nextProps.duration;
  4731. if (!isOpened) {
  4732. this.close();
  4733. return;
  4734. }
  4735. if (!this.state._isOpened) {
  4736. this.setState({
  4737. _isOpened: true
  4738. });
  4739. } else {
  4740. this.clearTimmer();
  4741. }
  4742. this.makeTimer(duration || 0);
  4743. };
  4744. AtToast2.prototype.render = function() {
  4745. var _a2, _b;
  4746. var _isOpened = this.state._isOpened;
  4747. var _c = this.props, customStyle = _c.customStyle, text = _c.text, icon = _c.icon, status = _c.status, image = _c.image, hasMask = _c.hasMask;
  4748. var realImg = image || statusImg[status] || null;
  4749. var isRenderIcon = !!(icon && !(image || statusImg[status]));
  4750. var bodyClass = classnames("toast-body", (_a2 = {
  4751. "at-toast__body--custom-image": image,
  4752. "toast-body--text": !realImg && !icon
  4753. }, _a2["at-toast__body--" + status] = !!status, _a2));
  4754. var iconClass = classnames("at-icon", (_b = {}, _b["at-icon-" + icon] = icon, _b));
  4755. return _isOpened ? import_react.default.createElement(View, {
  4756. className: classnames("at-toast", this.props.className)
  4757. }, hasMask && import_react.default.createElement(View, {
  4758. className: "at-toast__overlay"
  4759. }), import_react.default.createElement(View, {
  4760. className: bodyClass,
  4761. style: customStyle,
  4762. onClick: this.handleClick
  4763. }, import_react.default.createElement(View, {
  4764. className: "toast-body-content"
  4765. }, realImg ? import_react.default.createElement(View, {
  4766. className: "toast-body-content__img"
  4767. }, import_react.default.createElement(Image, {
  4768. className: "toast-body-content__img-item",
  4769. src: realImg,
  4770. mode: "scaleToFill"
  4771. })) : null, isRenderIcon && import_react.default.createElement(View, {
  4772. className: "toast-body-content__icon"
  4773. }, import_react.default.createElement(Text, {
  4774. className: iconClass
  4775. })), text && import_react.default.createElement(View, {
  4776. className: "toast-body-content__info"
  4777. }, import_react.default.createElement(Text, null, text))))) : null;
  4778. };
  4779. return AtToast2;
  4780. }(import_react.default.Component);
  4781. AtToast.defaultProps = {
  4782. duration: 3e3,
  4783. isOpened: false
  4784. };
  4785. AtToast.propTypes = {
  4786. text: PropTypes.string,
  4787. icon: PropTypes.string,
  4788. hasMask: PropTypes.bool,
  4789. image: PropTypes.string,
  4790. isOpened: PropTypes.bool,
  4791. duration: PropTypes.number,
  4792. status: PropTypes.oneOf([
  4793. "",
  4794. "error",
  4795. "loading",
  4796. "success"
  4797. ]),
  4798. onClick: PropTypes.func,
  4799. onClose: PropTypes.func
  4800. };
  4801. var AtAccordion = function(_super) {
  4802. __extends(AtAccordion2, _super);
  4803. function AtAccordion2(props) {
  4804. var _this = _super.call(this, props) || this;
  4805. _this.handleClick = function(event) {
  4806. var open = _this.props.open;
  4807. if (!_this.isCompleted) return;
  4808. _this.props.onClick && _this.props.onClick(!open, event);
  4809. };
  4810. _this.isCompleted = true;
  4811. _this.startOpen = false;
  4812. _this.state = {
  4813. wrapperHeight: 0
  4814. };
  4815. return _this;
  4816. }
  4817. AtAccordion2.prototype.toggleWithAnimation = function() {
  4818. var _this = this;
  4819. var _a2 = this.props, open = _a2.open, isAnimation = _a2.isAnimation;
  4820. if (!this.isCompleted || !isAnimation) return;
  4821. this.isCompleted = false;
  4822. delayQuerySelector(".at-accordion__body", 0).then(function(rect) {
  4823. var height = parseInt(rect[0].height.toString());
  4824. var startHeight = open ? height : 0;
  4825. var endHeight = open ? 0 : height;
  4826. _this.startOpen = false;
  4827. _this.setState({
  4828. wrapperHeight: startHeight
  4829. }, function() {
  4830. setTimeout(function() {
  4831. _this.setState({
  4832. wrapperHeight: endHeight
  4833. }, function() {
  4834. setTimeout(function() {
  4835. _this.isCompleted = true;
  4836. _this.setState({});
  4837. }, 700);
  4838. });
  4839. }, 100);
  4840. });
  4841. });
  4842. };
  4843. AtAccordion2.prototype.UNSAFE_componentWillReceiveProps = function(nextProps) {
  4844. if (nextProps.open !== this.props.open) {
  4845. this.startOpen = !!nextProps.open && !!nextProps.isAnimation;
  4846. this.toggleWithAnimation();
  4847. }
  4848. };
  4849. AtAccordion2.prototype.render = function() {
  4850. var _a2;
  4851. var _b = this.props, customStyle = _b.customStyle, className = _b.className, title = _b.title, icon = _b.icon, hasBorder = _b.hasBorder, open = _b.open, note = _b.note;
  4852. var wrapperHeight = this.state.wrapperHeight;
  4853. var rootCls = classnames("at-accordion", className);
  4854. var prefixClass = icon && icon.prefixClass || "at-icon";
  4855. var iconCls = classnames((_a2 = {}, _a2[prefixClass] = true, _a2[prefixClass + "-" + (icon && icon.value)] = icon && icon.value, _a2["at-accordion__icon"] = true, _a2));
  4856. var headerCls = classnames("at-accordion__header", {
  4857. "at-accordion__header--noborder": !hasBorder
  4858. });
  4859. var arrowCls = classnames("at-accordion__arrow", {
  4860. "at-accordion__arrow--folded": !!open
  4861. });
  4862. var contentCls = classnames("at-accordion__content", {
  4863. "at-accordion__content--inactive": !open && this.isCompleted || this.startOpen
  4864. });
  4865. var iconStyle = {
  4866. color: icon && icon.color || "",
  4867. fontSize: icon && icon.size + "px" || ""
  4868. };
  4869. var contentStyle = {
  4870. height: wrapperHeight + "px"
  4871. };
  4872. if (this.isCompleted) {
  4873. contentStyle.height = "";
  4874. }
  4875. return import_react.default.createElement(View, {
  4876. className: rootCls,
  4877. style: customStyle
  4878. }, import_react.default.createElement(View, {
  4879. className: headerCls,
  4880. onClick: this.handleClick
  4881. }, icon && icon.value && import_react.default.createElement(Text, {
  4882. className: iconCls,
  4883. style: iconStyle
  4884. }), import_react.default.createElement(View, {
  4885. className: "at-accordion__info"
  4886. }, import_react.default.createElement(View, {
  4887. className: "at-accordion__info__title"
  4888. }, title), import_react.default.createElement(View, {
  4889. className: "at-accordion__info__note"
  4890. }, note)), import_react.default.createElement(View, {
  4891. className: arrowCls
  4892. }, import_react.default.createElement(Text, {
  4893. className: "at-icon at-icon-chevron-down"
  4894. }))), import_react.default.createElement(View, {
  4895. style: contentStyle,
  4896. className: contentCls
  4897. }, import_react.default.createElement(View, {
  4898. className: "at-accordion__body"
  4899. }, this.props.children)));
  4900. };
  4901. return AtAccordion2;
  4902. }(import_react.default.Component);
  4903. AtAccordion.defaultProps = {
  4904. open: false,
  4905. customStyle: "",
  4906. className: "",
  4907. title: "",
  4908. note: "",
  4909. icon: {
  4910. value: ""
  4911. },
  4912. hasBorder: true,
  4913. isAnimation: true
  4914. };
  4915. AtAccordion.propTypes = {
  4916. customStyle: PropTypes.oneOfType([
  4917. PropTypes.object,
  4918. PropTypes.string
  4919. ]),
  4920. className: PropTypes.oneOfType([
  4921. PropTypes.array,
  4922. PropTypes.string
  4923. ]),
  4924. open: PropTypes.bool,
  4925. isAnimation: PropTypes.bool,
  4926. title: PropTypes.string,
  4927. note: PropTypes.string,
  4928. icon: PropTypes.object,
  4929. hasBorder: PropTypes.bool,
  4930. onClick: PropTypes.func
  4931. };
  4932. var AtSlider = function(_super) {
  4933. __extends(AtSlider2, _super);
  4934. function AtSlider2(props) {
  4935. var _this = _super.call(this, props) || this;
  4936. var _a2 = props.value, value = _a2 === void 0 ? 0 : _a2, _b = props.min, min = _b === void 0 ? 0 : _b, _c = props.max, max = _c === void 0 ? 100 : _c;
  4937. _this.state = {
  4938. _value: AtSlider2.clampNumber(value, min, max)
  4939. };
  4940. return _this;
  4941. }
  4942. AtSlider2.clampNumber = function(value, lower, upper) {
  4943. return Math.max(lower, Math.min(upper, value));
  4944. };
  4945. AtSlider2.prototype.handleChanging = function(e2) {
  4946. var _value = this.state._value;
  4947. var value = e2.detail.value;
  4948. if (value !== _value) {
  4949. this.setState({
  4950. _value: value
  4951. });
  4952. }
  4953. this.props.onChanging && this.props.onChanging(value);
  4954. };
  4955. AtSlider2.prototype.handleChange = function(e2) {
  4956. var value = e2.detail.value;
  4957. this.setState({
  4958. _value: value
  4959. });
  4960. this.props.onChange && this.props.onChange(value);
  4961. };
  4962. AtSlider2.prototype.UNSAFE_componentWillReceiveProps = function(props) {
  4963. var _a2 = props.value, value = _a2 === void 0 ? 0 : _a2, _b = props.min, min = _b === void 0 ? 0 : _b, _c = props.max, max = _c === void 0 ? 100 : _c;
  4964. this.setState({
  4965. _value: AtSlider2.clampNumber(value, min, max)
  4966. });
  4967. };
  4968. AtSlider2.prototype.render = function() {
  4969. var _value = this.state._value;
  4970. var _a2 = this.props, customStyle = _a2.customStyle, className = _a2.className, min = _a2.min, max = _a2.max, step = _a2.step, disabled = _a2.disabled, activeColor = _a2.activeColor, backgroundColor = _a2.backgroundColor, blockSize = _a2.blockSize, blockColor = _a2.blockColor, showValue = _a2.showValue;
  4971. return import_react.default.createElement(View, {
  4972. className: classnames({
  4973. "at-slider": true,
  4974. "at-slider--disabled": disabled
  4975. }, className),
  4976. style: customStyle
  4977. }, import_react.default.createElement(View, {
  4978. className: "at-slider__inner"
  4979. }, import_react.default.createElement(Slider, {
  4980. min,
  4981. max,
  4982. step,
  4983. value: _value,
  4984. disabled,
  4985. activeColor,
  4986. backgroundColor,
  4987. blockSize,
  4988. blockColor,
  4989. onChanging: this.handleChanging.bind(this),
  4990. onChange: this.handleChange.bind(this)
  4991. })), showValue && import_react.default.createElement(View, {
  4992. className: "at-slider__text"
  4993. }, "" + _value));
  4994. };
  4995. return AtSlider2;
  4996. }(import_react.default.Component);
  4997. AtSlider.defaultProps = {
  4998. customStyle: "",
  4999. className: "",
  5000. min: 0,
  5001. max: 100,
  5002. step: 1,
  5003. value: 0,
  5004. disabled: false,
  5005. activeColor: "#6190e8",
  5006. backgroundColor: "#e9e9e9",
  5007. blockSize: 28,
  5008. blockColor: "#ffffff",
  5009. showValue: false
  5010. };
  5011. AtSlider.propTypes = {
  5012. customStyle: PropTypes.oneOfType([
  5013. PropTypes.object,
  5014. PropTypes.string
  5015. ]),
  5016. className: PropTypes.oneOfType([
  5017. PropTypes.array,
  5018. PropTypes.string
  5019. ]),
  5020. min: PropTypes.number,
  5021. max: PropTypes.number,
  5022. step: PropTypes.number,
  5023. value: PropTypes.number,
  5024. disabled: PropTypes.bool,
  5025. activeColor: PropTypes.string,
  5026. backgroundColor: PropTypes.string,
  5027. blockSize: PropTypes.number,
  5028. blockColor: PropTypes.string,
  5029. showValue: PropTypes.bool,
  5030. onChange: PropTypes.func,
  5031. onChanging: PropTypes.func
  5032. };
  5033. var AtSwipeActionOptions = function(_super) {
  5034. __extends(AtSwipeActionOptions2, _super);
  5035. function AtSwipeActionOptions2() {
  5036. return _super !== null && _super.apply(this, arguments) || this;
  5037. }
  5038. AtSwipeActionOptions2.prototype.render = function() {
  5039. var rootClass = classnames("at-swipe-action__options", this.props.className);
  5040. return import_react.default.createElement(View, {
  5041. id: "swipeActionOptions-" + this.props.componentId,
  5042. className: rootClass,
  5043. style: this.props.customStyle
  5044. }, this.props.children);
  5045. };
  5046. return AtSwipeActionOptions2;
  5047. }(import_react.default.Component);
  5048. var AtSwipeAction = function(_super) {
  5049. __extends(AtSwipeAction2, _super);
  5050. function AtSwipeAction2(props) {
  5051. var _this = _super.call(this, props) || this;
  5052. _this.handleOpened = function(event) {
  5053. var onOpened = _this.props.onOpened;
  5054. if (typeof onOpened === "function") {
  5055. onOpened(event);
  5056. }
  5057. };
  5058. _this.handleClosed = function(event) {
  5059. var onClosed = _this.props.onClosed;
  5060. if (typeof onClosed === "function") {
  5061. onClosed(event);
  5062. }
  5063. };
  5064. _this.handleClick = function(item, index, event) {
  5065. var _a2 = _this.props, onClick = _a2.onClick, autoClose = _a2.autoClose;
  5066. if (typeof onClick === "function") {
  5067. onClick(item, index, event);
  5068. }
  5069. if (autoClose) {
  5070. _this._reset(false);
  5071. _this.handleClosed(event);
  5072. }
  5073. };
  5074. _this.onTouchEnd = function(e2) {
  5075. var maxOffsetSize = _this.state.maxOffsetSize;
  5076. if (_this.moveX === -maxOffsetSize) {
  5077. _this._reset(true);
  5078. _this.handleOpened(e2);
  5079. return;
  5080. }
  5081. if (_this.moveX === 0) {
  5082. _this._reset(false);
  5083. _this.handleClosed(e2);
  5084. return;
  5085. }
  5086. if (_this.state._isOpened && _this.moveX < 0) {
  5087. _this._reset(false);
  5088. _this.handleClosed(e2);
  5089. return;
  5090. }
  5091. if (Math.abs(_this.moveX) < maxOffsetSize * _this.moveRatio) {
  5092. _this._reset(false);
  5093. _this.handleClosed(e2);
  5094. } else {
  5095. _this._reset(true);
  5096. _this.handleOpened(e2);
  5097. }
  5098. };
  5099. _this.onChange = function(e2) {
  5100. _this.moveX = e2.detail.x;
  5101. };
  5102. var isOpened = props.isOpened, moveRatio = props.moveRatio;
  5103. _this.state = {
  5104. componentId: uuid(),
  5105. offsetSize: 0,
  5106. _isOpened: !!isOpened,
  5107. needAnimation: false,
  5108. eleWidth: 0,
  5109. maxOffsetSize: 0
  5110. };
  5111. _this.moveX = _this.state.offsetSize;
  5112. _this.moveRatio = moveRatio || 0.5;
  5113. return _this;
  5114. }
  5115. AtSwipeAction2.prototype.componentDidMount = function() {
  5116. this.getAreaWidth();
  5117. };
  5118. AtSwipeAction2.prototype.componentDidUpdate = function(_, prevState) {
  5119. var eleWidth = this.state.eleWidth;
  5120. if (prevState.eleWidth !== eleWidth) {
  5121. this.getMaxOffsetSize();
  5122. }
  5123. };
  5124. AtSwipeAction2.prototype.UNSAFE_componentWillReceiveProps = function(nextProps) {
  5125. var isOpened = nextProps.isOpened;
  5126. var _a2 = this.state, _isOpened = _a2._isOpened, maxOffsetSize = _a2.maxOffsetSize;
  5127. if (isOpened !== _isOpened) {
  5128. this.moveX = isOpened ? 0 : maxOffsetSize;
  5129. this._reset(!!isOpened);
  5130. }
  5131. };
  5132. AtSwipeAction2.prototype.getAreaWidth = function() {
  5133. return __awaiter(this, void 0, void 0, function() {
  5134. var systemInfo;
  5135. return __generator(this, function(_a2) {
  5136. switch(_a2.label){
  5137. case 0:
  5138. return [
  5139. 4,
  5140. import_taro.default.getSystemInfo()
  5141. ];
  5142. case 1:
  5143. systemInfo = _a2.sent();
  5144. this.setState({
  5145. eleWidth: systemInfo.windowWidth
  5146. });
  5147. return [
  5148. 2
  5149. ];
  5150. }
  5151. });
  5152. });
  5153. };
  5154. AtSwipeAction2.prototype.getMaxOffsetSize = function() {
  5155. return __awaiter(this, void 0, void 0, function() {
  5156. var componentId, actionOptionsRect, maxOffsetSize;
  5157. return __generator(this, function(_a2) {
  5158. switch(_a2.label){
  5159. case 0:
  5160. componentId = this.state.componentId;
  5161. return [
  5162. 4,
  5163. delayGetClientRect({
  5164. selectorStr: "#swipeActionOptions-" + componentId
  5165. })
  5166. ];
  5167. case 1:
  5168. actionOptionsRect = _a2.sent();
  5169. maxOffsetSize = actionOptionsRect[0].width;
  5170. this.setState({
  5171. maxOffsetSize
  5172. });
  5173. return [
  5174. 2
  5175. ];
  5176. }
  5177. });
  5178. });
  5179. };
  5180. AtSwipeAction2.prototype._reset = function(isOpened) {
  5181. var _this = this;
  5182. if (isOpened) {
  5183. var maxOffsetSize = this.state.maxOffsetSize;
  5184. if (false) {} else {
  5185. this.setState({
  5186. _isOpened: true,
  5187. offsetSize: -maxOffsetSize
  5188. });
  5189. }
  5190. } else {
  5191. this.setState({
  5192. offsetSize: this.moveX
  5193. }, function() {
  5194. _this.setState({
  5195. offsetSize: 0,
  5196. _isOpened: false
  5197. });
  5198. });
  5199. }
  5200. };
  5201. AtSwipeAction2.prototype.render = function() {
  5202. var _this = this;
  5203. var _a2 = this.state, componentId = _a2.componentId, maxOffsetSize = _a2.maxOffsetSize, eleWidth = _a2.eleWidth, offsetSize = _a2.offsetSize;
  5204. var _b = this.props, options = _b.options, disabled = _b.disabled;
  5205. var rootClass = classnames("at-swipe-action", this.props.className);
  5206. return import_react.default.createElement(View, {
  5207. id: "swipeAction-" + componentId,
  5208. className: rootClass,
  5209. style: {
  5210. width: eleWidth + "px"
  5211. }
  5212. }, import_react.default.createElement(MovableArea, {
  5213. className: "at-swipe-action__area",
  5214. style: {
  5215. width: eleWidth + "px"
  5216. }
  5217. }, import_react.default.createElement(MovableView, {
  5218. className: "at-swipe-action__content",
  5219. direction: "horizontal",
  5220. damping: 50,
  5221. x: offsetSize,
  5222. onTouchEnd: this.onTouchEnd,
  5223. onChange: this.onChange,
  5224. disabled,
  5225. style: {
  5226. width: eleWidth + maxOffsetSize + "px"
  5227. }
  5228. }, this.props.children, Array.isArray(options) && options.length > 0 ? import_react.default.createElement(AtSwipeActionOptions, {
  5229. options,
  5230. componentId,
  5231. customStyle: {
  5232. opacity: maxOffsetSize ? 1 : 0
  5233. }
  5234. }, options.map(function(item, key) {
  5235. return import_react.default.createElement(View, {
  5236. key: item.text + "-" + key,
  5237. style: item.style,
  5238. onClick: function(e2) {
  5239. return _this.handleClick(item, key, e2);
  5240. },
  5241. className: classnames("at-swipe-action__option", item.className)
  5242. }, import_react.default.createElement(Text, {
  5243. className: "option__text"
  5244. }, item.text));
  5245. })) : null)));
  5246. };
  5247. return AtSwipeAction2;
  5248. }(import_react.default.Component);
  5249. AtSwipeAction.defaultProps = {
  5250. options: [],
  5251. isOpened: false,
  5252. disabled: false,
  5253. autoClose: false,
  5254. maxDistance: 0,
  5255. areaWidth: 0
  5256. };
  5257. AtSwipeAction.propTypes = {
  5258. isOpened: PropTypes.bool,
  5259. disabled: PropTypes.bool,
  5260. autoClose: PropTypes.bool,
  5261. options: PropTypes.arrayOf(PropTypes.shape({
  5262. text: PropTypes.string,
  5263. style: PropTypes.oneOfType([
  5264. PropTypes.object,
  5265. PropTypes.string
  5266. ]),
  5267. className: PropTypes.oneOfType([
  5268. PropTypes.object,
  5269. PropTypes.string,
  5270. PropTypes.array
  5271. ])
  5272. })),
  5273. onClick: PropTypes.func,
  5274. onOpened: PropTypes.func,
  5275. onClosed: PropTypes.func
  5276. };
  5277. var AtSearchBar = function(_super) {
  5278. __extends(AtSearchBar2, _super);
  5279. function AtSearchBar2(props) {
  5280. var _this = _super.call(this, props) || this;
  5281. _this.handleFocus = function(event) {
  5282. _this.setState({
  5283. isFocus: true
  5284. });
  5285. _this.props.onFocus && _this.props.onFocus(event);
  5286. };
  5287. _this.handleBlur = function(event) {
  5288. _this.setState({
  5289. isFocus: false
  5290. });
  5291. _this.props.onBlur && _this.props.onBlur(event);
  5292. };
  5293. _this.handleChange = function(e2) {
  5294. _this.props.onChange(e2.detail.value, e2);
  5295. };
  5296. _this.handleClear = function(event) {
  5297. if (_this.props.onClear) {
  5298. _this.props.onClear(event);
  5299. } else {
  5300. _this.props.onChange("", event);
  5301. }
  5302. };
  5303. _this.handleConfirm = function(event) {
  5304. _this.props.onConfirm && _this.props.onConfirm(event);
  5305. };
  5306. _this.handleActionClick = function(event) {
  5307. _this.props.onActionClick && _this.props.onActionClick(event);
  5308. };
  5309. _this.state = {
  5310. isFocus: !!props.focus
  5311. };
  5312. return _this;
  5313. }
  5314. AtSearchBar2.prototype.UNSAFE_componentWillReceiveProps = function(nextProps) {
  5315. if (nextProps.focus !== this.props.focus) {
  5316. this.setState({
  5317. isFocus: !!nextProps.focus
  5318. });
  5319. }
  5320. };
  5321. AtSearchBar2.prototype.render = function() {
  5322. var _a2 = this.props, value = _a2.value, placeholder = _a2.placeholder, maxLength = _a2.maxLength, fixed = _a2.fixed, disabled = _a2.disabled, showActionButton = _a2.showActionButton, _b = _a2.actionName, actionName = _b === void 0 ? "\u641C\u7D22" : _b, inputType = _a2.inputType, className = _a2.className, customStyle = _a2.customStyle, enableNative = _a2.enableNative;
  5323. var isFocus = this.state.isFocus;
  5324. var fontSize = 14;
  5325. var rootCls = classnames("at-search-bar", {
  5326. "at-search-bar--fixed": fixed
  5327. }, className);
  5328. var placeholderWrapStyle = {};
  5329. var actionStyle = {};
  5330. if (isFocus || !isFocus && value) {
  5331. actionStyle.opacity = 1;
  5332. actionStyle.marginRight = "0";
  5333. placeholderWrapStyle.flexGrow = 0;
  5334. } else if (!isFocus && !value) {
  5335. placeholderWrapStyle.flexGrow = 1;
  5336. actionStyle.opacity = 0;
  5337. actionStyle.marginRight = "-" + ((actionName.length + 1) * fontSize + fontSize / 2 + 10) + "px";
  5338. }
  5339. if (showActionButton) {
  5340. actionStyle.opacity = 1;
  5341. actionStyle.marginRight = "0";
  5342. }
  5343. var clearIconStyle = {
  5344. display: "flex"
  5345. };
  5346. var placeholderStyle = {
  5347. visibility: "hidden"
  5348. };
  5349. if (!value.length) {
  5350. clearIconStyle.display = "none";
  5351. placeholderStyle.visibility = "visible";
  5352. }
  5353. return import_react.default.createElement(View, {
  5354. className: rootCls,
  5355. style: customStyle
  5356. }, import_react.default.createElement(View, {
  5357. className: "at-search-bar__input-cnt"
  5358. }, import_react.default.createElement(View, {
  5359. className: "at-search-bar__placeholder-wrap",
  5360. style: placeholderWrapStyle
  5361. }, import_react.default.createElement(Text, {
  5362. className: "at-icon at-icon-search"
  5363. }), import_react.default.createElement(Text, {
  5364. className: "at-search-bar__placeholder",
  5365. style: placeholderStyle
  5366. }, isFocus ? "" : placeholder)), import_react.default.createElement(Input, {
  5367. className: "at-search-bar__input",
  5368. type: inputType,
  5369. confirmType: "search",
  5370. value,
  5371. focus: isFocus,
  5372. disabled,
  5373. maxlength: maxLength,
  5374. enableNative,
  5375. onInput: this.handleChange,
  5376. onFocus: this.handleFocus,
  5377. onBlur: this.handleBlur,
  5378. onConfirm: this.handleConfirm
  5379. }), import_react.default.createElement(View, {
  5380. className: "at-search-bar__clear",
  5381. style: clearIconStyle,
  5382. onTouchStart: this.handleClear
  5383. }, import_react.default.createElement(Text, {
  5384. className: "at-icon at-icon-close-circle"
  5385. }))), import_react.default.createElement(View, {
  5386. className: "at-search-bar__action",
  5387. style: actionStyle,
  5388. onClick: this.handleActionClick
  5389. }, actionName));
  5390. };
  5391. return AtSearchBar2;
  5392. }(import_react.default.Component);
  5393. AtSearchBar.defaultProps = {
  5394. value: "",
  5395. placeholder: "\u641C\u7D22",
  5396. maxLength: 140,
  5397. fixed: false,
  5398. focus: false,
  5399. disabled: false,
  5400. showActionButton: false,
  5401. actionName: "\u641C\u7D22",
  5402. inputType: "text",
  5403. onChange: function() {},
  5404. enableNative: true
  5405. };
  5406. AtSearchBar.propTypes = {
  5407. value: PropTypes.string,
  5408. placeholder: PropTypes.string,
  5409. maxLength: PropTypes.number,
  5410. fixed: PropTypes.bool,
  5411. focus: PropTypes.bool,
  5412. disabled: PropTypes.bool,
  5413. showActionButton: PropTypes.bool,
  5414. actionName: PropTypes.string,
  5415. inputType: PropTypes.oneOf([
  5416. "text",
  5417. "number",
  5418. "idcard",
  5419. "digit"
  5420. ]),
  5421. onChange: PropTypes.func,
  5422. onFocus: PropTypes.func,
  5423. onBlur: PropTypes.func,
  5424. onConfirm: PropTypes.func,
  5425. onActionClick: PropTypes.func,
  5426. onClear: PropTypes.func,
  5427. enableNative: PropTypes.bool
  5428. };
  5429. var AtLoadMore = function(_super) {
  5430. __extends(AtLoadMore2, _super);
  5431. function AtLoadMore2() {
  5432. return _super !== null && _super.apply(this, arguments) || this;
  5433. }
  5434. AtLoadMore2.prototype.onClick = function() {
  5435. this.props.onClick && this.props.onClick(arguments);
  5436. };
  5437. AtLoadMore2.prototype.render = function() {
  5438. var _a2 = this.props, className = _a2.className, customStyle = _a2.customStyle, loadingText = _a2.loadingText, moreText = _a2.moreText, status = _a2.status, moreBtnStyle = _a2.moreBtnStyle, noMoreTextStyle = _a2.noMoreTextStyle, noMoreText = _a2.noMoreText;
  5439. var component = null;
  5440. if (status === "loading") {
  5441. component = import_react.default.createElement(AtActivityIndicator, {
  5442. mode: "center",
  5443. content: loadingText
  5444. });
  5445. } else if (status === "more") {
  5446. component = import_react.default.createElement(View, {
  5447. className: "at-load-more__cnt"
  5448. }, import_react.default.createElement(AtButton, {
  5449. full: true,
  5450. onClick: this.onClick.bind(this),
  5451. customStyle: moreBtnStyle
  5452. }, moreText));
  5453. } else {
  5454. component = import_react.default.createElement(Text, {
  5455. className: "at-load-more__tip",
  5456. style: noMoreTextStyle
  5457. }, noMoreText);
  5458. }
  5459. return import_react.default.createElement(View, {
  5460. className: classnames("at-load-more", className),
  5461. style: customStyle
  5462. }, component);
  5463. };
  5464. return AtLoadMore2;
  5465. }(import_react.default.Component);
  5466. AtLoadMore.defaultProps = {
  5467. customStyle: "",
  5468. className: "",
  5469. noMoreTextStyle: "",
  5470. moreBtnStyle: "",
  5471. status: "more",
  5472. loadingText: "\u52A0\u8F7D\u4E2D",
  5473. moreText: "\u67E5\u770B\u66F4\u591A",
  5474. noMoreText: "\u6CA1\u6709\u66F4\u591A"
  5475. };
  5476. AtLoadMore.propTypes = {
  5477. customStyle: PropTypes.oneOfType([
  5478. PropTypes.object,
  5479. PropTypes.string
  5480. ]),
  5481. className: PropTypes.oneOfType([
  5482. PropTypes.array,
  5483. PropTypes.string
  5484. ]),
  5485. noMoreTextStyle: PropTypes.oneOfType([
  5486. PropTypes.object,
  5487. PropTypes.string
  5488. ]),
  5489. moreBtnStyle: PropTypes.oneOfType([
  5490. PropTypes.object,
  5491. PropTypes.string
  5492. ]),
  5493. status: PropTypes.oneOf([
  5494. "more",
  5495. "loading",
  5496. "noMore"
  5497. ]),
  5498. loadingText: PropTypes.string,
  5499. moreText: PropTypes.string,
  5500. noMoreText: PropTypes.string,
  5501. onClick: PropTypes.func
  5502. };
  5503. var AtDivider = function(_super) {
  5504. __extends(AtDivider2, _super);
  5505. function AtDivider2() {
  5506. return _super !== null && _super.apply(this, arguments) || this;
  5507. }
  5508. AtDivider2.prototype.render = function() {
  5509. var _a2 = this.props, className = _a2.className, customStyle = _a2.customStyle, content = _a2.content, height = _a2.height, fontColor = _a2.fontColor, fontSize = _a2.fontSize, lineColor = _a2.lineColor;
  5510. var rootStyle = {
  5511. height: height ? "" + pxTransform(Number(height)) : ""
  5512. };
  5513. var fontStyle = {
  5514. color: fontColor,
  5515. "fontSize": fontSize ? "" + pxTransform(Number(fontSize)) : ""
  5516. };
  5517. var lineStyle = {
  5518. backgroundColor: lineColor
  5519. };
  5520. return import_react.default.createElement(View, {
  5521. className: classnames("at-divider", className),
  5522. style: mergeStyle(rootStyle, customStyle)
  5523. }, import_react.default.createElement(View, {
  5524. className: "at-divider__content",
  5525. style: fontStyle
  5526. }, content === "" ? this.props.children : content), import_react.default.createElement(View, {
  5527. className: "at-divider__line",
  5528. style: lineStyle
  5529. }));
  5530. };
  5531. return AtDivider2;
  5532. }(import_react.default.Component);
  5533. AtDivider.defaultProps = {
  5534. content: "",
  5535. height: 0,
  5536. fontColor: "",
  5537. fontSize: 0,
  5538. lineColor: ""
  5539. };
  5540. AtDivider.propTypes = {
  5541. customStyle: PropTypes.oneOfType([
  5542. PropTypes.object,
  5543. PropTypes.string
  5544. ]),
  5545. className: PropTypes.oneOfType([
  5546. PropTypes.array,
  5547. PropTypes.string
  5548. ]),
  5549. content: PropTypes.string,
  5550. height: PropTypes.oneOfType([
  5551. PropTypes.number,
  5552. PropTypes.string
  5553. ]),
  5554. fontColor: PropTypes.string,
  5555. fontSize: PropTypes.oneOfType([
  5556. PropTypes.number,
  5557. PropTypes.string
  5558. ]),
  5559. lineColor: PropTypes.string
  5560. };
  5561. var AtCountdownItem = function(_super) {
  5562. __extends(AtCountdownItem2, _super);
  5563. function AtCountdownItem2() {
  5564. return _super !== null && _super.apply(this, arguments) || this;
  5565. }
  5566. AtCountdownItem2.prototype.formatNum = function(num) {
  5567. return num <= 9 ? "0" + num : "" + num;
  5568. };
  5569. AtCountdownItem2.prototype.render = function() {
  5570. var _a2 = this.props, num = _a2.num, separator = _a2.separator;
  5571. return import_react.default.createElement(View, {
  5572. className: "at-countdown__item"
  5573. }, import_react.default.createElement(View, {
  5574. className: "at-countdown__time-box"
  5575. }, import_react.default.createElement(Text, {
  5576. className: "at-countdown__time"
  5577. }, this.formatNum(num))), import_react.default.createElement(Text, {
  5578. className: "at-countdown__separator"
  5579. }, separator));
  5580. };
  5581. return AtCountdownItem2;
  5582. }(import_react.default.Component);
  5583. AtCountdownItem.defaultProps = {
  5584. num: 0,
  5585. separator: ":"
  5586. };
  5587. AtCountdownItem.propTypes = {
  5588. num: PropTypes.number.isRequired,
  5589. separator: PropTypes.string
  5590. };
  5591. var toSeconds = function(day, hours, minutes, seconds) {
  5592. return day * 60 * 60 * 24 + hours * 60 * 60 + minutes * 60 + seconds;
  5593. };
  5594. var AtCountdown = function(_super) {
  5595. __extends(AtCountdown2, _super);
  5596. function AtCountdown2(props) {
  5597. var _this = _super.call(this, props) || this;
  5598. var _a2 = _this.props, _b = _a2.day, day = _b === void 0 ? 0 : _b, _c = _a2.hours, hours = _c === void 0 ? 0 : _c, _d = _a2.minutes, minutes = _d === void 0 ? 0 : _d, _e = _a2.seconds, seconds = _e === void 0 ? 0 : _e;
  5599. _this.seconds = toSeconds(day, hours, minutes, seconds);
  5600. var _f = _this.calculateTime(), _day = _f.day, _hours = _f.hours, _minutes = _f.minutes, _seconds = _f.seconds;
  5601. _this.state = {
  5602. _day,
  5603. _hours,
  5604. _minutes,
  5605. _seconds
  5606. };
  5607. return _this;
  5608. }
  5609. AtCountdown2.prototype.setTimer = function() {
  5610. if (!this.timer) this.countdonwn();
  5611. };
  5612. AtCountdown2.prototype.clearTimer = function() {
  5613. if (this.timer) {
  5614. clearTimeout(this.timer);
  5615. }
  5616. };
  5617. AtCountdown2.prototype.calculateTime = function() {
  5618. var _a2 = __read([
  5619. 0,
  5620. 0,
  5621. 0,
  5622. 0
  5623. ], 4), day = _a2[0], hours = _a2[1], minutes = _a2[2], seconds = _a2[3];
  5624. if (this.seconds > 0) {
  5625. day = this.props.isShowDay ? Math.floor(this.seconds / (60 * 60 * 24)) : 0;
  5626. hours = Math.floor(this.seconds / (60 * 60)) - day * 24;
  5627. minutes = Math.floor(this.seconds / 60) - day * 24 * 60 - hours * 60;
  5628. seconds = Math.floor(this.seconds) - day * 24 * 60 * 60 - hours * 60 * 60 - minutes * 60;
  5629. }
  5630. return {
  5631. day,
  5632. hours,
  5633. minutes,
  5634. seconds
  5635. };
  5636. };
  5637. AtCountdown2.prototype.countdonwn = function() {
  5638. var _this = this;
  5639. var _a2 = this.calculateTime(), day = _a2.day, hours = _a2.hours, minutes = _a2.minutes, seconds = _a2.seconds;
  5640. this.setState({
  5641. _day: day,
  5642. _hours: hours,
  5643. _minutes: minutes,
  5644. _seconds: seconds
  5645. });
  5646. this.seconds--;
  5647. if (this.seconds < 0) {
  5648. this.clearTimer();
  5649. this.props.onTimeUp && this.props.onTimeUp();
  5650. return;
  5651. }
  5652. this.timer = setTimeout(function() {
  5653. _this.countdonwn();
  5654. }, 1e3);
  5655. };
  5656. AtCountdown2.prototype.UNSAFE_componentWillReceiveProps = function(nextProps) {
  5657. if (JSON.stringify(this.props) === JSON.stringify(nextProps)) return;
  5658. var day = nextProps.day, hours = nextProps.hours, minutes = nextProps.minutes, seconds = nextProps.seconds;
  5659. this.seconds = toSeconds(day, hours, minutes, seconds);
  5660. this.clearTimer();
  5661. this.setTimer();
  5662. };
  5663. AtCountdown2.prototype.componentDidMount = function() {
  5664. this.setTimer();
  5665. };
  5666. AtCountdown2.prototype.componentWillUnmount = function() {
  5667. this.clearTimer();
  5668. };
  5669. AtCountdown2.prototype.componentDidHide = function() {
  5670. this.clearTimer();
  5671. };
  5672. AtCountdown2.prototype.componentDidShow = function() {
  5673. this.setTimer();
  5674. };
  5675. AtCountdown2.prototype.render = function() {
  5676. var _a2 = this.props, className = _a2.className, customStyle = _a2.customStyle, format = _a2.format, isShowDay = _a2.isShowDay, isCard = _a2.isCard, isShowHour = _a2.isShowHour;
  5677. var _b = this.state, _day = _b._day, _hours = _b._hours, _minutes = _b._minutes, _seconds = _b._seconds;
  5678. return import_react.default.createElement(View, {
  5679. className: classnames({
  5680. "at-countdown": true,
  5681. "at-countdown--card": isCard
  5682. }, className),
  5683. style: customStyle
  5684. }, isShowDay && import_react.default.createElement(AtCountdownItem, {
  5685. num: _day,
  5686. separator: format.day
  5687. }), isShowHour && import_react.default.createElement(AtCountdownItem, {
  5688. num: _hours,
  5689. separator: format.hours
  5690. }), import_react.default.createElement(AtCountdownItem, {
  5691. num: _minutes,
  5692. separator: format.minutes
  5693. }), import_react.default.createElement(AtCountdownItem, {
  5694. num: _seconds,
  5695. separator: format.seconds
  5696. }));
  5697. };
  5698. return AtCountdown2;
  5699. }(import_react.default.Component);
  5700. AtCountdown.defaultProps = {
  5701. customStyle: "",
  5702. className: "",
  5703. isCard: false,
  5704. isShowDay: false,
  5705. isShowHour: true,
  5706. format: {
  5707. day: "\u5929",
  5708. hours: "\u65F6",
  5709. minutes: "\u5206",
  5710. seconds: "\u79D2"
  5711. },
  5712. day: 0,
  5713. hours: 0,
  5714. minutes: 0,
  5715. seconds: 0
  5716. };
  5717. AtCountdown.propTypes = {
  5718. customStyle: PropTypes.oneOfType([
  5719. PropTypes.object,
  5720. PropTypes.string
  5721. ]),
  5722. className: PropTypes.oneOfType([
  5723. PropTypes.array,
  5724. PropTypes.string
  5725. ]),
  5726. isCard: PropTypes.bool,
  5727. isShowDay: PropTypes.bool,
  5728. isShowHour: PropTypes.bool,
  5729. format: PropTypes.object,
  5730. day: PropTypes.number,
  5731. hours: PropTypes.number,
  5732. minutes: PropTypes.number,
  5733. seconds: PropTypes.number,
  5734. onTimeUp: PropTypes.func
  5735. };
  5736. var AtSteps = function(_super) {
  5737. __extends(AtSteps2, _super);
  5738. function AtSteps2() {
  5739. return _super !== null && _super.apply(this, arguments) || this;
  5740. }
  5741. AtSteps2.prototype.handleClick = function(current, event) {
  5742. this.props.onChange(current, event);
  5743. };
  5744. AtSteps2.prototype.render = function() {
  5745. var _this = this;
  5746. var _a2 = this.props, customStyle = _a2.customStyle, className = _a2.className, items = _a2.items, current = _a2.current;
  5747. return import_react.default.createElement(View, {
  5748. className: classnames("at-steps", className),
  5749. style: customStyle
  5750. }, !!items && items.map(function(item, i) {
  5751. var _a3;
  5752. return import_react.default.createElement(View, {
  5753. key: item.title,
  5754. className: classnames({
  5755. "at-steps__item": true,
  5756. "at-steps__item--active": i === current,
  5757. "at-steps__item--inactive": i !== current
  5758. }),
  5759. onClick: _this.handleClick.bind(_this, i)
  5760. }, import_react.default.createElement(View, {
  5761. className: "at-steps__circular-wrap"
  5762. }, i !== 0 && import_react.default.createElement(View, {
  5763. className: "at-steps__left-line"
  5764. }), item.status ? import_react.default.createElement(View, {
  5765. className: classnames({
  5766. "at-icon": true,
  5767. "at-icon-check-circle": item.status === "success",
  5768. "at-icon-close-circle": item.status === "error",
  5769. "at-steps__single-icon": true,
  5770. "at-steps__single-icon--success": item.status === "success",
  5771. "at-steps__single-icon--error": item.status === "error"
  5772. })
  5773. }) : import_react.default.createElement(View, {
  5774. className: "at-steps__circular"
  5775. }, item.icon ? import_react.default.createElement(Text, {
  5776. className: classnames("at-icon", (_a3 = {}, _a3["at-icon-" + item.icon.value] = item.icon.value, _a3["at-steps__circle-icon"] = true, _a3))
  5777. }) : import_react.default.createElement(Text, {
  5778. className: "at-steps__num"
  5779. }, i + 1)), i !== items.length - 1 && import_react.default.createElement(View, {
  5780. className: "at-steps__right-line"
  5781. })), import_react.default.createElement(View, {
  5782. className: "at-steps__title"
  5783. }, item.title), import_react.default.createElement(View, {
  5784. className: "at-steps__desc"
  5785. }, item.desc));
  5786. }));
  5787. };
  5788. return AtSteps2;
  5789. }(import_react.default.Component);
  5790. AtSteps.defaultProps = {
  5791. customStyle: "",
  5792. className: "",
  5793. current: 0,
  5794. items: [],
  5795. onChange: function() {}
  5796. };
  5797. AtSteps.propTypes = {
  5798. customStyle: PropTypes.oneOfType([
  5799. PropTypes.object,
  5800. PropTypes.string
  5801. ]),
  5802. className: PropTypes.oneOfType([
  5803. PropTypes.array,
  5804. PropTypes.string
  5805. ]),
  5806. current: PropTypes.number,
  5807. items: PropTypes.array,
  5808. onChange: PropTypes.func
  5809. };
  5810. var AtCurtain = function(_super) {
  5811. __extends(AtCurtain2, _super);
  5812. function AtCurtain2() {
  5813. return _super !== null && _super.apply(this, arguments) || this;
  5814. }
  5815. AtCurtain2.prototype.onClose = function(e2) {
  5816. e2.stopPropagation();
  5817. this.props.onClose(e2);
  5818. };
  5819. AtCurtain2.prototype._stopPropagation = function(e2) {
  5820. e2.stopPropagation();
  5821. };
  5822. AtCurtain2.prototype.render = function() {
  5823. var _a2;
  5824. var _b = this.props, className = _b.className, customStyle = _b.customStyle, isOpened = _b.isOpened, closeBtnPosition = _b.closeBtnPosition;
  5825. var curtainClass = classnames({
  5826. "at-curtain": true,
  5827. "at-curtain--closed": !isOpened
  5828. }, className);
  5829. var btnCloseClass = classnames((_a2 = {
  5830. "at-curtain__btn-close": true
  5831. }, _a2["at-curtain__btn-close--" + closeBtnPosition] = closeBtnPosition, _a2));
  5832. return import_react.default.createElement(View, {
  5833. className: curtainClass,
  5834. style: customStyle,
  5835. onClick: this._stopPropagation
  5836. }, import_react.default.createElement(View, {
  5837. className: "at-curtain__container"
  5838. }, import_react.default.createElement(View, {
  5839. className: "at-curtain__body"
  5840. }, this.props.children, import_react.default.createElement(View, {
  5841. className: btnCloseClass,
  5842. onClick: this.onClose.bind(this)
  5843. }))));
  5844. };
  5845. return AtCurtain2;
  5846. }(import_react.default.Component);
  5847. AtCurtain.defaultProps = {
  5848. customStyle: "",
  5849. className: "",
  5850. isOpened: false,
  5851. closeBtnPosition: "bottom",
  5852. onClose: function() {}
  5853. };
  5854. AtCurtain.propTypes = {
  5855. customStyle: PropTypes.oneOfType([
  5856. PropTypes.object,
  5857. PropTypes.string
  5858. ]),
  5859. className: PropTypes.oneOfType([
  5860. PropTypes.array,
  5861. PropTypes.string
  5862. ]),
  5863. isOpened: PropTypes.bool,
  5864. closeBtnPosition: PropTypes.string,
  5865. onClose: PropTypes.func
  5866. };
  5867. var AtMessage = function(_super) {
  5868. __extends(AtMessage2, _super);
  5869. function AtMessage2(props) {
  5870. var _this = _super.call(this, props) || this;
  5871. _this.state = {
  5872. _isOpened: false,
  5873. _message: "",
  5874. _type: "info",
  5875. _duration: 3e3
  5876. };
  5877. _this._timer = null;
  5878. return _this;
  5879. }
  5880. AtMessage2.prototype.bindMessageListener = function() {
  5881. var _this = this;
  5882. import_taro.default.eventCenter.on("atMessage", function(options) {
  5883. if (options === void 0) {
  5884. options = {};
  5885. }
  5886. var message = options.message, type = options.type, duration = options.duration;
  5887. var newState = {
  5888. _isOpened: true,
  5889. _message: message,
  5890. _type: type,
  5891. _duration: duration || _this.state._duration
  5892. };
  5893. _this.setState(newState, function() {
  5894. clearTimeout(_this._timer);
  5895. _this._timer = setTimeout(function() {
  5896. _this.setState({
  5897. _isOpened: false
  5898. });
  5899. }, _this.state._duration);
  5900. });
  5901. });
  5902. import_taro.default.atMessage = import_taro.default.eventCenter.trigger.bind(import_taro.default.eventCenter, "atMessage");
  5903. };
  5904. AtMessage2.prototype.componentDidShow = function() {
  5905. this.bindMessageListener();
  5906. };
  5907. AtMessage2.prototype.componentDidMount = function() {
  5908. this.bindMessageListener();
  5909. };
  5910. AtMessage2.prototype.componentDidHide = function() {
  5911. import_taro.default.eventCenter.off("atMessage");
  5912. };
  5913. AtMessage2.prototype.componentWillUnmount = function() {
  5914. import_taro.default.eventCenter.off("atMessage");
  5915. };
  5916. AtMessage2.prototype.render = function() {
  5917. var _a2 = this.props, className = _a2.className, customStyle = _a2.customStyle;
  5918. var _b = this.state, _message = _b._message, _isOpened = _b._isOpened, _type = _b._type;
  5919. var rootCls = classnames({
  5920. "at-message": true,
  5921. "at-message--show": _isOpened,
  5922. "at-message--hidden": !_isOpened
  5923. }, "at-message--" + _type, className);
  5924. return import_react.default.createElement(View, {
  5925. className: rootCls,
  5926. style: customStyle
  5927. }, _message);
  5928. };
  5929. return AtMessage2;
  5930. }(import_react.default.Component);
  5931. AtMessage.defaultProps = {
  5932. customStyle: "",
  5933. className: ""
  5934. };
  5935. AtMessage.propTypes = {
  5936. customStyle: PropTypes.oneOfType([
  5937. PropTypes.object,
  5938. PropTypes.string
  5939. ]),
  5940. className: PropTypes.oneOfType([
  5941. PropTypes.array,
  5942. PropTypes.string
  5943. ])
  5944. };
  5945. var generateMatrix = function(files, col, showAddBtn) {
  5946. var matrix = [];
  5947. var length = showAddBtn ? files.length + 1 : files.length;
  5948. var row = Math.ceil(length / col);
  5949. for(var i = 0; i < row; i++){
  5950. if (i === row - 1) {
  5951. var lastArr = files.slice(i * col);
  5952. if (lastArr.length < col) {
  5953. if (showAddBtn) {
  5954. lastArr.push({
  5955. type: "btn",
  5956. uuid: uuid()
  5957. });
  5958. }
  5959. for(var j = lastArr.length; j < col; j++){
  5960. lastArr.push({
  5961. type: "blank",
  5962. uuid: uuid()
  5963. });
  5964. }
  5965. }
  5966. matrix.push(lastArr);
  5967. } else {
  5968. matrix.push(files.slice(i * col, (i + 1) * col));
  5969. }
  5970. }
  5971. return matrix;
  5972. };
  5973. var ENV$1 = import_taro.default.getEnv();
  5974. var AtImagePicker = function(_super) {
  5975. __extends(AtImagePicker2, _super);
  5976. function AtImagePicker2() {
  5977. var _this = _super !== null && _super.apply(this, arguments) || this;
  5978. _this.chooseFile = function() {
  5979. var _a2 = _this.props, _b = _a2.files, files = _b === void 0 ? [] : _b, multiple = _a2.multiple, count = _a2.count, sizeType = _a2.sizeType, sourceType = _a2.sourceType;
  5980. var filePathName = ENV$1 === import_taro.default.ENV_TYPE.ALIPAY ? "apFilePaths" : "tempFiles";
  5981. var params = {};
  5982. if (multiple) {
  5983. params.count = 99;
  5984. }
  5985. if (count) {
  5986. params.count = count;
  5987. }
  5988. if (sizeType) {
  5989. params.sizeType = sizeType;
  5990. }
  5991. if (sourceType) {
  5992. params.sourceType = sourceType;
  5993. }
  5994. import_taro.default.chooseImage(params).then(function(res) {
  5995. var targetFiles = res.tempFilePaths.map(function(path, i) {
  5996. return {
  5997. url: path,
  5998. file: res[filePathName][i]
  5999. };
  6000. });
  6001. var newFiles = files.concat(targetFiles);
  6002. _this.props.onChange(newFiles, "add");
  6003. }).catch(function(err) {
  6004. var _a3, _b2;
  6005. (_b2 = (_a3 = _this.props) === null || _a3 === void 0 ? void 0 : _a3.onFail) === null || _b2 === void 0 ? void 0 : _b2.call(_a3, err);
  6006. });
  6007. };
  6008. _this.handleImageClick = function(idx) {
  6009. _this.props.onImageClick && _this.props.onImageClick(idx, _this.props.files[idx]);
  6010. };
  6011. _this.handleRemoveImg = function(idx, event) {
  6012. event.stopPropagation();
  6013. event.preventDefault();
  6014. var _a2 = _this.props.files, files = _a2 === void 0 ? [] : _a2;
  6015. if (ENV$1 === import_taro.default.ENV_TYPE.WEB) {
  6016. window.URL.revokeObjectURL(files[idx].url);
  6017. }
  6018. var newFiles = files.filter(function(_, i) {
  6019. return i !== idx;
  6020. });
  6021. _this.props.onChange(newFiles, "remove", idx);
  6022. };
  6023. return _this;
  6024. }
  6025. AtImagePicker2.prototype.render = function() {
  6026. var _this = this;
  6027. var _a2 = this.props, className = _a2.className, customStyle = _a2.customStyle, files = _a2.files, mode = _a2.mode, _b = _a2.length, length = _b === void 0 ? 4 : _b, _c = _a2.showAddBtn, showAddBtn = _c === void 0 ? true : _c;
  6028. var rowLength = length <= 0 ? 1 : length;
  6029. var matrix = generateMatrix(files, rowLength, showAddBtn);
  6030. var rootCls = classnames("at-image-picker", className);
  6031. return import_react.default.createElement(View, {
  6032. className: rootCls,
  6033. style: customStyle
  6034. }, matrix.map(function(row, i) {
  6035. return import_react.default.createElement(View, {
  6036. className: "at-image-picker__flex-box",
  6037. key: i + 1
  6038. }, row.map(function(item, j) {
  6039. return item.url ? import_react.default.createElement(View, {
  6040. className: "at-image-picker__flex-item",
  6041. key: i * length + j
  6042. }, import_react.default.createElement(View, {
  6043. className: "at-image-picker__item"
  6044. }, import_react.default.createElement(View, {
  6045. className: "at-image-picker__remove-btn",
  6046. onClick: _this.handleRemoveImg.bind(_this, i * length + j)
  6047. }), import_react.default.createElement(Image, {
  6048. className: "at-image-picker__preview-img",
  6049. mode,
  6050. src: item.url,
  6051. onClick: _this.handleImageClick.bind(_this, i * length + j)
  6052. }))) : import_react.default.createElement(View, {
  6053. className: "at-image-picker__flex-item",
  6054. key: "empty_" + i * length + j
  6055. }, item.type === "btn" && import_react.default.createElement(View, {
  6056. className: "at-image-picker__item at-image-picker__choose-btn",
  6057. onClick: _this.chooseFile
  6058. }, import_react.default.createElement(View, {
  6059. className: "add-bar"
  6060. }), import_react.default.createElement(View, {
  6061. className: "add-bar"
  6062. })));
  6063. }));
  6064. }));
  6065. };
  6066. return AtImagePicker2;
  6067. }(import_react.default.Component);
  6068. AtImagePicker.defaultProps = {
  6069. className: "",
  6070. customStyle: "",
  6071. files: [],
  6072. mode: "aspectFill",
  6073. showAddBtn: true,
  6074. multiple: false,
  6075. length: 4,
  6076. onChange: function() {}
  6077. };
  6078. AtImagePicker.propTypes = {
  6079. className: PropTypes.oneOfType([
  6080. PropTypes.string,
  6081. PropTypes.array
  6082. ]),
  6083. customStyle: PropTypes.oneOfType([
  6084. PropTypes.string,
  6085. PropTypes.object
  6086. ]),
  6087. files: PropTypes.array,
  6088. mode: PropTypes.oneOf([
  6089. "scaleToFill",
  6090. "aspectFit",
  6091. "aspectFill",
  6092. "widthFix",
  6093. "top",
  6094. "bottom",
  6095. "center",
  6096. "left",
  6097. "right",
  6098. "top left",
  6099. "top right",
  6100. "bottom left",
  6101. "bottom right"
  6102. ]),
  6103. showAddBtn: PropTypes.bool,
  6104. multiple: PropTypes.bool,
  6105. length: PropTypes.number,
  6106. onChange: PropTypes.func,
  6107. onImageClick: PropTypes.func,
  6108. onFail: PropTypes.func,
  6109. count: PropTypes.number,
  6110. sizeType: PropTypes.array,
  6111. sourceType: PropTypes.array
  6112. };
  6113. var AtRange = function(_super) {
  6114. __extends(AtRange2, _super);
  6115. function AtRange2(props) {
  6116. var _this = _super.call(this, props) || this;
  6117. _this.handleClick = function(event) {
  6118. if (_this.currentSlider && !_this.props.disabled) {
  6119. var sliderValue = 0;
  6120. var detail = getEventDetail(event);
  6121. sliderValue = detail.x - _this.left;
  6122. _this.setSliderValue(_this.currentSlider, sliderValue, "onChange");
  6123. }
  6124. };
  6125. var _a2 = props.min, min = _a2 === void 0 ? 0 : _a2, _b = props.max, max = _b === void 0 ? 100 : _b;
  6126. _this.width = 0;
  6127. _this.left = 0;
  6128. _this.deltaValue = max - min;
  6129. _this.currentSlider = "";
  6130. _this.state = {
  6131. aX: 0,
  6132. bX: 0
  6133. };
  6134. return _this;
  6135. }
  6136. AtRange2.prototype.handleTouchMove = function(sliderName, event) {
  6137. if (this.props.disabled) return;
  6138. event.stopPropagation();
  6139. var clientX = event.touches[0].clientX;
  6140. this.setSliderValue(sliderName, clientX - this.left, "onChange");
  6141. };
  6142. AtRange2.prototype.handleTouchEnd = function(sliderName) {
  6143. if (this.props.disabled) return;
  6144. this.currentSlider = sliderName;
  6145. this.triggerEvent("onAfterChange");
  6146. };
  6147. AtRange2.prototype.setSliderValue = function(sliderName, targetValue, funcName) {
  6148. var _a2, _b;
  6149. var _this = this;
  6150. var distance = Math.min(Math.max(targetValue, 0), this.width);
  6151. var sliderValue = Math.floor(distance / this.width * 100);
  6152. if (funcName) {
  6153. this.setState((_a2 = {}, _a2[sliderName] = sliderValue, _a2), function() {
  6154. return _this.triggerEvent(funcName);
  6155. });
  6156. } else {
  6157. this.setState((_b = {}, _b[sliderName] = sliderValue, _b));
  6158. }
  6159. };
  6160. AtRange2.prototype.setValue = function(value) {
  6161. var _a2 = this.props.min, min = _a2 === void 0 ? 0 : _a2;
  6162. var aX = Math.round((value[0] - min) / this.deltaValue * 100);
  6163. var bX = Math.round((value[1] - min) / this.deltaValue * 100);
  6164. this.setState({
  6165. aX,
  6166. bX
  6167. });
  6168. };
  6169. AtRange2.prototype.triggerEvent = function(funcName) {
  6170. var _a2 = this.props.min, min = _a2 === void 0 ? 0 : _a2;
  6171. var _b = this.state, aX = _b.aX, bX = _b.bX;
  6172. var a = Math.round(aX / 100 * this.deltaValue) + min;
  6173. var b2 = Math.round(bX / 100 * this.deltaValue) + min;
  6174. var result = [
  6175. a,
  6176. b2
  6177. ].sort(function(x2, y2) {
  6178. return x2 - y2;
  6179. });
  6180. if (funcName === "onChange") {
  6181. this.props.onChange && this.props.onChange(result);
  6182. } else if (funcName === "onAfterChange") {
  6183. this.props.onAfterChange && this.props.onAfterChange(result);
  6184. }
  6185. };
  6186. AtRange2.prototype.updatePos = function() {
  6187. var _this = this;
  6188. delayQuerySelector(".at-range__container", 0).then(function(rect) {
  6189. var _a2, _b;
  6190. _this.width = Math.round((_a2 = rect[0]) === null || _a2 === void 0 ? void 0 : _a2.width);
  6191. _this.left = Math.round((_b = rect[0]) === null || _b === void 0 ? void 0 : _b.left);
  6192. });
  6193. };
  6194. AtRange2.prototype.UNSAFE_componentWillReceiveProps = function(nextProps) {
  6195. var value = nextProps.value;
  6196. this.updatePos();
  6197. if (this.props.value[0] !== value[0] || this.props.value[1] !== value[1]) {
  6198. this.setValue(value);
  6199. }
  6200. };
  6201. AtRange2.prototype.componentDidMount = function() {
  6202. var value = this.props.value;
  6203. this.updatePos();
  6204. this.setValue(value);
  6205. };
  6206. AtRange2.prototype.render = function() {
  6207. var _a2 = this.props, className = _a2.className, customStyle = _a2.customStyle, sliderStyle = _a2.sliderStyle, railStyle = _a2.railStyle, trackStyle = _a2.trackStyle, blockSize = _a2.blockSize, disabled = _a2.disabled;
  6208. var rootCls = classnames("at-range", {
  6209. "at-range--disabled": disabled
  6210. }, className);
  6211. var _b = this.state, aX = _b.aX, bX = _b.bX;
  6212. var sliderCommonStyle = {
  6213. width: blockSize ? blockSize + "PX" : "",
  6214. height: blockSize ? blockSize + "PX" : "",
  6215. marginLeft: blockSize ? -blockSize / 2 + "PX" : ""
  6216. };
  6217. var sliderAStyle = __assign(__assign({}, sliderCommonStyle), {
  6218. left: aX + "%"
  6219. });
  6220. var sliderBStyle = __assign(__assign({}, sliderCommonStyle), {
  6221. left: bX + "%"
  6222. });
  6223. var containerStyle = {
  6224. height: blockSize ? blockSize + "PX" : ""
  6225. };
  6226. var smallerX = Math.min(aX, bX);
  6227. var deltaX = Math.abs(aX - bX);
  6228. var atTrackStyle = {
  6229. left: smallerX + "%",
  6230. width: deltaX + "%"
  6231. };
  6232. return import_react.default.createElement(View, {
  6233. className: rootCls,
  6234. style: customStyle,
  6235. onClick: this.handleClick
  6236. }, import_react.default.createElement(View, {
  6237. className: "at-range__container",
  6238. style: containerStyle
  6239. }, import_react.default.createElement(View, {
  6240. className: "at-range__rail",
  6241. style: railStyle
  6242. }), import_react.default.createElement(View, {
  6243. className: "at-range__track",
  6244. style: mergeStyle(atTrackStyle, trackStyle)
  6245. }), import_react.default.createElement(View, {
  6246. className: "at-range__slider",
  6247. style: mergeStyle(sliderAStyle, sliderStyle),
  6248. onTouchMove: this.handleTouchMove.bind(this, "aX"),
  6249. onTouchEnd: this.handleTouchEnd.bind(this, "aX")
  6250. }), import_react.default.createElement(View, {
  6251. className: "at-range__slider",
  6252. style: mergeStyle(sliderBStyle, sliderStyle),
  6253. onTouchMove: this.handleTouchMove.bind(this, "bX"),
  6254. onTouchEnd: this.handleTouchEnd.bind(this, "bX")
  6255. })));
  6256. };
  6257. return AtRange2;
  6258. }(import_react.default.Component);
  6259. AtRange.defaultProps = {
  6260. customStyle: "",
  6261. className: "",
  6262. sliderStyle: "",
  6263. railStyle: "",
  6264. trackStyle: "",
  6265. value: [
  6266. 0,
  6267. 0
  6268. ],
  6269. min: 0,
  6270. max: 100,
  6271. disabled: false,
  6272. blockSize: 0
  6273. };
  6274. AtRange.propTypes = {
  6275. customStyle: PropTypes.oneOfType([
  6276. PropTypes.object,
  6277. PropTypes.string
  6278. ]),
  6279. className: PropTypes.oneOfType([
  6280. PropTypes.array,
  6281. PropTypes.string
  6282. ]),
  6283. sliderStyle: PropTypes.oneOfType([
  6284. PropTypes.object,
  6285. PropTypes.string
  6286. ]),
  6287. railStyle: PropTypes.oneOfType([
  6288. PropTypes.object,
  6289. PropTypes.string
  6290. ]),
  6291. trackStyle: PropTypes.oneOfType([
  6292. PropTypes.object,
  6293. PropTypes.string
  6294. ]),
  6295. value: PropTypes.array,
  6296. min: PropTypes.number,
  6297. max: PropTypes.number,
  6298. disabled: PropTypes.bool,
  6299. blockSize: PropTypes.number,
  6300. onChange: PropTypes.func,
  6301. onAfterChange: PropTypes.func
  6302. };
  6303. var ENV = import_taro.default.getEnv();
  6304. var AtIndexes = function(_super) {
  6305. __extends(AtIndexes2, _super);
  6306. function AtIndexes2(props) {
  6307. var _this = _super.call(this, props) || this;
  6308. _this.handleClick = function(item) {
  6309. _this.props.onClick && _this.props.onClick(item);
  6310. };
  6311. _this.handleTouchMove = function(event) {
  6312. event.stopPropagation();
  6313. event.preventDefault();
  6314. var list = _this.props.list;
  6315. var pageY = event.touches[0].pageY;
  6316. var index = Math.floor((pageY - _this.startTop) / _this.itemHeight);
  6317. if (index >= 0 && index <= list.length && _this.currentIndex !== index) {
  6318. _this.currentIndex = index;
  6319. var key = index > 0 ? list[index - 1].key : "top";
  6320. var touchView = "at-indexes__list-" + key;
  6321. _this.jumpTarget(touchView, index);
  6322. }
  6323. };
  6324. _this.handleTouchEnd = function() {
  6325. _this.currentIndex = -1;
  6326. };
  6327. _this.state = {
  6328. _scrollIntoView: "",
  6329. _scrollTop: 0,
  6330. _tipText: "",
  6331. _isShowToast: false,
  6332. isWEB: import_taro.default.getEnv() === import_taro.default.ENV_TYPE.WEB
  6333. };
  6334. _this.menuHeight = 0;
  6335. _this.startTop = 0;
  6336. _this.itemHeight = 0;
  6337. _this.currentIndex = -1;
  6338. _this.listId = isTest() ? "indexes-list-AOTU2018" : "list-" + uuid();
  6339. return _this;
  6340. }
  6341. AtIndexes2.prototype.jumpTarget = function(_scrollIntoView, idx) {
  6342. var _this = this;
  6343. var _a2 = this.props, _b = _a2.topKey, topKey = _b === void 0 ? "Top" : _b, list = _a2.list;
  6344. var _tipText = idx === 0 ? topKey : list[idx - 1].key;
  6345. if (ENV === import_taro.default.ENV_TYPE.WEB) {
  6346. delayQuerySelector(".at-indexes", 0).then(function(rect) {
  6347. var targetOffsetTop = _this.listRef.children[idx].offsetTop;
  6348. var _scrollTop = targetOffsetTop - rect[0].top;
  6349. _this.updateState({
  6350. _scrollTop,
  6351. _scrollIntoView,
  6352. _tipText
  6353. });
  6354. });
  6355. return;
  6356. }
  6357. this.updateState({
  6358. _scrollIntoView,
  6359. _tipText
  6360. });
  6361. };
  6362. AtIndexes2.prototype.__jumpTarget = function(key) {
  6363. var list = this.props.list;
  6364. var index = list.findIndex(function(item) {
  6365. return item.key === key;
  6366. });
  6367. var targetView = "at-indexes__list-" + key;
  6368. this.jumpTarget(targetView, index + 1);
  6369. };
  6370. AtIndexes2.prototype.updateState = function(state) {
  6371. var _this = this;
  6372. var _a2 = this.props, isShowToast = _a2.isShowToast, isVibrate = _a2.isVibrate;
  6373. var _scrollIntoView = state._scrollIntoView, _tipText = state._tipText, _scrollTop = state._scrollTop;
  6374. this.setState({
  6375. _scrollIntoView,
  6376. _tipText,
  6377. _scrollTop,
  6378. _isShowToast: isShowToast
  6379. }, function() {
  6380. clearTimeout(_this.timeoutTimer);
  6381. _this.timeoutTimer = setTimeout(function() {
  6382. _this.setState({
  6383. _tipText: "",
  6384. _isShowToast: false
  6385. });
  6386. }, 3e3);
  6387. });
  6388. if (isVibrate) {
  6389. import_taro.default.vibrateShort();
  6390. }
  6391. };
  6392. AtIndexes2.prototype.initData = function() {
  6393. var _this = this;
  6394. delayQuerySelector(".at-indexes__menu").then(function(rect) {
  6395. var len = _this.props.list.length;
  6396. _this.menuHeight = rect[0].height;
  6397. _this.startTop = rect[0].top;
  6398. _this.itemHeight = Math.floor(_this.menuHeight / (len + 1));
  6399. });
  6400. };
  6401. AtIndexes2.prototype.handleScroll = function(e2) {
  6402. if (e2 && e2.detail) {
  6403. this.setState({
  6404. _scrollTop: e2.detail.scrollTop
  6405. });
  6406. }
  6407. };
  6408. AtIndexes2.prototype.UNSAFE_componentWillReceiveProps = function(nextProps) {
  6409. if (nextProps.list.length !== this.props.list.length) {
  6410. this.initData();
  6411. }
  6412. };
  6413. AtIndexes2.prototype.componentDidMount = function() {
  6414. if (ENV === import_taro.default.ENV_TYPE.WEB) {
  6415. this.listRef = document.getElementById(this.listId);
  6416. }
  6417. this.initData();
  6418. };
  6419. AtIndexes2.prototype.UNSAFE_componentWillMount = function() {
  6420. this.props.onScrollIntoView && this.props.onScrollIntoView(this.__jumpTarget.bind(this));
  6421. };
  6422. AtIndexes2.prototype.render = function() {
  6423. var _this = this;
  6424. var _a2 = this.props, className = _a2.className, customStyle = _a2.customStyle, animation = _a2.animation, topKey = _a2.topKey, list = _a2.list;
  6425. var _b = this.state, _scrollTop = _b._scrollTop, _scrollIntoView = _b._scrollIntoView, _tipText = _b._tipText, _isShowToast = _b._isShowToast, isWEB = _b.isWEB;
  6426. var toastStyle = {
  6427. minWidth: pxTransform(100)
  6428. };
  6429. var rootCls = classnames("at-indexes", className);
  6430. var menuList = list.map(function(dataList, i) {
  6431. var key = dataList.key;
  6432. var targetView = "at-indexes__list-" + key;
  6433. return import_react.default.createElement(View, {
  6434. className: "at-indexes__menu-item",
  6435. key,
  6436. onClick: _this.jumpTarget.bind(_this, targetView, i + 1)
  6437. }, key);
  6438. });
  6439. var indexesList = list.map(function(dataList) {
  6440. return import_react.default.createElement(View, {
  6441. id: "at-indexes__list-" + dataList.key,
  6442. className: "at-indexes__list",
  6443. key: dataList.key
  6444. }, import_react.default.createElement(View, {
  6445. className: "at-indexes__list-title"
  6446. }, dataList.title), import_react.default.createElement(AtList, null, dataList.items && dataList.items.map(function(item) {
  6447. return import_react.default.createElement(AtListItem, {
  6448. key: item.name,
  6449. title: item.name,
  6450. onClick: _this.handleClick.bind(_this, item)
  6451. });
  6452. })));
  6453. });
  6454. return import_react.default.createElement(View, {
  6455. className: rootCls,
  6456. style: customStyle
  6457. }, import_react.default.createElement(AtToast, {
  6458. customStyle: toastStyle,
  6459. isOpened: _isShowToast,
  6460. text: _tipText,
  6461. duration: 2e3
  6462. }), import_react.default.createElement(View, {
  6463. className: "at-indexes__menu",
  6464. onTouchMove: this.handleTouchMove,
  6465. onTouchEnd: this.handleTouchEnd
  6466. }, import_react.default.createElement(View, {
  6467. className: "at-indexes__menu-item",
  6468. onClick: this.jumpTarget.bind(this, "at-indexes__top", 0)
  6469. }, topKey), menuList), import_react.default.createElement(ScrollView, {
  6470. className: "at-indexes__body",
  6471. id: this.listId,
  6472. scrollY: true,
  6473. scrollWithAnimation: animation,
  6474. scrollTop: isWEB ? _scrollTop : void 0,
  6475. scrollIntoView: !isWEB ? _scrollIntoView : "",
  6476. onScroll: this.handleScroll.bind(this)
  6477. }, import_react.default.createElement(View, {
  6478. className: "at-indexes__content",
  6479. id: "at-indexes__top"
  6480. }, this.props.children), indexesList));
  6481. };
  6482. return AtIndexes2;
  6483. }(import_react.default.Component);
  6484. AtIndexes.propTypes = {
  6485. customStyle: PropTypes.oneOfType([
  6486. PropTypes.object,
  6487. PropTypes.string
  6488. ]),
  6489. className: PropTypes.oneOfType([
  6490. PropTypes.array,
  6491. PropTypes.string
  6492. ]),
  6493. animation: PropTypes.bool,
  6494. isVibrate: PropTypes.bool,
  6495. isShowToast: PropTypes.bool,
  6496. topKey: PropTypes.string,
  6497. list: PropTypes.array,
  6498. onClick: PropTypes.func,
  6499. onScrollIntoView: PropTypes.func
  6500. };
  6501. AtIndexes.defaultProps = {
  6502. customStyle: "",
  6503. className: "",
  6504. animation: false,
  6505. topKey: "Top",
  6506. isVibrate: true,
  6507. isShowToast: true,
  6508. list: []
  6509. };
  6510. var dayjs_min = createCommonjsModule(function(module, exports) {
  6511. !function(t2, e2) {
  6512. module.exports = e2();
  6513. }(commonjsGlobal, function() {
  6514. var t2 = 1e3, e2 = 6e4, n2 = 36e5, r2 = "millisecond", i = "second", s = "minute", u = "hour", a = "day", o = "week", f2 = "month", h2 = "quarter", c2 = "year", d2 = "date", l2 = "Invalid Date", $ = /^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/, y2 = /\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g, M = {
  6515. name: "en",
  6516. weekdays: "Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),
  6517. months: "January_February_March_April_May_June_July_August_September_October_November_December".split("_"),
  6518. ordinal: function(t3) {
  6519. var e3 = [
  6520. "th",
  6521. "st",
  6522. "nd",
  6523. "rd"
  6524. ], n3 = t3 % 100;
  6525. return "[" + t3 + (e3[(n3 - 20) % 10] || e3[n3] || e3[0]) + "]";
  6526. }
  6527. }, m2 = function(t3, e3, n3) {
  6528. var r3 = String(t3);
  6529. return !r3 || r3.length >= e3 ? t3 : "" + Array(e3 + 1 - r3.length).join(n3) + t3;
  6530. }, v2 = {
  6531. s: m2,
  6532. z: function(t3) {
  6533. var e3 = -t3.utcOffset(), n3 = Math.abs(e3), r3 = Math.floor(n3 / 60), i2 = n3 % 60;
  6534. return (e3 <= 0 ? "+" : "-") + m2(r3, 2, "0") + ":" + m2(i2, 2, "0");
  6535. },
  6536. m: function t3(e3, n3) {
  6537. if (e3.date() < n3.date()) return -t3(n3, e3);
  6538. var r3 = 12 * (n3.year() - e3.year()) + (n3.month() - e3.month()), i2 = e3.clone().add(r3, f2), s2 = n3 - i2 < 0, u2 = e3.clone().add(r3 + (s2 ? -1 : 1), f2);
  6539. return +(-(r3 + (n3 - i2) / (s2 ? i2 - u2 : u2 - i2)) || 0);
  6540. },
  6541. a: function(t3) {
  6542. return t3 < 0 ? Math.ceil(t3) || 0 : Math.floor(t3);
  6543. },
  6544. p: function(t3) {
  6545. return ({
  6546. M: f2,
  6547. y: c2,
  6548. w: o,
  6549. d: a,
  6550. D: d2,
  6551. h: u,
  6552. m: s,
  6553. s: i,
  6554. ms: r2,
  6555. Q: h2
  6556. })[t3] || String(t3 || "").toLowerCase().replace(/s$/, "");
  6557. },
  6558. u: function(t3) {
  6559. return void 0 === t3;
  6560. }
  6561. }, g2 = "en", D = {};
  6562. D[g2] = M;
  6563. var p2 = function(t3) {
  6564. return t3 instanceof _;
  6565. }, S = function t3(e3, n3, r3) {
  6566. var i2;
  6567. if (!e3) return g2;
  6568. if ("string" == typeof e3) {
  6569. var s2 = e3.toLowerCase();
  6570. D[s2] && (i2 = s2), n3 && (D[s2] = n3, i2 = s2);
  6571. var u2 = e3.split("-");
  6572. if (!i2 && u2.length > 1) return t3(u2[0]);
  6573. } else {
  6574. var a2 = e3.name;
  6575. D[a2] = e3, i2 = a2;
  6576. }
  6577. return !r3 && i2 && (g2 = i2), i2 || !r3 && g2;
  6578. }, w2 = function(t3, e3) {
  6579. if (p2(t3)) return t3.clone();
  6580. var n3 = "object" == typeof e3 ? e3 : {};
  6581. return n3.date = t3, n3.args = arguments, new _(n3);
  6582. }, O = v2;
  6583. O.l = S, O.i = p2, O.w = function(t3, e3) {
  6584. return w2(t3, {
  6585. locale: e3.$L,
  6586. utc: e3.$u,
  6587. x: e3.$x,
  6588. $offset: e3.$offset
  6589. });
  6590. };
  6591. var _ = function() {
  6592. function M2(t3) {
  6593. this.$L = S(t3.locale, null, true), this.parse(t3);
  6594. }
  6595. var m3 = M2.prototype;
  6596. return m3.parse = function(t3) {
  6597. this.$d = function(t4) {
  6598. var e3 = t4.date, n3 = t4.utc;
  6599. if (null === e3) return new Date(NaN);
  6600. if (O.u(e3)) return new Date();
  6601. if (e3 instanceof Date) return new Date(e3);
  6602. if ("string" == typeof e3 && !/Z$/i.test(e3)) {
  6603. var r3 = e3.match($);
  6604. if (r3) {
  6605. var i2 = r3[2] - 1 || 0, s2 = (r3[7] || "0").substring(0, 3);
  6606. return n3 ? new Date(Date.UTC(r3[1], i2, r3[3] || 1, r3[4] || 0, r3[5] || 0, r3[6] || 0, s2)) : new Date(r3[1], i2, r3[3] || 1, r3[4] || 0, r3[5] || 0, r3[6] || 0, s2);
  6607. }
  6608. }
  6609. return new Date(e3);
  6610. }(t3), this.$x = t3.x || {}, this.init();
  6611. }, m3.init = function() {
  6612. var t3 = this.$d;
  6613. this.$y = t3.getFullYear(), this.$M = t3.getMonth(), this.$D = t3.getDate(), this.$W = t3.getDay(), this.$H = t3.getHours(), this.$m = t3.getMinutes(), this.$s = t3.getSeconds(), this.$ms = t3.getMilliseconds();
  6614. }, m3.$utils = function() {
  6615. return O;
  6616. }, m3.isValid = function() {
  6617. return !(this.$d.toString() === l2);
  6618. }, m3.isSame = function(t3, e3) {
  6619. var n3 = w2(t3);
  6620. return this.startOf(e3) <= n3 && n3 <= this.endOf(e3);
  6621. }, m3.isAfter = function(t3, e3) {
  6622. return w2(t3) < this.startOf(e3);
  6623. }, m3.isBefore = function(t3, e3) {
  6624. return this.endOf(e3) < w2(t3);
  6625. }, m3.$g = function(t3, e3, n3) {
  6626. return O.u(t3) ? this[e3] : this.set(n3, t3);
  6627. }, m3.unix = function() {
  6628. return Math.floor(this.valueOf() / 1e3);
  6629. }, m3.valueOf = function() {
  6630. return this.$d.getTime();
  6631. }, m3.startOf = function(t3, e3) {
  6632. var n3 = this, r3 = !!O.u(e3) || e3, h3 = O.p(t3), l3 = function(t4, e4) {
  6633. var i2 = O.w(n3.$u ? Date.UTC(n3.$y, e4, t4) : new Date(n3.$y, e4, t4), n3);
  6634. return r3 ? i2 : i2.endOf(a);
  6635. }, $2 = function(t4, e4) {
  6636. return O.w(n3.toDate()[t4].apply(n3.toDate("s"), (r3 ? [
  6637. 0,
  6638. 0,
  6639. 0,
  6640. 0
  6641. ] : [
  6642. 23,
  6643. 59,
  6644. 59,
  6645. 999
  6646. ]).slice(e4)), n3);
  6647. }, y3 = this.$W, M3 = this.$M, m4 = this.$D, v3 = "set" + (this.$u ? "UTC" : "");
  6648. switch(h3){
  6649. case c2:
  6650. return r3 ? l3(1, 0) : l3(31, 11);
  6651. case f2:
  6652. return r3 ? l3(1, M3) : l3(0, M3 + 1);
  6653. case o:
  6654. var g3 = this.$locale().weekStart || 0, D2 = (y3 < g3 ? y3 + 7 : y3) - g3;
  6655. return l3(r3 ? m4 - D2 : m4 + (6 - D2), M3);
  6656. case a:
  6657. case d2:
  6658. return $2(v3 + "Hours", 0);
  6659. case u:
  6660. return $2(v3 + "Minutes", 1);
  6661. case s:
  6662. return $2(v3 + "Seconds", 2);
  6663. case i:
  6664. return $2(v3 + "Milliseconds", 3);
  6665. default:
  6666. return this.clone();
  6667. }
  6668. }, m3.endOf = function(t3) {
  6669. return this.startOf(t3, false);
  6670. }, m3.$set = function(t3, e3) {
  6671. var n3, o2 = O.p(t3), h3 = "set" + (this.$u ? "UTC" : ""), l3 = (n3 = {}, n3[a] = h3 + "Date", n3[d2] = h3 + "Date", n3[f2] = h3 + "Month", n3[c2] = h3 + "FullYear", n3[u] = h3 + "Hours", n3[s] = h3 + "Minutes", n3[i] = h3 + "Seconds", n3[r2] = h3 + "Milliseconds", n3)[o2], $2 = o2 === a ? this.$D + (e3 - this.$W) : e3;
  6672. if (o2 === f2 || o2 === c2) {
  6673. var y3 = this.clone().set(d2, 1);
  6674. y3.$d[l3]($2), y3.init(), this.$d = y3.set(d2, Math.min(this.$D, y3.daysInMonth())).$d;
  6675. } else l3 && this.$d[l3]($2);
  6676. return this.init(), this;
  6677. }, m3.set = function(t3, e3) {
  6678. return this.clone().$set(t3, e3);
  6679. }, m3.get = function(t3) {
  6680. return this[O.p(t3)]();
  6681. }, m3.add = function(r3, h3) {
  6682. var d3, l3 = this;
  6683. r3 = Number(r3);
  6684. var $2 = O.p(h3), y3 = function(t3) {
  6685. var e3 = w2(l3);
  6686. return O.w(e3.date(e3.date() + Math.round(t3 * r3)), l3);
  6687. };
  6688. if ($2 === f2) return this.set(f2, this.$M + r3);
  6689. if ($2 === c2) return this.set(c2, this.$y + r3);
  6690. if ($2 === a) return y3(1);
  6691. if ($2 === o) return y3(7);
  6692. var M3 = (d3 = {}, d3[s] = e2, d3[u] = n2, d3[i] = t2, d3)[$2] || 1, m4 = this.$d.getTime() + r3 * M3;
  6693. return O.w(m4, this);
  6694. }, m3.subtract = function(t3, e3) {
  6695. return this.add(-1 * t3, e3);
  6696. }, m3.format = function(t3) {
  6697. var e3 = this, n3 = this.$locale();
  6698. if (!this.isValid()) return n3.invalidDate || l2;
  6699. var r3 = t3 || "YYYY-MM-DDTHH:mm:ssZ", i2 = O.z(this), s2 = this.$H, u2 = this.$m, a2 = this.$M, o2 = n3.weekdays, f3 = n3.months, h3 = function(t4, n4, i3, s3) {
  6700. return t4 && (t4[n4] || t4(e3, r3)) || i3[n4].slice(0, s3);
  6701. }, c3 = function(t4) {
  6702. return O.s(s2 % 12 || 12, t4, "0");
  6703. }, d3 = n3.meridiem || function(t4, e4, n4) {
  6704. var r4 = t4 < 12 ? "AM" : "PM";
  6705. return n4 ? r4.toLowerCase() : r4;
  6706. }, $2 = {
  6707. YY: String(this.$y).slice(-2),
  6708. YYYY: this.$y,
  6709. M: a2 + 1,
  6710. MM: O.s(a2 + 1, 2, "0"),
  6711. MMM: h3(n3.monthsShort, a2, f3, 3),
  6712. MMMM: h3(f3, a2),
  6713. D: this.$D,
  6714. DD: O.s(this.$D, 2, "0"),
  6715. d: String(this.$W),
  6716. dd: h3(n3.weekdaysMin, this.$W, o2, 2),
  6717. ddd: h3(n3.weekdaysShort, this.$W, o2, 3),
  6718. dddd: o2[this.$W],
  6719. H: String(s2),
  6720. HH: O.s(s2, 2, "0"),
  6721. h: c3(1),
  6722. hh: c3(2),
  6723. a: d3(s2, u2, true),
  6724. A: d3(s2, u2, false),
  6725. m: String(u2),
  6726. mm: O.s(u2, 2, "0"),
  6727. s: String(this.$s),
  6728. ss: O.s(this.$s, 2, "0"),
  6729. SSS: O.s(this.$ms, 3, "0"),
  6730. Z: i2
  6731. };
  6732. return r3.replace(y2, function(t4, e4) {
  6733. return e4 || $2[t4] || i2.replace(":", "");
  6734. });
  6735. }, m3.utcOffset = function() {
  6736. return 15 * -Math.round(this.$d.getTimezoneOffset() / 15);
  6737. }, m3.diff = function(r3, d3, l3) {
  6738. var $2, y3 = O.p(d3), M3 = w2(r3), m4 = (M3.utcOffset() - this.utcOffset()) * e2, v3 = this - M3, g3 = O.m(this, M3);
  6739. return g3 = ($2 = {}, $2[c2] = g3 / 12, $2[f2] = g3, $2[h2] = g3 / 3, $2[o] = (v3 - m4) / 6048e5, $2[a] = (v3 - m4) / 864e5, $2[u] = v3 / n2, $2[s] = v3 / e2, $2[i] = v3 / t2, $2)[y3] || v3, l3 ? g3 : O.a(g3);
  6740. }, m3.daysInMonth = function() {
  6741. return this.endOf(f2).$D;
  6742. }, m3.$locale = function() {
  6743. return D[this.$L];
  6744. }, m3.locale = function(t3, e3) {
  6745. if (!t3) return this.$L;
  6746. var n3 = this.clone(), r3 = S(t3, e3, true);
  6747. return r3 && (n3.$L = r3), n3;
  6748. }, m3.clone = function() {
  6749. return O.w(this.$d, this);
  6750. }, m3.toDate = function() {
  6751. return new Date(this.valueOf());
  6752. }, m3.toJSON = function() {
  6753. return this.isValid() ? this.toISOString() : null;
  6754. }, m3.toISOString = function() {
  6755. return this.$d.toISOString();
  6756. }, m3.toString = function() {
  6757. return this.$d.toUTCString();
  6758. }, M2;
  6759. }(), T = _.prototype;
  6760. return w2.prototype = T, [
  6761. [
  6762. "$ms",
  6763. r2
  6764. ],
  6765. [
  6766. "$s",
  6767. i
  6768. ],
  6769. [
  6770. "$m",
  6771. s
  6772. ],
  6773. [
  6774. "$H",
  6775. u
  6776. ],
  6777. [
  6778. "$W",
  6779. a
  6780. ],
  6781. [
  6782. "$M",
  6783. f2
  6784. ],
  6785. [
  6786. "$y",
  6787. c2
  6788. ],
  6789. [
  6790. "$D",
  6791. d2
  6792. ]
  6793. ].forEach(function(t3) {
  6794. T[t3[1]] = function(e3) {
  6795. return this.$g(e3, t3[0], t3[1]);
  6796. };
  6797. }), w2.extend = function(t3, e3) {
  6798. return t3.$i || (t3(e3, _, w2), t3.$i = true), w2;
  6799. }, w2.locale = S, w2.isDayjs = p2, w2.unix = function(t3) {
  6800. return w2(1e3 * t3);
  6801. }, w2.en = D[g2], w2.Ls = D, w2.p = {}, w2;
  6802. });
  6803. });
  6804. var objectCreate = Object.create;
  6805. var baseCreate = function() {
  6806. function object() {}
  6807. return function(proto) {
  6808. if (!isObject_1(proto)) {
  6809. return {};
  6810. }
  6811. if (objectCreate) {
  6812. return objectCreate(proto);
  6813. }
  6814. object.prototype = proto;
  6815. var result = new object();
  6816. object.prototype = void 0;
  6817. return result;
  6818. };
  6819. }();
  6820. var _baseCreate = baseCreate;
  6821. function baseLodash() {}
  6822. var _baseLodash = baseLodash;
  6823. function LodashWrapper(value, chainAll) {
  6824. this.__wrapped__ = value;
  6825. this.__actions__ = [];
  6826. this.__chain__ = !!chainAll;
  6827. this.__index__ = 0;
  6828. this.__values__ = void 0;
  6829. }
  6830. LodashWrapper.prototype = _baseCreate(_baseLodash.prototype);
  6831. LodashWrapper.prototype.constructor = LodashWrapper;
  6832. var _LodashWrapper = LodashWrapper;
  6833. function arrayPush(array, values) {
  6834. var index = -1, length = values.length, offset = array.length;
  6835. while(++index < length){
  6836. array[offset + index] = values[index];
  6837. }
  6838. return array;
  6839. }
  6840. var _arrayPush = arrayPush;
  6841. var argsTag$1 = "[object Arguments]";
  6842. function baseIsArguments(value) {
  6843. return isObjectLike_1(value) && _baseGetTag(value) == argsTag$1;
  6844. }
  6845. var _baseIsArguments = baseIsArguments;
  6846. var objectProto$6 = Object.prototype;
  6847. var hasOwnProperty$5 = objectProto$6.hasOwnProperty;
  6848. var propertyIsEnumerable = objectProto$6.propertyIsEnumerable;
  6849. var isArguments = _baseIsArguments(function() {
  6850. return arguments;
  6851. }()) ? _baseIsArguments : function(value) {
  6852. return isObjectLike_1(value) && hasOwnProperty$5.call(value, "callee") && !propertyIsEnumerable.call(value, "callee");
  6853. };
  6854. var isArguments_1 = isArguments;
  6855. var spreadableSymbol = _Symbol ? _Symbol.isConcatSpreadable : void 0;
  6856. function isFlattenable(value) {
  6857. return isArray_1(value) || isArguments_1(value) || !!(spreadableSymbol && value && value[spreadableSymbol]);
  6858. }
  6859. var _isFlattenable = isFlattenable;
  6860. function baseFlatten(array, depth, predicate, isStrict, result) {
  6861. var index = -1, length = array.length;
  6862. predicate || (predicate = _isFlattenable);
  6863. result || (result = []);
  6864. while(++index < length){
  6865. var value = array[index];
  6866. if (depth > 0 && predicate(value)) {
  6867. if (depth > 1) {
  6868. baseFlatten(value, depth - 1, predicate, isStrict, result);
  6869. } else {
  6870. _arrayPush(result, value);
  6871. }
  6872. } else if (!isStrict) {
  6873. result[result.length] = value;
  6874. }
  6875. }
  6876. return result;
  6877. }
  6878. var _baseFlatten = baseFlatten;
  6879. function flatten(array) {
  6880. var length = array == null ? 0 : array.length;
  6881. return length ? _baseFlatten(array, 1) : [];
  6882. }
  6883. var flatten_1 = flatten;
  6884. function apply(func, thisArg, args) {
  6885. switch(args.length){
  6886. case 0:
  6887. return func.call(thisArg);
  6888. case 1:
  6889. return func.call(thisArg, args[0]);
  6890. case 2:
  6891. return func.call(thisArg, args[0], args[1]);
  6892. case 3:
  6893. return func.call(thisArg, args[0], args[1], args[2]);
  6894. }
  6895. return func.apply(thisArg, args);
  6896. }
  6897. var _apply = apply;
  6898. var nativeMax = Math.max;
  6899. function overRest(func, start, transform) {
  6900. start = nativeMax(start === void 0 ? func.length - 1 : start, 0);
  6901. return function() {
  6902. var args = arguments, index = -1, length = nativeMax(args.length - start, 0), array = Array(length);
  6903. while(++index < length){
  6904. array[index] = args[start + index];
  6905. }
  6906. index = -1;
  6907. var otherArgs = Array(start + 1);
  6908. while(++index < start){
  6909. otherArgs[index] = args[index];
  6910. }
  6911. otherArgs[start] = transform(array);
  6912. return _apply(func, this, otherArgs);
  6913. };
  6914. }
  6915. var _overRest = overRest;
  6916. function constant(value) {
  6917. return function() {
  6918. return value;
  6919. };
  6920. }
  6921. var constant_1 = constant;
  6922. var coreJsData = _root["__core-js_shared__"];
  6923. var _coreJsData = coreJsData;
  6924. var maskSrcKey = function() {
  6925. var uid = /[^.]+$/.exec(_coreJsData && _coreJsData.keys && _coreJsData.keys.IE_PROTO || "");
  6926. return uid ? "Symbol(src)_1." + uid : "";
  6927. }();
  6928. function isMasked(func) {
  6929. return !!maskSrcKey && maskSrcKey in func;
  6930. }
  6931. var _isMasked = isMasked;
  6932. var funcProto$1 = Function.prototype;
  6933. var funcToString$1 = funcProto$1.toString;
  6934. function toSource(func) {
  6935. if (func != null) {
  6936. try {
  6937. return funcToString$1.call(func);
  6938. } catch (e2) {}
  6939. try {
  6940. return func + "";
  6941. } catch (e21) {}
  6942. }
  6943. return "";
  6944. }
  6945. var _toSource = toSource;
  6946. var reRegExpChar = /[\\^$.*+?()[\]{}|]/g;
  6947. var reIsHostCtor = /^\[object .+?Constructor\]$/;
  6948. var funcProto = Function.prototype;
  6949. var objectProto$5 = Object.prototype;
  6950. var funcToString = funcProto.toString;
  6951. var hasOwnProperty$4 = objectProto$5.hasOwnProperty;
  6952. var reIsNative = RegExp("^" + funcToString.call(hasOwnProperty$4).replace(reRegExpChar, "\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, "$1.*?") + "$");
  6953. function baseIsNative(value) {
  6954. if (!isObject_1(value) || _isMasked(value)) {
  6955. return false;
  6956. }
  6957. var pattern = isFunction_1(value) ? reIsNative : reIsHostCtor;
  6958. return pattern.test(_toSource(value));
  6959. }
  6960. var _baseIsNative = baseIsNative;
  6961. function getValue(object, key) {
  6962. return object == null ? void 0 : object[key];
  6963. }
  6964. var _getValue = getValue;
  6965. function getNative(object, key) {
  6966. var value = _getValue(object, key);
  6967. return _baseIsNative(value) ? value : void 0;
  6968. }
  6969. var _getNative = getNative;
  6970. var defineProperty = function() {
  6971. try {
  6972. var func = _getNative(Object, "defineProperty");
  6973. func({}, "", {});
  6974. return func;
  6975. } catch (e2) {}
  6976. }();
  6977. var _defineProperty = defineProperty;
  6978. function identity(value) {
  6979. return value;
  6980. }
  6981. var identity_1 = identity;
  6982. var baseSetToString = !_defineProperty ? identity_1 : function(func, string) {
  6983. return _defineProperty(func, "toString", {
  6984. "configurable": true,
  6985. "enumerable": false,
  6986. "value": constant_1(string),
  6987. "writable": true
  6988. });
  6989. };
  6990. var _baseSetToString = baseSetToString;
  6991. var HOT_COUNT = 800;
  6992. var HOT_SPAN = 16;
  6993. var nativeNow = Date.now;
  6994. function shortOut(func) {
  6995. var count = 0, lastCalled = 0;
  6996. return function() {
  6997. var stamp = nativeNow(), remaining = HOT_SPAN - (stamp - lastCalled);
  6998. lastCalled = stamp;
  6999. if (remaining > 0) {
  7000. if (++count >= HOT_COUNT) {
  7001. return arguments[0];
  7002. }
  7003. } else {
  7004. count = 0;
  7005. }
  7006. return func.apply(void 0, arguments);
  7007. };
  7008. }
  7009. var _shortOut = shortOut;
  7010. var setToString = _shortOut(_baseSetToString);
  7011. var _setToString = setToString;
  7012. function flatRest(func) {
  7013. return _setToString(_overRest(func, void 0, flatten_1), func + "");
  7014. }
  7015. var _flatRest = flatRest;
  7016. var WeakMap = _getNative(_root, "WeakMap");
  7017. var _WeakMap = WeakMap;
  7018. var metaMap = _WeakMap && new _WeakMap();
  7019. var _metaMap = metaMap;
  7020. function noop() {}
  7021. var noop_1 = noop;
  7022. var getData = !_metaMap ? noop_1 : function(func) {
  7023. return _metaMap.get(func);
  7024. };
  7025. var _getData = getData;
  7026. var realNames = {};
  7027. var _realNames = realNames;
  7028. var objectProto$4 = Object.prototype;
  7029. var hasOwnProperty$3 = objectProto$4.hasOwnProperty;
  7030. function getFuncName(func) {
  7031. var result = func.name + "", array = _realNames[result], length = hasOwnProperty$3.call(_realNames, result) ? array.length : 0;
  7032. while(length--){
  7033. var data = array[length], otherFunc = data.func;
  7034. if (otherFunc == null || otherFunc == func) {
  7035. return data.name;
  7036. }
  7037. }
  7038. return result;
  7039. }
  7040. var _getFuncName = getFuncName;
  7041. var MAX_ARRAY_LENGTH = 4294967295;
  7042. function LazyWrapper(value) {
  7043. this.__wrapped__ = value;
  7044. this.__actions__ = [];
  7045. this.__dir__ = 1;
  7046. this.__filtered__ = false;
  7047. this.__iteratees__ = [];
  7048. this.__takeCount__ = MAX_ARRAY_LENGTH;
  7049. this.__views__ = [];
  7050. }
  7051. LazyWrapper.prototype = _baseCreate(_baseLodash.prototype);
  7052. LazyWrapper.prototype.constructor = LazyWrapper;
  7053. var _LazyWrapper = LazyWrapper;
  7054. function copyArray(source, array) {
  7055. var index = -1, length = source.length;
  7056. array || (array = Array(length));
  7057. while(++index < length){
  7058. array[index] = source[index];
  7059. }
  7060. return array;
  7061. }
  7062. var _copyArray = copyArray;
  7063. function wrapperClone(wrapper) {
  7064. if (wrapper instanceof _LazyWrapper) {
  7065. return wrapper.clone();
  7066. }
  7067. var result = new _LodashWrapper(wrapper.__wrapped__, wrapper.__chain__);
  7068. result.__actions__ = _copyArray(wrapper.__actions__);
  7069. result.__index__ = wrapper.__index__;
  7070. result.__values__ = wrapper.__values__;
  7071. return result;
  7072. }
  7073. var _wrapperClone = wrapperClone;
  7074. var objectProto$3 = Object.prototype;
  7075. var hasOwnProperty$2 = objectProto$3.hasOwnProperty;
  7076. function lodash(value) {
  7077. if (isObjectLike_1(value) && !isArray_1(value) && !(value instanceof _LazyWrapper)) {
  7078. if (value instanceof _LodashWrapper) {
  7079. return value;
  7080. }
  7081. if (hasOwnProperty$2.call(value, "__wrapped__")) {
  7082. return _wrapperClone(value);
  7083. }
  7084. }
  7085. return new _LodashWrapper(value);
  7086. }
  7087. lodash.prototype = _baseLodash.prototype;
  7088. lodash.prototype.constructor = lodash;
  7089. var wrapperLodash = lodash;
  7090. function isLaziable(func) {
  7091. var funcName = _getFuncName(func), other = wrapperLodash[funcName];
  7092. if (typeof other != "function" || !(funcName in _LazyWrapper.prototype)) {
  7093. return false;
  7094. }
  7095. if (func === other) {
  7096. return true;
  7097. }
  7098. var data = _getData(other);
  7099. return !!data && func === data[0];
  7100. }
  7101. var _isLaziable = isLaziable;
  7102. var FUNC_ERROR_TEXT = "Expected a function";
  7103. var WRAP_CURRY_FLAG = 8;
  7104. var WRAP_PARTIAL_FLAG = 32;
  7105. var WRAP_ARY_FLAG = 128;
  7106. var WRAP_REARG_FLAG = 256;
  7107. function createFlow(fromRight) {
  7108. return _flatRest(function(funcs) {
  7109. var length = funcs.length, index = length, prereq = _LodashWrapper.prototype.thru;
  7110. if (fromRight) {
  7111. funcs.reverse();
  7112. }
  7113. while(index--){
  7114. var func = funcs[index];
  7115. if (typeof func != "function") {
  7116. throw new TypeError(FUNC_ERROR_TEXT);
  7117. }
  7118. if (prereq && !wrapper && _getFuncName(func) == "wrapper") {
  7119. var wrapper = new _LodashWrapper([], true);
  7120. }
  7121. }
  7122. index = wrapper ? index : length;
  7123. while(++index < length){
  7124. func = funcs[index];
  7125. var funcName = _getFuncName(func), data = funcName == "wrapper" ? _getData(func) : void 0;
  7126. if (data && _isLaziable(data[0]) && data[1] == (WRAP_ARY_FLAG | WRAP_CURRY_FLAG | WRAP_PARTIAL_FLAG | WRAP_REARG_FLAG) && !data[4].length && data[9] == 1) {
  7127. wrapper = wrapper[_getFuncName(data[0])].apply(wrapper, data[3]);
  7128. } else {
  7129. wrapper = func.length == 1 && _isLaziable(func) ? wrapper[funcName]() : wrapper.thru(func);
  7130. }
  7131. }
  7132. return function() {
  7133. var args = arguments, value = args[0];
  7134. if (wrapper && args.length == 1 && isArray_1(value)) {
  7135. return wrapper.plant(value).value();
  7136. }
  7137. var index2 = 0, result = length ? funcs[index2].apply(this, args) : value;
  7138. while(++index2 < length){
  7139. result = funcs[index2].call(this, result);
  7140. }
  7141. return result;
  7142. };
  7143. });
  7144. }
  7145. var _createFlow = createFlow;
  7146. var flow = _createFlow();
  7147. var flow_1 = flow;
  7148. var TYPE_PRE_MONTH = -1;
  7149. var TYPE_NOW_MONTH = 0;
  7150. var TYPE_NEXT_MONTH = 1;
  7151. var objectProto$2 = Object.prototype;
  7152. function isPrototype(value) {
  7153. var Ctor = value && value.constructor, proto = typeof Ctor == "function" && Ctor.prototype || objectProto$2;
  7154. return value === proto;
  7155. }
  7156. var _isPrototype = isPrototype;
  7157. function overArg(func, transform) {
  7158. return function(arg) {
  7159. return func(transform(arg));
  7160. };
  7161. }
  7162. var _overArg = overArg;
  7163. var nativeKeys = _overArg(Object.keys, Object);
  7164. var _nativeKeys = nativeKeys;
  7165. var objectProto$1 = Object.prototype;
  7166. var hasOwnProperty$1 = objectProto$1.hasOwnProperty;
  7167. function baseKeys(object) {
  7168. if (!_isPrototype(object)) {
  7169. return _nativeKeys(object);
  7170. }
  7171. var result = [];
  7172. for(var key in Object(object)){
  7173. if (hasOwnProperty$1.call(object, key) && key != "constructor") {
  7174. result.push(key);
  7175. }
  7176. }
  7177. return result;
  7178. }
  7179. var _baseKeys = baseKeys;
  7180. var DataView = _getNative(_root, "DataView");
  7181. var _DataView = DataView;
  7182. var Map = _getNative(_root, "Map");
  7183. var _Map = Map;
  7184. var Promise$1 = _getNative(_root, "Promise");
  7185. var _Promise = Promise$1;
  7186. var Set$1 = _getNative(_root, "Set");
  7187. var _Set = Set$1;
  7188. var mapTag$2 = "[object Map]";
  7189. var objectTag$1 = "[object Object]";
  7190. var promiseTag = "[object Promise]";
  7191. var setTag$2 = "[object Set]";
  7192. var weakMapTag$1 = "[object WeakMap]";
  7193. var dataViewTag$1 = "[object DataView]";
  7194. var dataViewCtorString = _toSource(_DataView);
  7195. var mapCtorString = _toSource(_Map);
  7196. var promiseCtorString = _toSource(_Promise);
  7197. var setCtorString = _toSource(_Set);
  7198. var weakMapCtorString = _toSource(_WeakMap);
  7199. var getTag = _baseGetTag;
  7200. if (_DataView && getTag(new _DataView(new ArrayBuffer(1))) != dataViewTag$1 || _Map && getTag(new _Map()) != mapTag$2 || _Promise && getTag(_Promise.resolve()) != promiseTag || _Set && getTag(new _Set()) != setTag$2 || _WeakMap && getTag(new _WeakMap()) != weakMapTag$1) {
  7201. getTag = function(value) {
  7202. var result = _baseGetTag(value), Ctor = result == objectTag$1 ? value.constructor : void 0, ctorString = Ctor ? _toSource(Ctor) : "";
  7203. if (ctorString) {
  7204. switch(ctorString){
  7205. case dataViewCtorString:
  7206. return dataViewTag$1;
  7207. case mapCtorString:
  7208. return mapTag$2;
  7209. case promiseCtorString:
  7210. return promiseTag;
  7211. case setCtorString:
  7212. return setTag$2;
  7213. case weakMapCtorString:
  7214. return weakMapTag$1;
  7215. }
  7216. }
  7217. return result;
  7218. };
  7219. }
  7220. var _getTag = getTag;
  7221. function stubFalse() {
  7222. return false;
  7223. }
  7224. var stubFalse_1 = stubFalse;
  7225. var isBuffer_1 = createCommonjsModule(function(module, exports) {
  7226. var freeExports = exports && !exports.nodeType && exports;
  7227. var freeModule = freeExports && true && module && !module.nodeType && module;
  7228. var moduleExports = freeModule && freeModule.exports === freeExports;
  7229. var Buffer = moduleExports ? _root.Buffer : void 0;
  7230. var nativeIsBuffer = Buffer ? Buffer.isBuffer : void 0;
  7231. var isBuffer = nativeIsBuffer || stubFalse_1;
  7232. module.exports = isBuffer;
  7233. });
  7234. var argsTag = "[object Arguments]";
  7235. var arrayTag = "[object Array]";
  7236. var boolTag = "[object Boolean]";
  7237. var dateTag = "[object Date]";
  7238. var errorTag = "[object Error]";
  7239. var funcTag = "[object Function]";
  7240. var mapTag$1 = "[object Map]";
  7241. var numberTag = "[object Number]";
  7242. var objectTag = "[object Object]";
  7243. var regexpTag = "[object RegExp]";
  7244. var setTag$1 = "[object Set]";
  7245. var stringTag = "[object String]";
  7246. var weakMapTag = "[object WeakMap]";
  7247. var arrayBufferTag = "[object ArrayBuffer]";
  7248. var dataViewTag = "[object DataView]";
  7249. var float32Tag = "[object Float32Array]";
  7250. var float64Tag = "[object Float64Array]";
  7251. var int8Tag = "[object Int8Array]";
  7252. var int16Tag = "[object Int16Array]";
  7253. var int32Tag = "[object Int32Array]";
  7254. var uint8Tag = "[object Uint8Array]";
  7255. var uint8ClampedTag = "[object Uint8ClampedArray]";
  7256. var uint16Tag = "[object Uint16Array]";
  7257. var uint32Tag = "[object Uint32Array]";
  7258. var typedArrayTags = {};
  7259. typedArrayTags[float32Tag] = typedArrayTags[float64Tag] = typedArrayTags[int8Tag] = typedArrayTags[int16Tag] = typedArrayTags[int32Tag] = typedArrayTags[uint8Tag] = typedArrayTags[uint8ClampedTag] = typedArrayTags[uint16Tag] = typedArrayTags[uint32Tag] = true;
  7260. typedArrayTags[argsTag] = typedArrayTags[arrayTag] = typedArrayTags[arrayBufferTag] = typedArrayTags[boolTag] = typedArrayTags[dataViewTag] = typedArrayTags[dateTag] = typedArrayTags[errorTag] = typedArrayTags[funcTag] = typedArrayTags[mapTag$1] = typedArrayTags[numberTag] = typedArrayTags[objectTag] = typedArrayTags[regexpTag] = typedArrayTags[setTag$1] = typedArrayTags[stringTag] = typedArrayTags[weakMapTag] = false;
  7261. function baseIsTypedArray(value) {
  7262. return isObjectLike_1(value) && isLength_1(value.length) && !!typedArrayTags[_baseGetTag(value)];
  7263. }
  7264. var _baseIsTypedArray = baseIsTypedArray;
  7265. function baseUnary(func) {
  7266. return function(value) {
  7267. return func(value);
  7268. };
  7269. }
  7270. var _baseUnary = baseUnary;
  7271. var _nodeUtil = createCommonjsModule(function(module, exports) {
  7272. var freeExports = exports && !exports.nodeType && exports;
  7273. var freeModule = freeExports && true && module && !module.nodeType && module;
  7274. var moduleExports = freeModule && freeModule.exports === freeExports;
  7275. var freeProcess = moduleExports && _freeGlobal.process;
  7276. var nodeUtil = function() {
  7277. try {
  7278. var types = freeModule && freeModule.require && freeModule.require("util").types;
  7279. if (types) {
  7280. return types;
  7281. }
  7282. return freeProcess && freeProcess.binding && freeProcess.binding("util");
  7283. } catch (e2) {}
  7284. }();
  7285. module.exports = nodeUtil;
  7286. });
  7287. var nodeIsTypedArray = _nodeUtil && _nodeUtil.isTypedArray;
  7288. var isTypedArray = nodeIsTypedArray ? _baseUnary(nodeIsTypedArray) : _baseIsTypedArray;
  7289. var isTypedArray_1 = isTypedArray;
  7290. var mapTag = "[object Map]";
  7291. var setTag = "[object Set]";
  7292. var objectProto = Object.prototype;
  7293. var hasOwnProperty = objectProto.hasOwnProperty;
  7294. function isEmpty(value) {
  7295. if (value == null) {
  7296. return true;
  7297. }
  7298. if (isArrayLike_1(value) && (isArray_1(value) || typeof value == "string" || typeof value.splice == "function" || isBuffer_1(value) || isTypedArray_1(value) || isArguments_1(value))) {
  7299. return !value.length;
  7300. }
  7301. var tag = _getTag(value);
  7302. if (tag == mapTag || tag == setTag) {
  7303. return !value.size;
  7304. }
  7305. if (_isPrototype(value)) {
  7306. return !_baseKeys(value).length;
  7307. }
  7308. for(var key in value){
  7309. if (hasOwnProperty.call(value, key)) {
  7310. return false;
  7311. }
  7312. }
  7313. return true;
  7314. }
  7315. var isEmpty_1 = isEmpty;
  7316. function handleActive(args, item) {
  7317. var selectedDate = args.selectedDate;
  7318. var _value = item._value;
  7319. var start = selectedDate.start, end = selectedDate.end;
  7320. var dayjsEnd = dayjs_min(end);
  7321. var dayjsStart = start ? dayjs_min(start) : dayjsEnd;
  7322. item.isSelected = (_value === null || _value === void 0 ? void 0 : _value.isSame(dayjsEnd)) || (_value === null || _value === void 0 ? void 0 : _value.isSame(dayjsStart)) || (_value === null || _value === void 0 ? void 0 : _value.isAfter(dayjsStart)) && (_value === null || _value === void 0 ? void 0 : _value.isBefore(dayjsEnd));
  7323. item.isSelectedHead = _value === null || _value === void 0 ? void 0 : _value.isSame(dayjsStart);
  7324. item.isSelectedTail = _value === null || _value === void 0 ? void 0 : _value.isSame(dayjsEnd);
  7325. item.isToday = (_value === null || _value === void 0 ? void 0 : _value.diff(dayjs_min(Date.now()).startOf("day"), "day")) === 0;
  7326. return item;
  7327. }
  7328. function handleMarks(args, item) {
  7329. var options = args.options;
  7330. var _value = item._value;
  7331. var marks = options.marks;
  7332. var markList = marks.filter(function(mark) {
  7333. return dayjs_min(mark.value).startOf("day").isSame(_value);
  7334. });
  7335. item.marks = markList.slice(0, 1);
  7336. return item;
  7337. }
  7338. function handleDisabled(args, item) {
  7339. var options = args.options;
  7340. var _value = item._value;
  7341. var minDate = options.minDate, maxDate = options.maxDate;
  7342. var dayjsMinDate = dayjs_min(minDate);
  7343. var dayjsMaxDate = dayjs_min(maxDate);
  7344. item.isDisabled = !!(minDate && (_value === null || _value === void 0 ? void 0 : _value.isBefore(dayjsMinDate))) || !!(maxDate && (_value === null || _value === void 0 ? void 0 : _value.isAfter(dayjsMaxDate)));
  7345. return item;
  7346. }
  7347. function handleValid(args, item) {
  7348. var options = args.options;
  7349. var _value = item._value;
  7350. var validDates = options.validDates;
  7351. if (!isEmpty_1(validDates)) {
  7352. var isInclude = validDates.some(function(date) {
  7353. return dayjs_min(date.value).startOf("day").isSame(_value);
  7354. });
  7355. item.isDisabled = !isInclude;
  7356. }
  7357. delete item._value;
  7358. return item;
  7359. }
  7360. var plugins = [
  7361. handleActive,
  7362. handleMarks,
  7363. handleDisabled,
  7364. handleValid
  7365. ];
  7366. var TOTAL = 7 * 6;
  7367. function getFullItem(item, options, selectedDate, isShowStatus) {
  7368. if (options.marks.find(function(x2) {
  7369. return x2.value === item.value;
  7370. })) {
  7371. item.marks = [
  7372. {
  7373. value: item.value
  7374. }
  7375. ];
  7376. }
  7377. if (!isShowStatus) return item;
  7378. var bindedPlugins = plugins.map(function(fn) {
  7379. return fn.bind(null, {
  7380. options,
  7381. selectedDate
  7382. });
  7383. });
  7384. return flow_1(bindedPlugins)(item);
  7385. }
  7386. function generateCalendarGroup(options) {
  7387. return function(generateDate, selectedDate, isShowStatus) {
  7388. var date = dayjs_min(generateDate);
  7389. var format = options.format;
  7390. var firstDate = date.startOf("month");
  7391. var lastDate = date.endOf("month");
  7392. var preMonthDate = date.subtract(1, "month");
  7393. var list = [];
  7394. var nowMonthDays = date.daysInMonth();
  7395. var preMonthLastDay = preMonthDate.endOf("month").day();
  7396. for(var i_1 = 1; i_1 <= preMonthLastDay + 1; i_1++){
  7397. var thisDate = firstDate.subtract(i_1, "day").startOf("day");
  7398. var item = {
  7399. marks: [],
  7400. _value: thisDate,
  7401. text: thisDate.date(),
  7402. type: TYPE_PRE_MONTH,
  7403. value: thisDate.format(format)
  7404. };
  7405. item = getFullItem(item, options, selectedDate, isShowStatus);
  7406. list.push(item);
  7407. }
  7408. list.reverse();
  7409. for(var i_2 = 0; i_2 < nowMonthDays; i_2++){
  7410. var thisDate = firstDate.add(i_2, "day").startOf("day");
  7411. var item = {
  7412. marks: [],
  7413. _value: thisDate,
  7414. text: thisDate.date(),
  7415. type: TYPE_NOW_MONTH,
  7416. value: thisDate.format(format)
  7417. };
  7418. item = getFullItem(item, options, selectedDate, isShowStatus);
  7419. list.push(item);
  7420. }
  7421. var i = 1;
  7422. while(list.length < TOTAL){
  7423. var thisDate = lastDate.add(i++, "day").startOf("day");
  7424. var item = {
  7425. marks: [],
  7426. _value: thisDate,
  7427. text: thisDate.date(),
  7428. type: TYPE_NEXT_MONTH,
  7429. value: thisDate.format(format)
  7430. };
  7431. item = getFullItem(item, options, selectedDate, isShowStatus);
  7432. list.push(item);
  7433. }
  7434. return {
  7435. list,
  7436. value: generateDate
  7437. };
  7438. };
  7439. }
  7440. var _a;
  7441. var MAP = (_a = {}, _a[TYPE_PRE_MONTH] = "pre", _a[TYPE_NOW_MONTH] = "now", _a[TYPE_NEXT_MONTH] = "next", _a);
  7442. var AtCalendarList = function(_super) {
  7443. __extends(AtCalendarList2, _super);
  7444. function AtCalendarList2() {
  7445. var _this = _super !== null && _super.apply(this, arguments) || this;
  7446. _this.handleClick = function(item) {
  7447. if (typeof _this.props.onClick === "function") {
  7448. _this.props.onClick(item);
  7449. }
  7450. };
  7451. _this.handleLongClick = function(item) {
  7452. if (typeof _this.props.onLongClick === "function") {
  7453. _this.props.onLongClick(item);
  7454. }
  7455. };
  7456. return _this;
  7457. }
  7458. AtCalendarList2.prototype.render = function() {
  7459. var _this = this;
  7460. var list = this.props.list;
  7461. if (!list || list.length === 0) return null;
  7462. return import_react.default.createElement(View, {
  7463. className: "at-calendar__list flex"
  7464. }, list.map(function(item) {
  7465. return import_react.default.createElement(View, {
  7466. key: "list-item-" + item.value,
  7467. onClick: _this.handleClick.bind(_this, item),
  7468. onLongPress: _this.handleLongClick.bind(_this, item),
  7469. className: classnames("flex__item", "flex__item--" + MAP[item.type], {
  7470. "flex__item--today": item.isToday,
  7471. "flex__item--active": item.isActive,
  7472. "flex__item--selected": item.isSelected,
  7473. "flex__item--selected-head": item.isSelectedHead,
  7474. "flex__item--selected-tail": item.isSelectedTail,
  7475. "flex__item--blur": item.isDisabled || item.type === TYPE_PRE_MONTH || item.type === TYPE_NEXT_MONTH
  7476. })
  7477. }, import_react.default.createElement(View, {
  7478. className: "flex__item-container"
  7479. }, import_react.default.createElement(View, {
  7480. className: "container-text"
  7481. }, item.text)), import_react.default.createElement(View, {
  7482. className: "flex__item-extra extra"
  7483. }, item.marks && item.marks.length > 0 ? import_react.default.createElement(View, {
  7484. className: "extra-marks"
  7485. }, item.marks.map(function(mark, key) {
  7486. return import_react.default.createElement(Text, {
  7487. key,
  7488. className: "mark"
  7489. }, mark.value);
  7490. })) : null));
  7491. }));
  7492. };
  7493. return AtCalendarList2;
  7494. }(import_react.default.Component);
  7495. var AtCalendarHeader = function(_super) {
  7496. __extends(AtCalendarHeader2, _super);
  7497. function AtCalendarHeader2() {
  7498. return _super !== null && _super.apply(this, arguments) || this;
  7499. }
  7500. AtCalendarHeader2.prototype.render = function() {
  7501. return import_react.default.createElement(View, {
  7502. className: "at-calendar__header header"
  7503. }, import_react.default.createElement(View, {
  7504. className: "header__flex"
  7505. }, import_react.default.createElement(View, {
  7506. className: "header__flex-item"
  7507. }, "\u65E5"), import_react.default.createElement(View, {
  7508. className: "header__flex-item"
  7509. }, "\u4E00"), import_react.default.createElement(View, {
  7510. className: "header__flex-item"
  7511. }, "\u4E8C"), import_react.default.createElement(View, {
  7512. className: "header__flex-item"
  7513. }, "\u4E09"), import_react.default.createElement(View, {
  7514. className: "header__flex-item"
  7515. }, "\u56DB"), import_react.default.createElement(View, {
  7516. className: "header__flex-item"
  7517. }, "\u4E94"), import_react.default.createElement(View, {
  7518. className: "header__flex-item"
  7519. }, "\u516D")));
  7520. };
  7521. return AtCalendarHeader2;
  7522. }(import_react.default.Component);
  7523. var ANIMTE_DURATION = 300;
  7524. var defaultProps$1 = {
  7525. marks: [],
  7526. selectedDate: {
  7527. end: Date.now(),
  7528. start: Date.now()
  7529. },
  7530. format: "YYYY-MM-DD",
  7531. generateDate: Date.now()
  7532. };
  7533. var AtCalendarBody = function(_super) {
  7534. __extends(AtCalendarBody2, _super);
  7535. function AtCalendarBody2(props) {
  7536. var _this = _super.call(this, props) || this;
  7537. _this.changeCount = 0;
  7538. _this.currentSwiperIndex = 1;
  7539. _this.startX = 0;
  7540. _this.swipeStartPoint = 0;
  7541. _this.isPreMonth = false;
  7542. _this.maxWidth = 0;
  7543. _this.isTouching = false;
  7544. _this.getGroups = function(generateDate2, selectedDate2) {
  7545. var dayjsDate = dayjs_min(generateDate2);
  7546. var arr = [];
  7547. var preList = _this.generateFunc(dayjsDate.subtract(1, "month").valueOf(), selectedDate2);
  7548. var nowList = _this.generateFunc(generateDate2, selectedDate2, true);
  7549. var nextList = _this.generateFunc(dayjsDate.add(1, "month").valueOf(), selectedDate2);
  7550. var preListIndex = _this.currentSwiperIndex === 0 ? 2 : _this.currentSwiperIndex - 1;
  7551. var nextListIndex = _this.currentSwiperIndex === 2 ? 0 : _this.currentSwiperIndex + 1;
  7552. arr[preListIndex] = preList;
  7553. arr[nextListIndex] = nextList;
  7554. arr[_this.currentSwiperIndex] = nowList;
  7555. return arr;
  7556. };
  7557. _this.handleTouchStart = function(e2) {
  7558. if (!_this.props.isSwiper) {
  7559. return;
  7560. }
  7561. _this.isTouching = true;
  7562. _this.startX = e2.touches[0].clientX;
  7563. };
  7564. _this.handleTouchMove = function(e2) {
  7565. if (!_this.props.isSwiper) {
  7566. return;
  7567. }
  7568. if (!_this.isTouching) return;
  7569. var clientX = e2.touches[0].clientX;
  7570. var offsetSize = clientX - _this.startX;
  7571. _this.setState({
  7572. offsetSize
  7573. });
  7574. };
  7575. _this.animateMoveSlide = function(offset, callback) {
  7576. _this.setState({
  7577. isAnimate: true
  7578. }, function() {
  7579. _this.setState({
  7580. offsetSize: offset
  7581. });
  7582. setTimeout(function() {
  7583. _this.setState({
  7584. isAnimate: false
  7585. }, function() {
  7586. callback && callback();
  7587. });
  7588. }, ANIMTE_DURATION);
  7589. });
  7590. };
  7591. _this.handleTouchEnd = function() {
  7592. if (!_this.props.isSwiper) {
  7593. return;
  7594. }
  7595. var offsetSize = _this.state.offsetSize;
  7596. _this.isTouching = false;
  7597. var isRight = offsetSize > 0;
  7598. var breakpoint = _this.maxWidth / 2;
  7599. var absOffsetSize = Math.abs(offsetSize);
  7600. if (absOffsetSize > breakpoint) {
  7601. var res = isRight ? _this.maxWidth : -_this.maxWidth;
  7602. return _this.animateMoveSlide(res, function() {
  7603. _this.props.onSwipeMonth(isRight ? -1 : 1);
  7604. });
  7605. }
  7606. _this.animateMoveSlide(0);
  7607. };
  7608. _this.handleChange = function(e2) {
  7609. var _a2 = e2.detail, current = _a2.current, source = _a2.source;
  7610. if (source === "touch") {
  7611. _this.currentSwiperIndex = current;
  7612. _this.changeCount += 1;
  7613. }
  7614. };
  7615. _this.handleAnimateFinish = function() {
  7616. if (_this.changeCount > 0) {
  7617. _this.props.onSwipeMonth(_this.isPreMonth ? -_this.changeCount : _this.changeCount);
  7618. _this.changeCount = 0;
  7619. }
  7620. };
  7621. _this.handleSwipeTouchStart = function(e2) {
  7622. var _a2 = e2.changedTouches[0], clientY = _a2.clientY, clientX = _a2.clientX;
  7623. _this.swipeStartPoint = _this.props.isVertical ? clientY : clientX;
  7624. };
  7625. _this.handleSwipeTouchEnd = function(e2) {
  7626. var _a2 = e2.changedTouches[0], clientY = _a2.clientY, clientX = _a2.clientX;
  7627. _this.isPreMonth = _this.props.isVertical ? clientY - _this.swipeStartPoint > 0 : clientX - _this.swipeStartPoint > 0;
  7628. };
  7629. var validDates = props.validDates, marks = props.marks, format = props.format, minDate = props.minDate, maxDate = props.maxDate, generateDate = props.generateDate, selectedDate = props.selectedDate, selectedDates = props.selectedDates;
  7630. _this.generateFunc = generateCalendarGroup({
  7631. validDates,
  7632. format,
  7633. minDate,
  7634. maxDate,
  7635. marks,
  7636. selectedDates
  7637. });
  7638. var listGroup = _this.getGroups(generateDate, selectedDate);
  7639. _this.state = {
  7640. listGroup,
  7641. offsetSize: 0,
  7642. isAnimate: false
  7643. };
  7644. return _this;
  7645. }
  7646. AtCalendarBody2.prototype.componentDidMount = function() {
  7647. var _this = this;
  7648. delayQuerySelector(".at-calendar-slider__main").then(function(res) {
  7649. _this.maxWidth = res[0].width;
  7650. });
  7651. };
  7652. AtCalendarBody2.prototype.UNSAFE_componentWillReceiveProps = function(nextProps) {
  7653. var validDates = nextProps.validDates, marks = nextProps.marks, format = nextProps.format, minDate = nextProps.minDate, maxDate = nextProps.maxDate, generateDate = nextProps.generateDate, selectedDate = nextProps.selectedDate, selectedDates = nextProps.selectedDates;
  7654. this.generateFunc = generateCalendarGroup({
  7655. validDates,
  7656. format,
  7657. minDate,
  7658. maxDate,
  7659. marks,
  7660. selectedDates
  7661. });
  7662. var listGroup = this.getGroups(generateDate, selectedDate);
  7663. this.setState({
  7664. offsetSize: 0,
  7665. listGroup
  7666. });
  7667. };
  7668. AtCalendarBody2.prototype.render = function() {
  7669. var _this = this;
  7670. var isSwiper = this.props.isSwiper;
  7671. var _a2 = this.state, isAnimate = _a2.isAnimate, offsetSize = _a2.offsetSize, listGroup = _a2.listGroup;
  7672. if (!isSwiper) {
  7673. return import_react.default.createElement(View, {
  7674. className: classnames("main", "at-calendar-slider__main", "at-calendar-slider__main--weapp")
  7675. }, import_react.default.createElement(AtCalendarHeader, null), import_react.default.createElement(View, {
  7676. className: "main__body body"
  7677. }, import_react.default.createElement(View, {
  7678. className: "body__slider body__slider--now"
  7679. }, import_react.default.createElement(AtCalendarList, {
  7680. list: listGroup[1].list,
  7681. onClick: this.props.onDayClick,
  7682. onLongClick: this.props.onLongClick
  7683. }))));
  7684. }
  7685. if (false) {}
  7686. return import_react.default.createElement(View, {
  7687. className: classnames("main", "at-calendar-slider__main", "at-calendar-slider__main--weapp")
  7688. }, import_react.default.createElement(AtCalendarHeader, null), import_react.default.createElement(Swiper, {
  7689. circular: true,
  7690. current: 1,
  7691. skipHiddenItemLayout: true,
  7692. className: classnames("main__body"),
  7693. onChange: this.handleChange,
  7694. vertical: this.props.isVertical,
  7695. onAnimationFinish: this.handleAnimateFinish,
  7696. onTouchEnd: this.handleSwipeTouchEnd,
  7697. onTouchStart: this.handleSwipeTouchStart
  7698. }, listGroup.map(function(item, key) {
  7699. return import_react.default.createElement(SwiperItem, {
  7700. key,
  7701. itemId: key.toString()
  7702. }, import_react.default.createElement(AtCalendarList, {
  7703. list: item.list,
  7704. onClick: _this.props.onDayClick,
  7705. onLongClick: _this.props.onLongClick
  7706. }));
  7707. })));
  7708. };
  7709. AtCalendarBody2.defaultProps = defaultProps$1;
  7710. return AtCalendarBody2;
  7711. }(import_react.default.Component);
  7712. var AtCalendarController = function(_super) {
  7713. __extends(AtCalendarController2, _super);
  7714. function AtCalendarController2() {
  7715. return _super !== null && _super.apply(this, arguments) || this;
  7716. }
  7717. AtCalendarController2.prototype.render = function() {
  7718. var _a2 = this.props, generateDate = _a2.generateDate, minDate = _a2.minDate, maxDate = _a2.maxDate, monthFormat = _a2.monthFormat, hideArrow = _a2.hideArrow;
  7719. var dayjsDate = dayjs_min(generateDate);
  7720. var dayjsMinDate = !!minDate && dayjs_min(minDate);
  7721. var dayjsMaxDate = !!maxDate && dayjs_min(maxDate);
  7722. var isMinMonth = dayjsMinDate && dayjsMinDate.startOf("month").isSame(dayjsDate);
  7723. var isMaxMonth = dayjsMaxDate && dayjsMaxDate.startOf("month").isSame(dayjsDate);
  7724. var minDateValue = dayjsMinDate ? dayjsMinDate.format("YYYY-MM") : "";
  7725. var maxDateValue = dayjsMaxDate ? dayjsMaxDate.format("YYYY-MM") : "";
  7726. return import_react.default.createElement(View, {
  7727. className: "at-calendar__controller controller"
  7728. }, hideArrow ? null : import_react.default.createElement(View, {
  7729. className: classnames("controller__arrow controller__arrow--left", {
  7730. "controller__arrow--disabled": isMinMonth
  7731. }),
  7732. onClick: this.props.onPreMonth.bind(this, isMinMonth)
  7733. }), import_react.default.createElement(Picker, {
  7734. mode: "date",
  7735. fields: "month",
  7736. end: maxDateValue,
  7737. start: minDateValue,
  7738. onChange: this.props.onSelectDate,
  7739. value: dayjsDate.format("YYYY-MM")
  7740. }, import_react.default.createElement(Text, {
  7741. className: "controller__info"
  7742. }, dayjsDate.format(monthFormat))), hideArrow ? null : import_react.default.createElement(View, {
  7743. className: classnames("controller__arrow controller__arrow--right", {
  7744. "controller__arrow--disabled": isMaxMonth
  7745. }),
  7746. onClick: this.props.onNextMonth.bind(this, isMaxMonth)
  7747. }));
  7748. };
  7749. return AtCalendarController2;
  7750. }(import_react.default.Component);
  7751. var defaultProps = {
  7752. validDates: [],
  7753. marks: [],
  7754. isSwiper: true,
  7755. hideArrow: false,
  7756. isVertical: false,
  7757. selectedDates: [],
  7758. isMultiSelect: false,
  7759. format: "YYYY-MM-DD",
  7760. currentDate: Date.now(),
  7761. monthFormat: "YYYY\u5E74MM\u6708"
  7762. };
  7763. var AtCalendar = function(_super) {
  7764. __extends(AtCalendar2, _super);
  7765. function AtCalendar2(props) {
  7766. var _this = _super.call(this, props) || this;
  7767. _this.getSingleSelectdState = function(value) {
  7768. var generateDate = _this.state.generateDate;
  7769. var stateValue = {
  7770. selectedDate: _this.getSelectedDate(value.valueOf())
  7771. };
  7772. var dayjsGenerateDate = value.startOf("month");
  7773. var generateDateValue = dayjsGenerateDate.valueOf();
  7774. if (generateDateValue !== generateDate) {
  7775. _this.triggerChangeDate(dayjsGenerateDate);
  7776. stateValue.generateDate = generateDateValue;
  7777. }
  7778. return stateValue;
  7779. };
  7780. _this.getMultiSelectedState = function(value) {
  7781. var selectedDate = _this.state.selectedDate;
  7782. var end = selectedDate.end, start = selectedDate.start;
  7783. var valueUnix = value.valueOf();
  7784. var state = {
  7785. selectedDate
  7786. };
  7787. if (end) {
  7788. state.selectedDate = _this.getSelectedDate(valueUnix, 0);
  7789. } else {
  7790. state.selectedDate.end = Math.max(valueUnix, +start);
  7791. state.selectedDate.start = Math.min(valueUnix, +start);
  7792. }
  7793. return state;
  7794. };
  7795. _this.getSelectedDate = function(start, end) {
  7796. var stateValue = {
  7797. start,
  7798. end: start
  7799. };
  7800. if (typeof end !== "undefined") {
  7801. stateValue.end = end;
  7802. }
  7803. return stateValue;
  7804. };
  7805. _this.triggerChangeDate = function(value) {
  7806. var format = _this.props.format;
  7807. if (typeof _this.props.onMonthChange !== "function") return;
  7808. _this.props.onMonthChange(value.format(format));
  7809. };
  7810. _this.setMonth = function(vectorCount) {
  7811. var format = _this.props.format;
  7812. var generateDate = _this.state.generateDate;
  7813. var _generateDate = dayjs_min(generateDate).add(vectorCount, "month");
  7814. _this.setState({
  7815. generateDate: _generateDate.valueOf()
  7816. });
  7817. if (vectorCount && typeof _this.props.onMonthChange === "function") {
  7818. _this.props.onMonthChange(_generateDate.format(format));
  7819. }
  7820. };
  7821. _this.handleClickPreMonth = function(isMinMonth) {
  7822. if (isMinMonth === true) {
  7823. return;
  7824. }
  7825. _this.setMonth(-1);
  7826. if (typeof _this.props.onClickPreMonth === "function") {
  7827. _this.props.onClickPreMonth();
  7828. }
  7829. };
  7830. _this.handleClickNextMonth = function(isMaxMonth) {
  7831. if (isMaxMonth === true) {
  7832. return;
  7833. }
  7834. _this.setMonth(1);
  7835. if (typeof _this.props.onClickNextMonth === "function") {
  7836. _this.props.onClickNextMonth();
  7837. }
  7838. };
  7839. _this.handleSelectDate = function(e2) {
  7840. var value = e2.detail.value;
  7841. var _generateDate = dayjs_min(value);
  7842. var _generateDateValue = _generateDate.valueOf();
  7843. if (_this.state.generateDate === _generateDateValue) return;
  7844. _this.triggerChangeDate(_generateDate);
  7845. _this.setState({
  7846. generateDate: _generateDateValue
  7847. });
  7848. };
  7849. _this.handleDayClick = function(item) {
  7850. var isMultiSelect2 = _this.props.isMultiSelect;
  7851. var isDisabled = item.isDisabled, value = item.value;
  7852. if (isDisabled) return;
  7853. var dayjsDate = dayjs_min(value);
  7854. var stateValue = {};
  7855. if (isMultiSelect2) {
  7856. stateValue = _this.getMultiSelectedState(dayjsDate);
  7857. } else {
  7858. stateValue = _this.getSingleSelectdState(dayjsDate);
  7859. }
  7860. _this.setState(stateValue, function() {
  7861. _this.handleSelectedDate();
  7862. });
  7863. if (typeof _this.props.onDayClick === "function") {
  7864. _this.props.onDayClick({
  7865. value: item.value
  7866. });
  7867. }
  7868. };
  7869. _this.handleSelectedDate = function() {
  7870. var selectDate = _this.state.selectedDate;
  7871. if (typeof _this.props.onSelectDate === "function") {
  7872. var info = {
  7873. start: dayjs_min(selectDate.start).format(_this.props.format)
  7874. };
  7875. if (selectDate.end) {
  7876. info.end = dayjs_min(selectDate.end).format(_this.props.format);
  7877. }
  7878. _this.props.onSelectDate({
  7879. value: info
  7880. });
  7881. }
  7882. };
  7883. _this.handleDayLongClick = function(item) {
  7884. if (typeof _this.props.onDayLongClick === "function") {
  7885. _this.props.onDayLongClick({
  7886. value: item.value
  7887. });
  7888. }
  7889. };
  7890. var _a2 = props, currentDate = _a2.currentDate, isMultiSelect = _a2.isMultiSelect;
  7891. _this.state = _this.getInitializeState(currentDate, isMultiSelect);
  7892. return _this;
  7893. }
  7894. AtCalendar2.prototype.UNSAFE_componentWillReceiveProps = function(nextProps) {
  7895. var currentDate = nextProps.currentDate, isMultiSelect = nextProps.isMultiSelect;
  7896. if (!currentDate || currentDate === this.props.currentDate) return;
  7897. if (isMultiSelect && this.props.isMultiSelect) {
  7898. var _a2 = currentDate, start = _a2.start, end = _a2.end;
  7899. var _b = this.props.currentDate, preStart = _b.start, preEnd = _b.end;
  7900. if (start === preStart && preEnd === end) {
  7901. return;
  7902. }
  7903. }
  7904. var stateValue = this.getInitializeState(currentDate, isMultiSelect);
  7905. this.setState(stateValue);
  7906. };
  7907. AtCalendar2.prototype.getInitializeState = function(currentDate, isMultiSelect) {
  7908. var end;
  7909. var start;
  7910. var generateDateValue;
  7911. if (!currentDate) {
  7912. var dayjsStart = dayjs_min();
  7913. start = dayjsStart.startOf("day").valueOf();
  7914. generateDateValue = dayjsStart.startOf("month").valueOf();
  7915. return {
  7916. generateDate: generateDateValue,
  7917. selectedDate: {
  7918. start: ""
  7919. }
  7920. };
  7921. }
  7922. if (isMultiSelect) {
  7923. var _a2 = currentDate, cStart = _a2.start, cEnd = _a2.end;
  7924. var dayjsStart = dayjs_min(cStart);
  7925. start = dayjsStart.startOf("day").valueOf();
  7926. generateDateValue = dayjsStart.startOf("month").valueOf();
  7927. end = cEnd ? dayjs_min(cEnd).startOf("day").valueOf() : start;
  7928. } else {
  7929. var dayjsStart = dayjs_min(currentDate);
  7930. start = dayjsStart.startOf("day").valueOf();
  7931. generateDateValue = dayjsStart.startOf("month").valueOf();
  7932. end = start;
  7933. }
  7934. return {
  7935. generateDate: generateDateValue,
  7936. selectedDate: this.getSelectedDate(start, end)
  7937. };
  7938. };
  7939. AtCalendar2.prototype.render = function() {
  7940. var _a2 = this.state, generateDate = _a2.generateDate, selectedDate = _a2.selectedDate;
  7941. var _b = this.props, validDates = _b.validDates, marks = _b.marks, format = _b.format, minDate = _b.minDate, maxDate = _b.maxDate, isSwiper = _b.isSwiper, className = _b.className, hideArrow = _b.hideArrow, isVertical = _b.isVertical, monthFormat = _b.monthFormat, selectedDates = _b.selectedDates;
  7942. return import_react.default.createElement(View, {
  7943. className: classnames("at-calendar", className)
  7944. }, import_react.default.createElement(AtCalendarController, {
  7945. minDate,
  7946. maxDate,
  7947. hideArrow,
  7948. monthFormat,
  7949. generateDate,
  7950. onPreMonth: this.handleClickPreMonth,
  7951. onNextMonth: this.handleClickNextMonth,
  7952. onSelectDate: this.handleSelectDate
  7953. }), import_react.default.createElement(AtCalendarBody, {
  7954. validDates,
  7955. marks,
  7956. format,
  7957. minDate,
  7958. maxDate,
  7959. isSwiper,
  7960. isVertical,
  7961. selectedDate,
  7962. selectedDates,
  7963. generateDate,
  7964. onDayClick: this.handleDayClick,
  7965. onSwipeMonth: this.setMonth,
  7966. onLongClick: this.handleDayLongClick
  7967. }));
  7968. };
  7969. AtCalendar2.defaultProps = defaultProps;
  7970. return AtCalendar2;
  7971. }(import_react.default.Component);
  7972. var AtFab = function(_super) {
  7973. __extends(AtFab2, _super);
  7974. function AtFab2() {
  7975. return _super !== null && _super.apply(this, arguments) || this;
  7976. }
  7977. AtFab2.prototype.onClick = function(e2) {
  7978. if (typeof this.props.onClick === "function") {
  7979. this.props.onClick(e2);
  7980. }
  7981. };
  7982. AtFab2.prototype.render = function() {
  7983. var _a2;
  7984. var _b = this.props, size = _b.size, className = _b.className, children = _b.children;
  7985. var rootClass = classnames("at-fab", className, (_a2 = {}, _a2["at-fab--" + size] = size, _a2));
  7986. return import_react.default.createElement(View, {
  7987. className: rootClass,
  7988. onClick: this.onClick.bind(this)
  7989. }, children);
  7990. };
  7991. return AtFab2;
  7992. }(import_react.default.Component);
  7993. AtFab.propTypes = {
  7994. size: PropTypes.oneOf([
  7995. "normal",
  7996. "small"
  7997. ]),
  7998. onClick: PropTypes.func
  7999. };
  8000. AtFab.defaultProps = {
  8001. size: "normal"
  8002. };
  8003. var objectToString = function(style) {
  8004. if (style && typeof style === "object") {
  8005. var styleStr_1 = "";
  8006. Object.keys(style).forEach(function(key) {
  8007. var lowerCaseKey = key.replace(/([A-Z])/g, "-$1").toLowerCase();
  8008. styleStr_1 += lowerCaseKey + ":" + style[key] + ";";
  8009. });
  8010. return styleStr_1;
  8011. } else if (style && typeof style === "string") {
  8012. return style;
  8013. }
  8014. return "";
  8015. };
  8016. var AtComponent = function(_super) {
  8017. __extends(AtComponent2, _super);
  8018. function AtComponent2() {
  8019. return _super !== null && _super.apply(this, arguments) || this;
  8020. }
  8021. AtComponent2.prototype.mergeStyle = function(style1, style2) {
  8022. if (style1 && typeof style1 === "object" && style2 && typeof style2 === "object") {
  8023. return Object.assign({}, style1, style2);
  8024. }
  8025. return objectToString(style1) + objectToString(style2);
  8026. };
  8027. return AtComponent2;
  8028. }(import_react.Component);
  8029. /*
  8030. object-assign
  8031. (c) Sindre Sorhus
  8032. @license MIT
  8033. */ /*!
  8034. Copyright (c) 2018 Jed Watson.
  8035. Licensed under the MIT License (MIT), see
  8036. http://jedwatson.github.io/classnames
  8037. */ /** @license React v16.13.1
  8038. * react-is.production.min.js
  8039. *
  8040. * Copyright (c) Facebook, Inc. and its affiliates.
  8041. *
  8042. * This source code is licensed under the MIT license found in the
  8043. * LICENSE file in the root directory of this source tree.
  8044. */
  8045. /***/ })
  8046. }]);