rlmuidebug.js 398 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648264926502651265226532654265526562657265826592660266126622663266426652666266726682669267026712672267326742675267626772678267926802681268226832684268526862687268826892690269126922693269426952696269726982699270027012702270327042705270627072708270927102711271227132714271527162717271827192720272127222723272427252726272727282729273027312732273327342735273627372738273927402741274227432744274527462747274827492750275127522753275427552756275727582759276027612762276327642765276627672768276927702771277227732774277527762777277827792780278127822783278427852786278727882789279027912792279327942795279627972798279928002801280228032804280528062807280828092810281128122813281428152816281728182819282028212822282328242825282628272828282928302831283228332834283528362837283828392840284128422843284428452846284728482849285028512852285328542855285628572858285928602861286228632864286528662867286828692870287128722873287428752876287728782879288028812882288328842885288628872888288928902891289228932894289528962897289828992900290129022903290429052906290729082909291029112912291329142915291629172918291929202921292229232924292529262927292829292930293129322933293429352936293729382939294029412942294329442945294629472948294929502951295229532954295529562957295829592960296129622963296429652966296729682969297029712972297329742975297629772978297929802981298229832984298529862987298829892990299129922993299429952996299729982999300030013002300330043005300630073008300930103011301230133014301530163017301830193020302130223023302430253026302730283029303030313032303330343035303630373038303930403041304230433044304530463047304830493050305130523053305430553056305730583059306030613062306330643065306630673068306930703071307230733074307530763077307830793080308130823083308430853086308730883089309030913092309330943095309630973098309931003101310231033104310531063107310831093110311131123113311431153116311731183119312031213122312331243125312631273128312931303131313231333134313531363137313831393140314131423143314431453146314731483149315031513152315331543155315631573158315931603161316231633164316531663167316831693170317131723173317431753176317731783179318031813182318331843185318631873188318931903191319231933194319531963197319831993200320132023203320432053206320732083209321032113212321332143215321632173218321932203221322232233224322532263227322832293230323132323233323432353236323732383239324032413242324332443245324632473248324932503251325232533254325532563257325832593260326132623263326432653266326732683269327032713272327332743275327632773278327932803281328232833284328532863287328832893290329132923293329432953296329732983299330033013302330333043305330633073308330933103311331233133314331533163317331833193320332133223323332433253326332733283329333033313332333333343335333633373338333933403341334233433344334533463347334833493350335133523353335433553356335733583359336033613362336333643365336633673368336933703371337233733374337533763377337833793380338133823383338433853386338733883389339033913392339333943395339633973398339934003401340234033404340534063407340834093410341134123413341434153416341734183419342034213422342334243425342634273428342934303431343234333434343534363437343834393440344134423443344434453446344734483449345034513452345334543455345634573458345934603461346234633464346534663467346834693470347134723473347434753476347734783479348034813482348334843485348634873488348934903491349234933494349534963497349834993500350135023503350435053506350735083509351035113512351335143515351635173518351935203521352235233524352535263527352835293530353135323533353435353536353735383539354035413542354335443545354635473548354935503551355235533554355535563557355835593560356135623563356435653566356735683569357035713572357335743575357635773578357935803581358235833584358535863587358835893590359135923593359435953596359735983599360036013602360336043605360636073608360936103611361236133614361536163617361836193620362136223623362436253626362736283629363036313632363336343635363636373638363936403641364236433644364536463647364836493650365136523653365436553656365736583659366036613662366336643665366636673668366936703671367236733674367536763677367836793680368136823683368436853686368736883689369036913692369336943695369636973698369937003701370237033704370537063707370837093710371137123713371437153716371737183719372037213722372337243725372637273728372937303731373237333734373537363737373837393740374137423743374437453746374737483749375037513752375337543755375637573758375937603761376237633764376537663767376837693770377137723773377437753776377737783779378037813782378337843785378637873788378937903791379237933794379537963797379837993800380138023803380438053806380738083809381038113812381338143815381638173818381938203821382238233824382538263827382838293830383138323833383438353836383738383839384038413842384338443845384638473848384938503851385238533854385538563857385838593860386138623863386438653866386738683869387038713872387338743875387638773878387938803881388238833884388538863887388838893890389138923893389438953896389738983899390039013902390339043905390639073908390939103911391239133914391539163917391839193920392139223923392439253926392739283929393039313932393339343935393639373938393939403941394239433944394539463947394839493950395139523953395439553956395739583959396039613962396339643965396639673968396939703971397239733974397539763977397839793980398139823983398439853986398739883989399039913992399339943995399639973998399940004001400240034004400540064007400840094010401140124013401440154016401740184019402040214022402340244025402640274028402940304031403240334034403540364037403840394040404140424043404440454046404740484049405040514052405340544055405640574058405940604061406240634064406540664067406840694070407140724073407440754076407740784079408040814082408340844085408640874088408940904091409240934094409540964097409840994100410141024103410441054106410741084109411041114112411341144115411641174118411941204121412241234124412541264127412841294130413141324133413441354136413741384139414041414142414341444145414641474148414941504151415241534154415541564157415841594160416141624163416441654166416741684169417041714172417341744175417641774178417941804181418241834184418541864187418841894190419141924193419441954196419741984199420042014202420342044205420642074208420942104211421242134214421542164217421842194220422142224223422442254226422742284229423042314232423342344235423642374238423942404241424242434244424542464247424842494250425142524253425442554256425742584259426042614262426342644265426642674268426942704271427242734274427542764277427842794280428142824283428442854286428742884289429042914292429342944295429642974298429943004301430243034304430543064307430843094310431143124313431443154316431743184319432043214322432343244325432643274328432943304331433243334334433543364337433843394340434143424343434443454346434743484349435043514352435343544355435643574358435943604361436243634364436543664367436843694370437143724373437443754376437743784379438043814382438343844385438643874388438943904391439243934394439543964397439843994400440144024403440444054406440744084409441044114412441344144415441644174418441944204421442244234424442544264427442844294430443144324433443444354436443744384439444044414442444344444445444644474448444944504451445244534454445544564457445844594460446144624463446444654466446744684469447044714472447344744475447644774478447944804481448244834484448544864487448844894490449144924493449444954496449744984499450045014502450345044505450645074508450945104511451245134514451545164517451845194520452145224523452445254526452745284529453045314532453345344535453645374538453945404541454245434544454545464547454845494550455145524553455445554556455745584559456045614562456345644565456645674568456945704571457245734574457545764577457845794580458145824583458445854586458745884589459045914592459345944595459645974598459946004601460246034604460546064607460846094610461146124613461446154616461746184619462046214622462346244625462646274628462946304631463246334634463546364637463846394640464146424643464446454646464746484649465046514652465346544655465646574658465946604661466246634664466546664667466846694670467146724673467446754676467746784679468046814682468346844685468646874688468946904691469246934694469546964697469846994700470147024703470447054706470747084709471047114712471347144715471647174718471947204721472247234724472547264727472847294730473147324733473447354736473747384739474047414742474347444745474647474748474947504751475247534754475547564757475847594760476147624763476447654766476747684769477047714772477347744775477647774778477947804781478247834784478547864787478847894790479147924793479447954796479747984799480048014802480348044805480648074808480948104811481248134814481548164817481848194820482148224823482448254826482748284829483048314832483348344835483648374838483948404841484248434844484548464847484848494850485148524853485448554856485748584859486048614862486348644865486648674868486948704871487248734874487548764877487848794880488148824883488448854886488748884889489048914892489348944895489648974898489949004901490249034904490549064907490849094910491149124913491449154916491749184919492049214922492349244925492649274928492949304931493249334934493549364937493849394940494149424943494449454946494749484949495049514952495349544955495649574958495949604961496249634964496549664967496849694970497149724973497449754976497749784979498049814982498349844985498649874988498949904991499249934994499549964997499849995000500150025003500450055006500750085009501050115012501350145015501650175018501950205021502250235024502550265027502850295030503150325033503450355036503750385039504050415042504350445045504650475048504950505051505250535054505550565057505850595060506150625063506450655066506750685069507050715072507350745075507650775078507950805081508250835084508550865087508850895090509150925093509450955096509750985099510051015102510351045105510651075108510951105111511251135114511551165117511851195120512151225123512451255126512751285129513051315132513351345135513651375138513951405141514251435144514551465147514851495150515151525153515451555156515751585159516051615162516351645165516651675168516951705171517251735174517551765177517851795180518151825183518451855186518751885189519051915192519351945195519651975198519952005201520252035204520552065207520852095210521152125213521452155216521752185219522052215222522352245225522652275228522952305231523252335234523552365237523852395240524152425243524452455246524752485249525052515252525352545255525652575258525952605261526252635264526552665267526852695270527152725273527452755276527752785279528052815282528352845285528652875288528952905291529252935294529552965297529852995300530153025303530453055306530753085309531053115312531353145315531653175318531953205321532253235324532553265327532853295330533153325333533453355336533753385339534053415342534353445345534653475348534953505351535253535354535553565357535853595360536153625363536453655366536753685369537053715372537353745375537653775378537953805381538253835384538553865387538853895390539153925393539453955396539753985399540054015402540354045405540654075408540954105411541254135414541554165417541854195420542154225423542454255426542754285429543054315432543354345435543654375438543954405441544254435444544554465447544854495450545154525453545454555456545754585459546054615462546354645465546654675468546954705471547254735474547554765477547854795480548154825483548454855486548754885489549054915492549354945495549654975498549955005501550255035504550555065507550855095510551155125513551455155516551755185519552055215522552355245525552655275528552955305531553255335534553555365537553855395540554155425543554455455546554755485549555055515552555355545555555655575558555955605561556255635564556555665567556855695570557155725573557455755576557755785579558055815582558355845585558655875588558955905591559255935594559555965597559855995600560156025603560456055606560756085609561056115612561356145615561656175618561956205621562256235624562556265627562856295630563156325633563456355636563756385639564056415642564356445645564656475648564956505651565256535654565556565657565856595660566156625663566456655666566756685669567056715672567356745675567656775678567956805681568256835684568556865687568856895690569156925693569456955696569756985699570057015702570357045705570657075708570957105711571257135714571557165717571857195720572157225723572457255726572757285729573057315732573357345735573657375738573957405741574257435744574557465747574857495750575157525753575457555756575757585759576057615762576357645765576657675768576957705771577257735774577557765777577857795780578157825783578457855786578757885789579057915792579357945795579657975798579958005801580258035804580558065807580858095810581158125813581458155816581758185819582058215822582358245825582658275828582958305831583258335834583558365837583858395840584158425843584458455846584758485849585058515852585358545855585658575858585958605861586258635864586558665867586858695870587158725873587458755876587758785879588058815882588358845885588658875888588958905891589258935894589558965897589858995900590159025903590459055906590759085909591059115912591359145915591659175918591959205921592259235924592559265927592859295930593159325933593459355936593759385939594059415942594359445945594659475948594959505951595259535954595559565957595859595960596159625963596459655966596759685969597059715972597359745975597659775978597959805981598259835984598559865987598859895990599159925993599459955996599759985999600060016002600360046005600660076008600960106011601260136014601560166017601860196020602160226023602460256026602760286029603060316032603360346035603660376038603960406041604260436044604560466047604860496050605160526053605460556056605760586059606060616062606360646065606660676068606960706071607260736074607560766077607860796080608160826083608460856086608760886089609060916092609360946095609660976098609961006101610261036104610561066107610861096110611161126113611461156116611761186119612061216122612361246125612661276128612961306131613261336134613561366137613861396140614161426143614461456146614761486149615061516152615361546155615661576158615961606161616261636164616561666167616861696170617161726173617461756176617761786179618061816182618361846185618661876188618961906191619261936194619561966197619861996200620162026203620462056206620762086209621062116212621362146215621662176218621962206221622262236224622562266227622862296230623162326233623462356236623762386239624062416242624362446245624662476248624962506251625262536254625562566257625862596260626162626263626462656266626762686269627062716272627362746275627662776278627962806281628262836284628562866287628862896290629162926293629462956296629762986299630063016302630363046305630663076308630963106311631263136314631563166317631863196320632163226323632463256326632763286329633063316332633363346335633663376338633963406341634263436344634563466347634863496350635163526353635463556356635763586359636063616362636363646365636663676368636963706371637263736374637563766377637863796380638163826383638463856386638763886389639063916392639363946395639663976398639964006401640264036404640564066407640864096410641164126413641464156416641764186419642064216422642364246425642664276428642964306431643264336434643564366437643864396440644164426443644464456446644764486449645064516452645364546455645664576458645964606461646264636464646564666467646864696470647164726473647464756476647764786479648064816482648364846485648664876488648964906491649264936494649564966497649864996500650165026503650465056506650765086509651065116512651365146515651665176518651965206521652265236524652565266527652865296530653165326533653465356536653765386539654065416542654365446545654665476548654965506551655265536554655565566557655865596560656165626563656465656566656765686569657065716572657365746575657665776578657965806581658265836584658565866587658865896590659165926593659465956596659765986599660066016602660366046605660666076608660966106611661266136614661566166617661866196620662166226623662466256626662766286629663066316632663366346635663666376638663966406641664266436644664566466647664866496650665166526653665466556656665766586659666066616662666366646665666666676668666966706671667266736674667566766677667866796680668166826683668466856686668766886689669066916692669366946695669666976698669967006701670267036704670567066707670867096710671167126713671467156716671767186719672067216722672367246725672667276728672967306731673267336734673567366737673867396740674167426743674467456746674767486749675067516752675367546755675667576758675967606761676267636764676567666767676867696770677167726773677467756776677767786779678067816782678367846785678667876788678967906791679267936794679567966797679867996800680168026803680468056806680768086809681068116812681368146815681668176818681968206821682268236824682568266827682868296830683168326833683468356836683768386839684068416842684368446845684668476848684968506851685268536854685568566857685868596860686168626863686468656866686768686869687068716872687368746875687668776878687968806881688268836884688568866887688868896890689168926893689468956896689768986899690069016902690369046905690669076908690969106911691269136914691569166917691869196920692169226923692469256926692769286929693069316932693369346935693669376938693969406941694269436944694569466947694869496950695169526953695469556956695769586959696069616962696369646965696669676968696969706971697269736974697569766977697869796980698169826983698469856986698769886989699069916992699369946995699669976998699970007001700270037004700570067007700870097010701170127013701470157016701770187019702070217022702370247025702670277028702970307031703270337034703570367037703870397040704170427043704470457046704770487049705070517052705370547055705670577058705970607061706270637064706570667067706870697070707170727073707470757076707770787079708070817082708370847085708670877088708970907091709270937094709570967097709870997100710171027103710471057106710771087109711071117112711371147115711671177118711971207121712271237124712571267127712871297130713171327133713471357136713771387139714071417142714371447145714671477148714971507151715271537154715571567157715871597160716171627163716471657166716771687169717071717172717371747175717671777178717971807181718271837184718571867187718871897190719171927193719471957196719771987199720072017202720372047205720672077208720972107211721272137214721572167217721872197220722172227223722472257226722772287229723072317232723372347235723672377238723972407241724272437244724572467247724872497250725172527253725472557256725772587259726072617262726372647265726672677268726972707271727272737274727572767277727872797280728172827283728472857286728772887289729072917292729372947295729672977298729973007301730273037304730573067307730873097310731173127313731473157316731773187319732073217322732373247325732673277328732973307331733273337334733573367337733873397340734173427343734473457346734773487349735073517352735373547355735673577358735973607361736273637364736573667367736873697370737173727373737473757376737773787379738073817382738373847385738673877388738973907391739273937394739573967397739873997400740174027403740474057406740774087409741074117412741374147415741674177418741974207421742274237424742574267427742874297430743174327433743474357436743774387439744074417442744374447445744674477448744974507451745274537454745574567457745874597460746174627463746474657466746774687469747074717472747374747475747674777478747974807481748274837484748574867487748874897490749174927493749474957496749774987499750075017502750375047505750675077508750975107511751275137514751575167517751875197520752175227523752475257526752775287529753075317532753375347535753675377538753975407541754275437544754575467547754875497550755175527553755475557556755775587559756075617562756375647565756675677568756975707571757275737574757575767577757875797580758175827583758475857586758775887589759075917592759375947595759675977598759976007601760276037604760576067607760876097610761176127613761476157616761776187619762076217622762376247625762676277628762976307631763276337634763576367637763876397640764176427643764476457646764776487649765076517652765376547655765676577658765976607661766276637664766576667667766876697670767176727673767476757676767776787679768076817682768376847685768676877688768976907691769276937694769576967697769876997700770177027703770477057706770777087709771077117712771377147715771677177718771977207721772277237724772577267727772877297730773177327733773477357736773777387739774077417742774377447745774677477748774977507751775277537754775577567757775877597760776177627763776477657766776777687769777077717772777377747775777677777778777977807781778277837784778577867787778877897790779177927793779477957796779777987799780078017802780378047805780678077808780978107811781278137814781578167817781878197820782178227823782478257826782778287829783078317832783378347835783678377838783978407841784278437844784578467847784878497850785178527853785478557856785778587859786078617862786378647865786678677868786978707871787278737874787578767877787878797880788178827883788478857886788778887889789078917892789378947895789678977898789979007901790279037904790579067907790879097910791179127913791479157916791779187919792079217922792379247925792679277928792979307931793279337934793579367937793879397940794179427943794479457946794779487949795079517952795379547955795679577958795979607961796279637964796579667967796879697970797179727973797479757976797779787979798079817982798379847985798679877988798979907991799279937994799579967997799879998000800180028003800480058006800780088009801080118012801380148015801680178018801980208021802280238024802580268027802880298030803180328033803480358036803780388039804080418042804380448045804680478048804980508051805280538054805580568057805880598060806180628063806480658066806780688069807080718072807380748075807680778078807980808081808280838084808580868087808880898090809180928093809480958096809780988099810081018102810381048105810681078108810981108111811281138114811581168117811881198120812181228123812481258126812781288129813081318132813381348135813681378138813981408141814281438144814581468147814881498150815181528153815481558156815781588159816081618162816381648165816681678168816981708171817281738174817581768177817881798180818181828183818481858186818781888189819081918192819381948195819681978198819982008201820282038204820582068207820882098210821182128213821482158216821782188219822082218222822382248225822682278228822982308231823282338234823582368237823882398240824182428243824482458246824782488249825082518252825382548255825682578258825982608261826282638264826582668267826882698270827182728273827482758276827782788279828082818282828382848285828682878288828982908291829282938294829582968297829882998300
  1. /*!
  2. * =====================================================
  3. *Learun MobileUI v1.0.0
  4. * =====================================================
  5. */
  6. /* NUGET: BEGIN LICENSE TEXT
  7. *
  8. * Microsoft grants you the right to use these script files for the sole
  9. * purpose of either: (i) interacting through your browser with the Microsoft
  10. * website or online service, subject to the applicable licensing or use
  11. * terms; or (ii) using the files as included with a Microsoft product subject
  12. * to that product's license terms. Microsoft reserves all other rights to the
  13. * files not expressly granted by Microsoft, whether by implication, estoppel
  14. * or otherwise. Insofar as a script file is dual licensed under GPL,
  15. * Microsoft neither took the code under GPL nor distributes it thereunder but
  16. * under the terms set out in this paragraph. All notices and licenses
  17. * below are for informational purposes only.
  18. *
  19. * JQUERY CORE 1.10.2; Copyright 2005, 2013 jQuery Foundation, Inc. and other contributors; http://jquery.org/license
  20. * Includes Sizzle.js; Copyright 2013 jQuery Foundation, Inc. and other contributors; http://opensource.org/licenses/MIT
  21. *
  22. * NUGET: END LICENSE TEXT */
  23. /*! jQuery v1.10.2 | (c) 2005, 2013 jQuery Foundation, Inc. | jquery.org/license
  24. //@ sourceMappingURL=jquery-1.10.2.min.map
  25. */
  26. (function(e,t){var n,r,i=typeof t,o=e.location,a=e.document,s=a.documentElement,l=e.jQuery,u=e.$,c={},p=[],f="1.10.2",d=p.concat,h=p.push,g=p.slice,m=p.indexOf,y=c.toString,v=c.hasOwnProperty,b=f.trim,x=function(e,t){return new x.fn.init(e,t,r)},w=/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source,T=/\S+/g,C=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,N=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]*))$/,k=/^<(\w+)\s*\/?>(?:<\/\1>|)$/,E=/^[\],:{}\s]*$/,S=/(?:^|:|,)(?:\s*\[)+/g,A=/\\(?:["\\\/bfnrt]|u[\da-fA-F]{4})/g,j=/"[^"\\\r\n]*"|true|false|null|-?(?:\d+\.|)\d+(?:[eE][+-]?\d+|)/g,D=/^-ms-/,L=/-([\da-z])/gi,H=function(e,t){return t.toUpperCase()},q=function(e){(a.addEventListener||"load"===e.type||"complete"===a.readyState)&&(_(),x.ready())},_=function(){a.addEventListener?(a.removeEventListener("DOMContentLoaded",q,!1),e.removeEventListener("load",q,!1)):(a.detachEvent("onreadystatechange",q),e.detachEvent("onload",q))};x.fn=x.prototype={jquery:f,constructor:x,init:function(e,n,r){var i,o;if(!e)return this;if("string"==typeof e){if(i="<"===e.charAt(0)&&">"===e.charAt(e.length-1)&&e.length>=3?[null,e,null]:N.exec(e),!i||!i[1]&&n)return!n||n.jquery?(n||r).find(e):this.constructor(n).find(e);if(i[1]){if(n=n instanceof x?n[0]:n,x.merge(this,x.parseHTML(i[1],n&&n.nodeType?n.ownerDocument||n:a,!0)),k.test(i[1])&&x.isPlainObject(n))for(i in n)x.isFunction(this[i])?this[i](n[i]):this.attr(i,n[i]);return this}if(o=a.getElementById(i[2]),o&&o.parentNode){if(o.id!==i[2])return r.find(e);this.length=1,this[0]=o}return this.context=a,this.selector=e,this}return e.nodeType?(this.context=this[0]=e,this.length=1,this):x.isFunction(e)?r.ready(e):(e.selector!==t&&(this.selector=e.selector,this.context=e.context),x.makeArray(e,this))},selector:"",length:0,toArray:function(){return g.call(this)},get:function(e){return null==e?this.toArray():0>e?this[this.length+e]:this[e]},pushStack:function(e){var t=x.merge(this.constructor(),e);return t.prevObject=this,t.context=this.context,t},each:function(e,t){return x.each(this,e,t)},ready:function(e){return x.ready.promise().done(e),this},slice:function(){return this.pushStack(g.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},eq:function(e){var t=this.length,n=+e+(0>e?t:0);return this.pushStack(n>=0&&t>n?[this[n]]:[])},map:function(e){return this.pushStack(x.map(this,function(t,n){return e.call(t,n,t)}))},end:function(){return this.prevObject||this.constructor(null)},push:h,sort:[].sort,splice:[].splice},x.fn.init.prototype=x.fn,x.extend=x.fn.extend=function(){var e,n,r,i,o,a,s=arguments[0]||{},l=1,u=arguments.length,c=!1;for("boolean"==typeof s&&(c=s,s=arguments[1]||{},l=2),"object"==typeof s||x.isFunction(s)||(s={}),u===l&&(s=this,--l);u>l;l++)if(null!=(o=arguments[l]))for(i in o)e=s[i],r=o[i],s!==r&&(c&&r&&(x.isPlainObject(r)||(n=x.isArray(r)))?(n?(n=!1,a=e&&x.isArray(e)?e:[]):a=e&&x.isPlainObject(e)?e:{},s[i]=x.extend(c,a,r)):r!==t&&(s[i]=r));return s},x.extend({expando:"jQuery"+(f+Math.random()).replace(/\D/g,""),noConflict:function(t){return e.$===x&&(e.$=u),t&&e.jQuery===x&&(e.jQuery=l),x},isReady:!1,readyWait:1,holdReady:function(e){e?x.readyWait++:x.ready(!0)},ready:function(e){if(e===!0?!--x.readyWait:!x.isReady){if(!a.body)return setTimeout(x.ready);x.isReady=!0,e!==!0&&--x.readyWait>0||(n.resolveWith(a,[x]),x.fn.trigger&&x(a).trigger("ready").off("ready"))}},isFunction:function(e){return"function"===x.type(e)},isArray:Array.isArray||function(e){return"array"===x.type(e)},isWindow:function(e){return null!=e&&e==e.window},isNumeric:function(e){return!isNaN(parseFloat(e))&&isFinite(e)},type:function(e){return null==e?e+"":"object"==typeof e||"function"==typeof e?c[y.call(e)]||"object":typeof e},isPlainObject:function(e){var n;if(!e||"object"!==x.type(e)||e.nodeType||x.isWindow(e))return!1;try{if(e.constructor&&!v.call(e,"constructor")&&!v.call(e.constructor.prototype,"isPrototypeOf"))return!1}catch(r){return!1}if(x.support.ownLast)for(n in e)return v.call(e,n);for(n in e);return n===t||v.call(e,n)},isEmptyObject:function(e){var t;for(t in e)return!1;return!0},error:function(e){throw Error(e)},parseHTML:function(e,t,n){if(!e||"string"!=typeof e)return null;"boolean"==typeof t&&(n=t,t=!1),t=t||a;var r=k.exec(e),i=!n&&[];return r?[t.createElement(r[1])]:(r=x.buildFragment([e],t,i),i&&x(i).remove(),x.merge([],r.childNodes))},parseJSON:function(n){return e.JSON&&e.JSON.parse?e.JSON.parse(n):null===n?n:"string"==typeof n&&(n=x.trim(n),n&&E.test(n.replace(A,"@").replace(j,"]").replace(S,"")))?Function("return "+n)():(x.error("Invalid JSON: "+n),t)},parseXML:function(n){var r,i;if(!n||"string"!=typeof n)return null;try{e.DOMParser?(i=new DOMParser,r=i.parseFromString(n,"text/xml")):(r=new ActiveXObject("Microsoft.XMLDOM"),r.async="false",r.loadXML(n))}catch(o){r=t}return r&&r.documentElement&&!r.getElementsByTagName("parsererror").length||x.error("Invalid XML: "+n),r},noop:function(){},globalEval:function(t){t&&x.trim(t)&&(e.execScript||function(t){e.eval.call(e,t)})(t)},camelCase:function(e){return e.replace(D,"ms-").replace(L,H)},nodeName:function(e,t){return e.nodeName&&e.nodeName.toLowerCase()===t.toLowerCase()},each:function(e,t,n){var r,i=0,o=e.length,a=M(e);if(n){if(a){for(;o>i;i++)if(r=t.apply(e[i],n),r===!1)break}else for(i in e)if(r=t.apply(e[i],n),r===!1)break}else if(a){for(;o>i;i++)if(r=t.call(e[i],i,e[i]),r===!1)break}else for(i in e)if(r=t.call(e[i],i,e[i]),r===!1)break;return e},trim:b&&!b.call("\ufeff\u00a0")?function(e){return null==e?"":b.call(e)}:function(e){return null==e?"":(e+"").replace(C,"")},makeArray:function(e,t){var n=t||[];return null!=e&&(M(Object(e))?x.merge(n,"string"==typeof e?[e]:e):h.call(n,e)),n},inArray:function(e,t,n){var r;if(t){if(m)return m.call(t,e,n);for(r=t.length,n=n?0>n?Math.max(0,r+n):n:0;r>n;n++)if(n in t&&t[n]===e)return n}return-1},merge:function(e,n){var r=n.length,i=e.length,o=0;if("number"==typeof r)for(;r>o;o++)e[i++]=n[o];else while(n[o]!==t)e[i++]=n[o++];return e.length=i,e},grep:function(e,t,n){var r,i=[],o=0,a=e.length;for(n=!!n;a>o;o++)r=!!t(e[o],o),n!==r&&i.push(e[o]);return i},map:function(e,t,n){var r,i=0,o=e.length,a=M(e),s=[];if(a)for(;o>i;i++)r=t(e[i],i,n),null!=r&&(s[s.length]=r);else for(i in e)r=t(e[i],i,n),null!=r&&(s[s.length]=r);return d.apply([],s)},guid:1,proxy:function(e,n){var r,i,o;return"string"==typeof n&&(o=e[n],n=e,e=o),x.isFunction(e)?(r=g.call(arguments,2),i=function(){return e.apply(n||this,r.concat(g.call(arguments)))},i.guid=e.guid=e.guid||x.guid++,i):t},access:function(e,n,r,i,o,a,s){var l=0,u=e.length,c=null==r;if("object"===x.type(r)){o=!0;for(l in r)x.access(e,n,l,r[l],!0,a,s)}else if(i!==t&&(o=!0,x.isFunction(i)||(s=!0),c&&(s?(n.call(e,i),n=null):(c=n,n=function(e,t,n){return c.call(x(e),n)})),n))for(;u>l;l++)n(e[l],r,s?i:i.call(e[l],l,n(e[l],r)));return o?e:c?n.call(e):u?n(e[0],r):a},now:function(){return(new Date).getTime()},swap:function(e,t,n,r){var i,o,a={};for(o in t)a[o]=e.style[o],e.style[o]=t[o];i=n.apply(e,r||[]);for(o in t)e.style[o]=a[o];return i}}),x.ready.promise=function(t){if(!n)if(n=x.Deferred(),"complete"===a.readyState)setTimeout(x.ready);else if(a.addEventListener)a.addEventListener("DOMContentLoaded",q,!1),e.addEventListener("load",q,!1);else{a.attachEvent("onreadystatechange",q),e.attachEvent("onload",q);var r=!1;try{r=null==e.frameElement&&a.documentElement}catch(i){}r&&r.doScroll&&function o(){if(!x.isReady){try{r.doScroll("left")}catch(e){return setTimeout(o,50)}_(),x.ready()}}()}return n.promise(t)},x.each("Boolean Number String Function Array Date RegExp Object Error".split(" "),function(e,t){c["[object "+t+"]"]=t.toLowerCase()});function M(e){var t=e.length,n=x.type(e);return x.isWindow(e)?!1:1===e.nodeType&&t?!0:"array"===n||"function"!==n&&(0===t||"number"==typeof t&&t>0&&t-1 in e)}r=x(a),function(e,t){var n,r,i,o,a,s,l,u,c,p,f,d,h,g,m,y,v,b="sizzle"+-new Date,w=e.document,T=0,C=0,N=st(),k=st(),E=st(),S=!1,A=function(e,t){return e===t?(S=!0,0):0},j=typeof t,D=1<<31,L={}.hasOwnProperty,H=[],q=H.pop,_=H.push,M=H.push,O=H.slice,F=H.indexOf||function(e){var t=0,n=this.length;for(;n>t;t++)if(this[t]===e)return t;return-1},B="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",P="[\\x20\\t\\r\\n\\f]",R="(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+",W=R.replace("w","w#"),$="\\["+P+"*("+R+")"+P+"*(?:([*^$|!~]?=)"+P+"*(?:(['\"])((?:\\\\.|[^\\\\])*?)\\3|("+W+")|)|)"+P+"*\\]",I=":("+R+")(?:\\(((['\"])((?:\\\\.|[^\\\\])*?)\\3|((?:\\\\.|[^\\\\()[\\]]|"+$.replace(3,8)+")*)|.*)\\)|)",z=RegExp("^"+P+"+|((?:^|[^\\\\])(?:\\\\.)*)"+P+"+$","g"),X=RegExp("^"+P+"*,"+P+"*"),U=RegExp("^"+P+"*([>+~]|"+P+")"+P+"*"),V=RegExp(P+"*[+~]"),Y=RegExp("="+P+"*([^\\]'\"]*)"+P+"*\\]","g"),J=RegExp(I),G=RegExp("^"+W+"$"),Q={ID:RegExp("^#("+R+")"),CLASS:RegExp("^\\.("+R+")"),TAG:RegExp("^("+R.replace("w","w*")+")"),ATTR:RegExp("^"+$),PSEUDO:RegExp("^"+I),CHILD:RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+P+"*(even|odd|(([+-]|)(\\d*)n|)"+P+"*(?:([+-]|)"+P+"*(\\d+)|))"+P+"*\\)|)","i"),bool:RegExp("^(?:"+B+")$","i"),needsContext:RegExp("^"+P+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+P+"*((?:-\\d)?\\d*)"+P+"*\\)|)(?=[^-]|$)","i")},K=/^[^{]+\{\s*\[native \w/,Z=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,et=/^(?:input|select|textarea|button)$/i,tt=/^h\d$/i,nt=/'|\\/g,rt=RegExp("\\\\([\\da-f]{1,6}"+P+"?|("+P+")|.)","ig"),it=function(e,t,n){var r="0x"+t-65536;return r!==r||n?t:0>r?String.fromCharCode(r+65536):String.fromCharCode(55296|r>>10,56320|1023&r)};try{M.apply(H=O.call(w.childNodes),w.childNodes),H[w.childNodes.length].nodeType}catch(ot){M={apply:H.length?function(e,t){_.apply(e,O.call(t))}:function(e,t){var n=e.length,r=0;while(e[n++]=t[r++]);e.length=n-1}}}function at(e,t,n,i){var o,a,s,l,u,c,d,m,y,x;if((t?t.ownerDocument||t:w)!==f&&p(t),t=t||f,n=n||[],!e||"string"!=typeof e)return n;if(1!==(l=t.nodeType)&&9!==l)return[];if(h&&!i){if(o=Z.exec(e))if(s=o[1]){if(9===l){if(a=t.getElementById(s),!a||!a.parentNode)return n;if(a.id===s)return n.push(a),n}else if(t.ownerDocument&&(a=t.ownerDocument.getElementById(s))&&v(t,a)&&a.id===s)return n.push(a),n}else{if(o[2])return M.apply(n,t.getElementsByTagName(e)),n;if((s=o[3])&&r.getElementsByClassName&&t.getElementsByClassName)return M.apply(n,t.getElementsByClassName(s)),n}if(r.qsa&&(!g||!g.test(e))){if(m=d=b,y=t,x=9===l&&e,1===l&&"object"!==t.nodeName.toLowerCase()){c=mt(e),(d=t.getAttribute("id"))?m=d.replace(nt,"\\$&"):t.setAttribute("id",m),m="[id='"+m+"'] ",u=c.length;while(u--)c[u]=m+yt(c[u]);y=V.test(e)&&t.parentNode||t,x=c.join(",")}if(x)try{return M.apply(n,y.querySelectorAll(x)),n}catch(T){}finally{d||t.removeAttribute("id")}}}return kt(e.replace(z,"$1"),t,n,i)}function st(){var e=[];function t(n,r){return e.push(n+=" ")>o.cacheLength&&delete t[e.shift()],t[n]=r}return t}function lt(e){return e[b]=!0,e}function ut(e){var t=f.createElement("div");try{return!!e(t)}catch(n){return!1}finally{t.parentNode&&t.parentNode.removeChild(t),t=null}}function ct(e,t){var n=e.split("|"),r=e.length;while(r--)o.attrHandle[n[r]]=t}function pt(e,t){var n=t&&e,r=n&&1===e.nodeType&&1===t.nodeType&&(~t.sourceIndex||D)-(~e.sourceIndex||D);if(r)return r;if(n)while(n=n.nextSibling)if(n===t)return-1;return e?1:-1}function ft(e){return function(t){var n=t.nodeName.toLowerCase();return"input"===n&&t.type===e}}function dt(e){return function(t){var n=t.nodeName.toLowerCase();return("input"===n||"button"===n)&&t.type===e}}function ht(e){return lt(function(t){return t=+t,lt(function(n,r){var i,o=e([],n.length,t),a=o.length;while(a--)n[i=o[a]]&&(n[i]=!(r[i]=n[i]))})})}s=at.isXML=function(e){var t=e&&(e.ownerDocument||e).documentElement;return t?"HTML"!==t.nodeName:!1},r=at.support={},p=at.setDocument=function(e){var n=e?e.ownerDocument||e:w,i=n.defaultView;return n!==f&&9===n.nodeType&&n.documentElement?(f=n,d=n.documentElement,h=!s(n),i&&i.attachEvent&&i!==i.top&&i.attachEvent("onbeforeunload",function(){p()}),r.attributes=ut(function(e){return e.className="i",!e.getAttribute("className")}),r.getElementsByTagName=ut(function(e){return e.appendChild(n.createComment("")),!e.getElementsByTagName("*").length}),r.getElementsByClassName=ut(function(e){return e.innerHTML="<div class='a'></div><div class='a i'></div>",e.firstChild.className="i",2===e.getElementsByClassName("i").length}),r.getById=ut(function(e){return d.appendChild(e).id=b,!n.getElementsByName||!n.getElementsByName(b).length}),r.getById?(o.find.ID=function(e,t){if(typeof t.getElementById!==j&&h){var n=t.getElementById(e);return n&&n.parentNode?[n]:[]}},o.filter.ID=function(e){var t=e.replace(rt,it);return function(e){return e.getAttribute("id")===t}}):(delete o.find.ID,o.filter.ID=function(e){var t=e.replace(rt,it);return function(e){var n=typeof e.getAttributeNode!==j&&e.getAttributeNode("id");return n&&n.value===t}}),o.find.TAG=r.getElementsByTagName?function(e,n){return typeof n.getElementsByTagName!==j?n.getElementsByTagName(e):t}:function(e,t){var n,r=[],i=0,o=t.getElementsByTagName(e);if("*"===e){while(n=o[i++])1===n.nodeType&&r.push(n);return r}return o},o.find.CLASS=r.getElementsByClassName&&function(e,n){return typeof n.getElementsByClassName!==j&&h?n.getElementsByClassName(e):t},m=[],g=[],(r.qsa=K.test(n.querySelectorAll))&&(ut(function(e){e.innerHTML="<select><option selected=''></option></select>",e.querySelectorAll("[selected]").length||g.push("\\["+P+"*(?:value|"+B+")"),e.querySelectorAll(":checked").length||g.push(":checked")}),ut(function(e){var t=n.createElement("input");t.setAttribute("type","hidden"),e.appendChild(t).setAttribute("t",""),e.querySelectorAll("[t^='']").length&&g.push("[*^$]="+P+"*(?:''|\"\")"),e.querySelectorAll(":enabled").length||g.push(":enabled",":disabled"),e.querySelectorAll("*,:x"),g.push(",.*:")})),(r.matchesSelector=K.test(y=d.webkitMatchesSelector||d.mozMatchesSelector||d.oMatchesSelector||d.msMatchesSelector))&&ut(function(e){r.disconnectedMatch=y.call(e,"div"),y.call(e,"[s!='']:x"),m.push("!=",I)}),g=g.length&&RegExp(g.join("|")),m=m.length&&RegExp(m.join("|")),v=K.test(d.contains)||d.compareDocumentPosition?function(e,t){var n=9===e.nodeType?e.documentElement:e,r=t&&t.parentNode;return e===r||!(!r||1!==r.nodeType||!(n.contains?n.contains(r):e.compareDocumentPosition&&16&e.compareDocumentPosition(r)))}:function(e,t){if(t)while(t=t.parentNode)if(t===e)return!0;return!1},A=d.compareDocumentPosition?function(e,t){if(e===t)return S=!0,0;var i=t.compareDocumentPosition&&e.compareDocumentPosition&&e.compareDocumentPosition(t);return i?1&i||!r.sortDetached&&t.compareDocumentPosition(e)===i?e===n||v(w,e)?-1:t===n||v(w,t)?1:c?F.call(c,e)-F.call(c,t):0:4&i?-1:1:e.compareDocumentPosition?-1:1}:function(e,t){var r,i=0,o=e.parentNode,a=t.parentNode,s=[e],l=[t];if(e===t)return S=!0,0;if(!o||!a)return e===n?-1:t===n?1:o?-1:a?1:c?F.call(c,e)-F.call(c,t):0;if(o===a)return pt(e,t);r=e;while(r=r.parentNode)s.unshift(r);r=t;while(r=r.parentNode)l.unshift(r);while(s[i]===l[i])i++;return i?pt(s[i],l[i]):s[i]===w?-1:l[i]===w?1:0},n):f},at.matches=function(e,t){return at(e,null,null,t)},at.matchesSelector=function(e,t){if((e.ownerDocument||e)!==f&&p(e),t=t.replace(Y,"='$1']"),!(!r.matchesSelector||!h||m&&m.test(t)||g&&g.test(t)))try{var n=y.call(e,t);if(n||r.disconnectedMatch||e.document&&11!==e.document.nodeType)return n}catch(i){}return at(t,f,null,[e]).length>0},at.contains=function(e,t){return(e.ownerDocument||e)!==f&&p(e),v(e,t)},at.attr=function(e,n){(e.ownerDocument||e)!==f&&p(e);var i=o.attrHandle[n.toLowerCase()],a=i&&L.call(o.attrHandle,n.toLowerCase())?i(e,n,!h):t;return a===t?r.attributes||!h?e.getAttribute(n):(a=e.getAttributeNode(n))&&a.specified?a.value:null:a},at.error=function(e){throw Error("Syntax error, unrecognized expression: "+e)},at.uniqueSort=function(e){var t,n=[],i=0,o=0;if(S=!r.detectDuplicates,c=!r.sortStable&&e.slice(0),e.sort(A),S){while(t=e[o++])t===e[o]&&(i=n.push(o));while(i--)e.splice(n[i],1)}return e},a=at.getText=function(e){var t,n="",r=0,i=e.nodeType;if(i){if(1===i||9===i||11===i){if("string"==typeof e.textContent)return e.textContent;for(e=e.firstChild;e;e=e.nextSibling)n+=a(e)}else if(3===i||4===i)return e.nodeValue}else for(;t=e[r];r++)n+=a(t);return n},o=at.selectors={cacheLength:50,createPseudo:lt,match:Q,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(e){return e[1]=e[1].replace(rt,it),e[3]=(e[4]||e[5]||"").replace(rt,it),"~="===e[2]&&(e[3]=" "+e[3]+" "),e.slice(0,4)},CHILD:function(e){return e[1]=e[1].toLowerCase(),"nth"===e[1].slice(0,3)?(e[3]||at.error(e[0]),e[4]=+(e[4]?e[5]+(e[6]||1):2*("even"===e[3]||"odd"===e[3])),e[5]=+(e[7]+e[8]||"odd"===e[3])):e[3]&&at.error(e[0]),e},PSEUDO:function(e){var n,r=!e[5]&&e[2];return Q.CHILD.test(e[0])?null:(e[3]&&e[4]!==t?e[2]=e[4]:r&&J.test(r)&&(n=mt(r,!0))&&(n=r.indexOf(")",r.length-n)-r.length)&&(e[0]=e[0].slice(0,n),e[2]=r.slice(0,n)),e.slice(0,3))}},filter:{TAG:function(e){var t=e.replace(rt,it).toLowerCase();return"*"===e?function(){return!0}:function(e){return e.nodeName&&e.nodeName.toLowerCase()===t}},CLASS:function(e){var t=N[e+" "];return t||(t=RegExp("(^|"+P+")"+e+"("+P+"|$)"))&&N(e,function(e){return t.test("string"==typeof e.className&&e.className||typeof e.getAttribute!==j&&e.getAttribute("class")||"")})},ATTR:function(e,t,n){return function(r){var i=at.attr(r,e);return null==i?"!="===t:t?(i+="","="===t?i===n:"!="===t?i!==n:"^="===t?n&&0===i.indexOf(n):"*="===t?n&&i.indexOf(n)>-1:"$="===t?n&&i.slice(-n.length)===n:"~="===t?(" "+i+" ").indexOf(n)>-1:"|="===t?i===n||i.slice(0,n.length+1)===n+"-":!1):!0}},CHILD:function(e,t,n,r,i){var o="nth"!==e.slice(0,3),a="last"!==e.slice(-4),s="of-type"===t;return 1===r&&0===i?function(e){return!!e.parentNode}:function(t,n,l){var u,c,p,f,d,h,g=o!==a?"nextSibling":"previousSibling",m=t.parentNode,y=s&&t.nodeName.toLowerCase(),v=!l&&!s;if(m){if(o){while(g){p=t;while(p=p[g])if(s?p.nodeName.toLowerCase()===y:1===p.nodeType)return!1;h=g="only"===e&&!h&&"nextSibling"}return!0}if(h=[a?m.firstChild:m.lastChild],a&&v){c=m[b]||(m[b]={}),u=c[e]||[],d=u[0]===T&&u[1],f=u[0]===T&&u[2],p=d&&m.childNodes[d];while(p=++d&&p&&p[g]||(f=d=0)||h.pop())if(1===p.nodeType&&++f&&p===t){c[e]=[T,d,f];break}}else if(v&&(u=(t[b]||(t[b]={}))[e])&&u[0]===T)f=u[1];else while(p=++d&&p&&p[g]||(f=d=0)||h.pop())if((s?p.nodeName.toLowerCase()===y:1===p.nodeType)&&++f&&(v&&((p[b]||(p[b]={}))[e]=[T,f]),p===t))break;return f-=i,f===r||0===f%r&&f/r>=0}}},PSEUDO:function(e,t){var n,r=o.pseudos[e]||o.setFilters[e.toLowerCase()]||at.error("unsupported pseudo: "+e);return r[b]?r(t):r.length>1?(n=[e,e,"",t],o.setFilters.hasOwnProperty(e.toLowerCase())?lt(function(e,n){var i,o=r(e,t),a=o.length;while(a--)i=F.call(e,o[a]),e[i]=!(n[i]=o[a])}):function(e){return r(e,0,n)}):r}},pseudos:{not:lt(function(e){var t=[],n=[],r=l(e.replace(z,"$1"));return r[b]?lt(function(e,t,n,i){var o,a=r(e,null,i,[]),s=e.length;while(s--)(o=a[s])&&(e[s]=!(t[s]=o))}):function(e,i,o){return t[0]=e,r(t,null,o,n),!n.pop()}}),has:lt(function(e){return function(t){return at(e,t).length>0}}),contains:lt(function(e){return function(t){return(t.textContent||t.innerText||a(t)).indexOf(e)>-1}}),lang:lt(function(e){return G.test(e||"")||at.error("unsupported lang: "+e),e=e.replace(rt,it).toLowerCase(),function(t){var n;do if(n=h?t.lang:t.getAttribute("xml:lang")||t.getAttribute("lang"))return n=n.toLowerCase(),n===e||0===n.indexOf(e+"-");while((t=t.parentNode)&&1===t.nodeType);return!1}}),target:function(t){var n=e.location&&e.location.hash;return n&&n.slice(1)===t.id},root:function(e){return e===d},focus:function(e){return e===f.activeElement&&(!f.hasFocus||f.hasFocus())&&!!(e.type||e.href||~e.tabIndex)},enabled:function(e){return e.disabled===!1},disabled:function(e){return e.disabled===!0},checked:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&!!e.checked||"option"===t&&!!e.selected},selected:function(e){return e.parentNode&&e.parentNode.selectedIndex,e.selected===!0},empty:function(e){for(e=e.firstChild;e;e=e.nextSibling)if(e.nodeName>"@"||3===e.nodeType||4===e.nodeType)return!1;return!0},parent:function(e){return!o.pseudos.empty(e)},header:function(e){return tt.test(e.nodeName)},input:function(e){return et.test(e.nodeName)},button:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&"button"===e.type||"button"===t},text:function(e){var t;return"input"===e.nodeName.toLowerCase()&&"text"===e.type&&(null==(t=e.getAttribute("type"))||t.toLowerCase()===e.type)},first:ht(function(){return[0]}),last:ht(function(e,t){return[t-1]}),eq:ht(function(e,t,n){return[0>n?n+t:n]}),even:ht(function(e,t){var n=0;for(;t>n;n+=2)e.push(n);return e}),odd:ht(function(e,t){var n=1;for(;t>n;n+=2)e.push(n);return e}),lt:ht(function(e,t,n){var r=0>n?n+t:n;for(;--r>=0;)e.push(r);return e}),gt:ht(function(e,t,n){var r=0>n?n+t:n;for(;t>++r;)e.push(r);return e})}},o.pseudos.nth=o.pseudos.eq;for(n in{radio:!0,checkbox:!0,file:!0,password:!0,image:!0})o.pseudos[n]=ft(n);for(n in{submit:!0,reset:!0})o.pseudos[n]=dt(n);function gt(){}gt.prototype=o.filters=o.pseudos,o.setFilters=new gt;function mt(e,t){var n,r,i,a,s,l,u,c=k[e+" "];if(c)return t?0:c.slice(0);s=e,l=[],u=o.preFilter;while(s){(!n||(r=X.exec(s)))&&(r&&(s=s.slice(r[0].length)||s),l.push(i=[])),n=!1,(r=U.exec(s))&&(n=r.shift(),i.push({value:n,type:r[0].replace(z," ")}),s=s.slice(n.length));for(a in o.filter)!(r=Q[a].exec(s))||u[a]&&!(r=u[a](r))||(n=r.shift(),i.push({value:n,type:a,matches:r}),s=s.slice(n.length));if(!n)break}return t?s.length:s?at.error(e):k(e,l).slice(0)}function yt(e){var t=0,n=e.length,r="";for(;n>t;t++)r+=e[t].value;return r}function vt(e,t,n){var r=t.dir,o=n&&"parentNode"===r,a=C++;return t.first?function(t,n,i){while(t=t[r])if(1===t.nodeType||o)return e(t,n,i)}:function(t,n,s){var l,u,c,p=T+" "+a;if(s){while(t=t[r])if((1===t.nodeType||o)&&e(t,n,s))return!0}else while(t=t[r])if(1===t.nodeType||o)if(c=t[b]||(t[b]={}),(u=c[r])&&u[0]===p){if((l=u[1])===!0||l===i)return l===!0}else if(u=c[r]=[p],u[1]=e(t,n,s)||i,u[1]===!0)return!0}}function bt(e){return e.length>1?function(t,n,r){var i=e.length;while(i--)if(!e[i](t,n,r))return!1;return!0}:e[0]}function xt(e,t,n,r,i){var o,a=[],s=0,l=e.length,u=null!=t;for(;l>s;s++)(o=e[s])&&(!n||n(o,r,i))&&(a.push(o),u&&t.push(s));return a}function wt(e,t,n,r,i,o){return r&&!r[b]&&(r=wt(r)),i&&!i[b]&&(i=wt(i,o)),lt(function(o,a,s,l){var u,c,p,f=[],d=[],h=a.length,g=o||Nt(t||"*",s.nodeType?[s]:s,[]),m=!e||!o&&t?g:xt(g,f,e,s,l),y=n?i||(o?e:h||r)?[]:a:m;if(n&&n(m,y,s,l),r){u=xt(y,d),r(u,[],s,l),c=u.length;while(c--)(p=u[c])&&(y[d[c]]=!(m[d[c]]=p))}if(o){if(i||e){if(i){u=[],c=y.length;while(c--)(p=y[c])&&u.push(m[c]=p);i(null,y=[],u,l)}c=y.length;while(c--)(p=y[c])&&(u=i?F.call(o,p):f[c])>-1&&(o[u]=!(a[u]=p))}}else y=xt(y===a?y.splice(h,y.length):y),i?i(null,a,y,l):M.apply(a,y)})}function Tt(e){var t,n,r,i=e.length,a=o.relative[e[0].type],s=a||o.relative[" "],l=a?1:0,c=vt(function(e){return e===t},s,!0),p=vt(function(e){return F.call(t,e)>-1},s,!0),f=[function(e,n,r){return!a&&(r||n!==u)||((t=n).nodeType?c(e,n,r):p(e,n,r))}];for(;i>l;l++)if(n=o.relative[e[l].type])f=[vt(bt(f),n)];else{if(n=o.filter[e[l].type].apply(null,e[l].matches),n[b]){for(r=++l;i>r;r++)if(o.relative[e[r].type])break;return wt(l>1&&bt(f),l>1&&yt(e.slice(0,l-1).concat({value:" "===e[l-2].type?"*":""})).replace(z,"$1"),n,r>l&&Tt(e.slice(l,r)),i>r&&Tt(e=e.slice(r)),i>r&&yt(e))}f.push(n)}return bt(f)}function Ct(e,t){var n=0,r=t.length>0,a=e.length>0,s=function(s,l,c,p,d){var h,g,m,y=[],v=0,b="0",x=s&&[],w=null!=d,C=u,N=s||a&&o.find.TAG("*",d&&l.parentNode||l),k=T+=null==C?1:Math.random()||.1;for(w&&(u=l!==f&&l,i=n);null!=(h=N[b]);b++){if(a&&h){g=0;while(m=e[g++])if(m(h,l,c)){p.push(h);break}w&&(T=k,i=++n)}r&&((h=!m&&h)&&v--,s&&x.push(h))}if(v+=b,r&&b!==v){g=0;while(m=t[g++])m(x,y,l,c);if(s){if(v>0)while(b--)x[b]||y[b]||(y[b]=q.call(p));y=xt(y)}M.apply(p,y),w&&!s&&y.length>0&&v+t.length>1&&at.uniqueSort(p)}return w&&(T=k,u=C),x};return r?lt(s):s}l=at.compile=function(e,t){var n,r=[],i=[],o=E[e+" "];if(!o){t||(t=mt(e)),n=t.length;while(n--)o=Tt(t[n]),o[b]?r.push(o):i.push(o);o=E(e,Ct(i,r))}return o};function Nt(e,t,n){var r=0,i=t.length;for(;i>r;r++)at(e,t[r],n);return n}function kt(e,t,n,i){var a,s,u,c,p,f=mt(e);if(!i&&1===f.length){if(s=f[0]=f[0].slice(0),s.length>2&&"ID"===(u=s[0]).type&&r.getById&&9===t.nodeType&&h&&o.relative[s[1].type]){if(t=(o.find.ID(u.matches[0].replace(rt,it),t)||[])[0],!t)return n;e=e.slice(s.shift().value.length)}a=Q.needsContext.test(e)?0:s.length;while(a--){if(u=s[a],o.relative[c=u.type])break;if((p=o.find[c])&&(i=p(u.matches[0].replace(rt,it),V.test(s[0].type)&&t.parentNode||t))){if(s.splice(a,1),e=i.length&&yt(s),!e)return M.apply(n,i),n;break}}}return l(e,f)(i,t,!h,n,V.test(e)),n}r.sortStable=b.split("").sort(A).join("")===b,r.detectDuplicates=S,p(),r.sortDetached=ut(function(e){return 1&e.compareDocumentPosition(f.createElement("div"))}),ut(function(e){return e.innerHTML="<a href='#'></a>","#"===e.firstChild.getAttribute("href")})||ct("type|href|height|width",function(e,n,r){return r?t:e.getAttribute(n,"type"===n.toLowerCase()?1:2)}),r.attributes&&ut(function(e){return e.innerHTML="<input/>",e.firstChild.setAttribute("value",""),""===e.firstChild.getAttribute("value")})||ct("value",function(e,n,r){return r||"input"!==e.nodeName.toLowerCase()?t:e.defaultValue}),ut(function(e){return null==e.getAttribute("disabled")})||ct(B,function(e,n,r){var i;return r?t:(i=e.getAttributeNode(n))&&i.specified?i.value:e[n]===!0?n.toLowerCase():null}),x.find=at,x.expr=at.selectors,x.expr[":"]=x.expr.pseudos,x.unique=at.uniqueSort,x.text=at.getText,x.isXMLDoc=at.isXML,x.contains=at.contains}(e);var O={};function F(e){var t=O[e]={};return x.each(e.match(T)||[],function(e,n){t[n]=!0}),t}x.Callbacks=function(e){e="string"==typeof e?O[e]||F(e):x.extend({},e);var n,r,i,o,a,s,l=[],u=!e.once&&[],c=function(t){for(r=e.memory&&t,i=!0,a=s||0,s=0,o=l.length,n=!0;l&&o>a;a++)if(l[a].apply(t[0],t[1])===!1&&e.stopOnFalse){r=!1;break}n=!1,l&&(u?u.length&&c(u.shift()):r?l=[]:p.disable())},p={add:function(){if(l){var t=l.length;(function i(t){x.each(t,function(t,n){var r=x.type(n);"function"===r?e.unique&&p.has(n)||l.push(n):n&&n.length&&"string"!==r&&i(n)})})(arguments),n?o=l.length:r&&(s=t,c(r))}return this},remove:function(){return l&&x.each(arguments,function(e,t){var r;while((r=x.inArray(t,l,r))>-1)l.splice(r,1),n&&(o>=r&&o--,a>=r&&a--)}),this},has:function(e){return e?x.inArray(e,l)>-1:!(!l||!l.length)},empty:function(){return l=[],o=0,this},disable:function(){return l=u=r=t,this},disabled:function(){return!l},lock:function(){return u=t,r||p.disable(),this},locked:function(){return!u},fireWith:function(e,t){return!l||i&&!u||(t=t||[],t=[e,t.slice?t.slice():t],n?u.push(t):c(t)),this},fire:function(){return p.fireWith(this,arguments),this},fired:function(){return!!i}};return p},x.extend({Deferred:function(e){var t=[["resolve","done",x.Callbacks("once memory"),"resolved"],["reject","fail",x.Callbacks("once memory"),"rejected"],["notify","progress",x.Callbacks("memory")]],n="pending",r={state:function(){return n},always:function(){return i.done(arguments).fail(arguments),this},then:function(){var e=arguments;return x.Deferred(function(n){x.each(t,function(t,o){var a=o[0],s=x.isFunction(e[t])&&e[t];i[o[1]](function(){var e=s&&s.apply(this,arguments);e&&x.isFunction(e.promise)?e.promise().done(n.resolve).fail(n.reject).progress(n.notify):n[a+"With"](this===r?n.promise():this,s?[e]:arguments)})}),e=null}).promise()},promise:function(e){return null!=e?x.extend(e,r):r}},i={};return r.pipe=r.then,x.each(t,function(e,o){var a=o[2],s=o[3];r[o[1]]=a.add,s&&a.add(function(){n=s},t[1^e][2].disable,t[2][2].lock),i[o[0]]=function(){return i[o[0]+"With"](this===i?r:this,arguments),this},i[o[0]+"With"]=a.fireWith}),r.promise(i),e&&e.call(i,i),i},when:function(e){var t=0,n=g.call(arguments),r=n.length,i=1!==r||e&&x.isFunction(e.promise)?r:0,o=1===i?e:x.Deferred(),a=function(e,t,n){return function(r){t[e]=this,n[e]=arguments.length>1?g.call(arguments):r,n===s?o.notifyWith(t,n):--i||o.resolveWith(t,n)}},s,l,u;if(r>1)for(s=Array(r),l=Array(r),u=Array(r);r>t;t++)n[t]&&x.isFunction(n[t].promise)?n[t].promise().done(a(t,u,n)).fail(o.reject).progress(a(t,l,s)):--i;return i||o.resolveWith(u,n),o.promise()}}),x.support=function(t){var n,r,o,s,l,u,c,p,f,d=a.createElement("div");if(d.setAttribute("className","t"),d.innerHTML=" <link/><table></table><a href='/a'>a</a><input type='checkbox'/>",n=d.getElementsByTagName("*")||[],r=d.getElementsByTagName("a")[0],!r||!r.style||!n.length)return t;s=a.createElement("select"),u=s.appendChild(a.createElement("option")),o=d.getElementsByTagName("input")[0],r.style.cssText="top:1px;float:left;opacity:.5",t.getSetAttribute="t"!==d.className,t.leadingWhitespace=3===d.firstChild.nodeType,t.tbody=!d.getElementsByTagName("tbody").length,t.htmlSerialize=!!d.getElementsByTagName("link").length,t.style=/top/.test(r.getAttribute("style")),t.hrefNormalized="/a"===r.getAttribute("href"),t.opacity=/^0.5/.test(r.style.opacity),t.cssFloat=!!r.style.cssFloat,t.checkOn=!!o.value,t.optSelected=u.selected,t.enctype=!!a.createElement("form").enctype,t.html5Clone="<:nav></:nav>"!==a.createElement("nav").cloneNode(!0).outerHTML,t.inlineBlockNeedsLayout=!1,t.shrinkWrapBlocks=!1,t.pixelPosition=!1,t.deleteExpando=!0,t.noCloneEvent=!0,t.reliableMarginRight=!0,t.boxSizingReliable=!0,o.checked=!0,t.noCloneChecked=o.cloneNode(!0).checked,s.disabled=!0,t.optDisabled=!u.disabled;try{delete d.test}catch(h){t.deleteExpando=!1}o=a.createElement("input"),o.setAttribute("value",""),t.input=""===o.getAttribute("value"),o.value="t",o.setAttribute("type","radio"),t.radioValue="t"===o.value,o.setAttribute("checked","t"),o.setAttribute("name","t"),l=a.createDocumentFragment(),l.appendChild(o),t.appendChecked=o.checked,t.checkClone=l.cloneNode(!0).cloneNode(!0).lastChild.checked,d.attachEvent&&(d.attachEvent("onclick",function(){t.noCloneEvent=!1}),d.cloneNode(!0).click());for(f in{submit:!0,change:!0,focusin:!0})d.setAttribute(c="on"+f,"t"),t[f+"Bubbles"]=c in e||d.attributes[c].expando===!1;d.style.backgroundClip="content-box",d.cloneNode(!0).style.backgroundClip="",t.clearCloneStyle="content-box"===d.style.backgroundClip;for(f in x(t))break;return t.ownLast="0"!==f,x(function(){var n,r,o,s="padding:0;margin:0;border:0;display:block;box-sizing:content-box;-moz-box-sizing:content-box;-webkit-box-sizing:content-box;",l=a.getElementsByTagName("body")[0];l&&(n=a.createElement("div"),n.style.cssText="border:0;width:0;height:0;position:absolute;top:0;left:-9999px;margin-top:1px",l.appendChild(n).appendChild(d),d.innerHTML="<table><tr><td></td><td>t</td></tr></table>",o=d.getElementsByTagName("td"),o[0].style.cssText="padding:0;margin:0;border:0;display:none",p=0===o[0].offsetHeight,o[0].style.display="",o[1].style.display="none",t.reliableHiddenOffsets=p&&0===o[0].offsetHeight,d.innerHTML="",d.style.cssText="box-sizing:border-box;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;padding:1px;border:1px;display:block;width:4px;margin-top:1%;position:absolute;top:1%;",x.swap(l,null!=l.style.zoom?{zoom:1}:{},function(){t.boxSizing=4===d.offsetWidth}),e.getComputedStyle&&(t.pixelPosition="1%"!==(e.getComputedStyle(d,null)||{}).top,t.boxSizingReliable="4px"===(e.getComputedStyle(d,null)||{width:"4px"}).width,r=d.appendChild(a.createElement("div")),r.style.cssText=d.style.cssText=s,r.style.marginRight=r.style.width="0",d.style.width="1px",t.reliableMarginRight=!parseFloat((e.getComputedStyle(r,null)||{}).marginRight)),typeof d.style.zoom!==i&&(d.innerHTML="",d.style.cssText=s+"width:1px;padding:1px;display:inline;zoom:1",t.inlineBlockNeedsLayout=3===d.offsetWidth,d.style.display="block",d.innerHTML="<div></div>",d.firstChild.style.width="5px",t.shrinkWrapBlocks=3!==d.offsetWidth,t.inlineBlockNeedsLayout&&(l.style.zoom=1)),l.removeChild(n),n=d=o=r=null)}),n=s=l=u=r=o=null,t
  27. }({});var B=/(?:\{[\s\S]*\}|\[[\s\S]*\])$/,P=/([A-Z])/g;function R(e,n,r,i){if(x.acceptData(e)){var o,a,s=x.expando,l=e.nodeType,u=l?x.cache:e,c=l?e[s]:e[s]&&s;if(c&&u[c]&&(i||u[c].data)||r!==t||"string"!=typeof n)return c||(c=l?e[s]=p.pop()||x.guid++:s),u[c]||(u[c]=l?{}:{toJSON:x.noop}),("object"==typeof n||"function"==typeof n)&&(i?u[c]=x.extend(u[c],n):u[c].data=x.extend(u[c].data,n)),a=u[c],i||(a.data||(a.data={}),a=a.data),r!==t&&(a[x.camelCase(n)]=r),"string"==typeof n?(o=a[n],null==o&&(o=a[x.camelCase(n)])):o=a,o}}function W(e,t,n){if(x.acceptData(e)){var r,i,o=e.nodeType,a=o?x.cache:e,s=o?e[x.expando]:x.expando;if(a[s]){if(t&&(r=n?a[s]:a[s].data)){x.isArray(t)?t=t.concat(x.map(t,x.camelCase)):t in r?t=[t]:(t=x.camelCase(t),t=t in r?[t]:t.split(" ")),i=t.length;while(i--)delete r[t[i]];if(n?!I(r):!x.isEmptyObject(r))return}(n||(delete a[s].data,I(a[s])))&&(o?x.cleanData([e],!0):x.support.deleteExpando||a!=a.window?delete a[s]:a[s]=null)}}}x.extend({cache:{},noData:{applet:!0,embed:!0,object:"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"},hasData:function(e){return e=e.nodeType?x.cache[e[x.expando]]:e[x.expando],!!e&&!I(e)},data:function(e,t,n){return R(e,t,n)},removeData:function(e,t){return W(e,t)},_data:function(e,t,n){return R(e,t,n,!0)},_removeData:function(e,t){return W(e,t,!0)},acceptData:function(e){if(e.nodeType&&1!==e.nodeType&&9!==e.nodeType)return!1;var t=e.nodeName&&x.noData[e.nodeName.toLowerCase()];return!t||t!==!0&&e.getAttribute("classid")===t}}),x.fn.extend({data:function(e,n){var r,i,o=null,a=0,s=this[0];if(e===t){if(this.length&&(o=x.data(s),1===s.nodeType&&!x._data(s,"parsedAttrs"))){for(r=s.attributes;r.length>a;a++)i=r[a].name,0===i.indexOf("data-")&&(i=x.camelCase(i.slice(5)),$(s,i,o[i]));x._data(s,"parsedAttrs",!0)}return o}return"object"==typeof e?this.each(function(){x.data(this,e)}):arguments.length>1?this.each(function(){x.data(this,e,n)}):s?$(s,e,x.data(s,e)):null},removeData:function(e){return this.each(function(){x.removeData(this,e)})}});function $(e,n,r){if(r===t&&1===e.nodeType){var i="data-"+n.replace(P,"-$1").toLowerCase();if(r=e.getAttribute(i),"string"==typeof r){try{r="true"===r?!0:"false"===r?!1:"null"===r?null:+r+""===r?+r:B.test(r)?x.parseJSON(r):r}catch(o){}x.data(e,n,r)}else r=t}return r}function I(e){var t;for(t in e)if(("data"!==t||!x.isEmptyObject(e[t]))&&"toJSON"!==t)return!1;return!0}x.extend({queue:function(e,n,r){var i;return e?(n=(n||"fx")+"queue",i=x._data(e,n),r&&(!i||x.isArray(r)?i=x._data(e,n,x.makeArray(r)):i.push(r)),i||[]):t},dequeue:function(e,t){t=t||"fx";var n=x.queue(e,t),r=n.length,i=n.shift(),o=x._queueHooks(e,t),a=function(){x.dequeue(e,t)};"inprogress"===i&&(i=n.shift(),r--),i&&("fx"===t&&n.unshift("inprogress"),delete o.stop,i.call(e,a,o)),!r&&o&&o.empty.fire()},_queueHooks:function(e,t){var n=t+"queueHooks";return x._data(e,n)||x._data(e,n,{empty:x.Callbacks("once memory").add(function(){x._removeData(e,t+"queue"),x._removeData(e,n)})})}}),x.fn.extend({queue:function(e,n){var r=2;return"string"!=typeof e&&(n=e,e="fx",r--),r>arguments.length?x.queue(this[0],e):n===t?this:this.each(function(){var t=x.queue(this,e,n);x._queueHooks(this,e),"fx"===e&&"inprogress"!==t[0]&&x.dequeue(this,e)})},dequeue:function(e){return this.each(function(){x.dequeue(this,e)})},delay:function(e,t){return e=x.fx?x.fx.speeds[e]||e:e,t=t||"fx",this.queue(t,function(t,n){var r=setTimeout(t,e);n.stop=function(){clearTimeout(r)}})},clearQueue:function(e){return this.queue(e||"fx",[])},promise:function(e,n){var r,i=1,o=x.Deferred(),a=this,s=this.length,l=function(){--i||o.resolveWith(a,[a])};"string"!=typeof e&&(n=e,e=t),e=e||"fx";while(s--)r=x._data(a[s],e+"queueHooks"),r&&r.empty&&(i++,r.empty.add(l));return l(),o.promise(n)}});var z,X,U=/[\t\r\n\f]/g,V=/\r/g,Y=/^(?:input|select|textarea|button|object)$/i,J=/^(?:a|area)$/i,G=/^(?:checked|selected)$/i,Q=x.support.getSetAttribute,K=x.support.input;x.fn.extend({attr:function(e,t){return x.access(this,x.attr,e,t,arguments.length>1)},removeAttr:function(e){return this.each(function(){x.removeAttr(this,e)})},prop:function(e,t){return x.access(this,x.prop,e,t,arguments.length>1)},removeProp:function(e){return e=x.propFix[e]||e,this.each(function(){try{this[e]=t,delete this[e]}catch(n){}})},addClass:function(e){var t,n,r,i,o,a=0,s=this.length,l="string"==typeof e&&e;if(x.isFunction(e))return this.each(function(t){x(this).addClass(e.call(this,t,this.className))});if(l)for(t=(e||"").match(T)||[];s>a;a++)if(n=this[a],r=1===n.nodeType&&(n.className?(" "+n.className+" ").replace(U," "):" ")){o=0;while(i=t[o++])0>r.indexOf(" "+i+" ")&&(r+=i+" ");n.className=x.trim(r)}return this},removeClass:function(e){var t,n,r,i,o,a=0,s=this.length,l=0===arguments.length||"string"==typeof e&&e;if(x.isFunction(e))return this.each(function(t){x(this).removeClass(e.call(this,t,this.className))});if(l)for(t=(e||"").match(T)||[];s>a;a++)if(n=this[a],r=1===n.nodeType&&(n.className?(" "+n.className+" ").replace(U," "):"")){o=0;while(i=t[o++])while(r.indexOf(" "+i+" ")>=0)r=r.replace(" "+i+" "," ");n.className=e?x.trim(r):""}return this},toggleClass:function(e,t){var n=typeof e;return"boolean"==typeof t&&"string"===n?t?this.addClass(e):this.removeClass(e):x.isFunction(e)?this.each(function(n){x(this).toggleClass(e.call(this,n,this.className,t),t)}):this.each(function(){if("string"===n){var t,r=0,o=x(this),a=e.match(T)||[];while(t=a[r++])o.hasClass(t)?o.removeClass(t):o.addClass(t)}else(n===i||"boolean"===n)&&(this.className&&x._data(this,"__className__",this.className),this.className=this.className||e===!1?"":x._data(this,"__className__")||"")})},hasClass:function(e){var t=" "+e+" ",n=0,r=this.length;for(;r>n;n++)if(1===this[n].nodeType&&(" "+this[n].className+" ").replace(U," ").indexOf(t)>=0)return!0;return!1},val:function(e){var n,r,i,o=this[0];{if(arguments.length)return i=x.isFunction(e),this.each(function(n){var o;1===this.nodeType&&(o=i?e.call(this,n,x(this).val()):e,null==o?o="":"number"==typeof o?o+="":x.isArray(o)&&(o=x.map(o,function(e){return null==e?"":e+""})),r=x.valHooks[this.type]||x.valHooks[this.nodeName.toLowerCase()],r&&"set"in r&&r.set(this,o,"value")!==t||(this.value=o))});if(o)return r=x.valHooks[o.type]||x.valHooks[o.nodeName.toLowerCase()],r&&"get"in r&&(n=r.get(o,"value"))!==t?n:(n=o.value,"string"==typeof n?n.replace(V,""):null==n?"":n)}}}),x.extend({valHooks:{option:{get:function(e){var t=x.find.attr(e,"value");return null!=t?t:e.text}},select:{get:function(e){var t,n,r=e.options,i=e.selectedIndex,o="select-one"===e.type||0>i,a=o?null:[],s=o?i+1:r.length,l=0>i?s:o?i:0;for(;s>l;l++)if(n=r[l],!(!n.selected&&l!==i||(x.support.optDisabled?n.disabled:null!==n.getAttribute("disabled"))||n.parentNode.disabled&&x.nodeName(n.parentNode,"optgroup"))){if(t=x(n).val(),o)return t;a.push(t)}return a},set:function(e,t){var n,r,i=e.options,o=x.makeArray(t),a=i.length;while(a--)r=i[a],(r.selected=x.inArray(x(r).val(),o)>=0)&&(n=!0);return n||(e.selectedIndex=-1),o}}},attr:function(e,n,r){var o,a,s=e.nodeType;if(e&&3!==s&&8!==s&&2!==s)return typeof e.getAttribute===i?x.prop(e,n,r):(1===s&&x.isXMLDoc(e)||(n=n.toLowerCase(),o=x.attrHooks[n]||(x.expr.match.bool.test(n)?X:z)),r===t?o&&"get"in o&&null!==(a=o.get(e,n))?a:(a=x.find.attr(e,n),null==a?t:a):null!==r?o&&"set"in o&&(a=o.set(e,r,n))!==t?a:(e.setAttribute(n,r+""),r):(x.removeAttr(e,n),t))},removeAttr:function(e,t){var n,r,i=0,o=t&&t.match(T);if(o&&1===e.nodeType)while(n=o[i++])r=x.propFix[n]||n,x.expr.match.bool.test(n)?K&&Q||!G.test(n)?e[r]=!1:e[x.camelCase("default-"+n)]=e[r]=!1:x.attr(e,n,""),e.removeAttribute(Q?n:r)},attrHooks:{type:{set:function(e,t){if(!x.support.radioValue&&"radio"===t&&x.nodeName(e,"input")){var n=e.value;return e.setAttribute("type",t),n&&(e.value=n),t}}}},propFix:{"for":"htmlFor","class":"className"},prop:function(e,n,r){var i,o,a,s=e.nodeType;if(e&&3!==s&&8!==s&&2!==s)return a=1!==s||!x.isXMLDoc(e),a&&(n=x.propFix[n]||n,o=x.propHooks[n]),r!==t?o&&"set"in o&&(i=o.set(e,r,n))!==t?i:e[n]=r:o&&"get"in o&&null!==(i=o.get(e,n))?i:e[n]},propHooks:{tabIndex:{get:function(e){var t=x.find.attr(e,"tabindex");return t?parseInt(t,10):Y.test(e.nodeName)||J.test(e.nodeName)&&e.href?0:-1}}}}),X={set:function(e,t,n){return t===!1?x.removeAttr(e,n):K&&Q||!G.test(n)?e.setAttribute(!Q&&x.propFix[n]||n,n):e[x.camelCase("default-"+n)]=e[n]=!0,n}},x.each(x.expr.match.bool.source.match(/\w+/g),function(e,n){var r=x.expr.attrHandle[n]||x.find.attr;x.expr.attrHandle[n]=K&&Q||!G.test(n)?function(e,n,i){var o=x.expr.attrHandle[n],a=i?t:(x.expr.attrHandle[n]=t)!=r(e,n,i)?n.toLowerCase():null;return x.expr.attrHandle[n]=o,a}:function(e,n,r){return r?t:e[x.camelCase("default-"+n)]?n.toLowerCase():null}}),K&&Q||(x.attrHooks.value={set:function(e,n,r){return x.nodeName(e,"input")?(e.defaultValue=n,t):z&&z.set(e,n,r)}}),Q||(z={set:function(e,n,r){var i=e.getAttributeNode(r);return i||e.setAttributeNode(i=e.ownerDocument.createAttribute(r)),i.value=n+="","value"===r||n===e.getAttribute(r)?n:t}},x.expr.attrHandle.id=x.expr.attrHandle.name=x.expr.attrHandle.coords=function(e,n,r){var i;return r?t:(i=e.getAttributeNode(n))&&""!==i.value?i.value:null},x.valHooks.button={get:function(e,n){var r=e.getAttributeNode(n);return r&&r.specified?r.value:t},set:z.set},x.attrHooks.contenteditable={set:function(e,t,n){z.set(e,""===t?!1:t,n)}},x.each(["width","height"],function(e,n){x.attrHooks[n]={set:function(e,r){return""===r?(e.setAttribute(n,"auto"),r):t}}})),x.support.hrefNormalized||x.each(["href","src"],function(e,t){x.propHooks[t]={get:function(e){return e.getAttribute(t,4)}}}),x.support.style||(x.attrHooks.style={get:function(e){return e.style.cssText||t},set:function(e,t){return e.style.cssText=t+""}}),x.support.optSelected||(x.propHooks.selected={get:function(e){var t=e.parentNode;return t&&(t.selectedIndex,t.parentNode&&t.parentNode.selectedIndex),null}}),x.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],function(){x.propFix[this.toLowerCase()]=this}),x.support.enctype||(x.propFix.enctype="encoding"),x.each(["radio","checkbox"],function(){x.valHooks[this]={set:function(e,n){return x.isArray(n)?e.checked=x.inArray(x(e).val(),n)>=0:t}},x.support.checkOn||(x.valHooks[this].get=function(e){return null===e.getAttribute("value")?"on":e.value})});var Z=/^(?:input|select|textarea)$/i,et=/^key/,tt=/^(?:mouse|contextmenu)|click/,nt=/^(?:focusinfocus|focusoutblur)$/,rt=/^([^.]*)(?:\.(.+)|)$/;function it(){return!0}function ot(){return!1}function at(){try{return a.activeElement}catch(e){}}x.event={global:{},add:function(e,n,r,o,a){var s,l,u,c,p,f,d,h,g,m,y,v=x._data(e);if(v){r.handler&&(c=r,r=c.handler,a=c.selector),r.guid||(r.guid=x.guid++),(l=v.events)||(l=v.events={}),(f=v.handle)||(f=v.handle=function(e){return typeof x===i||e&&x.event.triggered===e.type?t:x.event.dispatch.apply(f.elem,arguments)},f.elem=e),n=(n||"").match(T)||[""],u=n.length;while(u--)s=rt.exec(n[u])||[],g=y=s[1],m=(s[2]||"").split(".").sort(),g&&(p=x.event.special[g]||{},g=(a?p.delegateType:p.bindType)||g,p=x.event.special[g]||{},d=x.extend({type:g,origType:y,data:o,handler:r,guid:r.guid,selector:a,needsContext:a&&x.expr.match.needsContext.test(a),namespace:m.join(".")},c),(h=l[g])||(h=l[g]=[],h.delegateCount=0,p.setup&&p.setup.call(e,o,m,f)!==!1||(e.addEventListener?e.addEventListener(g,f,!1):e.attachEvent&&e.attachEvent("on"+g,f))),p.add&&(p.add.call(e,d),d.handler.guid||(d.handler.guid=r.guid)),a?h.splice(h.delegateCount++,0,d):h.push(d),x.event.global[g]=!0);e=null}},remove:function(e,t,n,r,i){var o,a,s,l,u,c,p,f,d,h,g,m=x.hasData(e)&&x._data(e);if(m&&(c=m.events)){t=(t||"").match(T)||[""],u=t.length;while(u--)if(s=rt.exec(t[u])||[],d=g=s[1],h=(s[2]||"").split(".").sort(),d){p=x.event.special[d]||{},d=(r?p.delegateType:p.bindType)||d,f=c[d]||[],s=s[2]&&RegExp("(^|\\.)"+h.join("\\.(?:.*\\.|)")+"(\\.|$)"),l=o=f.length;while(o--)a=f[o],!i&&g!==a.origType||n&&n.guid!==a.guid||s&&!s.test(a.namespace)||r&&r!==a.selector&&("**"!==r||!a.selector)||(f.splice(o,1),a.selector&&f.delegateCount--,p.remove&&p.remove.call(e,a));l&&!f.length&&(p.teardown&&p.teardown.call(e,h,m.handle)!==!1||x.removeEvent(e,d,m.handle),delete c[d])}else for(d in c)x.event.remove(e,d+t[u],n,r,!0);x.isEmptyObject(c)&&(delete m.handle,x._removeData(e,"events"))}},trigger:function(n,r,i,o){var s,l,u,c,p,f,d,h=[i||a],g=v.call(n,"type")?n.type:n,m=v.call(n,"namespace")?n.namespace.split("."):[];if(u=f=i=i||a,3!==i.nodeType&&8!==i.nodeType&&!nt.test(g+x.event.triggered)&&(g.indexOf(".")>=0&&(m=g.split("."),g=m.shift(),m.sort()),l=0>g.indexOf(":")&&"on"+g,n=n[x.expando]?n:new x.Event(g,"object"==typeof n&&n),n.isTrigger=o?2:3,n.namespace=m.join("."),n.namespace_re=n.namespace?RegExp("(^|\\.)"+m.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,n.result=t,n.target||(n.target=i),r=null==r?[n]:x.makeArray(r,[n]),p=x.event.special[g]||{},o||!p.trigger||p.trigger.apply(i,r)!==!1)){if(!o&&!p.noBubble&&!x.isWindow(i)){for(c=p.delegateType||g,nt.test(c+g)||(u=u.parentNode);u;u=u.parentNode)h.push(u),f=u;f===(i.ownerDocument||a)&&h.push(f.defaultView||f.parentWindow||e)}d=0;while((u=h[d++])&&!n.isPropagationStopped())n.type=d>1?c:p.bindType||g,s=(x._data(u,"events")||{})[n.type]&&x._data(u,"handle"),s&&s.apply(u,r),s=l&&u[l],s&&x.acceptData(u)&&s.apply&&s.apply(u,r)===!1&&n.preventDefault();if(n.type=g,!o&&!n.isDefaultPrevented()&&(!p._default||p._default.apply(h.pop(),r)===!1)&&x.acceptData(i)&&l&&i[g]&&!x.isWindow(i)){f=i[l],f&&(i[l]=null),x.event.triggered=g;try{i[g]()}catch(y){}x.event.triggered=t,f&&(i[l]=f)}return n.result}},dispatch:function(e){e=x.event.fix(e);var n,r,i,o,a,s=[],l=g.call(arguments),u=(x._data(this,"events")||{})[e.type]||[],c=x.event.special[e.type]||{};if(l[0]=e,e.delegateTarget=this,!c.preDispatch||c.preDispatch.call(this,e)!==!1){s=x.event.handlers.call(this,e,u),n=0;while((o=s[n++])&&!e.isPropagationStopped()){e.currentTarget=o.elem,a=0;while((i=o.handlers[a++])&&!e.isImmediatePropagationStopped())(!e.namespace_re||e.namespace_re.test(i.namespace))&&(e.handleObj=i,e.data=i.data,r=((x.event.special[i.origType]||{}).handle||i.handler).apply(o.elem,l),r!==t&&(e.result=r)===!1&&(e.preventDefault(),e.stopPropagation()))}return c.postDispatch&&c.postDispatch.call(this,e),e.result}},handlers:function(e,n){var r,i,o,a,s=[],l=n.delegateCount,u=e.target;if(l&&u.nodeType&&(!e.button||"click"!==e.type))for(;u!=this;u=u.parentNode||this)if(1===u.nodeType&&(u.disabled!==!0||"click"!==e.type)){for(o=[],a=0;l>a;a++)i=n[a],r=i.selector+" ",o[r]===t&&(o[r]=i.needsContext?x(r,this).index(u)>=0:x.find(r,this,null,[u]).length),o[r]&&o.push(i);o.length&&s.push({elem:u,handlers:o})}return n.length>l&&s.push({elem:this,handlers:n.slice(l)}),s},fix:function(e){if(e[x.expando])return e;var t,n,r,i=e.type,o=e,s=this.fixHooks[i];s||(this.fixHooks[i]=s=tt.test(i)?this.mouseHooks:et.test(i)?this.keyHooks:{}),r=s.props?this.props.concat(s.props):this.props,e=new x.Event(o),t=r.length;while(t--)n=r[t],e[n]=o[n];return e.target||(e.target=o.srcElement||a),3===e.target.nodeType&&(e.target=e.target.parentNode),e.metaKey=!!e.metaKey,s.filter?s.filter(e,o):e},props:"altKey bubbles cancelable ctrlKey currentTarget eventPhase metaKey relatedTarget shiftKey target timeStamp view which".split(" "),fixHooks:{},keyHooks:{props:"char charCode key keyCode".split(" "),filter:function(e,t){return null==e.which&&(e.which=null!=t.charCode?t.charCode:t.keyCode),e}},mouseHooks:{props:"button buttons clientX clientY fromElement offsetX offsetY pageX pageY screenX screenY toElement".split(" "),filter:function(e,n){var r,i,o,s=n.button,l=n.fromElement;return null==e.pageX&&null!=n.clientX&&(i=e.target.ownerDocument||a,o=i.documentElement,r=i.body,e.pageX=n.clientX+(o&&o.scrollLeft||r&&r.scrollLeft||0)-(o&&o.clientLeft||r&&r.clientLeft||0),e.pageY=n.clientY+(o&&o.scrollTop||r&&r.scrollTop||0)-(o&&o.clientTop||r&&r.clientTop||0)),!e.relatedTarget&&l&&(e.relatedTarget=l===e.target?n.toElement:l),e.which||s===t||(e.which=1&s?1:2&s?3:4&s?2:0),e}},special:{load:{noBubble:!0},focus:{trigger:function(){if(this!==at()&&this.focus)try{return this.focus(),!1}catch(e){}},delegateType:"focusin"},blur:{trigger:function(){return this===at()&&this.blur?(this.blur(),!1):t},delegateType:"focusout"},click:{trigger:function(){return x.nodeName(this,"input")&&"checkbox"===this.type&&this.click?(this.click(),!1):t},_default:function(e){return x.nodeName(e.target,"a")}},beforeunload:{postDispatch:function(e){e.result!==t&&(e.originalEvent.returnValue=e.result)}}},simulate:function(e,t,n,r){var i=x.extend(new x.Event,n,{type:e,isSimulated:!0,originalEvent:{}});r?x.event.trigger(i,null,t):x.event.dispatch.call(t,i),i.isDefaultPrevented()&&n.preventDefault()}},x.removeEvent=a.removeEventListener?function(e,t,n){e.removeEventListener&&e.removeEventListener(t,n,!1)}:function(e,t,n){var r="on"+t;e.detachEvent&&(typeof e[r]===i&&(e[r]=null),e.detachEvent(r,n))},x.Event=function(e,n){return this instanceof x.Event?(e&&e.type?(this.originalEvent=e,this.type=e.type,this.isDefaultPrevented=e.defaultPrevented||e.returnValue===!1||e.getPreventDefault&&e.getPreventDefault()?it:ot):this.type=e,n&&x.extend(this,n),this.timeStamp=e&&e.timeStamp||x.now(),this[x.expando]=!0,t):new x.Event(e,n)},x.Event.prototype={isDefaultPrevented:ot,isPropagationStopped:ot,isImmediatePropagationStopped:ot,preventDefault:function(){var e=this.originalEvent;this.isDefaultPrevented=it,e&&(e.preventDefault?e.preventDefault():e.returnValue=!1)},stopPropagation:function(){var e=this.originalEvent;this.isPropagationStopped=it,e&&(e.stopPropagation&&e.stopPropagation(),e.cancelBubble=!0)},stopImmediatePropagation:function(){this.isImmediatePropagationStopped=it,this.stopPropagation()}},x.each({mouseenter:"mouseover",mouseleave:"mouseout"},function(e,t){x.event.special[e]={delegateType:t,bindType:t,handle:function(e){var n,r=this,i=e.relatedTarget,o=e.handleObj;return(!i||i!==r&&!x.contains(r,i))&&(e.type=o.origType,n=o.handler.apply(this,arguments),e.type=t),n}}}),x.support.submitBubbles||(x.event.special.submit={setup:function(){return x.nodeName(this,"form")?!1:(x.event.add(this,"click._submit keypress._submit",function(e){var n=e.target,r=x.nodeName(n,"input")||x.nodeName(n,"button")?n.form:t;r&&!x._data(r,"submitBubbles")&&(x.event.add(r,"submit._submit",function(e){e._submit_bubble=!0}),x._data(r,"submitBubbles",!0))}),t)},postDispatch:function(e){e._submit_bubble&&(delete e._submit_bubble,this.parentNode&&!e.isTrigger&&x.event.simulate("submit",this.parentNode,e,!0))},teardown:function(){return x.nodeName(this,"form")?!1:(x.event.remove(this,"._submit"),t)}}),x.support.changeBubbles||(x.event.special.change={setup:function(){return Z.test(this.nodeName)?(("checkbox"===this.type||"radio"===this.type)&&(x.event.add(this,"propertychange._change",function(e){"checked"===e.originalEvent.propertyName&&(this._just_changed=!0)}),x.event.add(this,"click._change",function(e){this._just_changed&&!e.isTrigger&&(this._just_changed=!1),x.event.simulate("change",this,e,!0)})),!1):(x.event.add(this,"beforeactivate._change",function(e){var t=e.target;Z.test(t.nodeName)&&!x._data(t,"changeBubbles")&&(x.event.add(t,"change._change",function(e){!this.parentNode||e.isSimulated||e.isTrigger||x.event.simulate("change",this.parentNode,e,!0)}),x._data(t,"changeBubbles",!0))}),t)},handle:function(e){var n=e.target;return this!==n||e.isSimulated||e.isTrigger||"radio"!==n.type&&"checkbox"!==n.type?e.handleObj.handler.apply(this,arguments):t},teardown:function(){return x.event.remove(this,"._change"),!Z.test(this.nodeName)}}),x.support.focusinBubbles||x.each({focus:"focusin",blur:"focusout"},function(e,t){var n=0,r=function(e){x.event.simulate(t,e.target,x.event.fix(e),!0)};x.event.special[t]={setup:function(){0===n++&&a.addEventListener(e,r,!0)},teardown:function(){0===--n&&a.removeEventListener(e,r,!0)}}}),x.fn.extend({on:function(e,n,r,i,o){var a,s;if("object"==typeof e){"string"!=typeof n&&(r=r||n,n=t);for(a in e)this.on(a,n,r,e[a],o);return this}if(null==r&&null==i?(i=n,r=n=t):null==i&&("string"==typeof n?(i=r,r=t):(i=r,r=n,n=t)),i===!1)i=ot;else if(!i)return this;return 1===o&&(s=i,i=function(e){return x().off(e),s.apply(this,arguments)},i.guid=s.guid||(s.guid=x.guid++)),this.each(function(){x.event.add(this,e,i,r,n)})},one:function(e,t,n,r){return this.on(e,t,n,r,1)},off:function(e,n,r){var i,o;if(e&&e.preventDefault&&e.handleObj)return i=e.handleObj,x(e.delegateTarget).off(i.namespace?i.origType+"."+i.namespace:i.origType,i.selector,i.handler),this;if("object"==typeof e){for(o in e)this.off(o,n,e[o]);return this}return(n===!1||"function"==typeof n)&&(r=n,n=t),r===!1&&(r=ot),this.each(function(){x.event.remove(this,e,r,n)})},trigger:function(e,t){return this.each(function(){x.event.trigger(e,t,this)})},triggerHandler:function(e,n){var r=this[0];return r?x.event.trigger(e,n,r,!0):t}});var st=/^.[^:#\[\.,]*$/,lt=/^(?:parents|prev(?:Until|All))/,ut=x.expr.match.needsContext,ct={children:!0,contents:!0,next:!0,prev:!0};x.fn.extend({find:function(e){var t,n=[],r=this,i=r.length;if("string"!=typeof e)return this.pushStack(x(e).filter(function(){for(t=0;i>t;t++)if(x.contains(r[t],this))return!0}));for(t=0;i>t;t++)x.find(e,r[t],n);return n=this.pushStack(i>1?x.unique(n):n),n.selector=this.selector?this.selector+" "+e:e,n},has:function(e){var t,n=x(e,this),r=n.length;return this.filter(function(){for(t=0;r>t;t++)if(x.contains(this,n[t]))return!0})},not:function(e){return this.pushStack(ft(this,e||[],!0))},filter:function(e){return this.pushStack(ft(this,e||[],!1))},is:function(e){return!!ft(this,"string"==typeof e&&ut.test(e)?x(e):e||[],!1).length},closest:function(e,t){var n,r=0,i=this.length,o=[],a=ut.test(e)||"string"!=typeof e?x(e,t||this.context):0;for(;i>r;r++)for(n=this[r];n&&n!==t;n=n.parentNode)if(11>n.nodeType&&(a?a.index(n)>-1:1===n.nodeType&&x.find.matchesSelector(n,e))){n=o.push(n);break}return this.pushStack(o.length>1?x.unique(o):o)},index:function(e){return e?"string"==typeof e?x.inArray(this[0],x(e)):x.inArray(e.jquery?e[0]:e,this):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(e,t){var n="string"==typeof e?x(e,t):x.makeArray(e&&e.nodeType?[e]:e),r=x.merge(this.get(),n);return this.pushStack(x.unique(r))},addBack:function(e){return this.add(null==e?this.prevObject:this.prevObject.filter(e))}});function pt(e,t){do e=e[t];while(e&&1!==e.nodeType);return e}x.each({parent:function(e){var t=e.parentNode;return t&&11!==t.nodeType?t:null},parents:function(e){return x.dir(e,"parentNode")},parentsUntil:function(e,t,n){return x.dir(e,"parentNode",n)},next:function(e){return pt(e,"nextSibling")},prev:function(e){return pt(e,"previousSibling")},nextAll:function(e){return x.dir(e,"nextSibling")},prevAll:function(e){return x.dir(e,"previousSibling")},nextUntil:function(e,t,n){return x.dir(e,"nextSibling",n)},prevUntil:function(e,t,n){return x.dir(e,"previousSibling",n)},siblings:function(e){return x.sibling((e.parentNode||{}).firstChild,e)},children:function(e){return x.sibling(e.firstChild)},contents:function(e){return x.nodeName(e,"iframe")?e.contentDocument||e.contentWindow.document:x.merge([],e.childNodes)}},function(e,t){x.fn[e]=function(n,r){var i=x.map(this,t,n);return"Until"!==e.slice(-5)&&(r=n),r&&"string"==typeof r&&(i=x.filter(r,i)),this.length>1&&(ct[e]||(i=x.unique(i)),lt.test(e)&&(i=i.reverse())),this.pushStack(i)}}),x.extend({filter:function(e,t,n){var r=t[0];return n&&(e=":not("+e+")"),1===t.length&&1===r.nodeType?x.find.matchesSelector(r,e)?[r]:[]:x.find.matches(e,x.grep(t,function(e){return 1===e.nodeType}))},dir:function(e,n,r){var i=[],o=e[n];while(o&&9!==o.nodeType&&(r===t||1!==o.nodeType||!x(o).is(r)))1===o.nodeType&&i.push(o),o=o[n];return i},sibling:function(e,t){var n=[];for(;e;e=e.nextSibling)1===e.nodeType&&e!==t&&n.push(e);return n}});function ft(e,t,n){if(x.isFunction(t))return x.grep(e,function(e,r){return!!t.call(e,r,e)!==n});if(t.nodeType)return x.grep(e,function(e){return e===t!==n});if("string"==typeof t){if(st.test(t))return x.filter(t,e,n);t=x.filter(t,e)}return x.grep(e,function(e){return x.inArray(e,t)>=0!==n})}function dt(e){var t=ht.split("|"),n=e.createDocumentFragment();if(n.createElement)while(t.length)n.createElement(t.pop());return n}var ht="abbr|article|aside|audio|bdi|canvas|data|datalist|details|figcaption|figure|footer|header|hgroup|mark|meter|nav|output|progress|section|summary|time|video",gt=/ jQuery\d+="(?:null|\d+)"/g,mt=RegExp("<(?:"+ht+")[\\s/>]","i"),yt=/^\s+/,vt=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi,bt=/<([\w:]+)/,xt=/<tbody/i,wt=/<|&#?\w+;/,Tt=/<(?:script|style|link)/i,Ct=/^(?:checkbox|radio)$/i,Nt=/checked\s*(?:[^=]|=\s*.checked.)/i,kt=/^$|\/(?:java|ecma)script/i,Et=/^true\/(.*)/,St=/^\s*<!(?:\[CDATA\[|--)|(?:\]\]|--)>\s*$/g,At={option:[1,"<select multiple='multiple'>","</select>"],legend:[1,"<fieldset>","</fieldset>"],area:[1,"<map>","</map>"],param:[1,"<object>","</object>"],thead:[1,"<table>","</table>"],tr:[2,"<table><tbody>","</tbody></table>"],col:[2,"<table><tbody></tbody><colgroup>","</colgroup></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],_default:x.support.htmlSerialize?[0,"",""]:[1,"X<div>","</div>"]},jt=dt(a),Dt=jt.appendChild(a.createElement("div"));At.optgroup=At.option,At.tbody=At.tfoot=At.colgroup=At.caption=At.thead,At.th=At.td,x.fn.extend({text:function(e){return x.access(this,function(e){return e===t?x.text(this):this.empty().append((this[0]&&this[0].ownerDocument||a).createTextNode(e))},null,e,arguments.length)},append:function(){return this.domManip(arguments,function(e){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var t=Lt(this,e);t.appendChild(e)}})},prepend:function(){return this.domManip(arguments,function(e){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var t=Lt(this,e);t.insertBefore(e,t.firstChild)}})},before:function(){return this.domManip(arguments,function(e){this.parentNode&&this.parentNode.insertBefore(e,this)})},after:function(){return this.domManip(arguments,function(e){this.parentNode&&this.parentNode.insertBefore(e,this.nextSibling)})},remove:function(e,t){var n,r=e?x.filter(e,this):this,i=0;for(;null!=(n=r[i]);i++)t||1!==n.nodeType||x.cleanData(Ft(n)),n.parentNode&&(t&&x.contains(n.ownerDocument,n)&&_t(Ft(n,"script")),n.parentNode.removeChild(n));return this},empty:function(){var e,t=0;for(;null!=(e=this[t]);t++){1===e.nodeType&&x.cleanData(Ft(e,!1));while(e.firstChild)e.removeChild(e.firstChild);e.options&&x.nodeName(e,"select")&&(e.options.length=0)}return this},clone:function(e,t){return e=null==e?!1:e,t=null==t?e:t,this.map(function(){return x.clone(this,e,t)})},html:function(e){return x.access(this,function(e){var n=this[0]||{},r=0,i=this.length;if(e===t)return 1===n.nodeType?n.innerHTML.replace(gt,""):t;if(!("string"!=typeof e||Tt.test(e)||!x.support.htmlSerialize&&mt.test(e)||!x.support.leadingWhitespace&&yt.test(e)||At[(bt.exec(e)||["",""])[1].toLowerCase()])){e=e.replace(vt,"<$1></$2>");try{for(;i>r;r++)n=this[r]||{},1===n.nodeType&&(x.cleanData(Ft(n,!1)),n.innerHTML=e);n=0}catch(o){}}n&&this.empty().append(e)},null,e,arguments.length)},replaceWith:function(){var e=x.map(this,function(e){return[e.nextSibling,e.parentNode]}),t=0;return this.domManip(arguments,function(n){var r=e[t++],i=e[t++];i&&(r&&r.parentNode!==i&&(r=this.nextSibling),x(this).remove(),i.insertBefore(n,r))},!0),t?this:this.remove()},detach:function(e){return this.remove(e,!0)},domManip:function(e,t,n){e=d.apply([],e);var r,i,o,a,s,l,u=0,c=this.length,p=this,f=c-1,h=e[0],g=x.isFunction(h);if(g||!(1>=c||"string"!=typeof h||x.support.checkClone)&&Nt.test(h))return this.each(function(r){var i=p.eq(r);g&&(e[0]=h.call(this,r,i.html())),i.domManip(e,t,n)});if(c&&(l=x.buildFragment(e,this[0].ownerDocument,!1,!n&&this),r=l.firstChild,1===l.childNodes.length&&(l=r),r)){for(a=x.map(Ft(l,"script"),Ht),o=a.length;c>u;u++)i=l,u!==f&&(i=x.clone(i,!0,!0),o&&x.merge(a,Ft(i,"script"))),t.call(this[u],i,u);if(o)for(s=a[a.length-1].ownerDocument,x.map(a,qt),u=0;o>u;u++)i=a[u],kt.test(i.type||"")&&!x._data(i,"globalEval")&&x.contains(s,i)&&(i.src?x._evalUrl(i.src):x.globalEval((i.text||i.textContent||i.innerHTML||"").replace(St,"")));l=r=null}return this}});function Lt(e,t){return x.nodeName(e,"table")&&x.nodeName(1===t.nodeType?t:t.firstChild,"tr")?e.getElementsByTagName("tbody")[0]||e.appendChild(e.ownerDocument.createElement("tbody")):e}function Ht(e){return e.type=(null!==x.find.attr(e,"type"))+"/"+e.type,e}function qt(e){var t=Et.exec(e.type);return t?e.type=t[1]:e.removeAttribute("type"),e}function _t(e,t){var n,r=0;for(;null!=(n=e[r]);r++)x._data(n,"globalEval",!t||x._data(t[r],"globalEval"))}function Mt(e,t){if(1===t.nodeType&&x.hasData(e)){var n,r,i,o=x._data(e),a=x._data(t,o),s=o.events;if(s){delete a.handle,a.events={};for(n in s)for(r=0,i=s[n].length;i>r;r++)x.event.add(t,n,s[n][r])}a.data&&(a.data=x.extend({},a.data))}}function Ot(e,t){var n,r,i;if(1===t.nodeType){if(n=t.nodeName.toLowerCase(),!x.support.noCloneEvent&&t[x.expando]){i=x._data(t);for(r in i.events)x.removeEvent(t,r,i.handle);t.removeAttribute(x.expando)}"script"===n&&t.text!==e.text?(Ht(t).text=e.text,qt(t)):"object"===n?(t.parentNode&&(t.outerHTML=e.outerHTML),x.support.html5Clone&&e.innerHTML&&!x.trim(t.innerHTML)&&(t.innerHTML=e.innerHTML)):"input"===n&&Ct.test(e.type)?(t.defaultChecked=t.checked=e.checked,t.value!==e.value&&(t.value=e.value)):"option"===n?t.defaultSelected=t.selected=e.defaultSelected:("input"===n||"textarea"===n)&&(t.defaultValue=e.defaultValue)}}x.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(e,t){x.fn[e]=function(e){var n,r=0,i=[],o=x(e),a=o.length-1;for(;a>=r;r++)n=r===a?this:this.clone(!0),x(o[r])[t](n),h.apply(i,n.get());return this.pushStack(i)}});function Ft(e,n){var r,o,a=0,s=typeof e.getElementsByTagName!==i?e.getElementsByTagName(n||"*"):typeof e.querySelectorAll!==i?e.querySelectorAll(n||"*"):t;if(!s)for(s=[],r=e.childNodes||e;null!=(o=r[a]);a++)!n||x.nodeName(o,n)?s.push(o):x.merge(s,Ft(o,n));return n===t||n&&x.nodeName(e,n)?x.merge([e],s):s}function Bt(e){Ct.test(e.type)&&(e.defaultChecked=e.checked)}x.extend({clone:function(e,t,n){var r,i,o,a,s,l=x.contains(e.ownerDocument,e);if(x.support.html5Clone||x.isXMLDoc(e)||!mt.test("<"+e.nodeName+">")?o=e.cloneNode(!0):(Dt.innerHTML=e.outerHTML,Dt.removeChild(o=Dt.firstChild)),!(x.support.noCloneEvent&&x.support.noCloneChecked||1!==e.nodeType&&11!==e.nodeType||x.isXMLDoc(e)))for(r=Ft(o),s=Ft(e),a=0;null!=(i=s[a]);++a)r[a]&&Ot(i,r[a]);if(t)if(n)for(s=s||Ft(e),r=r||Ft(o),a=0;null!=(i=s[a]);a++)Mt(i,r[a]);else Mt(e,o);return r=Ft(o,"script"),r.length>0&&_t(r,!l&&Ft(e,"script")),r=s=i=null,o},buildFragment:function(e,t,n,r){var i,o,a,s,l,u,c,p=e.length,f=dt(t),d=[],h=0;for(;p>h;h++)if(o=e[h],o||0===o)if("object"===x.type(o))x.merge(d,o.nodeType?[o]:o);else if(wt.test(o)){s=s||f.appendChild(t.createElement("div")),l=(bt.exec(o)||["",""])[1].toLowerCase(),c=At[l]||At._default,s.innerHTML=c[1]+o.replace(vt,"<$1></$2>")+c[2],i=c[0];while(i--)s=s.lastChild;if(!x.support.leadingWhitespace&&yt.test(o)&&d.push(t.createTextNode(yt.exec(o)[0])),!x.support.tbody){o="table"!==l||xt.test(o)?"<table>"!==c[1]||xt.test(o)?0:s:s.firstChild,i=o&&o.childNodes.length;while(i--)x.nodeName(u=o.childNodes[i],"tbody")&&!u.childNodes.length&&o.removeChild(u)}x.merge(d,s.childNodes),s.textContent="";while(s.firstChild)s.removeChild(s.firstChild);s=f.lastChild}else d.push(t.createTextNode(o));s&&f.removeChild(s),x.support.appendChecked||x.grep(Ft(d,"input"),Bt),h=0;while(o=d[h++])if((!r||-1===x.inArray(o,r))&&(a=x.contains(o.ownerDocument,o),s=Ft(f.appendChild(o),"script"),a&&_t(s),n)){i=0;while(o=s[i++])kt.test(o.type||"")&&n.push(o)}return s=null,f},cleanData:function(e,t){var n,r,o,a,s=0,l=x.expando,u=x.cache,c=x.support.deleteExpando,f=x.event.special;for(;null!=(n=e[s]);s++)if((t||x.acceptData(n))&&(o=n[l],a=o&&u[o])){if(a.events)for(r in a.events)f[r]?x.event.remove(n,r):x.removeEvent(n,r,a.handle);
  28. u[o]&&(delete u[o],c?delete n[l]:typeof n.removeAttribute!==i?n.removeAttribute(l):n[l]=null,p.push(o))}},_evalUrl:function(e){return x.ajax({url:e,type:"GET",dataType:"script",async:!1,global:!1,"throws":!0})}}),x.fn.extend({wrapAll:function(e){if(x.isFunction(e))return this.each(function(t){x(this).wrapAll(e.call(this,t))});if(this[0]){var t=x(e,this[0].ownerDocument).eq(0).clone(!0);this[0].parentNode&&t.insertBefore(this[0]),t.map(function(){var e=this;while(e.firstChild&&1===e.firstChild.nodeType)e=e.firstChild;return e}).append(this)}return this},wrapInner:function(e){return x.isFunction(e)?this.each(function(t){x(this).wrapInner(e.call(this,t))}):this.each(function(){var t=x(this),n=t.contents();n.length?n.wrapAll(e):t.append(e)})},wrap:function(e){var t=x.isFunction(e);return this.each(function(n){x(this).wrapAll(t?e.call(this,n):e)})},unwrap:function(){return this.parent().each(function(){x.nodeName(this,"body")||x(this).replaceWith(this.childNodes)}).end()}});var Pt,Rt,Wt,$t=/alpha\([^)]*\)/i,It=/opacity\s*=\s*([^)]*)/,zt=/^(top|right|bottom|left)$/,Xt=/^(none|table(?!-c[ea]).+)/,Ut=/^margin/,Vt=RegExp("^("+w+")(.*)$","i"),Yt=RegExp("^("+w+")(?!px)[a-z%]+$","i"),Jt=RegExp("^([+-])=("+w+")","i"),Gt={BODY:"block"},Qt={position:"absolute",visibility:"hidden",display:"block"},Kt={letterSpacing:0,fontWeight:400},Zt=["Top","Right","Bottom","Left"],en=["Webkit","O","Moz","ms"];function tn(e,t){if(t in e)return t;var n=t.charAt(0).toUpperCase()+t.slice(1),r=t,i=en.length;while(i--)if(t=en[i]+n,t in e)return t;return r}function nn(e,t){return e=t||e,"none"===x.css(e,"display")||!x.contains(e.ownerDocument,e)}function rn(e,t){var n,r,i,o=[],a=0,s=e.length;for(;s>a;a++)r=e[a],r.style&&(o[a]=x._data(r,"olddisplay"),n=r.style.display,t?(o[a]||"none"!==n||(r.style.display=""),""===r.style.display&&nn(r)&&(o[a]=x._data(r,"olddisplay",ln(r.nodeName)))):o[a]||(i=nn(r),(n&&"none"!==n||!i)&&x._data(r,"olddisplay",i?n:x.css(r,"display"))));for(a=0;s>a;a++)r=e[a],r.style&&(t&&"none"!==r.style.display&&""!==r.style.display||(r.style.display=t?o[a]||"":"none"));return e}x.fn.extend({css:function(e,n){return x.access(this,function(e,n,r){var i,o,a={},s=0;if(x.isArray(n)){for(o=Rt(e),i=n.length;i>s;s++)a[n[s]]=x.css(e,n[s],!1,o);return a}return r!==t?x.style(e,n,r):x.css(e,n)},e,n,arguments.length>1)},show:function(){return rn(this,!0)},hide:function(){return rn(this)},toggle:function(e){return"boolean"==typeof e?e?this.show():this.hide():this.each(function(){nn(this)?x(this).show():x(this).hide()})}}),x.extend({cssHooks:{opacity:{get:function(e,t){if(t){var n=Wt(e,"opacity");return""===n?"1":n}}}},cssNumber:{columnCount:!0,fillOpacity:!0,fontWeight:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{"float":x.support.cssFloat?"cssFloat":"styleFloat"},style:function(e,n,r,i){if(e&&3!==e.nodeType&&8!==e.nodeType&&e.style){var o,a,s,l=x.camelCase(n),u=e.style;if(n=x.cssProps[l]||(x.cssProps[l]=tn(u,l)),s=x.cssHooks[n]||x.cssHooks[l],r===t)return s&&"get"in s&&(o=s.get(e,!1,i))!==t?o:u[n];if(a=typeof r,"string"===a&&(o=Jt.exec(r))&&(r=(o[1]+1)*o[2]+parseFloat(x.css(e,n)),a="number"),!(null==r||"number"===a&&isNaN(r)||("number"!==a||x.cssNumber[l]||(r+="px"),x.support.clearCloneStyle||""!==r||0!==n.indexOf("background")||(u[n]="inherit"),s&&"set"in s&&(r=s.set(e,r,i))===t)))try{u[n]=r}catch(c){}}},css:function(e,n,r,i){var o,a,s,l=x.camelCase(n);return n=x.cssProps[l]||(x.cssProps[l]=tn(e.style,l)),s=x.cssHooks[n]||x.cssHooks[l],s&&"get"in s&&(a=s.get(e,!0,r)),a===t&&(a=Wt(e,n,i)),"normal"===a&&n in Kt&&(a=Kt[n]),""===r||r?(o=parseFloat(a),r===!0||x.isNumeric(o)?o||0:a):a}}),e.getComputedStyle?(Rt=function(t){return e.getComputedStyle(t,null)},Wt=function(e,n,r){var i,o,a,s=r||Rt(e),l=s?s.getPropertyValue(n)||s[n]:t,u=e.style;return s&&(""!==l||x.contains(e.ownerDocument,e)||(l=x.style(e,n)),Yt.test(l)&&Ut.test(n)&&(i=u.width,o=u.minWidth,a=u.maxWidth,u.minWidth=u.maxWidth=u.width=l,l=s.width,u.width=i,u.minWidth=o,u.maxWidth=a)),l}):a.documentElement.currentStyle&&(Rt=function(e){return e.currentStyle},Wt=function(e,n,r){var i,o,a,s=r||Rt(e),l=s?s[n]:t,u=e.style;return null==l&&u&&u[n]&&(l=u[n]),Yt.test(l)&&!zt.test(n)&&(i=u.left,o=e.runtimeStyle,a=o&&o.left,a&&(o.left=e.currentStyle.left),u.left="fontSize"===n?"1em":l,l=u.pixelLeft+"px",u.left=i,a&&(o.left=a)),""===l?"auto":l});function on(e,t,n){var r=Vt.exec(t);return r?Math.max(0,r[1]-(n||0))+(r[2]||"px"):t}function an(e,t,n,r,i){var o=n===(r?"border":"content")?4:"width"===t?1:0,a=0;for(;4>o;o+=2)"margin"===n&&(a+=x.css(e,n+Zt[o],!0,i)),r?("content"===n&&(a-=x.css(e,"padding"+Zt[o],!0,i)),"margin"!==n&&(a-=x.css(e,"border"+Zt[o]+"Width",!0,i))):(a+=x.css(e,"padding"+Zt[o],!0,i),"padding"!==n&&(a+=x.css(e,"border"+Zt[o]+"Width",!0,i)));return a}function sn(e,t,n){var r=!0,i="width"===t?e.offsetWidth:e.offsetHeight,o=Rt(e),a=x.support.boxSizing&&"border-box"===x.css(e,"boxSizing",!1,o);if(0>=i||null==i){if(i=Wt(e,t,o),(0>i||null==i)&&(i=e.style[t]),Yt.test(i))return i;r=a&&(x.support.boxSizingReliable||i===e.style[t]),i=parseFloat(i)||0}return i+an(e,t,n||(a?"border":"content"),r,o)+"px"}function ln(e){var t=a,n=Gt[e];return n||(n=un(e,t),"none"!==n&&n||(Pt=(Pt||x("<iframe frameborder='0' width='0' height='0'/>").css("cssText","display:block !important")).appendTo(t.documentElement),t=(Pt[0].contentWindow||Pt[0].contentDocument).document,t.write("<!doctype html><html><body>"),t.close(),n=un(e,t),Pt.detach()),Gt[e]=n),n}function un(e,t){var n=x(t.createElement(e)).appendTo(t.body),r=x.css(n[0],"display");return n.remove(),r}x.each(["height","width"],function(e,n){x.cssHooks[n]={get:function(e,r,i){return r?0===e.offsetWidth&&Xt.test(x.css(e,"display"))?x.swap(e,Qt,function(){return sn(e,n,i)}):sn(e,n,i):t},set:function(e,t,r){var i=r&&Rt(e);return on(e,t,r?an(e,n,r,x.support.boxSizing&&"border-box"===x.css(e,"boxSizing",!1,i),i):0)}}}),x.support.opacity||(x.cssHooks.opacity={get:function(e,t){return It.test((t&&e.currentStyle?e.currentStyle.filter:e.style.filter)||"")?.01*parseFloat(RegExp.$1)+"":t?"1":""},set:function(e,t){var n=e.style,r=e.currentStyle,i=x.isNumeric(t)?"alpha(opacity="+100*t+")":"",o=r&&r.filter||n.filter||"";n.zoom=1,(t>=1||""===t)&&""===x.trim(o.replace($t,""))&&n.removeAttribute&&(n.removeAttribute("filter"),""===t||r&&!r.filter)||(n.filter=$t.test(o)?o.replace($t,i):o+" "+i)}}),x(function(){x.support.reliableMarginRight||(x.cssHooks.marginRight={get:function(e,n){return n?x.swap(e,{display:"inline-block"},Wt,[e,"marginRight"]):t}}),!x.support.pixelPosition&&x.fn.position&&x.each(["top","left"],function(e,n){x.cssHooks[n]={get:function(e,r){return r?(r=Wt(e,n),Yt.test(r)?x(e).position()[n]+"px":r):t}}})}),x.expr&&x.expr.filters&&(x.expr.filters.hidden=function(e){return 0>=e.offsetWidth&&0>=e.offsetHeight||!x.support.reliableHiddenOffsets&&"none"===(e.style&&e.style.display||x.css(e,"display"))},x.expr.filters.visible=function(e){return!x.expr.filters.hidden(e)}),x.each({margin:"",padding:"",border:"Width"},function(e,t){x.cssHooks[e+t]={expand:function(n){var r=0,i={},o="string"==typeof n?n.split(" "):[n];for(;4>r;r++)i[e+Zt[r]+t]=o[r]||o[r-2]||o[0];return i}},Ut.test(e)||(x.cssHooks[e+t].set=on)});var cn=/%20/g,pn=/\[\]$/,fn=/\r?\n/g,dn=/^(?:submit|button|image|reset|file)$/i,hn=/^(?:input|select|textarea|keygen)/i;x.fn.extend({serialize:function(){return x.param(this.serializeArray())},serializeArray:function(){return this.map(function(){var e=x.prop(this,"elements");return e?x.makeArray(e):this}).filter(function(){var e=this.type;return this.name&&!x(this).is(":disabled")&&hn.test(this.nodeName)&&!dn.test(e)&&(this.checked||!Ct.test(e))}).map(function(e,t){var n=x(this).val();return null==n?null:x.isArray(n)?x.map(n,function(e){return{name:t.name,value:e.replace(fn,"\r\n")}}):{name:t.name,value:n.replace(fn,"\r\n")}}).get()}}),x.param=function(e,n){var r,i=[],o=function(e,t){t=x.isFunction(t)?t():null==t?"":t,i[i.length]=encodeURIComponent(e)+"="+encodeURIComponent(t)};if(n===t&&(n=x.ajaxSettings&&x.ajaxSettings.traditional),x.isArray(e)||e.jquery&&!x.isPlainObject(e))x.each(e,function(){o(this.name,this.value)});else for(r in e)gn(r,e[r],n,o);return i.join("&").replace(cn,"+")};function gn(e,t,n,r){var i;if(x.isArray(t))x.each(t,function(t,i){n||pn.test(e)?r(e,i):gn(e+"["+("object"==typeof i?t:"")+"]",i,n,r)});else if(n||"object"!==x.type(t))r(e,t);else for(i in t)gn(e+"["+i+"]",t[i],n,r)}x.each("blur focus focusin focusout load resize scroll unload click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup error contextmenu".split(" "),function(e,t){x.fn[t]=function(e,n){return arguments.length>0?this.on(t,null,e,n):this.trigger(t)}}),x.fn.extend({hover:function(e,t){return this.mouseenter(e).mouseleave(t||e)},bind:function(e,t,n){return this.on(e,null,t,n)},unbind:function(e,t){return this.off(e,null,t)},delegate:function(e,t,n,r){return this.on(t,e,n,r)},undelegate:function(e,t,n){return 1===arguments.length?this.off(e,"**"):this.off(t,e||"**",n)}});var mn,yn,vn=x.now(),bn=/\?/,xn=/#.*$/,wn=/([?&])_=[^&]*/,Tn=/^(.*?):[ \t]*([^\r\n]*)\r?$/gm,Cn=/^(?:about|app|app-storage|.+-extension|file|res|widget):$/,Nn=/^(?:GET|HEAD)$/,kn=/^\/\//,En=/^([\w.+-]+:)(?:\/\/([^\/?#:]*)(?::(\d+)|)|)/,Sn=x.fn.load,An={},jn={},Dn="*/".concat("*");try{yn=o.href}catch(Ln){yn=a.createElement("a"),yn.href="",yn=yn.href}mn=En.exec(yn.toLowerCase())||[];function Hn(e){return function(t,n){"string"!=typeof t&&(n=t,t="*");var r,i=0,o=t.toLowerCase().match(T)||[];if(x.isFunction(n))while(r=o[i++])"+"===r[0]?(r=r.slice(1)||"*",(e[r]=e[r]||[]).unshift(n)):(e[r]=e[r]||[]).push(n)}}function qn(e,n,r,i){var o={},a=e===jn;function s(l){var u;return o[l]=!0,x.each(e[l]||[],function(e,l){var c=l(n,r,i);return"string"!=typeof c||a||o[c]?a?!(u=c):t:(n.dataTypes.unshift(c),s(c),!1)}),u}return s(n.dataTypes[0])||!o["*"]&&s("*")}function _n(e,n){var r,i,o=x.ajaxSettings.flatOptions||{};for(i in n)n[i]!==t&&((o[i]?e:r||(r={}))[i]=n[i]);return r&&x.extend(!0,e,r),e}x.fn.load=function(e,n,r){if("string"!=typeof e&&Sn)return Sn.apply(this,arguments);var i,o,a,s=this,l=e.indexOf(" ");return l>=0&&(i=e.slice(l,e.length),e=e.slice(0,l)),x.isFunction(n)?(r=n,n=t):n&&"object"==typeof n&&(a="POST"),s.length>0&&x.ajax({url:e,type:a,dataType:"html",data:n}).done(function(e){o=arguments,s.html(i?x("<div>").append(x.parseHTML(e)).find(i):e)}).complete(r&&function(e,t){s.each(r,o||[e.responseText,t,e])}),this},x.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(e,t){x.fn[t]=function(e){return this.on(t,e)}}),x.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:yn,type:"GET",isLocal:Cn.test(mn[1]),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":Dn,text:"text/plain",html:"text/html",xml:"application/xml, text/xml",json:"application/json, text/javascript"},contents:{xml:/xml/,html:/html/,json:/json/},responseFields:{xml:"responseXML",text:"responseText",json:"responseJSON"},converters:{"* text":String,"text html":!0,"text json":x.parseJSON,"text xml":x.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(e,t){return t?_n(_n(e,x.ajaxSettings),t):_n(x.ajaxSettings,e)},ajaxPrefilter:Hn(An),ajaxTransport:Hn(jn),ajax:function(e,n){"object"==typeof e&&(n=e,e=t),n=n||{};var r,i,o,a,s,l,u,c,p=x.ajaxSetup({},n),f=p.context||p,d=p.context&&(f.nodeType||f.jquery)?x(f):x.event,h=x.Deferred(),g=x.Callbacks("once memory"),m=p.statusCode||{},y={},v={},b=0,w="canceled",C={readyState:0,getResponseHeader:function(e){var t;if(2===b){if(!c){c={};while(t=Tn.exec(a))c[t[1].toLowerCase()]=t[2]}t=c[e.toLowerCase()]}return null==t?null:t},getAllResponseHeaders:function(){return 2===b?a:null},setRequestHeader:function(e,t){var n=e.toLowerCase();return b||(e=v[n]=v[n]||e,y[e]=t),this},overrideMimeType:function(e){return b||(p.mimeType=e),this},statusCode:function(e){var t;if(e)if(2>b)for(t in e)m[t]=[m[t],e[t]];else C.always(e[C.status]);return this},abort:function(e){var t=e||w;return u&&u.abort(t),k(0,t),this}};if(h.promise(C).complete=g.add,C.success=C.done,C.error=C.fail,p.url=((e||p.url||yn)+"").replace(xn,"").replace(kn,mn[1]+"//"),p.type=n.method||n.type||p.method||p.type,p.dataTypes=x.trim(p.dataType||"*").toLowerCase().match(T)||[""],null==p.crossDomain&&(r=En.exec(p.url.toLowerCase()),p.crossDomain=!(!r||r[1]===mn[1]&&r[2]===mn[2]&&(r[3]||("http:"===r[1]?"80":"443"))===(mn[3]||("http:"===mn[1]?"80":"443")))),p.data&&p.processData&&"string"!=typeof p.data&&(p.data=x.param(p.data,p.traditional)),qn(An,p,n,C),2===b)return C;l=p.global,l&&0===x.active++&&x.event.trigger("ajaxStart"),p.type=p.type.toUpperCase(),p.hasContent=!Nn.test(p.type),o=p.url,p.hasContent||(p.data&&(o=p.url+=(bn.test(o)?"&":"?")+p.data,delete p.data),p.cache===!1&&(p.url=wn.test(o)?o.replace(wn,"$1_="+vn++):o+(bn.test(o)?"&":"?")+"_="+vn++)),p.ifModified&&(x.lastModified[o]&&C.setRequestHeader("If-Modified-Since",x.lastModified[o]),x.etag[o]&&C.setRequestHeader("If-None-Match",x.etag[o])),(p.data&&p.hasContent&&p.contentType!==!1||n.contentType)&&C.setRequestHeader("Content-Type",p.contentType),C.setRequestHeader("Accept",p.dataTypes[0]&&p.accepts[p.dataTypes[0]]?p.accepts[p.dataTypes[0]]+("*"!==p.dataTypes[0]?", "+Dn+"; q=0.01":""):p.accepts["*"]);for(i in p.headers)C.setRequestHeader(i,p.headers[i]);if(p.beforeSend&&(p.beforeSend.call(f,C,p)===!1||2===b))return C.abort();w="abort";for(i in{success:1,error:1,complete:1})C[i](p[i]);if(u=qn(jn,p,n,C)){C.readyState=1,l&&d.trigger("ajaxSend",[C,p]),p.async&&p.timeout>0&&(s=setTimeout(function(){C.abort("timeout")},p.timeout));try{b=1,u.send(y,k)}catch(N){if(!(2>b))throw N;k(-1,N)}}else k(-1,"No Transport");function k(e,n,r,i){var c,y,v,w,T,N=n;2!==b&&(b=2,s&&clearTimeout(s),u=t,a=i||"",C.readyState=e>0?4:0,c=e>=200&&300>e||304===e,r&&(w=Mn(p,C,r)),w=On(p,w,C,c),c?(p.ifModified&&(T=C.getResponseHeader("Last-Modified"),T&&(x.lastModified[o]=T),T=C.getResponseHeader("etag"),T&&(x.etag[o]=T)),204===e||"HEAD"===p.type?N="nocontent":304===e?N="notmodified":(N=w.state,y=w.data,v=w.error,c=!v)):(v=N,(e||!N)&&(N="error",0>e&&(e=0))),C.status=e,C.statusText=(n||N)+"",c?h.resolveWith(f,[y,N,C]):h.rejectWith(f,[C,N,v]),C.statusCode(m),m=t,l&&d.trigger(c?"ajaxSuccess":"ajaxError",[C,p,c?y:v]),g.fireWith(f,[C,N]),l&&(d.trigger("ajaxComplete",[C,p]),--x.active||x.event.trigger("ajaxStop")))}return C},getJSON:function(e,t,n){return x.get(e,t,n,"json")},getScript:function(e,n){return x.get(e,t,n,"script")}}),x.each(["get","post"],function(e,n){x[n]=function(e,r,i,o){return x.isFunction(r)&&(o=o||i,i=r,r=t),x.ajax({url:e,type:n,dataType:o,data:r,success:i})}});function Mn(e,n,r){var i,o,a,s,l=e.contents,u=e.dataTypes;while("*"===u[0])u.shift(),o===t&&(o=e.mimeType||n.getResponseHeader("Content-Type"));if(o)for(s in l)if(l[s]&&l[s].test(o)){u.unshift(s);break}if(u[0]in r)a=u[0];else{for(s in r){if(!u[0]||e.converters[s+" "+u[0]]){a=s;break}i||(i=s)}a=a||i}return a?(a!==u[0]&&u.unshift(a),r[a]):t}function On(e,t,n,r){var i,o,a,s,l,u={},c=e.dataTypes.slice();if(c[1])for(a in e.converters)u[a.toLowerCase()]=e.converters[a];o=c.shift();while(o)if(e.responseFields[o]&&(n[e.responseFields[o]]=t),!l&&r&&e.dataFilter&&(t=e.dataFilter(t,e.dataType)),l=o,o=c.shift())if("*"===o)o=l;else if("*"!==l&&l!==o){if(a=u[l+" "+o]||u["* "+o],!a)for(i in u)if(s=i.split(" "),s[1]===o&&(a=u[l+" "+s[0]]||u["* "+s[0]])){a===!0?a=u[i]:u[i]!==!0&&(o=s[0],c.unshift(s[1]));break}if(a!==!0)if(a&&e["throws"])t=a(t);else try{t=a(t)}catch(p){return{state:"parsererror",error:a?p:"No conversion from "+l+" to "+o}}}return{state:"success",data:t}}x.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/(?:java|ecma)script/},converters:{"text script":function(e){return x.globalEval(e),e}}}),x.ajaxPrefilter("script",function(e){e.cache===t&&(e.cache=!1),e.crossDomain&&(e.type="GET",e.global=!1)}),x.ajaxTransport("script",function(e){if(e.crossDomain){var n,r=a.head||x("head")[0]||a.documentElement;return{send:function(t,i){n=a.createElement("script"),n.async=!0,e.scriptCharset&&(n.charset=e.scriptCharset),n.src=e.url,n.onload=n.onreadystatechange=function(e,t){(t||!n.readyState||/loaded|complete/.test(n.readyState))&&(n.onload=n.onreadystatechange=null,n.parentNode&&n.parentNode.removeChild(n),n=null,t||i(200,"success"))},r.insertBefore(n,r.firstChild)},abort:function(){n&&n.onload(t,!0)}}}});var Fn=[],Bn=/(=)\?(?=&|$)|\?\?/;x.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var e=Fn.pop()||x.expando+"_"+vn++;return this[e]=!0,e}}),x.ajaxPrefilter("json jsonp",function(n,r,i){var o,a,s,l=n.jsonp!==!1&&(Bn.test(n.url)?"url":"string"==typeof n.data&&!(n.contentType||"").indexOf("application/x-www-form-urlencoded")&&Bn.test(n.data)&&"data");return l||"jsonp"===n.dataTypes[0]?(o=n.jsonpCallback=x.isFunction(n.jsonpCallback)?n.jsonpCallback():n.jsonpCallback,l?n[l]=n[l].replace(Bn,"$1"+o):n.jsonp!==!1&&(n.url+=(bn.test(n.url)?"&":"?")+n.jsonp+"="+o),n.converters["script json"]=function(){return s||x.error(o+" was not called"),s[0]},n.dataTypes[0]="json",a=e[o],e[o]=function(){s=arguments},i.always(function(){e[o]=a,n[o]&&(n.jsonpCallback=r.jsonpCallback,Fn.push(o)),s&&x.isFunction(a)&&a(s[0]),s=a=t}),"script"):t});var Pn,Rn,Wn=0,$n=e.ActiveXObject&&function(){var e;for(e in Pn)Pn[e](t,!0)};function In(){try{return new e.XMLHttpRequest}catch(t){}}function zn(){try{return new e.ActiveXObject("Microsoft.XMLHTTP")}catch(t){}}x.ajaxSettings.xhr=e.ActiveXObject?function(){return!this.isLocal&&In()||zn()}:In,Rn=x.ajaxSettings.xhr(),x.support.cors=!!Rn&&"withCredentials"in Rn,Rn=x.support.ajax=!!Rn,Rn&&x.ajaxTransport(function(n){if(!n.crossDomain||x.support.cors){var r;return{send:function(i,o){var a,s,l=n.xhr();if(n.username?l.open(n.type,n.url,n.async,n.username,n.password):l.open(n.type,n.url,n.async),n.xhrFields)for(s in n.xhrFields)l[s]=n.xhrFields[s];n.mimeType&&l.overrideMimeType&&l.overrideMimeType(n.mimeType),n.crossDomain||i["X-Requested-With"]||(i["X-Requested-With"]="XMLHttpRequest");try{for(s in i)l.setRequestHeader(s,i[s])}catch(u){}l.send(n.hasContent&&n.data||null),r=function(e,i){var s,u,c,p;try{if(r&&(i||4===l.readyState))if(r=t,a&&(l.onreadystatechange=x.noop,$n&&delete Pn[a]),i)4!==l.readyState&&l.abort();else{p={},s=l.status,u=l.getAllResponseHeaders(),"string"==typeof l.responseText&&(p.text=l.responseText);try{c=l.statusText}catch(f){c=""}s||!n.isLocal||n.crossDomain?1223===s&&(s=204):s=p.text?200:404}}catch(d){i||o(-1,d)}p&&o(s,c,p,u)},n.async?4===l.readyState?setTimeout(r):(a=++Wn,$n&&(Pn||(Pn={},x(e).unload($n)),Pn[a]=r),l.onreadystatechange=r):r()},abort:function(){r&&r(t,!0)}}}});var Xn,Un,Vn=/^(?:toggle|show|hide)$/,Yn=RegExp("^(?:([+-])=|)("+w+")([a-z%]*)$","i"),Jn=/queueHooks$/,Gn=[nr],Qn={"*":[function(e,t){var n=this.createTween(e,t),r=n.cur(),i=Yn.exec(t),o=i&&i[3]||(x.cssNumber[e]?"":"px"),a=(x.cssNumber[e]||"px"!==o&&+r)&&Yn.exec(x.css(n.elem,e)),s=1,l=20;if(a&&a[3]!==o){o=o||a[3],i=i||[],a=+r||1;do s=s||".5",a/=s,x.style(n.elem,e,a+o);while(s!==(s=n.cur()/r)&&1!==s&&--l)}return i&&(a=n.start=+a||+r||0,n.unit=o,n.end=i[1]?a+(i[1]+1)*i[2]:+i[2]),n}]};function Kn(){return setTimeout(function(){Xn=t}),Xn=x.now()}function Zn(e,t,n){var r,i=(Qn[t]||[]).concat(Qn["*"]),o=0,a=i.length;for(;a>o;o++)if(r=i[o].call(n,t,e))return r}function er(e,t,n){var r,i,o=0,a=Gn.length,s=x.Deferred().always(function(){delete l.elem}),l=function(){if(i)return!1;var t=Xn||Kn(),n=Math.max(0,u.startTime+u.duration-t),r=n/u.duration||0,o=1-r,a=0,l=u.tweens.length;for(;l>a;a++)u.tweens[a].run(o);return s.notifyWith(e,[u,o,n]),1>o&&l?n:(s.resolveWith(e,[u]),!1)},u=s.promise({elem:e,props:x.extend({},t),opts:x.extend(!0,{specialEasing:{}},n),originalProperties:t,originalOptions:n,startTime:Xn||Kn(),duration:n.duration,tweens:[],createTween:function(t,n){var r=x.Tween(e,u.opts,t,n,u.opts.specialEasing[t]||u.opts.easing);return u.tweens.push(r),r},stop:function(t){var n=0,r=t?u.tweens.length:0;if(i)return this;for(i=!0;r>n;n++)u.tweens[n].run(1);return t?s.resolveWith(e,[u,t]):s.rejectWith(e,[u,t]),this}}),c=u.props;for(tr(c,u.opts.specialEasing);a>o;o++)if(r=Gn[o].call(u,e,c,u.opts))return r;return x.map(c,Zn,u),x.isFunction(u.opts.start)&&u.opts.start.call(e,u),x.fx.timer(x.extend(l,{elem:e,anim:u,queue:u.opts.queue})),u.progress(u.opts.progress).done(u.opts.done,u.opts.complete).fail(u.opts.fail).always(u.opts.always)}function tr(e,t){var n,r,i,o,a;for(n in e)if(r=x.camelCase(n),i=t[r],o=e[n],x.isArray(o)&&(i=o[1],o=e[n]=o[0]),n!==r&&(e[r]=o,delete e[n]),a=x.cssHooks[r],a&&"expand"in a){o=a.expand(o),delete e[r];for(n in o)n in e||(e[n]=o[n],t[n]=i)}else t[r]=i}x.Animation=x.extend(er,{tweener:function(e,t){x.isFunction(e)?(t=e,e=["*"]):e=e.split(" ");var n,r=0,i=e.length;for(;i>r;r++)n=e[r],Qn[n]=Qn[n]||[],Qn[n].unshift(t)},prefilter:function(e,t){t?Gn.unshift(e):Gn.push(e)}});function nr(e,t,n){var r,i,o,a,s,l,u=this,c={},p=e.style,f=e.nodeType&&nn(e),d=x._data(e,"fxshow");n.queue||(s=x._queueHooks(e,"fx"),null==s.unqueued&&(s.unqueued=0,l=s.empty.fire,s.empty.fire=function(){s.unqueued||l()}),s.unqueued++,u.always(function(){u.always(function(){s.unqueued--,x.queue(e,"fx").length||s.empty.fire()})})),1===e.nodeType&&("height"in t||"width"in t)&&(n.overflow=[p.overflow,p.overflowX,p.overflowY],"inline"===x.css(e,"display")&&"none"===x.css(e,"float")&&(x.support.inlineBlockNeedsLayout&&"inline"!==ln(e.nodeName)?p.zoom=1:p.display="inline-block")),n.overflow&&(p.overflow="hidden",x.support.shrinkWrapBlocks||u.always(function(){p.overflow=n.overflow[0],p.overflowX=n.overflow[1],p.overflowY=n.overflow[2]}));for(r in t)if(i=t[r],Vn.exec(i)){if(delete t[r],o=o||"toggle"===i,i===(f?"hide":"show"))continue;c[r]=d&&d[r]||x.style(e,r)}if(!x.isEmptyObject(c)){d?"hidden"in d&&(f=d.hidden):d=x._data(e,"fxshow",{}),o&&(d.hidden=!f),f?x(e).show():u.done(function(){x(e).hide()}),u.done(function(){var t;x._removeData(e,"fxshow");for(t in c)x.style(e,t,c[t])});for(r in c)a=Zn(f?d[r]:0,r,u),r in d||(d[r]=a.start,f&&(a.end=a.start,a.start="width"===r||"height"===r?1:0))}}function rr(e,t,n,r,i){return new rr.prototype.init(e,t,n,r,i)}x.Tween=rr,rr.prototype={constructor:rr,init:function(e,t,n,r,i,o){this.elem=e,this.prop=n,this.easing=i||"swing",this.options=t,this.start=this.now=this.cur(),this.end=r,this.unit=o||(x.cssNumber[n]?"":"px")},cur:function(){var e=rr.propHooks[this.prop];return e&&e.get?e.get(this):rr.propHooks._default.get(this)},run:function(e){var t,n=rr.propHooks[this.prop];return this.pos=t=this.options.duration?x.easing[this.easing](e,this.options.duration*e,0,1,this.options.duration):e,this.now=(this.end-this.start)*t+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),n&&n.set?n.set(this):rr.propHooks._default.set(this),this}},rr.prototype.init.prototype=rr.prototype,rr.propHooks={_default:{get:function(e){var t;return null==e.elem[e.prop]||e.elem.style&&null!=e.elem.style[e.prop]?(t=x.css(e.elem,e.prop,""),t&&"auto"!==t?t:0):e.elem[e.prop]},set:function(e){x.fx.step[e.prop]?x.fx.step[e.prop](e):e.elem.style&&(null!=e.elem.style[x.cssProps[e.prop]]||x.cssHooks[e.prop])?x.style(e.elem,e.prop,e.now+e.unit):e.elem[e.prop]=e.now}}},rr.propHooks.scrollTop=rr.propHooks.scrollLeft={set:function(e){e.elem.nodeType&&e.elem.parentNode&&(e.elem[e.prop]=e.now)}},x.each(["toggle","show","hide"],function(e,t){var n=x.fn[t];x.fn[t]=function(e,r,i){return null==e||"boolean"==typeof e?n.apply(this,arguments):this.animate(ir(t,!0),e,r,i)}}),x.fn.extend({fadeTo:function(e,t,n,r){return this.filter(nn).css("opacity",0).show().end().animate({opacity:t},e,n,r)},animate:function(e,t,n,r){var i=x.isEmptyObject(e),o=x.speed(t,n,r),a=function(){var t=er(this,x.extend({},e),o);(i||x._data(this,"finish"))&&t.stop(!0)};return a.finish=a,i||o.queue===!1?this.each(a):this.queue(o.queue,a)},stop:function(e,n,r){var i=function(e){var t=e.stop;delete e.stop,t(r)};return"string"!=typeof e&&(r=n,n=e,e=t),n&&e!==!1&&this.queue(e||"fx",[]),this.each(function(){var t=!0,n=null!=e&&e+"queueHooks",o=x.timers,a=x._data(this);if(n)a[n]&&a[n].stop&&i(a[n]);else for(n in a)a[n]&&a[n].stop&&Jn.test(n)&&i(a[n]);for(n=o.length;n--;)o[n].elem!==this||null!=e&&o[n].queue!==e||(o[n].anim.stop(r),t=!1,o.splice(n,1));(t||!r)&&x.dequeue(this,e)})},finish:function(e){return e!==!1&&(e=e||"fx"),this.each(function(){var t,n=x._data(this),r=n[e+"queue"],i=n[e+"queueHooks"],o=x.timers,a=r?r.length:0;for(n.finish=!0,x.queue(this,e,[]),i&&i.stop&&i.stop.call(this,!0),t=o.length;t--;)o[t].elem===this&&o[t].queue===e&&(o[t].anim.stop(!0),o.splice(t,1));for(t=0;a>t;t++)r[t]&&r[t].finish&&r[t].finish.call(this);delete n.finish})}});function ir(e,t){var n,r={height:e},i=0;for(t=t?1:0;4>i;i+=2-t)n=Zt[i],r["margin"+n]=r["padding"+n]=e;return t&&(r.opacity=r.width=e),r}x.each({slideDown:ir("show"),slideUp:ir("hide"),slideToggle:ir("toggle"),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(e,t){x.fn[e]=function(e,n,r){return this.animate(t,e,n,r)}}),x.speed=function(e,t,n){var r=e&&"object"==typeof e?x.extend({},e):{complete:n||!n&&t||x.isFunction(e)&&e,duration:e,easing:n&&t||t&&!x.isFunction(t)&&t};return r.duration=x.fx.off?0:"number"==typeof r.duration?r.duration:r.duration in x.fx.speeds?x.fx.speeds[r.duration]:x.fx.speeds._default,(null==r.queue||r.queue===!0)&&(r.queue="fx"),r.old=r.complete,r.complete=function(){x.isFunction(r.old)&&r.old.call(this),r.queue&&x.dequeue(this,r.queue)},r},x.easing={linear:function(e){return e},swing:function(e){return.5-Math.cos(e*Math.PI)/2}},x.timers=[],x.fx=rr.prototype.init,x.fx.tick=function(){var e,n=x.timers,r=0;for(Xn=x.now();n.length>r;r++)e=n[r],e()||n[r]!==e||n.splice(r--,1);n.length||x.fx.stop(),Xn=t},x.fx.timer=function(e){e()&&x.timers.push(e)&&x.fx.start()},x.fx.interval=13,x.fx.start=function(){Un||(Un=setInterval(x.fx.tick,x.fx.interval))},x.fx.stop=function(){clearInterval(Un),Un=null},x.fx.speeds={slow:600,fast:200,_default:400},x.fx.step={},x.expr&&x.expr.filters&&(x.expr.filters.animated=function(e){return x.grep(x.timers,function(t){return e===t.elem}).length}),x.fn.offset=function(e){if(arguments.length)return e===t?this:this.each(function(t){x.offset.setOffset(this,e,t)});var n,r,o={top:0,left:0},a=this[0],s=a&&a.ownerDocument;if(s)return n=s.documentElement,x.contains(n,a)?(typeof a.getBoundingClientRect!==i&&(o=a.getBoundingClientRect()),r=or(s),{top:o.top+(r.pageYOffset||n.scrollTop)-(n.clientTop||0),left:o.left+(r.pageXOffset||n.scrollLeft)-(n.clientLeft||0)}):o},x.offset={setOffset:function(e,t,n){var r=x.css(e,"position");"static"===r&&(e.style.position="relative");var i=x(e),o=i.offset(),a=x.css(e,"top"),s=x.css(e,"left"),l=("absolute"===r||"fixed"===r)&&x.inArray("auto",[a,s])>-1,u={},c={},p,f;l?(c=i.position(),p=c.top,f=c.left):(p=parseFloat(a)||0,f=parseFloat(s)||0),x.isFunction(t)&&(t=t.call(e,n,o)),null!=t.top&&(u.top=t.top-o.top+p),null!=t.left&&(u.left=t.left-o.left+f),"using"in t?t.using.call(e,u):i.css(u)}},x.fn.extend({position:function(){if(this[0]){var e,t,n={top:0,left:0},r=this[0];return"fixed"===x.css(r,"position")?t=r.getBoundingClientRect():(e=this.offsetParent(),t=this.offset(),x.nodeName(e[0],"html")||(n=e.offset()),n.top+=x.css(e[0],"borderTopWidth",!0),n.left+=x.css(e[0],"borderLeftWidth",!0)),{top:t.top-n.top-x.css(r,"marginTop",!0),left:t.left-n.left-x.css(r,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){var e=this.offsetParent||s;while(e&&!x.nodeName(e,"html")&&"static"===x.css(e,"position"))e=e.offsetParent;return e||s})}}),x.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(e,n){var r=/Y/.test(n);x.fn[e]=function(i){return x.access(this,function(e,i,o){var a=or(e);return o===t?a?n in a?a[n]:a.document.documentElement[i]:e[i]:(a?a.scrollTo(r?x(a).scrollLeft():o,r?o:x(a).scrollTop()):e[i]=o,t)},e,i,arguments.length,null)}});function or(e){return x.isWindow(e)?e:9===e.nodeType?e.defaultView||e.parentWindow:!1}x.each({Height:"height",Width:"width"},function(e,n){x.each({padding:"inner"+e,content:n,"":"outer"+e},function(r,i){x.fn[i]=function(i,o){var a=arguments.length&&(r||"boolean"!=typeof i),s=r||(i===!0||o===!0?"margin":"border");return x.access(this,function(n,r,i){var o;return x.isWindow(n)?n.document.documentElement["client"+e]:9===n.nodeType?(o=n.documentElement,Math.max(n.body["scroll"+e],o["scroll"+e],n.body["offset"+e],o["offset"+e],o["client"+e])):i===t?x.css(n,r,s):x.style(n,r,i,s)},n,a?i:t,a,null)}})}),x.fn.size=function(){return this.length},x.fn.andSelf=x.fn.addBack,"object"==typeof module&&module&&"object"==typeof module.exports?module.exports=x:(e.jQuery=e.$=x,"function"==typeof define&&define.amd&&define("jquery",[],function(){return x}))})(window);
  29. /*! jQuery Mobile v1.4.5 | Copyright 2010, 2014 jQuery Foundation, Inc. | jquery.org/license */
  30. (function(e,t,n){typeof define=="function"&&define.amd?define(["jquery"],function(r){return n(r,e,t),r.mobile}):n(e.jQuery,e,t)})(this,document,function(e,t,n,r){(function(e,t,n,r){function T(e){while(e&&typeof e.originalEvent!="undefined")e=e.originalEvent;return e}function N(t,n){var i=t.type,s,o,a,l,c,h,p,d,v;t=e.Event(t),t.type=n,s=t.originalEvent,o=e.event.props,i.search(/^(mouse|click)/)>-1&&(o=f);if(s)for(p=o.length,l;p;)l=o[--p],t[l]=s[l];i.search(/mouse(down|up)|click/)>-1&&!t.which&&(t.which=1);if(i.search(/^touch/)!==-1){a=T(s),i=a.touches,c=a.changedTouches,h=i&&i.length?i[0]:c&&c.length?c[0]:r;if(h)for(d=0,v=u.length;d<v;d++)l=u[d],t[l]=h[l]}return t}function C(t){var n={},r,s;while(t){r=e.data(t,i);for(s in r)r[s]&&(n[s]=n.hasVirtualBinding=!0);t=t.parentNode}return n}function k(t,n){var r;while(t){r=e.data(t,i);if(r&&(!n||r[n]))return t;t=t.parentNode}return null}function L(){g=!1}function A(){g=!0}function O(){E=0,v.length=0,m=!1,A()}function M(){L()}function _(){D(),c=setTimeout(function(){c=0,O()},e.vmouse.resetTimerDuration)}function D(){c&&(clearTimeout(c),c=0)}function P(t,n,r){var i;if(r&&r[t]||!r&&k(n.target,t))i=N(n,t),e(n.target).trigger(i);return i}function H(t){var n=e.data(t.target,s),r;!m&&(!E||E!==n)&&(r=P("v"+t.type,t),r&&(r.isDefaultPrevented()&&t.preventDefault(),r.isPropagationStopped()&&t.stopPropagation(),r.isImmediatePropagationStopped()&&t.stopImmediatePropagation()))}function B(t){var n=T(t).touches,r,i,o;n&&n.length===1&&(r=t.target,i=C(r),i.hasVirtualBinding&&(E=w++,e.data(r,s,E),D(),M(),d=!1,o=T(t).touches[0],h=o.pageX,p=o.pageY,P("vmouseover",t,i),P("vmousedown",t,i)))}function j(e){if(g)return;d||P("vmousecancel",e,C(e.target)),d=!0,_()}function F(t){if(g)return;var n=T(t).touches[0],r=d,i=e.vmouse.moveDistanceThreshold,s=C(t.target);d=d||Math.abs(n.pageX-h)>i||Math.abs(n.pageY-p)>i,d&&!r&&P("vmousecancel",t,s),P("vmousemove",t,s),_()}function I(e){if(g)return;A();var t=C(e.target),n,r;P("vmouseup",e,t),d||(n=P("vclick",e,t),n&&n.isDefaultPrevented()&&(r=T(e).changedTouches[0],v.push({touchID:E,x:r.clientX,y:r.clientY}),m=!0)),P("vmouseout",e,t),d=!1,_()}function q(t){var n=e.data(t,i),r;if(n)for(r in n)if(n[r])return!0;return!1}function R(){}function U(t){var n=t.substr(1);return{setup:function(){q(this)||e.data(this,i,{});var r=e.data(this,i);r[t]=!0,l[t]=(l[t]||0)+1,l[t]===1&&b.bind(n,H),e(this).bind(n,R),y&&(l.touchstart=(l.touchstart||0)+1,l.touchstart===1&&b.bind("touchstart",B).bind("touchend",I).bind("touchmove",F).bind("scroll",j))},teardown:function(){--l[t],l[t]||b.unbind(n,H),y&&(--l.touchstart,l.touchstart||b.unbind("touchstart",B).unbind("touchmove",F).unbind("touchend",I).unbind("scroll",j));var r=e(this),s=e.data(this,i);s&&(s[t]=!1),r.unbind(n,R),q(this)||r.removeData(i)}}}var i="virtualMouseBindings",s="virtualTouchID",o="vmouseover vmousedown vmousemove vmouseup vclick vmouseout vmousecancel".split(" "),u="clientX clientY pageX pageY screenX screenY".split(" "),a=e.event.mouseHooks?e.event.mouseHooks.props:[],f=e.event.props.concat(a),l={},c=0,h=0,p=0,d=!1,v=[],m=!1,g=!1,y="addEventListener"in n,b=e(n),w=1,E=0,S,x;e.vmouse={moveDistanceThreshold:10,clickDistanceThreshold:10,resetTimerDuration:1500};for(x=0;x<o.length;x++)e.event.special[o[x]]=U(o[x]);y&&n.addEventListener("click",function(t){var n=v.length,r=t.target,i,o,u,a,f,l;if(n){i=t.clientX,o=t.clientY,S=e.vmouse.clickDistanceThreshold,u=r;while(u){for(a=0;a<n;a++){f=v[a],l=0;if(u===r&&Math.abs(f.x-i)<S&&Math.abs(f.y-o)<S||e.data(u,s)===f.touchID){t.preventDefault(),t.stopPropagation();return}}u=u.parentNode}}},!0)})(e,t,n),function(e){e.mobile={}}(e),function(e,t){var r={touch:"ontouchend"in n};e.mobile.support=e.mobile.support||{},e.extend(e.support,r),e.extend(e.mobile.support,r)}(e),function(e,t,r){function l(t,n,i,s){var o=i.type;i.type=n,s?e.event.trigger(i,r,t):e.event.dispatch.call(t,i),i.type=o}var i=e(n),s=e.mobile.support.touch,o="touchmove scroll",u=s?"touchstart":"mousedown",a=s?"touchend":"mouseup",f=s?"touchmove":"mousemove";e.each("touchstart touchmove touchend tap taphold swipe swipeleft swiperight scrollstart scrollstop".split(" "),function(t,n){e.fn[n]=function(e){return e?this.bind(n,e):this.trigger(n)},e.attrFn&&(e.attrFn[n]=!0)}),e.event.special.scrollstart={enabled:!0,setup:function(){function s(e,n){r=n,l(t,r?"scrollstart":"scrollstop",e)}var t=this,n=e(t),r,i;n.bind(o,function(t){if(!e.event.special.scrollstart.enabled)return;r||s(t,!0),clearTimeout(i),i=setTimeout(function(){s(t,!1)},50)})},teardown:function(){e(this).unbind(o)}},e.event.special.tap={tapholdThreshold:750,emitTapOnTaphold:!0,setup:function(){var t=this,n=e(t),r=!1;n.bind("vmousedown",function(s){function a(){clearTimeout(u)}function f(){a(),n.unbind("vclick",c).unbind("vmouseup",a),i.unbind("vmousecancel",f)}function c(e){f(),!r&&o===e.target?l(t,"tap",e):r&&e.preventDefault()}r=!1;if(s.which&&s.which!==1)return!1;var o=s.target,u;n.bind("vmouseup",a).bind("vclick",c),i.bind("vmousecancel",f),u=setTimeout(function(){e.event.special.tap.emitTapOnTaphold||(r=!0),l(t,"taphold",e.Event("taphold",{target:o}))},e.event.special.tap.tapholdThreshold)})},teardown:function(){e(this).unbind("vmousedown").unbind("vclick").unbind("vmouseup"),i.unbind("vmousecancel")}},e.event.special.swipe={scrollSupressionThreshold:30,durationThreshold:1e3,horizontalDistanceThreshold:30,verticalDistanceThreshold:30,getLocation:function(e){var n=t.pageXOffset,r=t.pageYOffset,i=e.clientX,s=e.clientY;if(e.pageY===0&&Math.floor(s)>Math.floor(e.pageY)||e.pageX===0&&Math.floor(i)>Math.floor(e.pageX))i-=n,s-=r;else if(s<e.pageY-r||i<e.pageX-n)i=e.pageX-n,s=e.pageY-r;return{x:i,y:s}},start:function(t){var n=t.originalEvent.touches?t.originalEvent.touches[0]:t,r=e.event.special.swipe.getLocation(n);return{time:(new Date).getTime(),coords:[r.x,r.y],origin:e(t.target)}},stop:function(t){var n=t.originalEvent.touches?t.originalEvent.touches[0]:t,r=e.event.special.swipe.getLocation(n);return{time:(new Date).getTime(),coords:[r.x,r.y]}},handleSwipe:function(t,n,r,i){if(n.time-t.time<e.event.special.swipe.durationThreshold&&Math.abs(t.coords[0]-n.coords[0])>e.event.special.swipe.horizontalDistanceThreshold&&Math.abs(t.coords[1]-n.coords[1])<e.event.special.swipe.verticalDistanceThreshold){var s=t.coords[0]>n.coords[0]?"swipeleft":"swiperight";return l(r,"swipe",e.Event("swipe",{target:i,swipestart:t,swipestop:n}),!0),l(r,s,e.Event(s,{target:i,swipestart:t,swipestop:n}),!0),!0}return!1},eventInProgress:!1,setup:function(){var t,n=this,r=e(n),s={};t=e.data(this,"mobile-events"),t||(t={length:0},e.data(this,"mobile-events",t)),t.length++,t.swipe=s,s.start=function(t){if(e.event.special.swipe.eventInProgress)return;e.event.special.swipe.eventInProgress=!0;var r,o=e.event.special.swipe.start(t),u=t.target,l=!1;s.move=function(t){if(!o||t.isDefaultPrevented())return;r=e.event.special.swipe.stop(t),l||(l=e.event.special.swipe.handleSwipe(o,r,n,u),l&&(e.event.special.swipe.eventInProgress=!1)),Math.abs(o.coords[0]-r.coords[0])>e.event.special.swipe.scrollSupressionThreshold&&t.preventDefault()},s.stop=function(){l=!0,e.event.special.swipe.eventInProgress=!1,i.off(f,s.move),s.move=null},i.on(f,s.move).one(a,s.stop)},r.on(u,s.start)},teardown:function(){var t,n;t=e.data(this,"mobile-events"),t&&(n=t.swipe,delete t.swipe,t.length--,t.length===0&&e.removeData(this,"mobile-events")),n&&(n.start&&e(this).off(u,n.start),n.move&&i.off(f,n.move),n.stop&&i.off(a,n.stop))}},e.each({scrollstop:"scrollstart",taphold:"tap",swipeleft:"swipe.left",swiperight:"swipe.right"},function(t,n){e.event.special[t]={setup:function(){e(this).bind(n,e.noop)},teardown:function(){e(this).unbind(n)}}})}(e,this)});(function (u) { var k = function (a, c) { var h, g, k, m; k = a & 2147483648; m = c & 2147483648; h = a & 1073741824; g = c & 1073741824; a = (a & 1073741823) + (c & 1073741823); return h & g ? a ^ 2147483648 ^ k ^ m : h | g ? a & 1073741824 ? a ^ 3221225472 ^ k ^ m : a ^ 1073741824 ^ k ^ m : a ^ k ^ m }, l = function (a, c, h, g, l, m, b) { a = k(a, k(k(c & h | ~c & g, l), b)); return k(a << m | a >>> 32 - m, c) }, n = function (a, c, h, g, l, m, b) { a = k(a, k(k(c & g | h & ~g, l), b)); return k(a << m | a >>> 32 - m, c) }, p = function (a, c, h, g, l, m, b) { a = k(a, k(k(c ^ h ^ g, l), b)); return k(a << m | a >>> 32 - m, c) }, q = function (a, c, h, g, l, m, b) { a = k(a, k(k(h ^ (c | ~g), l), b)); return k(a << m | a >>> 32 - m, c) }, t = function (a) { var c = "", h, g; for (g = 0; 3 >= g; g++) h = a >>> 8 * g & 255, h = "0" + h.toString(16), c += h.substr(h.length - 2, 2); return c }; u.extend({ md5: function (a) { var c, h, g, r, m, b, d, e, f; a = a.replace(/\x0d\x0a/g, "\n"); c = ""; for (h = 0; h < a.length; h++) g = a.charCodeAt(h), 128 > g ? c += String.fromCharCode(g) : (127 < g && 2048 > g ? c += String.fromCharCode(g >> 6 | 192) : (c += String.fromCharCode(g >> 12 | 224), c += String.fromCharCode(g >> 6 & 63 | 128)), c += String.fromCharCode(g & 63 | 128)); h = c.length; a = h + 8; r = 16 * ((a - a % 64) / 64 + 1); a = Array(r - 1); for (b = 0; b < h;) g = (b - b % 4) / 4, m = b % 4 * 8, a[g] |= c.charCodeAt(b) << m, b++; g = (b - b % 4) / 4; a[g] |= 128 << b % 4 * 8; a[r - 2] = h << 3; a[r - 1] = h >>> 29; b = 1732584193; d = 4023233417; e = 2562383102; f = 271733878; for (c = 0; c < a.length; c += 16) h = b, g = d, r = e, m = f, b = l(b, d, e, f, a[c + 0], 7, 3614090360), f = l(f, b, d, e, a[c + 1], 12, 3905402710), e = l(e, f, b, d, a[c + 2], 17, 606105819), d = l(d, e, f, b, a[c + 3], 22, 3250441966), b = l(b, d, e, f, a[c + 4], 7, 4118548399), f = l(f, b, d, e, a[c + 5], 12, 1200080426), e = l(e, f, b, d, a[c + 6], 17, 2821735955), d = l(d, e, f, b, a[c + 7], 22, 4249261313), b = l(b, d, e, f, a[c + 8], 7, 1770035416), f = l(f, b, d, e, a[c + 9], 12, 2336552879), e = l(e, f, b, d, a[c + 10], 17, 4294925233), d = l(d, e, f, b, a[c + 11], 22, 2304563134), b = l(b, d, e, f, a[c + 12], 7, 1804603682), f = l(f, b, d, e, a[c + 13], 12, 4254626195), e = l(e, f, b, d, a[c + 14], 17, 2792965006), d = l(d, e, f, b, a[c + 15], 22, 1236535329), b = n(b, d, e, f, a[c + 1], 5, 4129170786), f = n(f, b, d, e, a[c + 6], 9, 3225465664), e = n(e, f, b, d, a[c + 11], 14, 643717713), d = n(d, e, f, b, a[c + 0], 20, 3921069994), b = n(b, d, e, f, a[c + 5], 5, 3593408605), f = n(f, b, d, e, a[c + 10], 9, 38016083), e = n(e, f, b, d, a[c + 15], 14, 3634488961), d = n(d, e, f, b, a[c + 4], 20, 3889429448), b = n(b, d, e, f, a[c + 9], 5, 568446438), f = n(f, b, d, e, a[c + 14], 9, 3275163606), e = n(e, f, b, d, a[c + 3], 14, 4107603335), d = n(d, e, f, b, a[c + 8], 20, 1163531501), b = n(b, d, e, f, a[c + 13], 5, 2850285829), f = n(f, b, d, e, a[c + 2], 9, 4243563512), e = n(e, f, b, d, a[c + 7], 14, 1735328473), d = n(d, e, f, b, a[c + 12], 20, 2368359562), b = p(b, d, e, f, a[c + 5], 4, 4294588738), f = p(f, b, d, e, a[c + 8], 11, 2272392833), e = p(e, f, b, d, a[c + 11], 16, 1839030562), d = p(d, e, f, b, a[c + 14], 23, 4259657740), b = p(b, d, e, f, a[c + 1], 4, 2763975236), f = p(f, b, d, e, a[c + 4], 11, 1272893353), e = p(e, f, b, d, a[c + 7], 16, 4139469664), d = p(d, e, f, b, a[c + 10], 23, 3200236656), b = p(b, d, e, f, a[c + 13], 4, 681279174), f = p(f, b, d, e, a[c + 0], 11, 3936430074), e = p(e, f, b, d, a[c + 3], 16, 3572445317), d = p(d, e, f, b, a[c + 6], 23, 76029189), b = p(b, d, e, f, a[c + 9], 4, 3654602809), f = p(f, b, d, e, a[c + 12], 11, 3873151461), e = p(e, f, b, d, a[c + 15], 16, 530742520), d = p(d, e, f, b, a[c + 2], 23, 3299628645), b = q(b, d, e, f, a[c + 0], 6, 4096336452), f = q(f, b, d, e, a[c + 7], 10, 1126891415), e = q(e, f, b, d, a[c + 14], 15, 2878612391), d = q(d, e, f, b, a[c + 5], 21, 4237533241), b = q(b, d, e, f, a[c + 12], 6, 1700485571), f = q(f, b, d, e, a[c + 3], 10, 2399980690), e = q(e, f, b, d, a[c + 10], 15, 4293915773), d = q(d, e, f, b, a[c + 1], 21, 2240044497), b = q(b, d, e, f, a[c + 8], 6, 1873313359), f = q(f, b, d, e, a[c + 15], 10, 4264355552), e = q(e, f, b, d, a[c + 6], 15, 2734768916), d = q(d, e, f, b, a[c + 13], 21, 1309151649), b = q(b, d, e, f, a[c + 4], 6, 4149444226), f = q(f, b, d, e, a[c + 11], 10, 3174756917), e = q(e, f, b, d, a[c + 2], 15, 718787259), d = q(d, e, f, b, a[c + 9], 21, 3951481745), b = k(b, h), d = k(d, g), e = k(e, r), f = k(f, m); return (t(b) + t(d) + t(e) + t(f)).toLowerCase() } }) })(jQuery);/*!
  31. * =====================================================
  32. *Fui v1.0.1
  33. * =====================================================
  34. */
  35. (function(a, g) {
  36. Date.prototype.DateAdd = function(j, i) {
  37. var h = this;
  38. switch (j) {
  39. case "s":
  40. return new Date(Date.parse(h) + (1000 * i));
  41. case "n":
  42. return new Date(Date.parse(h) + (60000 * i));
  43. case "h":
  44. return new Date(Date.parse(h) + (3600000 * i));
  45. case "d":
  46. return new Date(Date.parse(h) + (86400000 * i));
  47. case "w":
  48. return new Date(Date.parse(h) + ((86400000 * 7) * i));
  49. case "q":
  50. return new Date(h.getFullYear(), (h.getMonth()) + i * 3, h.getDate(), h.getHours(), h.getMinutes(), h.getSeconds());
  51. case "m":
  52. return new Date(h.getFullYear(), (h.getMonth()) + i, h.getDate(), h.getHours(), h.getMinutes(), h.getSeconds());
  53. case "y":
  54. return new Date((h.getFullYear() + i), h.getMonth(), h.getDate(), h.getHours(), h.getMinutes(), h.getSeconds())
  55. }
  56. };
  57. Date.prototype.DateDiff = function(j, h) {
  58. var i = this;
  59. if (typeof h == "string") {
  60. h = fui.date.parse(h)
  61. }
  62. switch (j) {
  63. case "s":
  64. return parseInt((h - i) / 1000);
  65. case "n":
  66. return parseInt((h - i) / 60000);
  67. case "h":
  68. return parseInt((h - i) / 3600000);
  69. case "d":
  70. return parseInt((h - i) / 86400000);
  71. case "w":
  72. return parseInt((h - i) / (86400000 * 7));
  73. case "m":
  74. return (h.getMonth() + 1) + ((h.getFullYear() - i.getFullYear()) * 12) - (i.getMonth() + 1);
  75. case "y":
  76. return h.getFullYear() - i.getFullYear()
  77. }
  78. };
  79. Date.prototype.MaxDayOfDate = function() {
  80. var k = this;
  81. var h = k.toArray();
  82. var i = (new Date(h[0], h[1] + 1, 1));
  83. var j = i.DateAdd("m", 1);
  84. var l = dateDiff(i.Format("yyyy-MM-dd"), j.Format("yyyy-MM-dd"));
  85. return l
  86. };
  87. Date.prototype.isLeapYear = function() {
  88. return (0 == this.getYear() % 4 && ((this.getYear() % 100 != 0) || (this.getYear() % 400 == 0)))
  89. };
  90. var d;
  91. var c;
  92. a("body").on("tap",
  93. function(h) {
  94. var j = g.fui.now();
  95. var i = h.target || h.srcElement;
  96. if (d && d === i) {
  97. if (c && (j - c) < 300) {
  98. var k = {
  99. center: {
  100. x: h.pageX,
  101. y: h.pageY
  102. }
  103. };
  104. g.fui.trigger(i, "doubletap", k)
  105. }
  106. }
  107. c = g.fui.now();
  108. d = i;
  109. return false
  110. });
  111. var f = /matrix(3d)?\((.+?)\)/;
  112. var b = {};
  113. a.each(["Boolean", "Number", "String", "Function", "Array", "Date", "RegExp", "Object", "Error"],
  114. function(h, j) {
  115. b["[object " + j + "]"] = j.toLowerCase()
  116. });
  117. var e = a.mobile.support.touch;
  118. g.fui = g.fui || {};
  119. g.fui = {
  120. event: {
  121. supportTouch: e,
  122. start: e ? "touchstart": "mousedown",
  123. end: e ? "touchend": "mouseup",
  124. move: e ? "touchmove": "mousemove",
  125. cancel: "touchcancel"
  126. },
  127. options: {
  128. gestureConfig: {
  129. tap: true,
  130. doubletap: false,
  131. longtap: false,
  132. hold: false,
  133. flick: true,
  134. swipe: true,
  135. drag: true,
  136. pinch: false
  137. }
  138. },
  139. now: Date.now ||
  140. function() {
  141. return + new Date()
  142. },
  143. slice: [].slice,
  144. pageid: function() {
  145. if (!fui.nav) {
  146. return "no"
  147. }
  148. var h = fui.nav.page.data[fui.nav.page.activeid] || {};
  149. return (h.op || {}).pageid || "no"
  150. },
  151. guid: function(l) {
  152. l = l || "_";
  153. var h = "";
  154. for (var j = 1; j <= 32; j++) {
  155. var k = Math.floor(Math.random() * 16).toString(16);
  156. h += k;
  157. if ((j == 8) || (j == 12) || (j == 16) || (j == 20)) {
  158. h += l
  159. }
  160. }
  161. return h
  162. },
  163. date: {
  164. isLeapYear: function(h) {
  165. return (h % 4 == 0 && h % 100 != 0) || (h % 400 == 0)
  166. },
  167. parse: function(i) {
  168. var h = i;
  169. if (typeof i === "string") {
  170. if (i.indexOf("/Date(") > -1) {
  171. h = new Date(parseInt(i.replace("/Date(", "").replace(")/", ""), 10))
  172. } else {
  173. h = new Date(Date.parse(i.replace(/-/g, "/").replace("T", " ").split(".")[0]))
  174. }
  175. }
  176. return h
  177. },
  178. format: function(m, i) {
  179. if (!m) {
  180. return ""
  181. }
  182. var h = g.fui.date.parse(m);
  183. var l = {
  184. "M+": h.getMonth() + 1,
  185. "d+": h.getDate(),
  186. "h+": h.getHours(),
  187. "m+": h.getMinutes(),
  188. "s+": h.getSeconds(),
  189. "q+": Math.floor((h.getMonth() + 3) / 3),
  190. S: h.getMilliseconds()
  191. };
  192. if (/(y+)/.test(i)) {
  193. i = i.replace(RegExp.$1, (h.getFullYear() + "").substr(4 - RegExp.$1.length))
  194. }
  195. for (var j in l) {
  196. if (new RegExp("(" + j + ")").test(i)) {
  197. i = i.replace(RegExp.$1, RegExp.$1.length == 1 ? l[j] : ("00" + l[j]).substr(("" + l[j]).length))
  198. }
  199. }
  200. return i
  201. },
  202. get: function(h, l, j) {
  203. var i = new Date();
  204. if ( !! l) {
  205. i = i.DateAdd(l, j)
  206. }
  207. var k = g.fui.date.format(i, h);
  208. return k
  209. }
  210. },
  211. isArray: Array.isArray ||
  212. function(h) {
  213. return h instanceof Array
  214. },
  215. later: function(l, p, h, j) {
  216. p = p || 0;
  217. var n = l;
  218. var i = j;
  219. var k;
  220. var o;
  221. if (typeof l === "string") {
  222. n = h[l]
  223. }
  224. k = function() {
  225. n.apply(h, fui.isArray(i) ? i: [i])
  226. };
  227. o = setTimeout(k, p);
  228. return {
  229. id: o,
  230. cancel: function() {
  231. clearTimeout(o)
  232. }
  233. }
  234. },
  235. createMask: function() {
  236. if (a(".f-backdrop").length == 0) {
  237. var h = '<div class="f-backdrop" ></div>';
  238. a("body").append(h);
  239. a(".f-backdrop").on("tap",
  240. function() {
  241. a(this).fadeOut();
  242. a(".f-pop.active").removeClass("active");
  243. return false
  244. })
  245. }
  246. },
  247. showMask: function() {
  248. a(".f-backdrop").fadeIn()
  249. },
  250. hideMask: function() {
  251. a(".f-backdrop").fadeOut()
  252. },
  253. getStyles: function(h, i) {
  254. var j = h.ownerDocument.defaultView.getComputedStyle(h, null);
  255. if (i) {
  256. return j.getPropertyValue(i) || j[i]
  257. }
  258. return j
  259. },
  260. parseTranslateMatrix: function(l, j) {
  261. var i = l.match(f);
  262. var h = i && i[1];
  263. if (i) {
  264. i = i[2].split(",");
  265. if (h === "3d") {
  266. i = i.slice(12, 15)
  267. } else {
  268. i.push(0);
  269. i = i.slice(4, 7)
  270. }
  271. } else {
  272. i = [0, 0, 0]
  273. }
  274. var k = {
  275. x: parseFloat(i[0]),
  276. y: parseFloat(i[1]),
  277. z: parseFloat(i[2])
  278. };
  279. if (j && k.hasOwnProperty(j)) {
  280. return k[j]
  281. }
  282. return k
  283. },
  284. type: function(h) {
  285. return h == null ? String(h) : b[{}.toString.call(h)] || "object"
  286. },
  287. isFunction: function(h) {
  288. return fui.type(h) === "function"
  289. },
  290. trigger: function(h, j, i) {
  291. if (h) {
  292. h.dispatchEvent(new CustomEvent(j, {
  293. detail: i,
  294. bubbles: true,
  295. cancelable: true
  296. }))
  297. }
  298. return this
  299. },
  300. hooks: {},
  301. addAction: function(j, h) {
  302. var i = fui.hooks[j];
  303. if (!i) {
  304. i = []
  305. }
  306. h.index = h.index || 1000;
  307. i.push(h);
  308. i.sort(function(k, l) {
  309. return k.index - l.index
  310. });
  311. fui.hooks[j] = i;
  312. return fui.hooks[j]
  313. },
  314. doAction: function(i, h) {
  315. if (fui.isFunction(h)) {
  316. a.each(fui.hooks[i], h)
  317. } else {
  318. a.each(fui.hooks[i],
  319. function(k, j) {
  320. return ! j.handle()
  321. })
  322. }
  323. },
  324. offset: function(i) {
  325. var h = {
  326. top: 0,
  327. left: 0
  328. };
  329. if (typeof i.getBoundingClientRect !== undefined) {
  330. h = i.getBoundingClientRect()
  331. }
  332. return {
  333. top: h.top + g.pageYOffset - i.clientTop,
  334. left: h.left + g.pageXOffset - i.clientLeft
  335. }
  336. },
  337. includeJs: function(j) {
  338. var h = document.getElementsByTagName("HEAD").item(0);
  339. var i = document.createElement("script");
  340. i.language = "javascript";
  341. i.type = "text/javascript";
  342. i.text = j;
  343. h.appendChild(i)
  344. },
  345. includeCss: function(j) {
  346. var i = document.getElementsByTagName("head").item(0);
  347. var k = document.createElement("style");
  348. k.type = "text/css";
  349. try {
  350. k.appendChild(document.createTextNode(j))
  351. } catch(h) {
  352. k.style.cssText = j
  353. }
  354. i.appendChild(k)
  355. },
  356. data: {}
  357. }
  358. })(window.jQuery, this); (function(c) {
  359. var d = false,
  360. b = /xyz/.test(function() {
  361. xyz
  362. }) ? /\b_super\b/: /.*/;
  363. var a = function() {};
  364. a.extend = function(h) {
  365. var e = this.prototype;
  366. d = true;
  367. var i = new this();
  368. d = false;
  369. for (var g in h) {
  370. i[g] = typeof h[g] == "function" && typeof e[g] == "function" && b.test(h[g]) ? (function(k, j) {
  371. return function() {
  372. var m = this._super;
  373. this._super = e[k];
  374. var l = j.apply(this, arguments);
  375. this._super = m;
  376. return l
  377. }
  378. })(g, h[g]) : h[g]
  379. }
  380. function f() {
  381. if (!d && this.init) {
  382. this.init.apply(this, arguments)
  383. }
  384. }
  385. f.prototype = i;
  386. f.prototype.constructor = f;
  387. f.extend = arguments.callee;
  388. return f
  389. };
  390. c.Class = a
  391. })(window.fui); (function(b) {
  392. if (!b.requestAnimationFrame) {
  393. var a = 0;
  394. b.requestAnimationFrame = b.webkitRequestAnimationFrame ||
  395. function(c, e) {
  396. var d = new Date().getTime();
  397. var g = Math.max(0, 16.7 - (d - a));
  398. var f = b.setTimeout(function() {
  399. c(d + g)
  400. },
  401. g);
  402. a = d + g;
  403. return f
  404. };
  405. b.cancelAnimationFrame = b.webkitCancelAnimationFrame || b.webkitCancelRequestAnimationFrame ||
  406. function(c) {
  407. clearTimeout(c)
  408. }
  409. }
  410. } (window)); (function(a, b) {
  411. b.validator = {
  412. validReg: function(d, e, c) {
  413. var f = {
  414. code: true,
  415. msg: ""
  416. };
  417. if (!e.test(d)) {
  418. f.code = false;
  419. f.msg = c
  420. }
  421. return f
  422. },
  423. validRegOrNull: function(d, e, c) {
  424. var f = {
  425. code: true,
  426. msg: ""
  427. };
  428. if (d == null || d == undefined || d.length == 0) {
  429. return f
  430. }
  431. if (!e.test(d)) {
  432. f.code = false;
  433. f.msg = c
  434. }
  435. return f
  436. },
  437. isNotNull: function(c) {
  438. var d = {
  439. code: true,
  440. msg: ""
  441. };
  442. c = a.trim(c);
  443. if (c == null || c == undefined || c.length == 0) {
  444. d.code = false;
  445. d.msg = "不能为空"
  446. }
  447. return d
  448. },
  449. isNum: function(c) {
  450. return b.validator.validReg(c, /^[-+]?\d+$/, "必须为数字")
  451. },
  452. isNumOrNull: function(c) {
  453. return b.validator.validRegOrNull(c, /^[-+]?\d+$/, "数字或空")
  454. },
  455. isEmail: function(c) {
  456. return b.validator.validReg(c, /^\w{3,}@\w+(\.\w+)+$/, "必须为E-mail格式")
  457. },
  458. isEmailOrNull: function(c) {
  459. return b.validator.validRegOrNull(c, /^\w{3,}@\w+(\.\w+)+$/, "必须为E-mail格式或空")
  460. },
  461. isEnglishStr: function(c) {
  462. return b.validator.validReg(c, /^[a-z,A-Z]+$/, "必须为英文字符串")
  463. },
  464. isEnglishStrOrNull: function(c) {
  465. return b.validator.validRegOrNull(c, /^[a-z,A-Z]+$/, "必须为英文字符串或空")
  466. },
  467. isTelephone: function(c) {
  468. return b.validator.validReg(c, /^(\d{3,4}\-)?[1-9]\d{6,7}$/, "必须为电话格式")
  469. },
  470. isTelephoneOrNull: function(c) {
  471. return b.validator.validRegOrNull(c, /^(\d{3,4}\-)?[1-9]\d{6,7}$/, "必须为电话格式或空")
  472. },
  473. isMobile: function(c) {
  474. return b.validator.validReg(c, /^(\+\d{2,3}\-)?\d{11}$/, "必须为手机格式")
  475. },
  476. isMobileOrnull: function(c) {
  477. return b.validator.validRegOrNull(c, /^(\+\d{2,3}\-)?\d{11}$/, "必须为手机格式或空")
  478. },
  479. isMobileOrPhone: function(c) {
  480. var d = {
  481. code: true,
  482. msg: ""
  483. };
  484. if (!b.validator.isTelephone(c).code && !b.validator.isMobile(c).code) {
  485. d.code = false;
  486. d.msg = "为电话格式或手机格式"
  487. }
  488. return d
  489. },
  490. isMobileOrPhoneOrNull: function(c) {
  491. var d = {
  492. code: true,
  493. msg: ""
  494. };
  495. if (b.validator.isNotNull(c).code && !b.validator.isTelephone(c).code && !b.validator.isMobile(c).code) {
  496. d.code = false;
  497. d.msg = "为电话格式或手机格式或空"
  498. }
  499. return d
  500. },
  501. isUri: function(c) {
  502. return b.validator.validReg(c, /^http:\/\/[a-zA-Z0-9]+\.[a-zA-Z0-9]+[\/=\?%\-&_~`@[\]\':+!]*([^<>\"\"])*$/, "必须为网址格式")
  503. },
  504. isUriOrNull: function(c) {
  505. return b.validator.validRegOrNull(c, /^http:\/\/[a-zA-Z0-9]+\.[a-zA-Z0-9]+[\/=\?%\-&_~`@[\]\':+!]*([^<>\"\"])*$/, "必须为网址格式或空")
  506. },
  507. isDate: function(c) {
  508. return b.validator.validReg(c, /^(\d{1,4})(-|\/)(\d{1,2})\2(\d{1,2})$/, "必须为日期格式")
  509. },
  510. isDateOrNull: function(c) {
  511. return b.validator.validRegOrNull(c, /^(\d{1,4})(-|\/)(\d{1,2})\2(\d{1,2})$/, "必须为日期格式或空")
  512. },
  513. isDateTime: function(c) {
  514. return b.validator.validReg(c, /^(\d{1,4})(-|\/)(\d{1,2})\2(\d{1,2}) (\d{1,2}):(\d{1,2}):(\d{1,2})$/, "必须为日期时间格式")
  515. },
  516. isDateTimeOrNull: function(c) {
  517. return b.validator.validRegOrNull(c, /^(\d{1,4})(-|\/)(\d{1,2})\2(\d{1,2}) (\d{1,2}):(\d{1,2}):(\d{1,2})$/, "必须为日期时间格式")
  518. },
  519. isTime: function(c) {
  520. return b.validator.validReg(c, /^((20|21|22|23|[0-1]\d)\:[0-5][0-9])(\:[0-5][0-9])?$/, "必须为时间格式")
  521. },
  522. isTimeOrNull: function(c) {
  523. return b.validator.validRegOrNull(c, /^((20|21|22|23|[0-1]\d)\:[0-5][0-9])(\:[0-5][0-9])?$/, "必须为时间格式或空")
  524. },
  525. isChinese: function(c) {
  526. return b.validator.validReg(c, /^[\u0391-\uFFE5]+$/, "必须为中文")
  527. },
  528. isChineseOrNull: function(c) {
  529. return b.validator.validRegOrNull(c, /^[\u0391-\uFFE5]+$/, "必须为中文或空")
  530. },
  531. isZip: function(c) {
  532. return b.validator.validReg(c, /^\d{6}$/, "必须为邮编格式")
  533. },
  534. isZipOrNull: function(c) {
  535. return b.validator.validRegOrNull(c, /^\d{6}$/, "必须为邮编格式或空")
  536. },
  537. isDouble: function(c) {
  538. return b.validator.validReg(c, /^[-\+]?\d+(\.\d+)?$/, "必须为小数")
  539. },
  540. isDoubleOrNull: function(c) {
  541. return b.validator.validRegOrNull(c, /^[-\+]?\d+(\.\d+)?$/, "必须为小数或空")
  542. },
  543. isIDCard: function(c) {
  544. return b.validator.validReg(c, /^\d{15}(\d{2}[A-Za-z0-9;])?$/, "必须为身份证格式")
  545. },
  546. isIDCardOrNull: function(c) {
  547. return b.validator.validRegOrNull(c, /^\d{15}(\d{2}[A-Za-z0-9;])?$/, "必须为身份证格式或空")
  548. },
  549. isIP: function(d) {
  550. var f = {
  551. code: true,
  552. msg: ""
  553. };
  554. var e = /^(\d+)\.(\d+)\.(\d+)\.(\d+)$/g;
  555. var c = false;
  556. if (e.test(d)) {
  557. if (RegExp.$1 < 256 && RegExp.$2 < 256 && RegExp.$3 < 256 && RegExp.$4 < 256) {
  558. c = true
  559. }
  560. }
  561. if (!c) {
  562. f.code = false;
  563. f.msg = "必须为IP格式"
  564. }
  565. return f
  566. },
  567. isIPOrNull: function(c) {
  568. var d = {
  569. code: true,
  570. msg: ""
  571. };
  572. if (b.validator.isNotNull(c) && !b.validator.isIP(c).code) {
  573. d.code = false;
  574. d.msg = "必须为IP格式或空"
  575. }
  576. return d
  577. },
  578. isLenNum: function(d, c) {
  579. var f = {
  580. code: true,
  581. msg: ""
  582. };
  583. var e = /^[0-9]+$/;
  584. d = a.trim(d);
  585. if (d.length > c || !e.test(d)) {
  586. f.code = false;
  587. f.msg = "必须为" + c + "位数字"
  588. }
  589. return f
  590. },
  591. isLenNumOrNull: function(d, c) {
  592. var e = {
  593. code: true,
  594. msg: ""
  595. };
  596. if (b.validator.isNotNull(d).code && !b.validator.isLenNum(d)) {
  597. e.code = false;
  598. e.msg = "必须为" + c + "位数字或空"
  599. }
  600. return e
  601. },
  602. isLenStr: function(d, c) {
  603. var e = {
  604. code: true,
  605. msg: ""
  606. };
  607. d = a.trim(d);
  608. if (!b.validator.isNotNull(d).code || d.length > c) {
  609. e.code = false;
  610. e.msg = "必须小于等于" + c + "位字符"
  611. }
  612. return e
  613. },
  614. isLenStrOrNull: function(d, c) {
  615. var e = {
  616. code: true,
  617. msg: ""
  618. };
  619. d = a.trim(d);
  620. if (b.validator.isNotNull(d).code && d.length > c) {
  621. e.code = false;
  622. e.msg = "必须小于等于" + c + "位字符或空"
  623. }
  624. return e
  625. }
  626. }
  627. })(window.jQuery, window.fui); (function(k, B) {
  628. k.gestures = {
  629. session: {}
  630. };
  631. k.preventDefault = function(C) {
  632. C.preventDefault()
  633. };
  634. k.stopPropagation = function(C) {
  635. C.stopPropagation()
  636. };
  637. k.addGesture = function(C) {
  638. return k.addAction("gestures", C)
  639. };
  640. var w = Math.round;
  641. var a = Math.abs;
  642. var y = Math.sqrt;
  643. var b = Math.atan;
  644. var c = Math.atan2;
  645. var n = function(C, D, E) {
  646. if (!E) {
  647. E = ["x", "y"]
  648. }
  649. var F = D[E[0]] - C[E[0]];
  650. var G = D[E[1]] - C[E[1]];
  651. return y((F * F) + (G * G))
  652. };
  653. var q = function(E, C) {
  654. if (E.length >= 2 && C.length >= 2) {
  655. var D = ["pageX", "pageY"];
  656. return n(C[1], C[0], D) / n(E[1], E[0], D)
  657. }
  658. return 1
  659. };
  660. var l = function(C, D, E) {
  661. if (!E) {
  662. E = ["x", "y"]
  663. }
  664. var F = D[E[0]] - C[E[0]];
  665. var G = D[E[1]] - C[E[1]];
  666. return c(G, F) * 180 / Math.PI
  667. };
  668. var m = function(C, D) {
  669. if (C === D) {
  670. return ""
  671. }
  672. if (a(C) >= a(D)) {
  673. return C > 0 ? "left": "right"
  674. }
  675. return D > 0 ? "up": "down"
  676. };
  677. var p = function(E, C) {
  678. var D = ["pageX", "pageY"];
  679. return l(C[1], C[0], D) - l(E[1], E[0], D)
  680. };
  681. var s = function(C, D, E) {
  682. return {
  683. x: D / C || 0,
  684. y: E / C || 0
  685. }
  686. };
  687. var j = function(C, D) {
  688. if (k.gestures.stoped) {
  689. return
  690. }
  691. k.doAction("gestures",
  692. function(F, E) {
  693. if (!k.gestures.stoped) {
  694. if (k.options.gestureConfig[E.name] !== false) {
  695. E.handle(C, D)
  696. }
  697. }
  698. })
  699. };
  700. var u = function(C, D) {
  701. while (C) {
  702. if (C == D) {
  703. return true
  704. }
  705. C = C.parentNode
  706. }
  707. return false
  708. };
  709. var A = function(H, D, F) {
  710. var E = [];
  711. var J = [];
  712. var C = 0;
  713. while (C < H.length) {
  714. var I = D ? H[C][D] : H[C];
  715. if (J.indexOf(I) < 0) {
  716. E.push(H[C])
  717. }
  718. J[C] = I;
  719. C++
  720. }
  721. if (F) {
  722. if (!D) {
  723. E = E.sort()
  724. } else {
  725. E = E.sort(function G(K, L) {
  726. return K[D] > L[D]
  727. })
  728. }
  729. }
  730. return E
  731. };
  732. var o = function(D) {
  733. var E = D.length;
  734. if (E === 1) {
  735. return {
  736. x: w(D[0].pageX),
  737. y: w(D[0].pageY)
  738. }
  739. }
  740. var F = 0;
  741. var G = 0;
  742. var C = 0;
  743. while (C < E) {
  744. F += D[C].pageX;
  745. G += D[C].pageY;
  746. C++
  747. }
  748. return {
  749. x: w(F / E),
  750. y: w(G / E)
  751. }
  752. };
  753. var v = function() {
  754. return k.options.gestureConfig.pinch
  755. };
  756. var i = function(D) {
  757. var E = [];
  758. var C = 0;
  759. while (C < D.touches.length) {
  760. E[C] = {
  761. pageX: w(D.touches[C].pageX),
  762. pageY: w(D.touches[C].pageY)
  763. };
  764. C++
  765. }
  766. return {
  767. timestamp: k.now(),
  768. gesture: D.gesture,
  769. touches: E,
  770. center: o(D.touches),
  771. deltaX: D.deltaX,
  772. deltaY: D.deltaY
  773. }
  774. };
  775. var e = function(H) {
  776. var G = k.gestures.session;
  777. var C = H.center;
  778. var D = G.offsetDelta || {};
  779. var E = G.prevDelta || {};
  780. var F = G.prevTouch || {};
  781. if (H.gesture.type === k.event.start || H.gesture.type === k.event.end) {
  782. E = G.prevDelta = {
  783. x: F.deltaX || 0,
  784. y: F.deltaY || 0
  785. };
  786. D = G.offsetDelta = {
  787. x: C.x,
  788. y: C.y
  789. }
  790. }
  791. H.deltaX = E.x + (C.x - D.x);
  792. H.deltaY = E.y + (C.y - D.y)
  793. };
  794. var g = function(H) {
  795. var G = k.gestures.session;
  796. var I = H.touches;
  797. var J = I.length;
  798. if (!G.firstTouch) {
  799. G.firstTouch = i(H)
  800. }
  801. if (v() && J > 1 && !G.firstMultiTouch) {
  802. G.firstMultiTouch = i(H)
  803. } else {
  804. if (J === 1) {
  805. G.firstMultiTouch = false
  806. }
  807. }
  808. var E = G.firstTouch;
  809. var D = G.firstMultiTouch;
  810. var F = D ? D.center: E.center;
  811. var C = H.center = o(I);
  812. H.timestamp = k.now();
  813. H.deltaTime = H.timestamp - E.timestamp;
  814. H.angle = l(F, C);
  815. H.distance = n(F, C);
  816. e(H);
  817. H.offsetDirection = m(H.deltaX, H.deltaY);
  818. H.scale = D ? q(D.touches, I) : 1;
  819. H.rotation = D ? p(D.touches, I) : 0;
  820. f(H)
  821. };
  822. var d = 25;
  823. var f = function(I) {
  824. var H = k.gestures.session;
  825. var G = H.lastInterval || I;
  826. var C = I.timestamp - G.timestamp;
  827. var K;
  828. var L;
  829. var M;
  830. var F;
  831. if (I.gesture.type != k.event.cancel && (C > d || G.velocity === undefined)) {
  832. var D = G.deltaX - I.deltaX;
  833. var E = G.deltaY - I.deltaY;
  834. var J = s(C, D, E);
  835. L = J.x;
  836. M = J.y;
  837. K = (a(J.x) > a(J.y)) ? J.x: J.y;
  838. F = m(D, E) || G.direction;
  839. H.lastInterval = I
  840. } else {
  841. K = G.velocity;
  842. L = G.velocityX;
  843. M = G.velocityY;
  844. F = G.direction
  845. }
  846. I.velocity = K;
  847. I.velocityX = L;
  848. I.velocityY = M;
  849. I.direction = F
  850. };
  851. var z = {};
  852. var h = function(D) {
  853. for (var C = 0; C < D.length; C++) { ! D.identifier && (D.identifier = 0)
  854. }
  855. return D
  856. };
  857. var r = function(G, K) {
  858. var C = h(k.slice.call(G.touches || [G]));
  859. var M = G.type;
  860. var J = [];
  861. var D = [];
  862. if ((M === k.event.start || M === k.event.move) && C.length === 1) {
  863. z[C[0].identifier] = true;
  864. J = C;
  865. D = C;
  866. K.target = G.target
  867. } else {
  868. var H = 0;
  869. var J = [];
  870. var D = [];
  871. var E = h(k.slice.call(G.changedTouches || [G]));
  872. K.target = G.target;
  873. var I = k.gestures.session.target || G.target;
  874. J = C.filter(function(N) {
  875. return u(N.target, I)
  876. });
  877. if (M === k.event.start) {
  878. H = 0;
  879. while (H < J.length) {
  880. z[J[H].identifier] = true;
  881. H++
  882. }
  883. }
  884. H = 0;
  885. while (H < E.length) {
  886. if (z[E[H].identifier]) {
  887. D.push(E[H])
  888. }
  889. if (M === k.event.end || M === k.event.cancel) {
  890. delete z[E[H].identifier]
  891. }
  892. H++
  893. }
  894. if (!D.length) {
  895. return false
  896. }
  897. }
  898. J = A(J.concat(D), "identifier", true);
  899. var L = J.length;
  900. var F = D.length;
  901. if (M === k.event.start && L - F === 0) {
  902. K.isFirst = true;
  903. k.gestures.touch = k.gestures.session = {
  904. target: G.target
  905. }
  906. }
  907. K.isFinal = ((M === k.event.end || M === k.event.cancel) && (L - F === 0));
  908. K.touches = J;
  909. K.changedTouches = D;
  910. return true
  911. };
  912. var t = function(C) {
  913. var D = {
  914. gesture: C
  915. };
  916. var E = r(C, D);
  917. if (!E) {
  918. return
  919. }
  920. g(D);
  921. j(C, D);
  922. k.gestures.session.prevTouch = D;
  923. if (C.type === k.event.end && !k.event.supportTouch) {
  924. k.gestures.touch = k.gestures.session = {}
  925. }
  926. };
  927. B.addEventListener(k.event.start, t);
  928. B.addEventListener(k.event.move, t, {
  929. passive: false
  930. });
  931. B.addEventListener(k.event.end, t);
  932. B.addEventListener(k.event.cancel, t);
  933. k.isScrolling = false;
  934. var x = null;
  935. B.addEventListener("scroll",
  936. function() {
  937. k.isScrolling = true;
  938. x && clearTimeout(x);
  939. x = setTimeout(function() {
  940. k.isScrolling = false
  941. },
  942. 250)
  943. })
  944. })(window.fui, window); (function(a, c) {
  945. var b = function(d, f) {
  946. var e = a.gestures.session;
  947. switch (d.type) {
  948. case a.event.start:
  949. break;
  950. case a.event.move:
  951. if (!f.direction || !e.target) {
  952. return
  953. }
  954. if (e.lockDirection && e.startDirection) {
  955. if (e.startDirection && e.startDirection !== f.direction) {
  956. if (e.startDirection === "up" || e.startDirection === "down") {
  957. f.direction = f.deltaY < 0 ? "up": "down"
  958. } else {
  959. f.direction = f.deltaX < 0 ? "left": "right"
  960. }
  961. }
  962. }
  963. if (!e.drag) {
  964. e.drag = true;
  965. a.trigger(e.target, c + "start", f)
  966. }
  967. a.trigger(e.target, c, f);
  968. a.trigger(e.target, c + f.direction, f);
  969. break;
  970. case a.event.end:
  971. case a.event.cancel:
  972. if (e.drag && f.isFinal) {
  973. a.trigger(e.target, c + "end", f)
  974. }
  975. break
  976. }
  977. };
  978. a.addGesture({
  979. name: c,
  980. index: 20,
  981. handle: b,
  982. options: {
  983. fingers: 1
  984. }
  985. })
  986. })(fui, "drag"); (function(b, d) {
  987. var a = 0;
  988. var c = function(e, i) {
  989. var h = b.gestures.session;
  990. var g = this.options;
  991. var f = b.now();
  992. switch (e.type) {
  993. case b.event.move:
  994. if (f - a > 300) {
  995. a = f;
  996. h.flickStart = i.center
  997. }
  998. break;
  999. case b.event.end:
  1000. case b.event.cancel:
  1001. i.flick = false;
  1002. if (h.flickStart && g.flickMaxTime > (f - a) && i.distance > g.flickMinDistince) {
  1003. i.flick = true;
  1004. i.flickTime = f - a;
  1005. i.flickDistanceX = i.center.x - h.flickStart.x;
  1006. i.flickDistanceY = i.center.y - h.flickStart.y;
  1007. b.trigger(h.target, d, i);
  1008. b.trigger(h.target, d + i.direction, i)
  1009. }
  1010. break
  1011. }
  1012. };
  1013. b.addGesture({
  1014. name: d,
  1015. index: 5,
  1016. handle: c,
  1017. options: {
  1018. flickMaxTime: 200,
  1019. flickMinDistince: 10
  1020. }
  1021. })
  1022. })(fui, "flick"); (function(a, c) {
  1023. var d;
  1024. var b = function(e, h) {
  1025. var g = a.gestures.session;
  1026. var f = this.options;
  1027. switch (e.type) {
  1028. case a.event.start:
  1029. if (a.options.gestureConfig.hold) {
  1030. d && clearTimeout(d);
  1031. d = setTimeout(function() {
  1032. h.hold = true;
  1033. a.trigger(g.target, c, h)
  1034. },
  1035. f.holdTimeout)
  1036. }
  1037. break;
  1038. case a.event.move:
  1039. break;
  1040. case a.event.end:
  1041. case a.evetn.cancel:
  1042. if (d) {
  1043. clearTimeout(d) && (d = null);
  1044. a.trigger(g.target, "release", h)
  1045. }
  1046. break
  1047. }
  1048. };
  1049. a.addGesture({
  1050. name: c,
  1051. index: 10,
  1052. handle: b,
  1053. options: {
  1054. fingers: 1,
  1055. holdTimeout: 0
  1056. }
  1057. })
  1058. })(fui, "hold"); (function(a, c) {
  1059. var b = function(d, k) {
  1060. var f = this.options;
  1061. var j = a.gestures.session;
  1062. switch (d.type) {
  1063. case a.event.start:
  1064. break;
  1065. case a.event.move:
  1066. if (a.options.gestureConfig.pinch) {
  1067. if (k.touches.length < 2) {
  1068. return
  1069. }
  1070. if (!j.pinch) {
  1071. j.pinch = true;
  1072. a.trigger(j.target, c + "start", k)
  1073. }
  1074. a.trigger(j.target, c, k);
  1075. var h = k.scale;
  1076. var g = k.rotation;
  1077. var e = typeof k.lastScale === "undefined" ? 1 : k.lastScale;
  1078. var i = 1e-12;
  1079. if (h > e) {
  1080. e = h - i;
  1081. a.trigger(j.target, c + "out", k)
  1082. } else {
  1083. if (h < e) {
  1084. e = h + i;
  1085. a.trigger(j.target, c + "in", k)
  1086. }
  1087. }
  1088. if (Math.abs(g) > f.minRotationAngle) {
  1089. a.trigger(j.target, "rotate", k)
  1090. }
  1091. }
  1092. break;
  1093. case a.event.end:
  1094. case a.event.cancel:
  1095. if (a.options.gestureConfig.pinch && j.pinch && k.touches.length === 2) {
  1096. j.pinch = false;
  1097. a.trigger(j.target, c + "end", k)
  1098. }
  1099. break
  1100. }
  1101. };
  1102. a.addGesture({
  1103. name: c,
  1104. index: 10,
  1105. handle: b,
  1106. options: {
  1107. minRotationAngle: 0
  1108. }
  1109. })
  1110. })(fui, "pinch"); (function(a, c) {
  1111. var b = function(d, g) {
  1112. var f = a.gestures.session;
  1113. if (d.type === a.event.end || d.type === a.event.cancel) {
  1114. var e = this.options;
  1115. g.swipe = false;
  1116. if (g.direction && e.swipeMaxTime > g.deltaTime && g.distance > e.swipeMinDistince) {
  1117. g.swipe = true;
  1118. a.trigger(f.target, c, g);
  1119. a.trigger(f.target, c + g.direction, g)
  1120. }
  1121. }
  1122. };
  1123. a.addGesture({
  1124. name: c,
  1125. index: 10,
  1126. handle: b,
  1127. options: {
  1128. swipeMaxTime: 300,
  1129. swipeMinDistince: 18
  1130. }
  1131. })
  1132. })(fui, "fswipe"); (function(l, t, o) {
  1133. var m = l([]),
  1134. q = l.resize = l.extend(l.resize, {}),
  1135. u,
  1136. w = "setTimeout",
  1137. v = "resize",
  1138. p = v + "-special-event",
  1139. n = "delay",
  1140. r = "throttleWindow";
  1141. q[n] = 250;
  1142. q[r] = true;
  1143. l.event.special[v] = {
  1144. setup: function() {
  1145. if (!q[r] && this[w]) {
  1146. return false
  1147. }
  1148. var a = l(this);
  1149. m = m.add(a);
  1150. l.data(this, p, {
  1151. w: a.width(),
  1152. h: a.height()
  1153. });
  1154. if (m.length === 1) {
  1155. s()
  1156. }
  1157. },
  1158. teardown: function() {
  1159. if (!q[r] && this[w]) {
  1160. return false
  1161. }
  1162. var a = l(this);
  1163. m = m.not(a);
  1164. a.removeData(p);
  1165. if (!m.length) {
  1166. clearTimeout(u)
  1167. }
  1168. },
  1169. add: function(a) {
  1170. if (!q[r] && this[w]) {
  1171. return false
  1172. }
  1173. var c;
  1174. function b(h, d, e) {
  1175. var f = l(this),
  1176. g = l.data(this, p);
  1177. g.w = d !== o ? d: f.width();
  1178. g.h = e !== o ? e: f.height();
  1179. c.apply(this, arguments)
  1180. }
  1181. if (l.isFunction(a)) {
  1182. c = a;
  1183. return b
  1184. } else {
  1185. c = a.handler;
  1186. a.handler = b
  1187. }
  1188. }
  1189. };
  1190. function s() {
  1191. u = t[w](function() {
  1192. m.each(function() {
  1193. var c = l(this),
  1194. b = c.width(),
  1195. a = c.height(),
  1196. d = l.data(this, p);
  1197. if (b !== d.w || a !== d.h) {
  1198. c.trigger(v, [d.w = b, d.h = a])
  1199. }
  1200. });
  1201. s()
  1202. },
  1203. q[n])
  1204. }
  1205. })(jQuery, this); (function(a, d) {
  1206. var g = {};
  1207. var f = 0;
  1208. var e = 0;
  1209. var c = false;
  1210. var b = {
  1211. doQueue: function() {
  1212. if (!c) {
  1213. c = true;
  1214. var h = g[e];
  1215. if (h) {
  1216. b[h.type](h.op,
  1217. function() {
  1218. delete g[e];
  1219. e++;
  1220. c = false;
  1221. if (e < f) {
  1222. b.doQueue()
  1223. }
  1224. })
  1225. } else {
  1226. c = false;
  1227. if (e < f) {
  1228. e++;
  1229. b.doQueue()
  1230. }
  1231. }
  1232. }
  1233. },
  1234. open: function(k, j) {
  1235. var l = null;
  1236. if (d.nav.page.data[k.id]) {
  1237. l = d.nav.page.data[k.id];
  1238. l.load = false;
  1239. var h = l.op.fclass;
  1240. l.preid = d.nav.page.activeid || "";
  1241. l.op = k;
  1242. l.$page.removeAttr("style");
  1243. l.$page.attr("data-type", k.type);
  1244. l.$page.removeClass(h);
  1245. l.$page.addClass(k.fclass);
  1246. l.hasLoad = true
  1247. } else {
  1248. k.pageid = d.guid();
  1249. var i = '<div class="f-page ' + k.fclass + '" data-type="' + k.type + '" id="' + k.pageid + '">';
  1250. i += '<div class="f-page-header" >';
  1251. i += '<div class="f-page-backbtn" > ' + k.backbtn + " </div>";
  1252. i += '<div class="f-page-title">' + k.title + "</div>";
  1253. i += "</div>";
  1254. i += '<div class="f-page-body"></div>';
  1255. i += "</div>";
  1256. a("body").append(i);
  1257. l = {
  1258. $page: a("#" + k.pageid),
  1259. preid: d.nav.page.activeid || "",
  1260. op: k,
  1261. load: false
  1262. };
  1263. d.nav.page.data[k.id] = l;
  1264. d.nav.page.count++;
  1265. b.bindEvent(l.$page)
  1266. }
  1267. d.nav.page.activeid = k.id;
  1268. k.start && k.start(l);
  1269. switch (k.type) {
  1270. case "right":
  1271. l.$page.animate({
  1272. left:
  1273. "0px"
  1274. },
  1275. 200,
  1276. function() {
  1277. b.addPage(l);
  1278. j()
  1279. });
  1280. break;
  1281. case "bottom":
  1282. l.$page.animate({
  1283. top:
  1284. "0px"
  1285. },
  1286. 200,
  1287. function() {
  1288. b.addPage(l);
  1289. j()
  1290. });
  1291. break;
  1292. default:
  1293. l.$page.fadeIn(function() {
  1294. b.addPage(l);
  1295. j()
  1296. });
  1297. break
  1298. }
  1299. },
  1300. close: function(k, i) {
  1301. var j = k.op;
  1302. if (j.bfdestroy) {
  1303. if (!j.bfdestroy(k, "backbtn")) {
  1304. i()
  1305. }
  1306. }
  1307. d.nav.page.activeid = "";
  1308. if (k.preid) {
  1309. var h = d.nav.page.data[k.preid];
  1310. h.load = false;
  1311. h.$page.show();
  1312. d.nav.page.activeid = k.preid;
  1313. h = null
  1314. }
  1315. k.$page.css({
  1316. "z-index": 3
  1317. });
  1318. switch (j.type) {
  1319. case "right":
  1320. k.$page.animate({
  1321. left:
  1322. "100%"
  1323. },
  1324. 200,
  1325. function() {
  1326. b.removePage(k);
  1327. i()
  1328. });
  1329. break;
  1330. case "bottom":
  1331. k.$page.animate({
  1332. top:
  1333. "100%"
  1334. },
  1335. 200,
  1336. function() {
  1337. b.removePage(k);
  1338. i()
  1339. });
  1340. break;
  1341. default:
  1342. k.$page.fadeOut(function() {
  1343. b.removePage(k);
  1344. i()
  1345. });
  1346. break
  1347. }
  1348. },
  1349. bindEvent: function(h) {
  1350. h.find(".f-page-backbtn").on("tap",
  1351. function() {
  1352. var i = d.nav.page.activeid;
  1353. var j = d.nav.page.data[i];
  1354. if (!j.load) {
  1355. return false
  1356. }
  1357. g[f] = {
  1358. type: "close",
  1359. op: j
  1360. };
  1361. f++;
  1362. b.doQueue();
  1363. return false
  1364. })
  1365. },
  1366. addPage: function(i) {
  1367. if (i.preid != "") {
  1368. var h = d.nav.page.data[i.preid];
  1369. h.$page.hide()
  1370. }
  1371. i.$page.css({
  1372. "z-index": 1
  1373. });
  1374. i.op.end && i.op.end(i);
  1375. i.load = true
  1376. },
  1377. removePage: function(i) {
  1378. i.$page.remove();
  1379. i.$page = null;
  1380. a('[data-page="' + i.op.pageid + '"]').remove();
  1381. i.op.destroy && i.op.destroy(i);
  1382. if (i.preid) {
  1383. var h = d.nav.page.data[i.preid];
  1384. if (h.op.end) {
  1385. h.hasLoad = true;
  1386. h.op.end(h)
  1387. }
  1388. h.load = true
  1389. }
  1390. d.nav.page.count--;
  1391. d.nav.page.data[i.op.id] = null
  1392. },
  1393. remove: function(h) {
  1394. var i = d.nav.page.data[h];
  1395. if (i != null) {
  1396. i.$page.remove();
  1397. i.$page = null;
  1398. a('[data-page="' + i.op.pageid + '"]').remove();
  1399. d.nav.page.count--;
  1400. d.nav.page.data[i.op.id] = null;
  1401. i = null
  1402. }
  1403. }
  1404. };
  1405. d.nav = {
  1406. page: {
  1407. data: {},
  1408. count: 0,
  1409. activeid: ""
  1410. },
  1411. go: function(i) {
  1412. var h = {
  1413. id: "",
  1414. title: "",
  1415. type: "",
  1416. backbtn: '<a href="#">返回</a>',
  1417. fclass: "",
  1418. start: false,
  1419. end: false,
  1420. bfdestroy: false,
  1421. destroy: false
  1422. };
  1423. a.extend(h, i || {});
  1424. g[f] = {
  1425. type: "open",
  1426. op: i
  1427. };
  1428. f++;
  1429. b.doQueue()
  1430. },
  1431. closeCurrent: function() {
  1432. var h = d.nav.page.activeid;
  1433. var i = d.nav.page.data[h];
  1434. g[f] = {
  1435. type: "close",
  1436. op: i
  1437. };
  1438. f++;
  1439. b.doQueue()
  1440. },
  1441. close: function(h) {
  1442. b.remove(h)
  1443. }
  1444. }
  1445. })(window.jQuery, window.fui); (function(a, b) {
  1446. b.layer = {
  1447. open: function(f) {
  1448. var e = {
  1449. title: "",
  1450. backbtn: '<a href="#">返回</a>',
  1451. open: false,
  1452. close: false,
  1453. cancel: false,
  1454. };
  1455. a.extend(e, f || {});
  1456. e.layerid = b.guid();
  1457. var d = ' <div class="f-layer" id="' + e.layerid + '"> <div class="f-layer-closebtn" >关闭</div> <div class="f-layer-cancelbtn" >取消</div> <div class="f-layer-page" data-level="0" > <div class="f-layer-page-header" > <div class="f-layer-page-title">' + e.title + '</div> </div> <div class="f-layer-page-body"></div> </div> <div class="f-layer-mask" ></div></div>';
  1458. a("body").append(d);
  1459. var c = a("#" + e.layerid);
  1460. c[0].fop = e;
  1461. c.find(".f-layer-cancelbtn").on("tap",
  1462. function() {
  1463. var h = a(this);
  1464. var g = h.parent();
  1465. g.animate({
  1466. top: "100%"
  1467. },
  1468. 200,
  1469. function() {
  1470. var i = a(this)[0].fop;
  1471. setTimeout(function() {
  1472. var j = a("#" + i.layerid);
  1473. j.remove();
  1474. i.cancel && i.cancel();
  1475. j = null
  1476. },
  1477. 100)
  1478. })
  1479. });
  1480. c.find(".f-layer-closebtn").on("tap",
  1481. function() {
  1482. var h = a(this);
  1483. var g = h.parent();
  1484. var j = g[0].fop;
  1485. var i = g.find('[data-level="' + j.level + '"]');
  1486. g.find(".f-layer-closebtn").hide();
  1487. g.find(".f-layer-page").show();
  1488. i.animate({
  1489. left: "100%"
  1490. },
  1491. 200,
  1492. function() {
  1493. var k = a(this);
  1494. var l = k.parent()[0].fop;
  1495. l.level = 0;
  1496. setTimeout(function() {
  1497. g.find(".f-layer-left-page").remove();
  1498. l.close && l.close(l.layerid, l.level, l);
  1499. g = null
  1500. },
  1501. 100)
  1502. })
  1503. });
  1504. e.level = 0;
  1505. c.animate({
  1506. top: "0px"
  1507. },
  1508. 200,
  1509. function() {
  1510. var g = a(this)[0].fop;
  1511. setTimeout(function() {
  1512. var h = a("#" + g.layerid + ' [data-level="' + g.level + '"] .f-layer-page-body');
  1513. g.open && g.open(h, g.layerid, g.level, g)
  1514. },
  1515. 100)
  1516. });
  1517. c = null
  1518. },
  1519. iopen: function(h, i) {
  1520. var c = a("#" + h);
  1521. var d = c.find(".f-layer-mask");
  1522. d.show();
  1523. var g = c[0].fop;
  1524. g.level = g.level + 1;
  1525. var f = ' <div class="f-layer-left-page" data-level="' + g.level + '" > <div class="f-layer-page-header" > <div class="f-layer-page-backbtn" >' + g.backbtn + '</div> <div class="f-layer-page-title">' + i + '</div> </div> <div class="f-layer-page-body"></div></div>';
  1526. c.append(f);
  1527. var e = c.find('[data-level="' + g.level + '"]');
  1528. e.find(".f-layer-page-backbtn").on("tap",
  1529. function() {
  1530. var j = a(this);
  1531. var l = j.parents(".f-layer-left-page");
  1532. var k = l.parent();
  1533. var m = k[0].fop;
  1534. m.level = m.level - 1;
  1535. if (m.level < 2) {
  1536. k.find(".f-layer-closebtn").hide()
  1537. }
  1538. k.find('[data-level="' + m.level + '"]').show();
  1539. l.css({
  1540. "z-index": 5
  1541. });
  1542. l.animate({
  1543. left: "100%"
  1544. },
  1545. 200,
  1546. function() {
  1547. var n = a(this);
  1548. var o = n.parent()[0].fop;
  1549. setTimeout(function() {
  1550. n.remove();
  1551. o.close && o.close(o.layerid, o.level, o)
  1552. },
  1553. 100)
  1554. })
  1555. });
  1556. e.animate({
  1557. left: "0px"
  1558. },
  1559. 200,
  1560. function() {
  1561. var k = a(this);
  1562. k.css({
  1563. "z-index": 4
  1564. });
  1565. var j = k.parent();
  1566. var l = j[0].fop;
  1567. if (l.level >= 2) {
  1568. j.find(".f-layer-closebtn").show()
  1569. }
  1570. j.find('[data-level="' + (l.level - 1) + '"]').hide();
  1571. setTimeout(function() {
  1572. var m = k.find(".f-layer-page-body");
  1573. l.open && l.open(m, l.layerid, l.level, l)
  1574. },
  1575. 100);
  1576. d.hide()
  1577. });
  1578. c = null
  1579. },
  1580. close: function(c) {
  1581. a("#" + c + " .f-layer-cancelbtn").trigger("click")
  1582. },
  1583. iclose: function(c) {
  1584. a("#" + c + " .f-layer-closebtn").trigger("click")
  1585. },
  1586. closeLayer: function(d) {
  1587. var c = a("#" + d);
  1588. var e = c[0].fop.level;
  1589. c.find('[data-level="' + e + '"] .f-layer-page-backbtn').trigger("click")
  1590. }
  1591. }
  1592. })(window.jQuery, window.fui); (function(a, c) {
  1593. var e = navigator.platform.toLowerCase();
  1594. var f = navigator.userAgent.toLowerCase();
  1595. var d = (f.indexOf("iphone") > -1 || f.indexOf("ipad") > -1 || f.indexOf("ipod") > -1) && (e.indexOf("iphone") > -1 || e.indexOf("ipad") > -1 || e.indexOf("ipod") > -1);
  1596. var b = {
  1597. init: function(g, i) {
  1598. var h = '<div class="f-pciker-rule"></div><ul class="f-pciker-list"></ul>';
  1599. g.addClass("f-picker");
  1600. g.html(h);
  1601. b.initParams(g);
  1602. b.initData(g, i);
  1603. b.bindEvent(g)
  1604. },
  1605. initParams: function(g) {
  1606. var h = g[0];
  1607. h.list = g.find("ul")[0];
  1608. h.height = h.offsetHeight;
  1609. h.r = h.height / 2 - 10;
  1610. h.d = h.r * 2;
  1611. h.itemHeight = 40;
  1612. h.itemAngle = parseInt(b.calcAngle(h, h.itemHeight * 0.8));
  1613. h.hightlightRange = h.itemAngle / 2;
  1614. h.visibleRange = 90;
  1615. h.beginAngle = 0;
  1616. h.beginExceed = h.beginAngle - 30;
  1617. h.list.angle = h.beginAngle;
  1618. h.lastMoveTime = 0;
  1619. h.lastMoveStart = 0;
  1620. h.stopInertiaMove = false;
  1621. h.lastAngle = 0;
  1622. h.startY = null;
  1623. h.isPicking = false;
  1624. h.selected = null;
  1625. h.preselected = null;
  1626. h.list.style.webkitTransition = "150ms ease-out";
  1627. if (d) {
  1628. h.list.style.webkitTransformOrigin = "center center " + h.r + "px"
  1629. }
  1630. },
  1631. initData: function(i, k) {
  1632. var g = i.find("ul");
  1633. g.html("");
  1634. var l = i[0];
  1635. l.items = [];
  1636. var j = "";
  1637. k.data = k.data || [];
  1638. a.each(k.data,
  1639. function(m, o) {
  1640. var n = {
  1641. id: m,
  1642. text: o[k.text],
  1643. value: o[k.value],
  1644. angle: l.itemAngle * m,
  1645. obj: o
  1646. };
  1647. l.endAngle = n.angle;
  1648. l.items.push(n);
  1649. if (m <= 20) {
  1650. j += '<li data-index="' + m + '" style="transform-origin: center center -' + l.r + "px; transform: translateZ(" + l.r + "px) rotateX(-" + n.angle + 'deg);">' + n.text + "</li>"
  1651. }
  1652. });
  1653. l.beginindex = 0;
  1654. l.endindex = 20;
  1655. l.endExceed = l.endAngle + 30;
  1656. g.html(j);
  1657. b.setAngle(l, l.beginAngle);
  1658. if ( !! l.selected) {
  1659. var h = a(l);
  1660. h.trigger("change");
  1661. if ( !! k.change) {
  1662. k.change(l.selected.obj, h)
  1663. }
  1664. }
  1665. },
  1666. bindEvent: function(g) {
  1667. var h = g[0];
  1668. h.addEventListener(c.event.start,
  1669. function(i) {
  1670. var j = a(this)[0];
  1671. j.isPicking = true;
  1672. i.preventDefault();
  1673. j.list.style.webkitTransition = "";
  1674. j.startY = (i.changedTouches ? i.changedTouches[0] : i).pageY;
  1675. j.lastAngle = j.list.angle;
  1676. b.updateInertiaParams(j, i, true)
  1677. },
  1678. false);
  1679. h.addEventListener(c.event.end,
  1680. function(i) {
  1681. var j = a(this)[0];
  1682. j.isPicking = false;
  1683. i.preventDefault();
  1684. b.startInertiaScroll(j, i)
  1685. },
  1686. false);
  1687. h.addEventListener(c.event.cancel,
  1688. function(i) {
  1689. var j = a(this)[0];
  1690. j.isPicking = false;
  1691. i.preventDefault();
  1692. b.startInertiaScroll(j, i)
  1693. },
  1694. false);
  1695. h.addEventListener(c.event.move,
  1696. function(l) {
  1697. var n = a(this)[0];
  1698. if (!n.isPicking) {
  1699. return
  1700. }
  1701. l.preventDefault();
  1702. var k = (l.changedTouches ? l.changedTouches[0] : l).pageY;
  1703. var j = k - n.startY;
  1704. var i = b.calcAngle(n, j);
  1705. var m = j > 0 ? n.lastAngle - i: n.lastAngle + i;
  1706. if (m > n.endExceed) {
  1707. m = n.endExceed
  1708. }
  1709. if (m < n.beginExceed) {
  1710. m = n.beginExceed
  1711. }
  1712. b.setAngle(n, m);
  1713. b.updateInertiaParams(n, l)
  1714. },
  1715. false)
  1716. },
  1717. updateInertiaParams: function(k, g, h) {
  1718. var j = g.changedTouches ? g.changedTouches[0] : g;
  1719. if (h) {
  1720. k.lastMoveStart = j.pageY;
  1721. k.lastMoveTime = g.timeStamp || Date.now();
  1722. k.startAngle = k.list.angle
  1723. } else {
  1724. var i = g.timeStamp || Date.now();
  1725. if (i - k.lastMoveTime > 300) {
  1726. k.lastMoveTime = i;
  1727. k.lastMoveStart = j.pageY
  1728. }
  1729. }
  1730. k.stopInertiaMove = true
  1731. },
  1732. startInertiaScroll: function(o, l) {
  1733. var n = l.changedTouches ? l.changedTouches[0] : l;
  1734. var m = l.timeStamp || Date.now();
  1735. var r = (n.pageY - o.lastMoveStart) / (m - o.lastMoveTime);
  1736. var h = r > 0 ? -1 : 1;
  1737. var g = h * 0.0006 * -1;
  1738. var k = Math.abs(r / g);
  1739. var i = r * k / 2;
  1740. var q = o.list.angle;
  1741. var j = b.calcAngle(o, i) * h;
  1742. var p = j;
  1743. if (q + j < o.beginExceed) {
  1744. j = o.beginExceed - q;
  1745. k = k * (j / p) * 0.6
  1746. }
  1747. if (q + j > o.endExceed) {
  1748. j = o.endExceed - q;
  1749. k = k * (j / p) * 0.6
  1750. }
  1751. if (j == 0) {
  1752. b.endScroll(o);
  1753. return
  1754. }
  1755. b.scrollDistAngle(o, m, q, j, k)
  1756. },
  1757. scrollDistAngle: function(j, i, k, g, h) {
  1758. j.stopInertiaMove = false; (function(p, q, l, m) {
  1759. var n = 13;
  1760. var r = m / n;
  1761. var s = 0; (function o() {
  1762. if (j.stopInertiaMove) {
  1763. return
  1764. }
  1765. var t = b.quartEaseOut(s, q, l, r);
  1766. b.setAngle(j, t);
  1767. s++;
  1768. if (s > r - 1 || t < j.beginExceed || t > j.endExceed) {
  1769. b.endScroll(j);
  1770. return
  1771. }
  1772. setTimeout(o, n)
  1773. })()
  1774. })(i, k, g, h)
  1775. },
  1776. endScroll: function(j) {
  1777. if (j.list.angle < j.beginAngle) {
  1778. j.list.style.webkitTransition = "150ms ease-out";
  1779. b.setAngle(j, j.beginAngle)
  1780. } else {
  1781. if (j.list.angle > j.endAngle) {
  1782. j.list.style.webkitTransition = "150ms ease-out";
  1783. b.setAngle(j, j.endAngle)
  1784. } else {
  1785. var h = parseInt((j.list.angle / j.itemAngle).toFixed(0));
  1786. j.list.style.webkitTransition = "100ms ease-out";
  1787. b.setAngle(j, j.itemAngle * h)
  1788. }
  1789. }
  1790. if (j.preselected != j.selected) {
  1791. var g = a(j);
  1792. var i = j.fop;
  1793. g.trigger("change");
  1794. if ( !! i.change) {
  1795. i.change(j.selected.obj, g)
  1796. }
  1797. }
  1798. },
  1799. calcElementItemVisibility: function(o, l) {
  1800. var h = a(o);
  1801. var g = h.find("ul");
  1802. var k = "";
  1803. var q = 0;
  1804. var p = o.items.length;
  1805. a.each(o.items,
  1806. function(i, s) {
  1807. var r = Math.abs(s.angle - l);
  1808. if (r < o.hightlightRange) {
  1809. o.selected = s;
  1810. if (!s.hightlight || !g.find('li[data-index="' + i + '"]').hasClass("highlight")) {
  1811. s.hightlight = true;
  1812. g.find('li[data-index="' + i + '"]').addClass("highlight")
  1813. }
  1814. } else {
  1815. if (r < o.visibleRange) {
  1816. if (!s.visible || !g.find('li[data-index="' + i + '"]').hasClass("visible")) {
  1817. s.visible = true;
  1818. g.find('li[data-index="' + i + '"]').addClass("visible")
  1819. }
  1820. if ( !! s.hightlight || g.find('li[data-index="' + i + '"]').hasClass("highlight")) {
  1821. s.hightlight = false;
  1822. g.find('li[data-index="' + i + '"]').removeClass("highlight")
  1823. }
  1824. if (p > i) {
  1825. p = i
  1826. }
  1827. if (q < i) {
  1828. q = i
  1829. }
  1830. } else {
  1831. if ( !! s.visible || g.find('li[data-index="' + i + '"]').hasClass("visible")) {
  1832. s.visible = false;
  1833. g.find('li[data-index="' + i + '"]').removeClass("visible")
  1834. }
  1835. if ( !! s.hightlight || g.find('li[data-index="' + i + '"]').hasClass("highlight")) {
  1836. s.hightlight = false;
  1837. g.find('li[data-index="' + i + '"]').removeClass("highlight")
  1838. }
  1839. }
  1840. }
  1841. });
  1842. if (o.items.length > 21) {
  1843. if (q >= o.endindex) {
  1844. var n = o.endindex + 11;
  1845. for (var m = o.endindex + 1; m < n; m++) {
  1846. if ( !! o.items[m]) {
  1847. var j = "";
  1848. if ( !! o.items[m].visible) {
  1849. j = 'class="visible"'
  1850. }
  1851. g.append("<li " + j + ' data-index="' + m + '" style="transform-origin: center center -' + o.r + "px; transform: translateZ(" + o.r + "px) rotateX(-" + o.items[m].angle + 'deg);">' + o.items[m].text + "</li>");
  1852. g.find('li[data-index="' + (m - 21) + '"]').remove();
  1853. o.endindex++;
  1854. o.beginindex++
  1855. }
  1856. }
  1857. } else {
  1858. if (p <= o.beginindex) {
  1859. var n = o.beginindex - 11;
  1860. for (var m = o.beginindex - 1; m > n; m--) {
  1861. if ( !! o.items[m]) {
  1862. var j = "";
  1863. if ( !! o.items[m].visible) {
  1864. j = 'class="visible"'
  1865. }
  1866. g.prepend("<li " + j + ' data-index="' + m + '" style="transform-origin: center center -' + o.r + "px; transform: translateZ(" + o.r + "px) rotateX(-" + o.items[m].angle + 'deg);">' + o.items[m].text + "</li>");
  1867. g.find('li[data-index="' + (m + 21) + '"]').remove();
  1868. o.endindex--;
  1869. o.beginindex--
  1870. }
  1871. }
  1872. }
  1873. }
  1874. }
  1875. },
  1876. setAngle: function(h, g) {
  1877. h.list.angle = g;
  1878. h.list.style.webkitTransform = "perspective(1000px) rotateY(0deg) rotateX(" + g + "deg)";
  1879. b.calcElementItemVisibility(h, g)
  1880. },
  1881. calcAngle: function(m, j) {
  1882. var g = parseFloat(m.r);
  1883. var i = parseFloat(m.r);
  1884. j = Math.abs(j);
  1885. var l = parseInt(j / m.d) * 180;
  1886. j = j % m.d;
  1887. var k = (g * g + i * i - j * j) / (2 * g * i);
  1888. var h = l + b.rad2deg(Math.acos(k));
  1889. return h
  1890. },
  1891. rad2deg: function(g) {
  1892. return g / (Math.PI / 180)
  1893. },
  1894. quartEaseOut: function(j, g, h, i) {
  1895. return - h * ((j = j / i - 1) * j * j * j - 1) + g
  1896. }
  1897. };
  1898. a.fn.fpicker = function(i) {
  1899. var h = {
  1900. data: [],
  1901. value: "value",
  1902. text: "text",
  1903. change: null
  1904. };
  1905. var g = a(this);
  1906. if ( !! g[0].fop) {
  1907. return g
  1908. }
  1909. a.extend(h, i || {});
  1910. g[0].fop = h;
  1911. b.init(g, h);
  1912. return g
  1913. };
  1914. a.fn.fpickerSetData = function(h) {
  1915. var g = a(this);
  1916. if (!g[0].fop) {
  1917. return g
  1918. }
  1919. g[0].fop.data = h;
  1920. b.initParams(g);
  1921. b.initData(g, g[0].fop);
  1922. return g
  1923. };
  1924. a.fn.fpickerSet = function(i) {
  1925. var g = a(this);
  1926. var h = g[0];
  1927. if (!h.fop) {
  1928. return g
  1929. }
  1930. h._value = i;
  1931. a.each(h.items,
  1932. function(l, n) {
  1933. if (n.value == i) {
  1934. b.setAngle(h, n.angle);
  1935. if (h.items.length > 21) {
  1936. var j = g.find("ul");
  1937. j.html("");
  1938. h.beginindex = n.id - 10;
  1939. h.endindex = n.id + 10;
  1940. for (var m = h.beginindex; m < h.endindex + 1; m++) {
  1941. if ( !! h.items[m]) {
  1942. var k = "";
  1943. if ( !! h.items[m].visible) {
  1944. k = 'class="visible"'
  1945. }
  1946. if ( !! h.items[m].hightlight) {
  1947. k = 'class="highlight"'
  1948. }
  1949. j.append("<li " + k + ' data-index="' + m + '" style="transform-origin: center center -' + h.r + "px; transform: translateZ(" + h.r + "px) rotateX(-" + h.items[m].angle + 'deg);">' + h.items[m].text + "</li>")
  1950. }
  1951. }
  1952. if ( !! h.selected) {
  1953. g.trigger("change");
  1954. if ( !! h.fop.change) {
  1955. h.fop.change(h.selected.obj, g)
  1956. }
  1957. }
  1958. }
  1959. return false
  1960. }
  1961. })
  1962. };
  1963. a.fn.fpickerGet = function() {
  1964. var g = a(this);
  1965. return g[0].selected.value || ""
  1966. };
  1967. a.fn.fpickerGetObj = function() {
  1968. var g = a(this);
  1969. return g[0].selected
  1970. }
  1971. })(window.jQuery, window.fui); (function(a, c) {
  1972. var b = {
  1973. init: function(d, f) {
  1974. f.id = c.guid();
  1975. var e = '<div class="f-poppicker f-pop" id="pop_' + f.id + '" data-page="' + c.pageid() + '" >';
  1976. e += '<div class="f-poppicker-header" >';
  1977. e += '<div class="f-poppicker-cancel">取消</div>';
  1978. e += '<div class="f-poppicker-ok">确定</div>';
  1979. e += "</div>";
  1980. e += '<div class="f-poppicker-body" ></div>';
  1981. e += "</div>";
  1982. a("body").append(e);
  1983. c.createMask();
  1984. b.initPicker(f);
  1985. b.bindEvent(d, f)
  1986. },
  1987. bindEvent: function(e, f) {
  1988. e.on("tap",
  1989. function() {
  1990. var h = a(this);
  1991. if (h.attr("readonly") || h.parents(".lr-form-row").attr("readonly")) {
  1992. return false
  1993. }
  1994. var j = h[0];
  1995. var i = j.fop;
  1996. if ( !! i.callback) {
  1997. i.callback()
  1998. }
  1999. var g = a("#pop_" + i.id);
  2000. if (!g.hasClass("active")) {
  2001. g.addClass("active");
  2002. c.showMask()
  2003. }
  2004. setTimeout(function() {
  2005. if (i.value != undefined && i.value != "" && i.value != null) {
  2006. var k = i.value.split(",");
  2007. a.each(k,
  2008. function(m, n) {
  2009. var l = a("#picker_" + i.id + "_" + m);
  2010. l.fpickerSet(n)
  2011. })
  2012. }
  2013. },
  2014. 300);
  2015. return false
  2016. });
  2017. var d = a("#pop_" + f.id);
  2018. d.find(".f-poppicker-cancel").on("tap",
  2019. function() {
  2020. var g = a(this).parents(".f-poppicker");
  2021. g.removeClass("active");
  2022. c.hideMask();
  2023. return false
  2024. });
  2025. d.find(".f-poppicker-ok").on("tap", {
  2026. $self: e,
  2027. fop: f
  2028. },
  2029. function(l) {
  2030. var h = a(this).parents(".f-poppicker");
  2031. h.removeClass("active");
  2032. c.hideMask();
  2033. l = l || window.event;
  2034. var m = l.data.fop;
  2035. var j = l.data.$self;
  2036. var p = [];
  2037. var q = [];
  2038. var k = [];
  2039. for (var n = 0; n < m.level; n++) {
  2040. var g = a("#picker_" + m.id + "_" + n);
  2041. var o = g.fpickerGetObj();
  2042. p.push(o.text);
  2043. q.push(o.value);
  2044. k.push(o)
  2045. }
  2046. if (m.value != String(q)) {
  2047. m.value = String(q);
  2048. m.text = String(p);
  2049. j.trigger("change");
  2050. if ( !! m.change) {
  2051. m.change(m.value, m.text, k, j)
  2052. }
  2053. }
  2054. return false
  2055. })
  2056. },
  2057. initPicker: function(g) {
  2058. var e = a("#pop_" + g.id + " .f-poppicker-body");
  2059. for (var f = 0; f < g.level; f++) {
  2060. var d = a('<div id="picker_' + g.id + "_" + f + '" data-level="' + f + '" ></div>');
  2061. d.css("width", (100 / g.level + "%"));
  2062. e.append(d);
  2063. d.fpicker({
  2064. data: [],
  2065. value: g.ivalue,
  2066. text: g.itext,
  2067. change: function(k, h) {
  2068. var j = parseInt(h.attr("data-level")) + 1;
  2069. if (g.level > 1 && j < g.level) {
  2070. var i = a("#picker_" + g.id + "_" + j);
  2071. i.fpickerSetData(k.children)
  2072. }
  2073. }
  2074. })
  2075. }
  2076. a("#picker_" + g.id + "_0").fpickerSetData(g.data)
  2077. }
  2078. };
  2079. a.fn.fpoppicker = function(f) {
  2080. var e = {
  2081. data: [],
  2082. level: 1,
  2083. change: false,
  2084. ivalue: "value",
  2085. itext: "text"
  2086. };
  2087. var d = a(this);
  2088. if ( !! d[0].fop) {
  2089. return d
  2090. }
  2091. a.extend(e, f || {});
  2092. d[0].fop = e;
  2093. b.init(d, e);
  2094. return d
  2095. };
  2096. a.fn.fpoppickerSet = function(h) {
  2097. var d = a(this);
  2098. var f = d[0].fop;
  2099. if (h != undefined && h != "" && h != null) {
  2100. var i = h.split(",");
  2101. var g = [];
  2102. var e = [];
  2103. a.each(i,
  2104. function(k, m) {
  2105. var j = a("#picker_" + f.id + "_" + k);
  2106. j.fpickerSet(m);
  2107. var l = j.fpickerGetObj();
  2108. if (l) {
  2109. g.push(l.text || "");
  2110. e.push(l)
  2111. }
  2112. });
  2113. f.value = h;
  2114. f.text = String(g);
  2115. d.trigger("change");
  2116. if ( !! f.change) {
  2117. f.change(f.value, f.text, e, d)
  2118. }
  2119. }
  2120. };
  2121. a.fn.fpoppickerSetData = function(e) {
  2122. var d = a(this);
  2123. if (d.length > 0) {
  2124. var f = d[0].fop;
  2125. if (f) {
  2126. a("#picker_" + f.id + "_0").fpickerSetData(e)
  2127. }
  2128. }
  2129. d = null
  2130. }
  2131. })(window.jQuery, window.fui); (function(a, c) {
  2132. var b = {
  2133. init: function(e, h) {
  2134. h.id = c.guid();
  2135. var g = '<div class="f-dtpicker f-pop" id="dt_' + h.id + '" data-type="' + h.type + '" data-page="' + c.pageid() + '" >';
  2136. g += '<div class="f-dtpicker-header" >';
  2137. g += '<div class="f-dtpicker-cancel">取消</div>';
  2138. g += '<div class="f-dtpicker-ok">确定</div>';
  2139. g += "</div>";
  2140. g += '<div class="f-dtpicker-title">';
  2141. g += '<h5 data-id="title-y">' + h.label[0] + "</h5>";
  2142. g += '<h5 data-id="title-m">' + h.label[1] + "</h5>";
  2143. g += '<h5 data-id="title-d">' + h.label[2] + "</h5>";
  2144. g += '<h5 data-id="title-h">' + h.label[3] + "</h5>";
  2145. g += '<h5 data-id="title-i">' + h.label[4] + "</h5>";
  2146. g += "</div>";
  2147. g += '<div class="f-dtpicker-body" ></div>';
  2148. g += "</div>";
  2149. a("body").append(g);
  2150. c.createMask();
  2151. switch (h.type) {
  2152. case "datetime":
  2153. var f = b.initYear(h);
  2154. var d = b.initMonth(h);
  2155. b.initDay(h, f, d);
  2156. b.initHour(h);
  2157. b.initMinute(h);
  2158. break;
  2159. case "date":
  2160. var f = b.initYear(h);
  2161. var d = b.initMonth(h);
  2162. b.initDay(h, f, d);
  2163. break;
  2164. case "time":
  2165. b.initHour(h);
  2166. b.initMinute(h);
  2167. break;
  2168. case "month":
  2169. b.initYear(h);
  2170. b.initMonth(h);
  2171. break;
  2172. default:
  2173. var f = b.initYear(h);
  2174. var d = b.initMonth(h);
  2175. b.initDay(h, f, d);
  2176. b.initHour(h);
  2177. b.initMinute(h);
  2178. break
  2179. }
  2180. b.bindEvent(e, h)
  2181. },
  2182. bindEvent: function(e, f) {
  2183. e.on("tap",
  2184. function() {
  2185. var h = a(this);
  2186. if (h.attr("readonly") || h.parents(".lr-form-row").attr("readonly")) {
  2187. return false
  2188. }
  2189. var j = h[0];
  2190. var i = j.fop;
  2191. if ( !! i.callback) {
  2192. i.callback()
  2193. }
  2194. var g = a("#dt_" + i.id);
  2195. if (!g.hasClass("active")) {
  2196. g.addClass("active");
  2197. c.showMask()
  2198. }
  2199. setTimeout(function() {
  2200. if (i.value != undefined && i.value != "" && i.value != null) {
  2201. b.setValue(i, i.value)
  2202. }
  2203. },
  2204. 300);
  2205. return false
  2206. });
  2207. var d = a("#dt_" + f.id);
  2208. d.find(".f-dtpicker-cancel").on("tap",
  2209. function() {
  2210. var g = a(this).parents(".f-dtpicker");
  2211. g.removeClass("active");
  2212. c.hideMask();
  2213. return false
  2214. });
  2215. d.find(".f-dtpicker-ok").on("tap", {
  2216. $self: e,
  2217. fop: f
  2218. },
  2219. function(i) {
  2220. var g = a(this).parents(".f-dtpicker");
  2221. g.removeClass("active");
  2222. c.hideMask();
  2223. var j = i.data.fop;
  2224. var h = i.data.$self;
  2225. var l = "";
  2226. switch (j.type) {
  2227. case "datetime":
  2228. var k = b.getfYear(j) + "-" + b.getfMonth(j) + "-" + b.getfDay(j) + " " + b.getfHour(j) + ":" + b.getfMinute(j);
  2229. l = c.date.format(k, j.format || "yyyy-MM-dd hh:mm");
  2230. break;
  2231. case "date":
  2232. var k = b.getfYear(j) + "-" + b.getfMonth(j) + "-" + b.getfDay(j);
  2233. l = c.date.format(k, j.format || "yyyy-MM-dd");
  2234. break;
  2235. case "time":
  2236. var k = "2017-12-18 " + b.getfHour(j) + ":" + b.getfMinute(j);
  2237. l = c.date.format(k, j.format || "hh:mm");
  2238. break;
  2239. case "month":
  2240. var k = b.getfYear(j) + "-" + b.getfMonth(j) + "-01";
  2241. l = c.date.format(k, j.format || "yyyy-MM");
  2242. break
  2243. }
  2244. if (j.value != l) {
  2245. j.value = l;
  2246. h.trigger("change");
  2247. if ( !! j.change) {
  2248. j.change(j.value, h)
  2249. }
  2250. }
  2251. return false
  2252. })
  2253. },
  2254. initYear: function(l) {
  2255. var h = [];
  2256. var g = new Date();
  2257. var m = g.getFullYear();
  2258. for (var j = -50; j < 51; j++) {
  2259. var f = m + j;
  2260. var k = {
  2261. text: f,
  2262. value: f
  2263. };
  2264. h.push(k)
  2265. }
  2266. var e = a("#dt_" + l.id + " .f-dtpicker-body");
  2267. var d = a('<div id="picker_' + l.id + '_y" class="f-dt-picker f-dt-y" ></div>');
  2268. e.append(d);
  2269. d.fpicker({
  2270. data: h
  2271. }).fpickerSet(m);
  2272. return d
  2273. },
  2274. initMonth: function(h) {
  2275. var f = new Date();
  2276. var g = f.getMonth() + 1;
  2277. var e = a("#dt_" + h.id + " .f-dtpicker-body");
  2278. var d = a('<div id="picker_' + h.id + '_m" class="f-dt-picker f-dt-m" ></div>');
  2279. e.append(d);
  2280. d.fpicker({
  2281. data: [{
  2282. text: "01",
  2283. value: 1
  2284. },
  2285. {
  2286. text: "02",
  2287. value: 2
  2288. },
  2289. {
  2290. text: "03",
  2291. value: 3
  2292. },
  2293. {
  2294. text: "04",
  2295. value: 4
  2296. },
  2297. {
  2298. text: "05",
  2299. value: 5
  2300. },
  2301. {
  2302. text: "06",
  2303. value: 6
  2304. },
  2305. {
  2306. text: "07",
  2307. value: 7
  2308. },
  2309. {
  2310. text: "08",
  2311. value: 8
  2312. },
  2313. {
  2314. text: "09",
  2315. value: 9
  2316. },
  2317. {
  2318. text: "10",
  2319. value: 10
  2320. },
  2321. {
  2322. text: "11",
  2323. value: 11
  2324. },
  2325. {
  2326. text: "12",
  2327. value: 12
  2328. }]
  2329. }).fpickerSet(g);
  2330. return d
  2331. },
  2332. initDay: function(k, g, d) {
  2333. var h = new Date();
  2334. var i = h.getDate();
  2335. var j = d.fpickerGet();
  2336. var l = g.fpickerGet();
  2337. var f = a("#dt_" + k.id + " .f-dtpicker-body");
  2338. var e = a('<div id="picker_' + k.id + '_d" class="f-dt-picker f-dt-d" ></div>');
  2339. f.append(e);
  2340. e.fpicker({
  2341. data: b.getDayData(l, j)
  2342. }).fpickerSet(i);
  2343. g[0].fop.change = function(t, m) {
  2344. var r = t.value;
  2345. var q = d.fpickerGet();
  2346. var o = e.fpickerGet();
  2347. var p = e[0].fop.data.length;
  2348. var s = b.getDayNum(r, q);
  2349. if (p != s) {
  2350. if (o > s) {
  2351. o = s
  2352. }
  2353. var n = b.getDayData(r, q);
  2354. e.fpickerSetData(n).fpickerSet(o)
  2355. }
  2356. };
  2357. d[0].fop.change = function(t, m) {
  2358. var q = t.value;
  2359. var r = g.fpickerGet();
  2360. var o = e.fpickerGet();
  2361. var p = e[0].fop.data.length;
  2362. var s = b.getDayNum(r, q);
  2363. if (p != s) {
  2364. if (o > s) {
  2365. o = s
  2366. }
  2367. var n = b.getDayData(r, q);
  2368. e.fpickerSetData(n).fpickerSet(o)
  2369. }
  2370. }
  2371. },
  2372. initHour: function(i) {
  2373. var g = [{
  2374. text: "00",
  2375. value: 0
  2376. },
  2377. {
  2378. text: "01",
  2379. value: 1
  2380. },
  2381. {
  2382. text: "02",
  2383. value: 2
  2384. },
  2385. {
  2386. text: "03",
  2387. value: 3
  2388. },
  2389. {
  2390. text: "04",
  2391. value: 4
  2392. },
  2393. {
  2394. text: "05",
  2395. value: 5
  2396. },
  2397. {
  2398. text: "06",
  2399. value: 6
  2400. },
  2401. {
  2402. text: "07",
  2403. value: 7
  2404. },
  2405. {
  2406. text: "08",
  2407. value: 8
  2408. },
  2409. {
  2410. text: "09",
  2411. value: 9
  2412. },
  2413. {
  2414. text: "10",
  2415. value: 10
  2416. },
  2417. {
  2418. text: "11",
  2419. value: 11
  2420. },
  2421. {
  2422. text: "12",
  2423. value: 12
  2424. },
  2425. {
  2426. text: "13",
  2427. value: 13
  2428. },
  2429. {
  2430. text: "14",
  2431. value: 14
  2432. },
  2433. {
  2434. text: "15",
  2435. value: 15
  2436. },
  2437. {
  2438. text: "16",
  2439. value: 16
  2440. },
  2441. {
  2442. text: "17",
  2443. value: 17
  2444. },
  2445. {
  2446. text: "18",
  2447. value: 18
  2448. },
  2449. {
  2450. text: "19",
  2451. value: 19
  2452. },
  2453. {
  2454. text: "20",
  2455. value: 20
  2456. },
  2457. {
  2458. text: "21",
  2459. value: 21
  2460. },
  2461. {
  2462. text: "22",
  2463. value: 22
  2464. },
  2465. {
  2466. text: "23",
  2467. value: 23
  2468. },
  2469. ];
  2470. var f = new Date();
  2471. var h = f.getHours();
  2472. var e = a("#dt_" + i.id + " .f-dtpicker-body");
  2473. var d = a('<div id="picker_' + i.id + '_h" class="f-dt-picker f-dt-h" ></div>');
  2474. e.append(d);
  2475. d.fpicker({
  2476. data: g
  2477. }).fpickerSet(h)
  2478. },
  2479. initMinute: function(i) {
  2480. var g = [{
  2481. text: "00",
  2482. value: 0
  2483. },
  2484. {
  2485. text: "01",
  2486. value: 1
  2487. },
  2488. {
  2489. text: "02",
  2490. value: 2
  2491. },
  2492. {
  2493. text: "03",
  2494. value: 3
  2495. },
  2496. {
  2497. text: "04",
  2498. value: 4
  2499. },
  2500. {
  2501. text: "05",
  2502. value: 5
  2503. },
  2504. {
  2505. text: "06",
  2506. value: 6
  2507. },
  2508. {
  2509. text: "07",
  2510. value: 7
  2511. },
  2512. {
  2513. text: "08",
  2514. value: 8
  2515. },
  2516. {
  2517. text: "09",
  2518. value: 9
  2519. },
  2520. {
  2521. text: "10",
  2522. value: 10
  2523. },
  2524. {
  2525. text: "11",
  2526. value: 11
  2527. },
  2528. {
  2529. text: "12",
  2530. value: 12
  2531. },
  2532. {
  2533. text: "13",
  2534. value: 13
  2535. },
  2536. {
  2537. text: "14",
  2538. value: 14
  2539. },
  2540. {
  2541. text: "15",
  2542. value: 15
  2543. },
  2544. {
  2545. text: "16",
  2546. value: 16
  2547. },
  2548. {
  2549. text: "17",
  2550. value: 17
  2551. },
  2552. {
  2553. text: "18",
  2554. value: 18
  2555. },
  2556. {
  2557. text: "19",
  2558. value: 19
  2559. },
  2560. {
  2561. text: "20",
  2562. value: 20
  2563. },
  2564. {
  2565. text: "21",
  2566. value: 21
  2567. },
  2568. {
  2569. text: "22",
  2570. value: 22
  2571. },
  2572. {
  2573. text: "23",
  2574. value: 23
  2575. },
  2576. {
  2577. text: "24",
  2578. value: 24
  2579. },
  2580. {
  2581. text: "25",
  2582. value: 25
  2583. },
  2584. {
  2585. text: "26",
  2586. value: 26
  2587. },
  2588. {
  2589. text: "27",
  2590. value: 27
  2591. },
  2592. {
  2593. text: "28",
  2594. value: 28
  2595. },
  2596. {
  2597. text: "29",
  2598. value: 29
  2599. },
  2600. {
  2601. text: "30",
  2602. value: 30
  2603. },
  2604. {
  2605. text: "31",
  2606. value: 31
  2607. },
  2608. {
  2609. text: "32",
  2610. value: 32
  2611. },
  2612. {
  2613. text: "33",
  2614. value: 33
  2615. },
  2616. {
  2617. text: "34",
  2618. value: 34
  2619. },
  2620. {
  2621. text: "35",
  2622. value: 35
  2623. },
  2624. {
  2625. text: "36",
  2626. value: 36
  2627. },
  2628. {
  2629. text: "37",
  2630. value: 37
  2631. },
  2632. {
  2633. text: "38",
  2634. value: 38
  2635. },
  2636. {
  2637. text: "39",
  2638. value: 39
  2639. },
  2640. {
  2641. text: "40",
  2642. value: 40
  2643. },
  2644. {
  2645. text: "41",
  2646. value: 41
  2647. },
  2648. {
  2649. text: "42",
  2650. value: 42
  2651. },
  2652. {
  2653. text: "43",
  2654. value: 43
  2655. },
  2656. {
  2657. text: "44",
  2658. value: 44
  2659. },
  2660. {
  2661. text: "45",
  2662. value: 45
  2663. },
  2664. {
  2665. text: "46",
  2666. value: 46
  2667. },
  2668. {
  2669. text: "47",
  2670. value: 47
  2671. },
  2672. {
  2673. text: "48",
  2674. value: 48
  2675. },
  2676. {
  2677. text: "49",
  2678. value: 49
  2679. },
  2680. {
  2681. text: "50",
  2682. value: 50
  2683. },
  2684. {
  2685. text: "51",
  2686. value: 51
  2687. },
  2688. {
  2689. text: "52",
  2690. value: 52
  2691. },
  2692. {
  2693. text: "53",
  2694. value: 53
  2695. },
  2696. {
  2697. text: "54",
  2698. value: 54
  2699. },
  2700. {
  2701. text: "55",
  2702. value: 55
  2703. },
  2704. {
  2705. text: "56",
  2706. value: 56
  2707. },
  2708. {
  2709. text: "57",
  2710. value: 57
  2711. },
  2712. {
  2713. text: "58",
  2714. value: 58
  2715. },
  2716. {
  2717. text: "59",
  2718. value: 59
  2719. }];
  2720. var f = new Date();
  2721. var h = f.getMinutes();
  2722. var e = a("#dt_" + i.id + " .f-dtpicker-body");
  2723. var d = a('<div id="picker_' + i.id + '_i" class="f-dt-picker f-dt-i" ></div>');
  2724. e.append(d);
  2725. d.fpicker({
  2726. data: g
  2727. }).fpickerSet(h)
  2728. },
  2729. getDayData: function(j, h) {
  2730. var f = [];
  2731. for (var g = 1; g <= b.getDayNum(j, h); g++) {
  2732. var e = "";
  2733. if (g < 10) {
  2734. e = "0" + g
  2735. } else {
  2736. e = "" + g
  2737. }
  2738. var d = {
  2739. text: e,
  2740. value: g
  2741. };
  2742. f.push(d)
  2743. }
  2744. return f
  2745. },
  2746. getDayNum: function(e, d) {
  2747. if ([1, 3, 5, 7, 8, 10, 12].indexOf(d) > -1) {
  2748. return 31
  2749. } else {
  2750. if ([4, 6, 9, 11].indexOf(d) > -1) {
  2751. return 30
  2752. } else {
  2753. if (c.date.isLeapYear(e)) {
  2754. return 29
  2755. } else {
  2756. return 28
  2757. }
  2758. }
  2759. }
  2760. },
  2761. getfYear: function(e) {
  2762. var d = a("#picker_" + e.id + "_y");
  2763. return d.fpickerGet()
  2764. },
  2765. getfMonth: function(e) {
  2766. var d = a("#picker_" + e.id + "_m");
  2767. return d.fpickerGetObj().text
  2768. },
  2769. getfDay: function(e) {
  2770. var d = a("#picker_" + e.id + "_d");
  2771. return d.fpickerGetObj().text
  2772. },
  2773. getfHour: function(e) {
  2774. var d = a("#picker_" + e.id + "_h");
  2775. return d.fpickerGetObj().text
  2776. },
  2777. getfMinute: function(e) {
  2778. var d = a("#picker_" + e.id + "_i");
  2779. return d.fpickerGetObj().text
  2780. },
  2781. setValue: function(k, l) {
  2782. if (k.type == "time") {
  2783. l = "2017-12-08 " + l
  2784. }
  2785. var j = c.date.parse(l);
  2786. var i = a("#picker_" + k.id + "_y");
  2787. if (i.length > 0) {
  2788. i.fpickerSet(j.getFullYear())
  2789. }
  2790. var h = a("#picker_" + k.id + "_m");
  2791. if (h.length > 0) {
  2792. h.fpickerSet(j.getMonth() + 1)
  2793. }
  2794. var e = a("#picker_" + k.id + "_d");
  2795. if (e.length > 0) {
  2796. e.fpickerSet(j.getDate())
  2797. }
  2798. var f = a("#picker_" + k.id + "_h");
  2799. if (f.length > 0) {
  2800. f.fpickerSet(j.getHours())
  2801. }
  2802. var g = a("#picker_" + k.id + "_i");
  2803. if (g.length > 0) {
  2804. g.fpickerSet(j.getMinutes())
  2805. }
  2806. }
  2807. };
  2808. a.fn.fdtpicker = function(f) {
  2809. var e = {
  2810. type: "datetime",
  2811. label: ["年", "月", "日", "时", "分"],
  2812. format: false,
  2813. change: false
  2814. };
  2815. var d = a(this);
  2816. if ( !! d[0].fop) {
  2817. return d
  2818. }
  2819. a.extend(e, f || {});
  2820. d[0].fop = e;
  2821. b.init(d, e);
  2822. return d
  2823. }
  2824. })(window.jQuery, window.fui); (function(a) {
  2825. var b = {
  2826. init: function(c) {
  2827. c.addClass("f-switch");
  2828. c.html('<div class="f-switch-handle"></div>');
  2829. c.on("tap",
  2830. function() {
  2831. var d = a(this);
  2832. if (d.attr("readonly") || d.parents(".lr-form-row").attr("readonly")) {
  2833. return false
  2834. }
  2835. if (d.hasClass("f-active")) {
  2836. d.removeClass("f-active")
  2837. } else {
  2838. d.addClass("f-active")
  2839. }
  2840. d.trigger("change");
  2841. return false
  2842. })
  2843. }
  2844. };
  2845. a.fn.fswitch = function() {
  2846. a(this).each(function() {
  2847. var c = a(this);
  2848. b.init(c)
  2849. });
  2850. return a(this)
  2851. };
  2852. a.fn.fswitchGet = function() {
  2853. var c = a(this);
  2854. var d = 0;
  2855. if (c.hasClass("f-active")) {
  2856. d = 1
  2857. }
  2858. return d
  2859. };
  2860. a.fn.fswitchSet = function(d) {
  2861. var c = a(this);
  2862. if (d != 1 && d != "1") {
  2863. c.removeClass("f-active")
  2864. } else {
  2865. if (!c.hasClass("f-active")) {
  2866. c.addClass("f-active")
  2867. }
  2868. }
  2869. }
  2870. })(window.jQuery); (function(a, c) {
  2871. var b = {
  2872. init: function(h) {
  2873. if (!h.id) {
  2874. alert("设置下id信息!");
  2875. return false
  2876. }
  2877. var d = a("#" + h.id);
  2878. if (d.length == 0) {
  2879. var e = '<div class="f-actionsheet f-pop" id="' + h.id + '" data-page="' + c.pageid() + '" ></div>';
  2880. c.createMask();
  2881. d = a(e);
  2882. a("body").append(d);
  2883. var i = {};
  2884. var f = c.guid();
  2885. a.each(h.data,
  2886. function(j, n) {
  2887. var k = a.extend({
  2888. group: f,
  2889. text: "按钮" + j,
  2890. },
  2891. n);
  2892. i[k.group] = i[k.group] || a('<ul class="f-table"></ul>');
  2893. var m = "";
  2894. if ( !! k.mark) {
  2895. m = 'style="color:red;"'
  2896. }
  2897. var l = '<li class="f-table-cell"><a data-event="' + j + '" ' + m + ' href="#">' + k.text + "</a></li>";
  2898. i[k.group].append(l)
  2899. });
  2900. for (var g in i) {
  2901. d.append(i[g])
  2902. }
  2903. d.append('<ul class="f-table"><li class="f-table-cell"><a data-event="cancel" href="#">取消</a></li></ul>');
  2904. d.on("tap", "a", {
  2905. op: h
  2906. },
  2907. function(k) {
  2908. var j = a(this);
  2909. var n = k.data.op;
  2910. var m = j.attr("data-event");
  2911. var l = null;
  2912. if (m == "cancel") {
  2913. l = n.cancel
  2914. } else {
  2915. l = n.data[m].event
  2916. }
  2917. c.hideMask();
  2918. a("#" + n.id).removeClass("active");
  2919. if ( !! l) {
  2920. setTimeout(function() {
  2921. l()
  2922. },
  2923. 300)
  2924. }
  2925. return false
  2926. })
  2927. }
  2928. c.showMask();
  2929. d.addClass("active")
  2930. }
  2931. };
  2932. c.actionsheet = function(e) {
  2933. var d = {
  2934. id: "",
  2935. data: [],
  2936. cancel: false
  2937. };
  2938. a.extend(d, e || {});
  2939. b.init(d)
  2940. }
  2941. })(window.jQuery, window.fui); (function(a, c) {
  2942. var b = {
  2943. init: function(g) {
  2944. var e = a("body");
  2945. if (g.type != "toast") {
  2946. if (a(".f-dialog").length > 0) {
  2947. a(".f-dialog").remove();
  2948. a(".f-dialog-mask").remove();
  2949. return false
  2950. }
  2951. var f = '<div class="f-dialog"></div><div class="f-dialog-mask"></div>';
  2952. e.append(f);
  2953. b[g.type](g);
  2954. b.bindEvent(g);
  2955. a(".f-dialog-mask").fadeIn();
  2956. a(".f-dialog").show("fast",
  2957. function() {
  2958. a(this).addClass("active")
  2959. })
  2960. } else {
  2961. var d = a('<div class="f-toast-container" ><div class="f-toast-message" >' + g.msg + "</div></div>");
  2962. e.append(d);
  2963. d.fadeIn(function() {
  2964. var h = d;
  2965. setTimeout(function() {
  2966. h.fadeOut(function() {
  2967. setTimeout(function() {
  2968. h.remove();
  2969. h = null
  2970. },
  2971. 100)
  2972. })
  2973. },
  2974. g.timeout);
  2975. d.on("click",
  2976. function() {
  2977. var i = a(this);
  2978. i.fadeOut(function() {
  2979. i.remove();
  2980. setTimeout(function() {
  2981. i.remove();
  2982. i = null
  2983. },
  2984. 100)
  2985. })
  2986. });
  2987. d = null
  2988. })
  2989. }
  2990. },
  2991. bindEvent: function(d) {
  2992. a(".f-dialog").on("tap", ".f-dialog-btn", {
  2993. op: d
  2994. },
  2995. function(h) {
  2996. var i = h.data.op;
  2997. var f = a(this).attr("data-index");
  2998. var g = a(".f-dialog input").val();
  2999. a(".f-dialog-mask").fadeOut(function() {
  3000. a(".f-dialog-mask").remove()
  3001. });
  3002. a(".f-dialog").fadeOut(function() {
  3003. a(".f-dialog").remove()
  3004. });
  3005. if ( !! i.callback) {
  3006. setTimeout(function() {
  3007. i.callback(f, g)
  3008. },
  3009. 300)
  3010. }
  3011. })
  3012. },
  3013. warning: function(g) {
  3014. var f = a(".f-dialog");
  3015. var d = a('<div class="f-dialog-body" ><div class="f-dialog-title" >' + g.title + '</div><div class="f-dialog-text">' + g.msg + "</div></div>");
  3016. var e = a('<div class="f-dialog-btns"><span data-index="0" class="f-dialog-btn f-dialog-btn-bold">' + g.btn + "</span></div>");
  3017. f.append(d);
  3018. f.append(e)
  3019. },
  3020. confirm: function(h) {
  3021. var f = a(".f-dialog");
  3022. var d = a('<div class="f-dialog-body" ><div class="f-dialog-title" >' + h.title + '</div><div class="f-dialog-text">' + h.msg + "</div></div>");
  3023. var e = a('<div class="f-dialog-btns"></div>');
  3024. var g = "";
  3025. a.each(h.btns,
  3026. function(i, j) {
  3027. g += '<span data-index="' + i + '" class="f-dialog-btn">' + j + "</span>"
  3028. });
  3029. e.html(g);
  3030. f.append(d);
  3031. f.append(e)
  3032. },
  3033. prompt: function(h) {
  3034. var f = a(".f-dialog");
  3035. var d = a('<div class="f-dialog-body" ><div class="f-dialog-title" >' + h.title + '</div><div class="f-dialog-text">' + h.msg + '</div> <div class="f-dialog-input" ><input type="text" placeholder="' + (h.input || "") + '"></div></div>');
  3036. var e = a('<div class="f-dialog-btns"></div>');
  3037. var g = "";
  3038. a.each(h.btns,
  3039. function(i, j) {
  3040. g += '<span data-index="' + i + '" class="f-dialog-btn">' + j + "</span>"
  3041. });
  3042. e.html(g);
  3043. f.append(d);
  3044. f.append(e);
  3045. f.find("input").focus()
  3046. }
  3047. };
  3048. c.dialog = function(e) {
  3049. var d = {
  3050. type: "toast",
  3051. title: "提示",
  3052. msg: "",
  3053. btn: "确定",
  3054. timeout: 2000,
  3055. btns: ["否", "是"],
  3056. callback: false
  3057. };
  3058. a.extend(d, e || {});
  3059. b.init(d)
  3060. };
  3061. c.loading = function(f, g) {
  3062. if (f) {
  3063. var e = "";
  3064. if ( !! g) {
  3065. e = '<div class="f-load-msg" >' + (g || "") + "</div>"
  3066. }
  3067. var d = a('<div class="f-load-mask"></div><div class="f-load-container" ><div class="f-load-body" ><div style="margin-right:0px;" class="f-pull-loading f-spinner" ></div> ' + e + "</div></div>");
  3068. a("body").append(d);
  3069. d.fadeIn()
  3070. } else {
  3071. a(".f-load-mask").fadeOut(function() {
  3072. a(this).remove()
  3073. });
  3074. a(".f-load-container").fadeOut(function() {
  3075. a(this).remove()
  3076. })
  3077. }
  3078. }
  3079. })(window.jQuery, window.fui); (function(a, k, i) {
  3080. var e = "f-scroll-wrapper";
  3081. var d = "f-scroll";
  3082. var f = "f-scrollbar";
  3083. var c = "f-scrollbar-indicator";
  3084. var h = f + "-vertical";
  3085. var g = f + "-horizontal";
  3086. var b = "f-active";
  3087. var j = {
  3088. quadratic: {
  3089. style: "cubic-bezier(0.25, 0.46, 0.45, 0.94)",
  3090. fn: function(n) {
  3091. return n * (2 - n)
  3092. }
  3093. },
  3094. circular: {
  3095. style: "cubic-bezier(0.1, 0.57, 0.1, 1)",
  3096. fn: function(n) {
  3097. return Math.sqrt(1 - (--n * n))
  3098. }
  3099. },
  3100. outCirc: {
  3101. style: "cubic-bezier(0.075, 0.82, 0.165, 1)"
  3102. },
  3103. outCubic: {
  3104. style: "cubic-bezier(0.165, 0.84, 0.44, 1)"
  3105. }
  3106. };
  3107. var m = k.Class.extend({
  3108. init: function(n, p) {
  3109. var o = a('<div class="' + d + '" ></div>');
  3110. o.html(n.children());
  3111. n.addClass(e);
  3112. n.html(o);
  3113. this.element = n[0];
  3114. this.wrapper = this.element;
  3115. this.scroller = this.wrapper.children[0];
  3116. this.scrollerStyle = this.scroller && this.scroller.style;
  3117. this.stopped = false;
  3118. this.options = a.extend(true, {
  3119. scrollY: true,
  3120. scrollX: false,
  3121. startX: 0,
  3122. startY: 0,
  3123. indicators: true,
  3124. stopPropagation: false,
  3125. hardwareAccelerated: true,
  3126. fixedBadAndorid: false,
  3127. preventDefaultException: {
  3128. tagName: /^(INPUT|TEXTAREA|BUTTON|SELECT|VIDEO)$/
  3129. },
  3130. momentum: true,
  3131. snapX: 0.5,
  3132. snap: false,
  3133. bounce: true,
  3134. bounceTime: 500,
  3135. bounceEasing: j.outCirc,
  3136. scrollTime: 500,
  3137. scrollEasing: j.outCubic,
  3138. directionLockThreshold: 5,
  3139. },
  3140. p);
  3141. this.x = 0;
  3142. this.y = 0;
  3143. this.translateZ = this.options.hardwareAccelerated ? " translateZ(0)": "";
  3144. this._init();
  3145. if (this.scroller) {
  3146. this.refresh();
  3147. this.scrollTo(this.options.startX, this.options.startY)
  3148. }
  3149. },
  3150. _init: function() {
  3151. this._initIndicators();
  3152. this._initEvent()
  3153. },
  3154. _initIndicators: function() {
  3155. var q = this;
  3156. q.indicators = [];
  3157. if (!this.options.indicators) {
  3158. return
  3159. }
  3160. var p = [],
  3161. o;
  3162. if (q.options.scrollY) {
  3163. o = {
  3164. el: this._createScrollBar(h),
  3165. listenX: false
  3166. };
  3167. this.wrapper.appendChild(o.el);
  3168. p.push(o)
  3169. }
  3170. if (this.options.scrollX) {
  3171. o = {
  3172. el: this._createScrollBar(g),
  3173. listenY: false
  3174. };
  3175. this.wrapper.appendChild(o.el);
  3176. p.push(o)
  3177. }
  3178. for (var n = p.length; n--;) {
  3179. this.indicators.push(new l(this, p[n]))
  3180. }
  3181. },
  3182. _initSnap: function() {
  3183. this.currentPage = {};
  3184. this.pages = [];
  3185. var y = this.snaps;
  3186. var q = y.length;
  3187. var r = 0;
  3188. var s = -1;
  3189. var A = 0;
  3190. var p = 0;
  3191. var v = 0;
  3192. var z = 0;
  3193. for (var o = 0; o < q; o++) {
  3194. var w = y[o];
  3195. var t = w.offsetLeft;
  3196. var u = w.offsetWidth;
  3197. if (o === 0 || t <= y[o - 1].offsetLeft) {
  3198. r = 0;
  3199. s++
  3200. }
  3201. if (!this.pages[r]) {
  3202. this.pages[r] = []
  3203. }
  3204. A = this._getSnapX(t);
  3205. z = Math.round((u) * this.options.snapX);
  3206. p = A - z;
  3207. v = A - u + z;
  3208. this.pages[r][s] = {
  3209. x: A,
  3210. leftX: p,
  3211. rightX: v,
  3212. pageX: r,
  3213. element: w
  3214. };
  3215. if (w.classList.contains(b)) {
  3216. this.currentPage = this.pages[r][0]
  3217. }
  3218. if (A >= this.maxScrollX) {
  3219. r++
  3220. }
  3221. }
  3222. this.options.startX = this.currentPage.x || 0
  3223. },
  3224. _getSnapX: function(n) {
  3225. return Math.max(Math.min(0, -n + (this.wrapperWidth / 2)), this.maxScrollX)
  3226. },
  3227. _gotoPage: function(o) {
  3228. this.currentPage = this.pages[Math.min(o, this.pages.length - 1)][0];
  3229. for (var n = 0,
  3230. p = this.snaps.length; n < p; n++) {
  3231. if (n === o) {
  3232. this.snaps[n].classList.add(b)
  3233. } else {
  3234. this.snaps[n].classList.remove(b)
  3235. }
  3236. }
  3237. this.scrollTo(this.currentPage.x, 0, this.options.scrollTime)
  3238. },
  3239. _nearestSnap: function(q) {
  3240. if (!this.pages.length) {
  3241. return {
  3242. x: 0,
  3243. pageX: 0
  3244. }
  3245. }
  3246. var n = 0;
  3247. var o = this.pages.length;
  3248. if (q > 0) {
  3249. q = 0
  3250. } else {
  3251. if (q < this.maxScrollX) {
  3252. q = this.maxScrollX
  3253. }
  3254. }
  3255. for (; n < o; n++) {
  3256. var p = this.direction === "left" ? this.pages[n][0].leftX: this.pages[n][0].rightX;
  3257. if (q >= p) {
  3258. return this.pages[n][0]
  3259. }
  3260. }
  3261. return {
  3262. x: 0,
  3263. pageX: 0
  3264. }
  3265. },
  3266. _initEvent: function(o) {
  3267. var n = o ? "removeEventListener": "addEventListener";
  3268. window[n]("orientationchange", this);
  3269. window[n]("resize", this);
  3270. this.scroller[n]("webkitTransitionEnd", this);
  3271. this.wrapper[n](k.event.start, this);
  3272. this.wrapper[n](k.event.cancel, this);
  3273. this.wrapper[n](k.event.end, this);
  3274. this.wrapper[n]("drag", this);
  3275. this.wrapper[n]("dragend", this);
  3276. this.wrapper[n]("flick", this);
  3277. this.wrapper[n]("scrollend", this);
  3278. if (this.options.scrollX) {
  3279. this.wrapper[n]("swiperight", this)
  3280. }
  3281. this.wrapper[n]("scrollstart", this);
  3282. this.wrapper[n]("refresh", this)
  3283. },
  3284. _handleIndicatorScrollend: function() {
  3285. this.indicators.map(function(n) {
  3286. n.fade()
  3287. })
  3288. },
  3289. _handleIndicatorScrollstart: function() {
  3290. this.indicators.map(function(n) {
  3291. n.fade(1)
  3292. })
  3293. },
  3294. _handleIndicatorRefresh: function() {
  3295. this.indicators.map(function(n) {
  3296. n.refresh()
  3297. })
  3298. },
  3299. handleEvent: function(n) {
  3300. if (this.stopped) {
  3301. this.resetPosition();
  3302. return
  3303. }
  3304. switch (n.type) {
  3305. case k.event.start:
  3306. this._start(n);
  3307. break;
  3308. case "drag":
  3309. this.options.stopPropagation && n.stopPropagation();
  3310. this._drag(n);
  3311. break;
  3312. case "dragend":
  3313. case "flick":
  3314. this.options.stopPropagation && n.stopPropagation();
  3315. this._flick(n);
  3316. break;
  3317. case k.event.cancel:
  3318. case k.event.end:
  3319. this._end(n);
  3320. break;
  3321. case "webkitTransitionEnd":
  3322. this.transitionTimer && this.transitionTimer.cancel();
  3323. this._transitionEnd(n);
  3324. break;
  3325. case "scrollstart":
  3326. this._handleIndicatorScrollstart(n);
  3327. break;
  3328. case "scrollend":
  3329. this._handleIndicatorScrollend(n);
  3330. this._scrollend(n);
  3331. n.stopPropagation();
  3332. break;
  3333. case "orientationchange":
  3334. case "resize":
  3335. this._resize();
  3336. break;
  3337. case "swiperight":
  3338. n.stopPropagation();
  3339. break;
  3340. case "refresh":
  3341. this._handleIndicatorRefresh(n);
  3342. break
  3343. }
  3344. },
  3345. _start: function(n) {
  3346. this.moved = this.needReset = false;
  3347. this._transitionTime();
  3348. if (this.isInTransition) {
  3349. this.needReset = true;
  3350. this.isInTransition = false;
  3351. var o = k.parseTranslateMatrix(k.getStyles(this.scroller, "webkitTransform"));
  3352. this.setTranslate(Math.round(o.x), Math.round(o.y));
  3353. k.trigger(this.scroller, "scrollend", this);
  3354. n.preventDefault()
  3355. }
  3356. this.reLayout();
  3357. k.trigger(this.scroller, "beforescrollstart", this)
  3358. },
  3359. _getDirectionByAngle: function(n) {
  3360. if (n < -80 && n > -100) {
  3361. return "up"
  3362. } else {
  3363. if (n >= 80 && n < 100) {
  3364. return "down"
  3365. } else {
  3366. if (n >= 170 || n <= -170) {
  3367. return "left"
  3368. } else {
  3369. if (n >= -35 && n <= 10) {
  3370. return "right"
  3371. }
  3372. }
  3373. }
  3374. }
  3375. return null
  3376. },
  3377. _drag: function(t) {
  3378. var r = t.detail;
  3379. var u = false;
  3380. var v = false;
  3381. var s = this._getDirectionByAngle(r.angle);
  3382. if (r.direction === "left" || r.direction === "right") {
  3383. if (this.options.scrollX) {
  3384. u = true;
  3385. if (!this.moved) {
  3386. k.gestures.session.lockDirection = true;
  3387. k.gestures.session.startDirection = r.direction
  3388. }
  3389. } else {
  3390. if (this.options.scrollY && !this.moved) {
  3391. v = true
  3392. }
  3393. }
  3394. } else {
  3395. if (r.direction === "up" || r.direction === "down") {
  3396. if (this.options.scrollY) {
  3397. u = true;
  3398. if (!this.moved) {
  3399. k.gestures.session.lockDirection = true;
  3400. k.gestures.session.startDirection = r.direction
  3401. }
  3402. } else {
  3403. if (this.options.scrollX && !this.moved) {
  3404. v = true
  3405. }
  3406. }
  3407. } else {
  3408. v = true
  3409. }
  3410. }
  3411. if (this.moved || u) {
  3412. t.stopPropagation();
  3413. r.gesture && r.gesture.preventDefault()
  3414. }
  3415. if (v) {
  3416. return
  3417. }
  3418. if (!this.moved) {
  3419. k.trigger(this.scroller, "scrollstart", this)
  3420. } else {
  3421. t.stopPropagation()
  3422. }
  3423. var p = 0;
  3424. var q = 0;
  3425. if (!this.moved) {
  3426. p = r.deltaX;
  3427. q = r.deltaY
  3428. } else {
  3429. p = r.deltaX - k.gestures.session.prevTouch.deltaX;
  3430. q = r.deltaY - k.gestures.session.prevTouch.deltaY
  3431. }
  3432. var n = Math.abs(r.deltaX);
  3433. var o = Math.abs(r.deltaY);
  3434. if (n > o + this.options.directionLockThreshold) {
  3435. q = 0
  3436. } else {
  3437. if (o >= n + this.options.directionLockThreshold) {
  3438. p = 0
  3439. }
  3440. }
  3441. p = this.hasHorizontalScroll ? p: 0;
  3442. q = this.hasVerticalScroll ? q: 0;
  3443. var w = this.x + p;
  3444. var x = this.y + q;
  3445. if (w > 0 || w < this.maxScrollX) {
  3446. w = this.options.bounce ? this.x + p / 3 : w > 0 ? 0 : this.maxScrollX
  3447. }
  3448. if (x > 0 || x < this.maxScrollY) {
  3449. x = this.options.bounce ? this.y + q / 3 : x > 0 ? 0 : this.maxScrollY
  3450. }
  3451. if (!this.requestAnimationFrame) {
  3452. this._updateTranslate()
  3453. }
  3454. this.direction = r.deltaX > 0 ? "right": "left";
  3455. this.moved = true;
  3456. this.x = w;
  3457. this.y = x;
  3458. k.trigger(this.scroller, "scroll", this)
  3459. },
  3460. _flick: function(o) {
  3461. if (!this.moved) {
  3462. return
  3463. }
  3464. o.stopPropagation();
  3465. var n = o.detail;
  3466. this._clearRequestAnimationFrame();
  3467. if (o.type === "dragend" && n.flick) {
  3468. return
  3469. }
  3470. var s = Math.round(this.x);
  3471. var t = Math.round(this.y);
  3472. this.isInTransition = false;
  3473. if (this.resetPosition(this.options.bounceTime)) {
  3474. return
  3475. }
  3476. this.scrollTo(s, t);
  3477. if (o.type === "dragend") {
  3478. k.trigger(this.scroller, "scrollend", this);
  3479. return
  3480. }
  3481. var u = 0;
  3482. var p = "";
  3483. if (this.options.momentum && n.flickTime < 300) {
  3484. var q = this.hasHorizontalScroll ? this._momentum(this.x, n.flickDistanceX, n.flickTime, this.maxScrollX, this.options.bounce ? this.wrapperWidth: 0, this.options.deceleration) : {
  3485. destination: s,
  3486. duration: 0
  3487. };
  3488. var r = this.hasVerticalScroll ? this._momentum(this.y, n.flickDistanceY, n.flickTime, this.maxScrollY, this.options.bounce ? this.wrapperHeight: 0, this.options.deceleration) : {
  3489. destination: t,
  3490. duration: 0
  3491. };
  3492. s = q.destination;
  3493. t = r.destination;
  3494. u = Math.max(q.duration, r.duration);
  3495. this.isInTransition = true
  3496. }
  3497. if (s != this.x || t != this.y) {
  3498. if (s > 0 || s < this.maxScrollX || t > 0 || t < this.maxScrollY) {
  3499. p = j.quadratic
  3500. }
  3501. this.scrollTo(s, t, u, p);
  3502. return
  3503. }
  3504. k.trigger(this.scroller, "scrollend", this)
  3505. },
  3506. _end: function(n) {
  3507. this.needReset = false;
  3508. if ((!this.moved && this.needReset) || n.type === k.event.cancel) {
  3509. this.resetPosition()
  3510. }
  3511. },
  3512. _transitionEnd: function(n) {
  3513. if (n.target != this.scroller || !this.isInTransition) {
  3514. return
  3515. }
  3516. this._transitionTime();
  3517. if (!this.resetPosition(this.options.bounceTime)) {
  3518. this.isInTransition = false;
  3519. k.trigger(this.scroller, "scrollend", this)
  3520. }
  3521. },
  3522. _scrollend: function(n) {
  3523. if ((this.y === 0 && this.maxScrollY === 0) || (Math.abs(this.y) > 0 && this.y <= this.maxScrollY)) {
  3524. k.trigger(this.scroller, "scrollbottom", this)
  3525. }
  3526. },
  3527. _resize: function() {
  3528. var n = this;
  3529. clearTimeout(n.resizeTimeout);
  3530. n.resizeTimeout = setTimeout(function() {
  3531. n.refresh()
  3532. },
  3533. n.options.resizePolling)
  3534. },
  3535. _transitionTime: function(o) {
  3536. o = o || 0;
  3537. this.scrollerStyle.webkitTransitionDuration = o + "ms";
  3538. if (this.indicators) {
  3539. for (var n = this.indicators.length; n--;) {
  3540. this.indicators[n].transitionTime(o)
  3541. }
  3542. }
  3543. if (o) {
  3544. this.transitionTimer && this.transitionTimer.cancel();
  3545. this.transitionTimer = k.later(function() {
  3546. k.trigger(this.scroller, "webkitTransitionEnd")
  3547. },
  3548. o + 100, this)
  3549. }
  3550. },
  3551. _transitionTimingFunction: function(n) {
  3552. this.scrollerStyle.webkitTransitionTimingFunction = n;
  3553. if (this.indicators) {
  3554. for (var o = this.indicators.length; o--;) {
  3555. this.indicators[o].transitionTimingFunction(n)
  3556. }
  3557. }
  3558. },
  3559. _translate: function(n, o) {
  3560. this.x = n;
  3561. this.y = o
  3562. },
  3563. _clearRequestAnimationFrame: function() {
  3564. if (this.requestAnimationFrame) {
  3565. cancelAnimationFrame(this.requestAnimationFrame);
  3566. this.requestAnimationFrame = null
  3567. }
  3568. },
  3569. _updateTranslate: function() {
  3570. var n = this;
  3571. if (n.x !== n.lastX || n.y !== n.lastY) {
  3572. n.setTranslate(n.x, n.y)
  3573. }
  3574. n.requestAnimationFrame = requestAnimationFrame(function() {
  3575. n._updateTranslate()
  3576. })
  3577. },
  3578. _createScrollBar: function(n) {
  3579. var p = i.createElement("div");
  3580. var o = i.createElement("div");
  3581. p.className = f + " " + n;
  3582. o.className = c;
  3583. p.appendChild(o);
  3584. if (n === h) {
  3585. this.scrollbarY = p;
  3586. this.scrollbarIndicatorY = o
  3587. } else {
  3588. if (n === g) {
  3589. this.scrollbarX = p;
  3590. this.scrollbarIndicatorX = o
  3591. }
  3592. }
  3593. this.wrapper.appendChild(p);
  3594. return p
  3595. },
  3596. _preventDefaultException: function(n, o) {
  3597. for (var p in o) {
  3598. if (o[p].test(n[p])) {
  3599. return true
  3600. }
  3601. }
  3602. return false
  3603. },
  3604. _reLayout: function() {
  3605. if (!this.hasHorizontalScroll) {
  3606. this.maxScrollX = 0;
  3607. this.scrollerWidth = this.wrapperWidth
  3608. }
  3609. if (!this.hasVerticalScroll) {
  3610. this.maxScrollY = 0;
  3611. this.scrollerHeight = this.wrapperHeight
  3612. }
  3613. this.indicators.map(function(r) {
  3614. r.refresh()
  3615. });
  3616. if (this.options.snap && typeof this.options.snap === "string") {
  3617. var p = this.scroller.querySelectorAll(this.options.snap);
  3618. this.itemLength = 0;
  3619. this.snaps = [];
  3620. for (var n = 0,
  3621. q = p.length; n < q; n++) {
  3622. var o = p[n];
  3623. if (o.parentNode === this.scroller) {
  3624. this.itemLength++;
  3625. this.snaps.push(o)
  3626. }
  3627. }
  3628. this._initSnap()
  3629. }
  3630. },
  3631. _momentum: function(n, q, u, s, v, o) {
  3632. var t = parseFloat(Math.abs(q) / u),
  3633. p,
  3634. r;
  3635. o = o === undefined ? 0.0006 : o;
  3636. p = n + (t * t) / (2 * o) * (q < 0 ? -1 : 1);
  3637. r = t / o;
  3638. if (p < s) {
  3639. p = v ? s - (v / 2.5 * (t / 8)) : s;
  3640. q = Math.abs(p - n);
  3641. r = q / t
  3642. } else {
  3643. if (p > 0) {
  3644. p = v ? v / 2.5 * (t / 8) : 0;
  3645. q = Math.abs(n) + p;
  3646. r = q / t
  3647. }
  3648. }
  3649. return {
  3650. destination: Math.round(p),
  3651. duration: r
  3652. }
  3653. },
  3654. _getTranslateStr: function(n, o) {
  3655. if (this.options.hardwareAccelerated) {
  3656. return "translate3d(" + n + "px," + o + "px,0px) " + this.translateZ
  3657. }
  3658. return "translate(" + n + "px," + o + "px) "
  3659. },
  3660. setStopped: function(n) {
  3661. this.stopped = !!n
  3662. },
  3663. setTranslate: function(o, p) {
  3664. this.x = o;
  3665. this.y = p;
  3666. this.scrollerStyle.webkitTransform = this._getTranslateStr(o, p);
  3667. if (this.indicators) {
  3668. for (var n = this.indicators.length; n--;) {
  3669. this.indicators[n].updatePosition()
  3670. }
  3671. }
  3672. this.lastX = this.x;
  3673. this.lastY = this.y;
  3674. k.trigger(this.scroller, "scroll", this)
  3675. },
  3676. reLayout: function() {
  3677. this.wrapper.offsetHeight;
  3678. var q = parseFloat(k.getStyles(this.wrapper, "padding-left")) || 0;
  3679. var r = parseFloat(k.getStyles(this.wrapper, "padding-right")) || 0;
  3680. var s = parseFloat(k.getStyles(this.wrapper, "padding-top")) || 0;
  3681. var p = parseFloat(k.getStyles(this.wrapper, "padding-bottom")) || 0;
  3682. var o = this.wrapper.clientWidth;
  3683. var n = this.wrapper.clientHeight;
  3684. this.scrollerWidth = this.scroller.offsetWidth;
  3685. this.scrollerHeight = this.scroller.offsetHeight;
  3686. this.wrapperWidth = o - q - r;
  3687. this.wrapperHeight = n - s - p;
  3688. this.maxScrollX = Math.min(this.wrapperWidth - this.scrollerWidth, 0);
  3689. this.maxScrollY = Math.min(this.wrapperHeight - this.scrollerHeight, 0);
  3690. this.hasHorizontalScroll = this.options.scrollX && this.maxScrollX < 0;
  3691. this.hasVerticalScroll = this.options.scrollY && this.maxScrollY < 0;
  3692. this._reLayout()
  3693. },
  3694. resetPosition: function(n) {
  3695. var o = this.x,
  3696. p = this.y;
  3697. n = n || 0;
  3698. if (!this.hasHorizontalScroll || this.x > 0) {
  3699. o = 0
  3700. } else {
  3701. if (this.x < this.maxScrollX) {
  3702. o = this.maxScrollX
  3703. }
  3704. }
  3705. if (!this.hasVerticalScroll || this.y > 0) {
  3706. p = 0
  3707. } else {
  3708. if (this.y < this.maxScrollY) {
  3709. p = this.maxScrollY
  3710. }
  3711. }
  3712. if (o == this.x && p == this.y) {
  3713. return false
  3714. }
  3715. this.scrollTo(o, p, n, this.options.scrollEasing);
  3716. return true
  3717. },
  3718. _reInit: function() {
  3719. var n = this.wrapper.querySelectorAll("." + d);
  3720. for (var o = 0,
  3721. p = n.length; o < p; o++) {
  3722. if (n[o].parentNode === this.wrapper) {
  3723. this.scroller = n[o];
  3724. break
  3725. }
  3726. }
  3727. this.scrollerStyle = this.scroller && this.scroller.style
  3728. },
  3729. refresh: function() {
  3730. this._reInit();
  3731. this.reLayout();
  3732. k.trigger(this.scroller, "refresh", this);
  3733. this.resetPosition()
  3734. },
  3735. scrollTo: function(p, q, o, n) {
  3736. var n = n || j.circular;
  3737. this.isInTransition = o > 0;
  3738. if (this.isInTransition) {
  3739. this._clearRequestAnimationFrame();
  3740. this._transitionTimingFunction(n.style);
  3741. this._transitionTime(o);
  3742. this.setTranslate(p, q)
  3743. } else {
  3744. this.setTranslate(p, q)
  3745. }
  3746. },
  3747. scrollToBottom: function(o, n) {
  3748. o = o || this.options.scrollTime;
  3749. this.scrollTo(0, this.maxScrollY, o, n)
  3750. },
  3751. gotoPage: function(n) {
  3752. this._gotoPage(n)
  3753. },
  3754. destroy: function() {
  3755. this._initEvent(true);
  3756. this.wrapper.setAttribute("data-scroll", "")
  3757. }
  3758. });
  3759. var l = function(o, n) {
  3760. this.wrapper = typeof n.el == "string" ? i.querySelector(n.el) : n.el;
  3761. this.wrapperStyle = this.wrapper.style;
  3762. this.indicator = this.wrapper.children[0];
  3763. this.indicatorStyle = this.indicator.style;
  3764. this.scroller = o;
  3765. this.options = a.extend({
  3766. listenX: true,
  3767. listenY: true,
  3768. fade: false,
  3769. speedRatioX: 0,
  3770. speedRatioY: 0
  3771. },
  3772. n);
  3773. this.sizeRatioX = 1;
  3774. this.sizeRatioY = 1;
  3775. this.maxPosX = 0;
  3776. this.maxPosY = 0;
  3777. if (this.options.fade) {
  3778. this.wrapperStyle.webkitTransform = this.scroller.translateZ;
  3779. this.wrapperStyle.webkitTransitionDuration = "0ms";
  3780. this.wrapperStyle.opacity = "0"
  3781. }
  3782. };
  3783. l.prototype = {
  3784. handleEvent: function(n) {},
  3785. transitionTime: function(n) {
  3786. n = n || 0;
  3787. this.indicatorStyle.webkitTransitionDuration = n + "ms"
  3788. },
  3789. transitionTimingFunction: function(n) {
  3790. this.indicatorStyle.webkitTransitionTimingFunction = n
  3791. },
  3792. refresh: function() {
  3793. this.transitionTime();
  3794. if (this.options.listenX && !this.options.listenY) {
  3795. this.indicatorStyle.display = this.scroller.hasHorizontalScroll ? "block": "none"
  3796. } else {
  3797. if (this.options.listenY && !this.options.listenX) {
  3798. this.indicatorStyle.display = this.scroller.hasVerticalScroll ? "block": "none"
  3799. } else {
  3800. this.indicatorStyle.display = this.scroller.hasHorizontalScroll || this.scroller.hasVerticalScroll ? "block": "none"
  3801. }
  3802. }
  3803. this.wrapper.offsetHeight;
  3804. if (this.options.listenX) {
  3805. this.wrapperWidth = this.wrapper.clientWidth;
  3806. this.indicatorWidth = Math.max(Math.round(this.wrapperWidth * this.wrapperWidth / (this.scroller.scrollerWidth || this.wrapperWidth || 1)), 8);
  3807. this.indicatorStyle.width = this.indicatorWidth + "px";
  3808. this.maxPosX = this.wrapperWidth - this.indicatorWidth;
  3809. this.minBoundaryX = 0;
  3810. this.maxBoundaryX = this.maxPosX;
  3811. this.sizeRatioX = this.options.speedRatioX || (this.scroller.maxScrollX && (this.maxPosX / this.scroller.maxScrollX))
  3812. }
  3813. if (this.options.listenY) {
  3814. this.wrapperHeight = this.wrapper.clientHeight;
  3815. this.indicatorHeight = Math.max(Math.round(this.wrapperHeight * this.wrapperHeight / (this.scroller.scrollerHeight || this.wrapperHeight || 1)), 8);
  3816. this.indicatorStyle.height = this.indicatorHeight + "px";
  3817. this.maxPosY = this.wrapperHeight - this.indicatorHeight;
  3818. this.minBoundaryY = 0;
  3819. this.maxBoundaryY = this.maxPosY;
  3820. this.sizeRatioY = this.options.speedRatioY || (this.scroller.maxScrollY && (this.maxPosY / this.scroller.maxScrollY))
  3821. }
  3822. this.updatePosition()
  3823. },
  3824. updatePosition: function() {
  3825. var n = this.options.listenX && Math.round(this.sizeRatioX * this.scroller.x) || 0,
  3826. o = this.options.listenY && Math.round(this.sizeRatioY * this.scroller.y) || 0;
  3827. if (n < this.minBoundaryX) {
  3828. this.width = Math.max(this.indicatorWidth + n, 8);
  3829. this.indicatorStyle.width = this.width + "px";
  3830. n = this.minBoundaryX
  3831. } else {
  3832. if (n > this.maxBoundaryX) {
  3833. this.width = Math.max(this.indicatorWidth - (n - this.maxPosX), 8);
  3834. this.indicatorStyle.width = this.width + "px";
  3835. n = this.maxPosX + this.indicatorWidth - this.width
  3836. } else {
  3837. if (this.width != this.indicatorWidth) {
  3838. this.width = this.indicatorWidth;
  3839. this.indicatorStyle.width = this.width + "px"
  3840. }
  3841. }
  3842. }
  3843. if (o < this.minBoundaryY) {
  3844. this.height = Math.max(this.indicatorHeight + o * 3, 8);
  3845. this.indicatorStyle.height = this.height + "px";
  3846. o = this.minBoundaryY
  3847. } else {
  3848. if (o > this.maxBoundaryY) {
  3849. this.height = Math.max(this.indicatorHeight - (o - this.maxPosY) * 3, 8);
  3850. this.indicatorStyle.height = this.height + "px";
  3851. o = this.maxPosY + this.indicatorHeight - this.height
  3852. } else {
  3853. if (this.height != this.indicatorHeight) {
  3854. this.height = this.indicatorHeight;
  3855. this.indicatorStyle.height = this.height + "px"
  3856. }
  3857. }
  3858. }
  3859. this.x = n;
  3860. this.y = o;
  3861. this.indicatorStyle.webkitTransform = this.scroller._getTranslateStr(n, o)
  3862. },
  3863. fade: function(q, o) {
  3864. if (o && !this.visible) {
  3865. return
  3866. }
  3867. clearTimeout(this.fadeTimeout);
  3868. this.fadeTimeout = null;
  3869. var p = q ? 250 : 500,
  3870. n = q ? 0 : 300;
  3871. q = q ? "1": "0";
  3872. this.wrapperStyle.webkitTransitionDuration = p + "ms";
  3873. this.fadeTimeout = setTimeout((function(r) {
  3874. this.wrapperStyle.opacity = r;
  3875. this.visible = +r
  3876. }).bind(this, q), n)
  3877. }
  3878. };
  3879. k.Scroll = m;
  3880. a.fn.scroll = function(n) {
  3881. return new m(a(this), n)
  3882. }
  3883. })(window.jQuery, window.fui, document); (function(a, t, s) {
  3884. var p = "f-pull-top-pocket";
  3885. var j = "f-pull-bottom-pocket";
  3886. var i = "f-pull";
  3887. var o = "f-pull-loading";
  3888. var k = "f-pull-caption";
  3889. var l = "f-pull-caption-down";
  3890. var n = "f-pull-caption-refresh";
  3891. var m = "f-pull-caption-nomore";
  3892. var d = "f-icon";
  3893. var q = "f-spinner";
  3894. var e = "f-icon-pulldown";
  3895. var b = "f-block";
  3896. var c = "f-hidden";
  3897. var r = "f-visibility";
  3898. var h = o + " " + d + " " + e;
  3899. var g = o + " " + d + " " + e;
  3900. var f = o + " " + d + " " + q;
  3901. var u = ['<div class="' + i + '">', '<div class="{icon}"></div>', '<div class="' + k + '">{contentrefresh}</div>', "</div>"].join("");
  3902. var v = {
  3903. init: function(w, x) {
  3904. this._super(w, a.extend(true, {
  3905. scrollY: true,
  3906. scrollX: false,
  3907. indicators: true,
  3908. deceleration: 0.003,
  3909. down: {
  3910. height: 50,
  3911. contentinit: "下拉可以刷新",
  3912. contentdown: "下拉可以刷新",
  3913. contentover: "释放立即刷新",
  3914. contentrefresh: "正在刷新..."
  3915. },
  3916. up: {
  3917. height: 50,
  3918. auto: false,
  3919. contentinit: "上拉显示更多",
  3920. contentdown: "上拉显示更多",
  3921. contentrefresh: "正在加载...",
  3922. contentnomore: "没有更多数据了",
  3923. duration: 300
  3924. }
  3925. },
  3926. x))
  3927. },
  3928. _init: function() {
  3929. this._super();
  3930. this._initPocket()
  3931. },
  3932. _initPulldownRefresh: function() {
  3933. this.pulldown = true;
  3934. if (this.topPocket) {
  3935. this.pullPocket = this.topPocket;
  3936. this.pullPocket.classList.add(b);
  3937. this.pullPocket.classList.add(r);
  3938. this.pullCaption = this.topCaption;
  3939. this.pullLoading = this.topLoading
  3940. }
  3941. },
  3942. _initPullupRefresh: function() {
  3943. this.pulldown = false;
  3944. if (this.bottomPocket) {
  3945. this.pullPocket = this.bottomPocket;
  3946. this.pullPocket.classList.add(b);
  3947. this.pullPocket.classList.add(r);
  3948. this.pullCaption = this.bottomCaption;
  3949. this.pullLoading = this.bottomLoading
  3950. }
  3951. },
  3952. _initPocket: function() {
  3953. var w = this.options;
  3954. if (w.down && w.down.hasOwnProperty("callback")) {
  3955. this.topPocket = this.scroller.querySelector("." + p);
  3956. if (!this.topPocket) {
  3957. this.topPocket = this._createPocket(p, w.down, g);
  3958. this.wrapper.insertBefore(this.topPocket, this.wrapper.firstChild)
  3959. }
  3960. this.topLoading = this.topPocket.querySelector("." + o);
  3961. this.topCaption = this.topPocket.querySelector("." + k)
  3962. }
  3963. if (w.up && w.up.hasOwnProperty("callback")) {
  3964. this.bottomPocket = this.scroller.querySelector("." + j);
  3965. if (!this.bottomPocket) {
  3966. this.bottomPocket = this._createPocket(j, w.up, f);
  3967. this.scroller.appendChild(this.bottomPocket)
  3968. }
  3969. this.bottomLoading = this.bottomPocket.querySelector("." + o);
  3970. this.bottomCaption = this.bottomPocket.querySelector("." + k);
  3971. this.wrapper.addEventListener("scrollbottom", this)
  3972. }
  3973. },
  3974. _createPocket: function(w, y, x) {
  3975. var z = s.createElement("div");
  3976. z.className = w;
  3977. z.innerHTML = u.replace("{contentrefresh}", y.contentinit).replace("{icon}", x);
  3978. return z
  3979. },
  3980. _resetPullDownLoading: function() {
  3981. var w = this.pullLoading;
  3982. if (w) {
  3983. this.pullCaption.innerHTML = this.options.down.contentdown;
  3984. w.style.webkitTransition = "";
  3985. w.style.webkitTransform = "";
  3986. w.style.webkitAnimation = "";
  3987. w.className = g
  3988. }
  3989. },
  3990. _setCaptionClass: function(x, w, y) {
  3991. if (!x) {
  3992. switch (y) {
  3993. case this.options.up.contentdown:
  3994. w.className = k + " " + l;
  3995. break;
  3996. case this.options.up.contentrefresh:
  3997. w.className = k + " " + n;
  3998. break;
  3999. case this.options.up.contentnomore:
  4000. w.className = k + " " + m;
  4001. break
  4002. }
  4003. }
  4004. },
  4005. _setCaption: function(D, B) {
  4006. if (this.loading) {
  4007. return
  4008. }
  4009. var z = this.options;
  4010. var A = this.pullPocket;
  4011. var w = this.pullCaption;
  4012. var y = this.pullLoading;
  4013. var x = this.pulldown;
  4014. var C = this;
  4015. if (A) {
  4016. if (B) {
  4017. setTimeout(function() {
  4018. w.innerHTML = C.lastTitle = D;
  4019. if (x) {
  4020. y.className = g
  4021. } else {
  4022. C._setCaptionClass(false, w, D);
  4023. y.className = f
  4024. }
  4025. y.style.webkitAnimation = "";
  4026. y.style.webkitTransition = "";
  4027. y.style.webkitTransform = ""
  4028. },
  4029. 100)
  4030. } else {
  4031. if (D !== this.lastTitle) {
  4032. w.innerHTML = D;
  4033. if (x) {
  4034. if (D === z.down.contentrefresh) {
  4035. y.className = f;
  4036. y.style.webkitAnimation = "spinner-spin 1s step-end infinite"
  4037. } else {
  4038. if (D === z.down.contentover) {
  4039. y.className = h;
  4040. y.style.webkitTransition = "-webkit-transform 0.3s ease-in";
  4041. y.style.webkitTransform = "rotate(180deg)"
  4042. } else {
  4043. if (D === z.down.contentdown) {
  4044. y.className = g;
  4045. y.style.webkitTransition = "-webkit-transform 0.3s ease-in";
  4046. y.style.webkitTransform = "rotate(0deg)"
  4047. }
  4048. }
  4049. }
  4050. } else {
  4051. if (D === z.up.contentrefresh) {
  4052. y.className = f + " " + r
  4053. } else {
  4054. y.className = f + " " + c
  4055. }
  4056. C._setCaptionClass(false, w, D)
  4057. }
  4058. this.lastTitle = D
  4059. }
  4060. }
  4061. }
  4062. }
  4063. };
  4064. t.PullRefresh = v
  4065. })(window.jQuery, window.fui, document); (function(a, e, h, d, g) {
  4066. var c = "f-visibility";
  4067. var b = "f-hidden";
  4068. var f = e.Scroll.extend(a.extend({
  4069. handleEvent: function(i) {
  4070. this._super(i);
  4071. if (i.type === "scrollbottom") {
  4072. if (i.target === this.scroller) {
  4073. this._scrollbottom()
  4074. }
  4075. }
  4076. },
  4077. _scrollbottom: function() {
  4078. if (!this.pulldown && !this.loading) {
  4079. this.pulldown = false;
  4080. this._initPullupRefresh();
  4081. this.pullupLoading()
  4082. }
  4083. },
  4084. _start: function(i) {
  4085. if (i.touches && i.touches.length && i.touches[0].clientX > 30) {
  4086. i.target && !this._preventDefaultException(i.target, this.options.preventDefaultException) && i.preventDefault()
  4087. }
  4088. if (!this.loading) {
  4089. this.pulldown = this.pullPocket = this.pullCaption = this.pullLoading = false
  4090. }
  4091. this._super(i)
  4092. },
  4093. _drag: function(i) {
  4094. this._super(i);
  4095. if (!this.pulldown && !this.loading && this.topPocket && i.detail.direction === "down" && this.y >= 0) {
  4096. this._initPulldownRefresh()
  4097. }
  4098. if (this.pulldown) {
  4099. this._setCaption(this.y > this.options.down.height ? this.options.down.contentover: this.options.down.contentdown)
  4100. }
  4101. },
  4102. _reLayout: function() {
  4103. this.hasVerticalScroll = true;
  4104. this._super()
  4105. },
  4106. resetPosition: function(i) {
  4107. if (this.pulldown) {
  4108. if (this.y >= this.options.down.height) {
  4109. this.pulldownLoading(g, i || 0);
  4110. return true
  4111. } else { ! this.loading && this.topPocket.classList.remove(c)
  4112. }
  4113. }
  4114. return this._super(i)
  4115. },
  4116. pulldownLoading: function(k, j) {
  4117. typeof k === "undefined" && (k = this.options.down.height);
  4118. this.scrollTo(0, k, j, this.options.bounceEasing);
  4119. if (this.loading) {
  4120. return
  4121. }
  4122. this._initPulldownRefresh();
  4123. this._setCaption(this.options.down.contentrefresh);
  4124. this.loading = true;
  4125. this.indicators.map(function(l) {
  4126. l.fade(0)
  4127. });
  4128. var i = this.options.down.callback;
  4129. i && i.call(this)
  4130. },
  4131. endPulldownToRefresh: function() {
  4132. var i = this;
  4133. if (i.topPocket && i.loading && this.pulldown) {
  4134. i.scrollTo(0, 0, i.options.bounceTime, i.options.bounceEasing);
  4135. i.loading = false;
  4136. i._setCaption(i.options.down.contentdown, true);
  4137. setTimeout(function() {
  4138. i.loading || i.topPocket.classList.remove(c)
  4139. },
  4140. 350)
  4141. }
  4142. },
  4143. pullupLoading: function(i, k, j) {
  4144. k = k || 0;
  4145. this.scrollTo(k, this.maxScrollY, j, this.options.bounceEasing);
  4146. if (this.loading) {
  4147. return
  4148. }
  4149. this._initPullupRefresh();
  4150. this._setCaption(this.options.up.contentrefresh);
  4151. this.indicators.map(function(l) {
  4152. l.fade(0)
  4153. });
  4154. this.loading = true;
  4155. i = i || this.options.up.callback;
  4156. i && i.call(this)
  4157. },
  4158. endPullupToRefresh: function(i) {
  4159. var j = this;
  4160. if (j.bottomPocket) {
  4161. j.loading = false;
  4162. if (i) {
  4163. this.finished = true;
  4164. j._setCaption(j.options.up.contentnomore);
  4165. j.wrapper.removeEventListener("scrollbottom", j)
  4166. } else {
  4167. j._setCaption(j.options.up.contentdown);
  4168. j.loading || j.bottomPocket.classList.remove(c)
  4169. }
  4170. }
  4171. },
  4172. disablePullupToRefresh: function() {
  4173. this._initPullupRefresh();
  4174. this.bottomPocket.className = "f-pull-bottom-pocket " + b;
  4175. this.wrapper.removeEventListener("scrollbottom", this)
  4176. },
  4177. enablePullupToRefresh: function() {
  4178. var i = this.pulldown;
  4179. this._initPullupRefresh();
  4180. this.bottomPocket.classList.remove(b);
  4181. this._setCaption(this.options.up.contentdown);
  4182. if (i) {
  4183. this.pulldown = true;
  4184. this.bottomPocket.classList.remove(c)
  4185. }
  4186. this.wrapper.addEventListener("scrollbottom", this)
  4187. },
  4188. refresh: function(i) {
  4189. if (i && this.finished) {
  4190. this.enablePullupToRefresh();
  4191. this.finished = false
  4192. }
  4193. this._super()
  4194. },
  4195. },
  4196. e.PullRefresh));
  4197. a.fn.pullRefresh = function(i) {
  4198. return new f(a(this), i)
  4199. }
  4200. })(window.jQuery, window.fui, window, document); (function(a, k, q, j, p) {
  4201. var e = "f-slider";
  4202. var f = "f-slider-group";
  4203. var i = "f-slider-loop";
  4204. var g = "f-slider-indicator";
  4205. var c = "f-action-previous";
  4206. var b = "f-action-next";
  4207. var h = "f-slider-item";
  4208. var d = "f-active";
  4209. var m = "." + h;
  4210. var l = "." + g;
  4211. var n = ".f-slider-progress-bar";
  4212. var o = k.Scroll.extend({
  4213. init: function(r, v) {
  4214. v = v || {};
  4215. r.addClass(e);
  4216. var s = a('<div class="f-slider-group" ></div>');
  4217. r.append(s);
  4218. var w = this;
  4219. if (v.loop == p) {
  4220. w.loop = true
  4221. }
  4222. if ( !! v.indicator) {
  4223. w.$indicator = a('<div class="' + g + '" ></div>');
  4224. r.append(w.$indicator)
  4225. }
  4226. var t = v.data || [];
  4227. var u = t.length;
  4228. if (u == 0) {
  4229. return
  4230. } else {
  4231. if (u == 1) {
  4232. s.append('<div class="' + h + '"><div><img src="' + t[0] + '"></div></div>')
  4233. } else {
  4234. if (w.loop) {
  4235. s.append('<div class="' + h + ' f-slider-item-duplicate"><div><img src="' + t[u - 1] + '"></div></div>')
  4236. }
  4237. a.each(t,
  4238. function(x, y) {
  4239. if ( !! v.indicator) {
  4240. w.$indicator.append('<div class="f-indicator ' + (x == 0 ? d: "") + '" ></div>')
  4241. }
  4242. s.append('<div class="' + h + " " + (x == 0 ? d: "") + ' "><div><img src="' + y + '"></div></div>')
  4243. });
  4244. if (w.loop) {
  4245. s.append('<div class="' + h + ' f-slider-item-duplicate"><div><img src="' + t[0] + '"></div></div>')
  4246. }
  4247. }
  4248. }
  4249. this._super(s, a.extend(true, {
  4250. fingers: 1,
  4251. interval: 0,
  4252. scrollY: false,
  4253. scrollX: true,
  4254. indicators: false,
  4255. scrollTime: 1000,
  4256. startX: false,
  4257. slideTime: 0,
  4258. snap: m
  4259. },
  4260. v));
  4261. this.options.gotonum != p && this.options.gotonum > 0 && this.gotoItem(this.options.gotonum, 0)
  4262. },
  4263. _init: function() {
  4264. this._reInit();
  4265. if (this.scroller) {
  4266. this.scrollerStyle = this.scroller.style;
  4267. this.progressBar = this.wrapper.querySelector(n);
  4268. if (this.progressBar) {
  4269. this.progressBarWidth = this.progressBar.offsetWidth;
  4270. this.progressBarStyle = this.progressBar.style
  4271. }
  4272. this._super();
  4273. this._initTimer()
  4274. }
  4275. },
  4276. _triggerSlide: function() {
  4277. var s = this;
  4278. s.isInTransition = false;
  4279. var r = s.currentPage;
  4280. s.slideNumber = s._fixedSlideNumber();
  4281. if (s.loop && s.itemLength > 1) {
  4282. if (s.slideNumber === 0) {
  4283. s.setTranslate(s.pages[1][0].x, 0)
  4284. } else {
  4285. if (s.slideNumber === s.itemLength - 3) {
  4286. s.setTranslate(s.pages[s.itemLength - 2][0].x, 0)
  4287. }
  4288. }
  4289. }
  4290. if (s.lastSlideNumber != s.slideNumber) {
  4291. s.lastSlideNumber = s.slideNumber;
  4292. s.lastPage = s.currentPage;
  4293. k.trigger(s.wrapper, "slide", {
  4294. slideNumber: s.slideNumber
  4295. })
  4296. }
  4297. s._initTimer()
  4298. },
  4299. _handleSlide: function(u) {
  4300. var C = this;
  4301. if (u.target !== C.wrapper) {
  4302. return
  4303. }
  4304. var t = u.detail;
  4305. t.slideNumber = t.slideNumber || 0;
  4306. var D = C.scroller.querySelectorAll(m);
  4307. var z = [];
  4308. for (var v = 0,
  4309. A = D.length; v < A; v++) {
  4310. var y = D[v];
  4311. if (y.parentNode === C.scroller) {
  4312. z.push(y)
  4313. }
  4314. }
  4315. var r = t.slideNumber;
  4316. if (C.loop) {
  4317. r += 1
  4318. }
  4319. if (!C.wrapper.classList.contains("f-segmented-control")) {
  4320. for (var v = 0,
  4321. A = z.length; v < A; v++) {
  4322. var y = z[v];
  4323. if (y.parentNode === C.scroller) {
  4324. if (v === r) {
  4325. y.classList.add(d)
  4326. } else {
  4327. y.classList.remove(d)
  4328. }
  4329. }
  4330. }
  4331. }
  4332. var x = C.wrapper.parentNode.querySelector(".f-slider-indicator");
  4333. if (x) {
  4334. if (x.getAttribute("data-scroll")) {
  4335. a(x).scroll().gotoPage(t.slideNumber)
  4336. }
  4337. var w = x.querySelectorAll(".f-indicator");
  4338. if (w.length > 0) {
  4339. for (var v = 0,
  4340. A = w.length; v < A; v++) {
  4341. w[v].classList[v === t.slideNumber ? "add": "remove"](d)
  4342. }
  4343. } else {
  4344. var B = x.querySelector(".f-number span");
  4345. if (B) {
  4346. B.innerText = (t.slideNumber + 1)
  4347. } else {
  4348. var s = x.querySelectorAll(".f-control-item");
  4349. for (var v = 0,
  4350. A = s.length; v < A; v++) {
  4351. s[v].classList[v === t.slideNumber ? "add": "remove"](d)
  4352. }
  4353. }
  4354. }
  4355. }
  4356. u.stopPropagation()
  4357. },
  4358. _handleTabShow: function(r) {
  4359. var s = this;
  4360. s.gotoItem((r.detail.tabNumber || 0), s.options.slideTime)
  4361. },
  4362. _handleIndicatorTap: function(r) {
  4363. var s = this;
  4364. var t = r.target;
  4365. if (t.classList.contains(c) || t.classList.contains(b)) {
  4366. s[t.classList.contains(c) ? "prevItem": "nextItem"]();
  4367. r.stopPropagation()
  4368. }
  4369. },
  4370. _initEvent: function(s) {
  4371. var t = this;
  4372. t._super(s);
  4373. var r = s ? "removeEventListener": "addEventListener";
  4374. t.wrapper[r]("slide", this);
  4375. t.wrapper[r]("show.f.tab", this)
  4376. },
  4377. handleEvent: function(r) {
  4378. this._super(r);
  4379. switch (r.type) {
  4380. case "slide":
  4381. this._handleSlide(r);
  4382. break;
  4383. case "show.f.tab":
  4384. if (~this.snaps.indexOf(r.target)) {
  4385. this._handleTabShow(r)
  4386. }
  4387. break
  4388. }
  4389. },
  4390. _scrollend: function(r) {
  4391. this._super(r);
  4392. this._triggerSlide(r)
  4393. },
  4394. _drag: function(s) {
  4395. this._super(s);
  4396. var r = s.detail.direction;
  4397. if (r === "left" || r === "right") {
  4398. var t = this.wrapper.getAttribute("data-slidershowTimer");
  4399. t && q.clearTimeout(t);
  4400. s.stopPropagation()
  4401. }
  4402. },
  4403. _initTimer: function() {
  4404. var s = this;
  4405. var t = s.wrapper;
  4406. var r = s.options.interval;
  4407. var u = t.getAttribute("data-slidershowTimer");
  4408. u && q.clearTimeout(u);
  4409. if (r) {
  4410. u = q.setTimeout(function() {
  4411. if (!t) {
  4412. return
  4413. }
  4414. if ( !! (t.offsetWidth || t.offsetHeight)) {
  4415. s.nextItem(true)
  4416. }
  4417. s._initTimer()
  4418. },
  4419. r);
  4420. t.setAttribute("data-slidershowTimer", u)
  4421. }
  4422. },
  4423. _fixedSlideNumber: function(r) {
  4424. r = r || this.currentPage;
  4425. var s = r.pageX;
  4426. if (this.loop) {
  4427. if (r.pageX === 0) {
  4428. s = this.itemLength - 3
  4429. } else {
  4430. if (r.pageX === (this.itemLength - 1)) {
  4431. s = 0
  4432. } else {
  4433. s = r.pageX - 1
  4434. }
  4435. }
  4436. }
  4437. return s
  4438. },
  4439. _reLayout: function() {
  4440. this.hasHorizontalScroll = true;
  4441. this._super()
  4442. },
  4443. _getScroll: function() {
  4444. var r = a.parseTranslateMatrix(a.getStyles(this.scroller, "webkitTransform"));
  4445. return r ? r.x: 0
  4446. },
  4447. _transitionEnd: function(r) {
  4448. if (r.target !== this.scroller || !this.isInTransition) {
  4449. return
  4450. }
  4451. this._transitionTime();
  4452. this.isInTransition = false;
  4453. k.trigger(this.wrapper, "scrollend", this)
  4454. },
  4455. _flick: function(t) {
  4456. if (!this.moved) {
  4457. return
  4458. }
  4459. var r = t.detail;
  4460. var s = r.direction;
  4461. this._clearRequestAnimationFrame();
  4462. this.isInTransition = true;
  4463. if (t.type === "flick") {
  4464. if (r.deltaTime < 200) {
  4465. this.x = this._getPage((this.slideNumber + (s === "right" ? -1 : 1)), true).x
  4466. }
  4467. this.resetPosition(this.options.bounceTime)
  4468. } else {
  4469. if (t.type === "dragend" && !r.flick) {
  4470. this.resetPosition(this.options.bounceTime)
  4471. }
  4472. }
  4473. t.stopPropagation()
  4474. },
  4475. _initSnap: function() {
  4476. this.scrollerWidth = this.itemLength * this.scrollerWidth;
  4477. this.maxScrollX = Math.min(this.wrapperWidth - this.scrollerWidth, 0);
  4478. this._super();
  4479. if (!this.currentPage.x) {
  4480. var r = this.pages[this.loop ? 1 : 0];
  4481. r = r || this.pages[0];
  4482. if (!r) {
  4483. return
  4484. }
  4485. this.currentPage = r[0];
  4486. this.slideNumber = 0;
  4487. this.lastSlideNumber = typeof this.lastSlideNumber === "undefined" ? 0 : this.lastSlideNumber
  4488. } else {
  4489. this.slideNumber = this._fixedSlideNumber();
  4490. this.lastSlideNumber = typeof this.lastSlideNumber === "undefined" ? this.slideNumber: this.lastSlideNumber
  4491. }
  4492. this.options.startX = this.currentPage.x || 0
  4493. },
  4494. _getSnapX: function(r) {
  4495. return Math.max( - r, this.maxScrollX)
  4496. },
  4497. _getPage: function(s, r) {
  4498. if (this.loop) {
  4499. if (s > (this.itemLength - (r ? 2 : 3))) {
  4500. s = 1;
  4501. time = 0
  4502. } else {
  4503. if (s < (r ? -1 : 0)) {
  4504. s = this.itemLength - 2;
  4505. time = 0
  4506. } else {
  4507. s += 1
  4508. }
  4509. }
  4510. } else {
  4511. if (!r) {
  4512. if (s > (this.itemLength - 1)) {
  4513. s = 0;
  4514. time = 0
  4515. } else {
  4516. if (s < 0) {
  4517. s = this.itemLength - 1;
  4518. time = 0
  4519. }
  4520. }
  4521. }
  4522. s = Math.min(Math.max(0, s), this.itemLength - 1)
  4523. }
  4524. if (s < 0) {
  4525. s = 0
  4526. }
  4527. if (this.itemLength == 1) {
  4528. return this.pages[0][0]
  4529. }
  4530. return this.pages[s][0]
  4531. },
  4532. _gotoItem: function(r, s) {
  4533. this.currentPage = this._getPage(r, true);
  4534. this.scrollTo(this.currentPage.x, 0, s, this.options.scrollEasing);
  4535. if (s === 0) {
  4536. k.trigger(this.wrapper, "scrollend", this)
  4537. }
  4538. },
  4539. setTranslate: function(s, t) {
  4540. this._super(s, t);
  4541. var r = this.progressBar;
  4542. if (r) {
  4543. this.progressBarStyle.webkitTransform = this._getTranslateStr(( - s * (this.progressBarWidth / this.wrapperWidth)), 0)
  4544. }
  4545. },
  4546. resetPosition: function(r) {
  4547. r = r || 0;
  4548. if (this.x > 0) {
  4549. this.x = 0
  4550. } else {
  4551. if (this.x < this.maxScrollX) {
  4552. this.x = this.maxScrollX
  4553. }
  4554. }
  4555. this.currentPage = this._nearestSnap(this.x);
  4556. this.scrollTo(this.currentPage.x, 0, r, this.options.scrollEasing);
  4557. return true
  4558. },
  4559. gotoItem: function(r, s) {
  4560. this._gotoItem(r, typeof s === "undefined" ? this.options.scrollTime: s)
  4561. },
  4562. nextItem: function() {
  4563. this._gotoItem(this.slideNumber + 1, this.options.scrollTime)
  4564. },
  4565. prevItem: function() {
  4566. this._gotoItem(this.slideNumber - 1, this.options.scrollTime)
  4567. },
  4568. getSlideNumber: function() {
  4569. return this.slideNumber || 0
  4570. },
  4571. _reInit: function() {
  4572. var r = this.wrapper.querySelectorAll("." + f);
  4573. for (var s = 0,
  4574. t = r.length; s < t; s++) {
  4575. if (r[s].parentNode === this.wrapper) {
  4576. this.scroller = r[s];
  4577. break
  4578. }
  4579. }
  4580. this.scrollerStyle = this.scroller && this.scroller.style;
  4581. if (this.progressBar) {
  4582. this.progressBarWidth = this.progressBar.offsetWidth;
  4583. this.progressBarStyle = this.progressBar.style
  4584. }
  4585. },
  4586. refresh: function(r) {
  4587. if (r) {
  4588. a.extend(this.options, r);
  4589. this._super();
  4590. this._initTimer()
  4591. } else {
  4592. this._super()
  4593. }
  4594. },
  4595. destroy: function() {
  4596. this._initEvent(true);
  4597. this.wrapper.setAttribute("data-slider", "")
  4598. }
  4599. });
  4600. a.fn.slider = function(r) {
  4601. return new o(a(this), r)
  4602. }
  4603. })(window.jQuery, window.fui, window, document); (function(a, h, d) {
  4604. var b = "f-zoom";
  4605. var c = "f-zoom-scroller";
  4606. var i = "." + b;
  4607. var j = "." + c;
  4608. var g = "pinchstart";
  4609. var e = "pinch";
  4610. var f = "pinchend";
  4611. if ("ongesturestart" in window) {
  4612. g = "gesturestart";
  4613. e = "gesturechange";
  4614. f = "gestureend"
  4615. }
  4616. a.Zoom = function(l, C) {
  4617. var L = this;
  4618. L.options = a.extend(a.Zoom.defaults, C);
  4619. L.wrapper = L.element = l;
  4620. L.scroller = l.querySelector(j);
  4621. L.scrollerStyle = L.scroller && L.scroller.style;
  4622. L.zoomer = l.querySelector(i);
  4623. L.zoomerStyle = L.zoomer && L.zoomer.style;
  4624. L.init = function() {
  4625. h.options.gestureConfig.pinch = true;
  4626. h.options.gestureConfig.doubletap = true;
  4627. L.initEvents()
  4628. };
  4629. L.initEvents = function(N) {
  4630. var M = N ? "removeEventListener": "addEventListener";
  4631. var O = L.scroller;
  4632. O[M](g, L.onPinchstart);
  4633. O[M](e, L.onPinch);
  4634. O[M](f, L.onPinchend);
  4635. O[M](h.event.start, L.onTouchstart);
  4636. O[M](h.event.move, L.onTouchMove);
  4637. O[M](h.event.cancel, L.onTouchEnd);
  4638. O[M](h.event.end, L.onTouchEnd);
  4639. O[M]("drag", L.dragEvent);
  4640. O[M]("doubletap", L.doubleTapEvent)
  4641. };
  4642. L.dragEvent = function(M) {
  4643. if (p || A) {
  4644. M.stopPropagation()
  4645. }
  4646. };
  4647. L.doubleTapEvent = function(M) {
  4648. L.toggleZoom(M.detail.center)
  4649. };
  4650. L.transition = function(M, N) {
  4651. N = N || 0;
  4652. M.webkitTransitionDuration = N + "ms";
  4653. return L
  4654. };
  4655. L.translate = function(M, N, O) {
  4656. N = N || 0;
  4657. O = O || 0;
  4658. M.webkitTransform = "translate3d(" + N + "px," + O + "px,0px)";
  4659. return L
  4660. };
  4661. L.scale = function(N, M) {
  4662. M = M || 1;
  4663. N.webkitTransform = "translate3d(0,0,0) scale(" + M + ")";
  4664. return L
  4665. };
  4666. L.scrollerTransition = function(M) {
  4667. return L.transition(L.scrollerStyle, M)
  4668. };
  4669. L.scrollerTransform = function(M, N) {
  4670. return L.translate(L.scrollerStyle, M, N)
  4671. };
  4672. L.zoomerTransition = function(M) {
  4673. return L.transition(L.zoomerStyle, M)
  4674. };
  4675. L.zoomerTransform = function(M) {
  4676. return L.scale(L.zoomerStyle, M)
  4677. };
  4678. var D = 1,
  4679. k = 1,
  4680. B = false,
  4681. A = false;
  4682. L.onPinchstart = function(M) {
  4683. A = true
  4684. };
  4685. L.onPinch = function(M) {
  4686. if (!B) {
  4687. L.zoomerTransition(0);
  4688. B = true
  4689. }
  4690. D = (M.detail ? M.detail.scale: M.scale) * k;
  4691. if (D > L.options.maxZoom) {
  4692. D = L.options.maxZoom - 1 + Math.pow((D - L.options.maxZoom + 1), 0.5)
  4693. }
  4694. if (D < L.options.minZoom) {
  4695. D = L.options.minZoom + 1 - Math.pow((L.options.minZoom - D + 1), 0.5)
  4696. }
  4697. L.zoomerTransform(D)
  4698. };
  4699. L.onPinchend = function(M) {
  4700. D = Math.max(Math.min(D, L.options.maxZoom), L.options.minZoom);
  4701. L.zoomerTransition(L.options.speed).zoomerTransform(D);
  4702. k = D;
  4703. B = false
  4704. };
  4705. L.setZoom = function(M) {
  4706. D = k = M;
  4707. L.scrollerTransition(L.options.speed).scrollerTransform(0, 0);
  4708. L.zoomerTransition(L.options.speed).zoomerTransform(D)
  4709. };
  4710. L.toggleZoom = function(Q, R) {
  4711. if (typeof Q === "number") {
  4712. R = Q;
  4713. Q = undefined
  4714. }
  4715. R = typeof R === "undefined" ? L.options.speed: R;
  4716. if (D && D !== 1) {
  4717. D = k = 1;
  4718. L.scrollerTransition(R).scrollerTransform(0, 0)
  4719. } else {
  4720. D = k = L.options.maxZoom;
  4721. if (Q) {
  4722. var N = h.offset(L.zoomer);
  4723. var S = N.top;
  4724. var M = N.left;
  4725. var O = (Q.x - M) * D;
  4726. var P = (Q.y - S) * D;
  4727. this._cal();
  4728. if (O >= r && O <= (r + K)) {
  4729. O = r - O + K / 2
  4730. } else {
  4731. if (O < r) {
  4732. O = r - O + K / 2
  4733. } else {
  4734. if (O > (r + K)) {
  4735. O = r + K - O - K / 2
  4736. }
  4737. }
  4738. }
  4739. if (P >= s && P <= (s + J)) {
  4740. P = s - P + J / 2
  4741. } else {
  4742. if (P < s) {
  4743. P = s - P + J / 2
  4744. } else {
  4745. if (P > (s + J)) {
  4746. P = s + J - P - J / 2
  4747. }
  4748. }
  4749. }
  4750. O = Math.min(Math.max(O, t), r);
  4751. P = Math.min(Math.max(P, u), s);
  4752. L.scrollerTransition(R).scrollerTransform(O, P)
  4753. } else {
  4754. L.scrollerTransition(R).scrollerTransform(0, 0)
  4755. }
  4756. }
  4757. L.zoomerTransition(R).zoomerTransform(D)
  4758. };
  4759. L._cal = function() {
  4760. K = L.wrapper.offsetWidth;
  4761. J = L.wrapper.offsetHeight;
  4762. z = L.zoomer.offsetWidth;
  4763. o = L.zoomer.offsetHeight;
  4764. var N = z * D;
  4765. var M = o * D;
  4766. t = Math.min((K / 2 - N / 2), 0);
  4767. r = -t;
  4768. u = Math.min((J / 2 - M / 2), 0);
  4769. s = -u
  4770. };
  4771. var K, J, q, p, m, n, t, u, r, s, z, o, y = {},
  4772. x = {},
  4773. v, w, E, G, H, F, I;
  4774. L.onTouchstart = function(M) {
  4775. M.preventDefault();
  4776. q = true;
  4777. y.x = M.type === "touchstart" ? M.targetTouches[0].pageX: M.pageX;
  4778. y.y = M.type === "touchstart" ? M.targetTouches[0].pageY: M.pageY
  4779. };
  4780. L.onTouchMove = function(M) {
  4781. M.preventDefault();
  4782. if (!q) {
  4783. return
  4784. }
  4785. if (!p) {
  4786. K = L.wrapper.offsetWidth;
  4787. J = L.wrapper.offsetHeight;
  4788. z = L.zoomer.offsetWidth;
  4789. o = L.zoomer.offsetHeight;
  4790. var P = h.parseTranslateMatrix(h.getStyles(L.scroller, "webkitTransform"));
  4791. v = P.x || 0;
  4792. w = P.y || 0;
  4793. L.scrollerTransition(0)
  4794. }
  4795. var O = z * D;
  4796. var N = o * D;
  4797. if (O < K && N < J) {
  4798. return
  4799. }
  4800. t = Math.min((K / 2 - O / 2), 0);
  4801. r = -t;
  4802. u = Math.min((J / 2 - N / 2), 0);
  4803. s = -u;
  4804. x.x = M.type === h.event.move ? M.targetTouches[0].pageX: M.pageX;
  4805. x.y = M.type === h.event.move ? M.targetTouches[0].pageY: M.pageY;
  4806. if (!p && !B) {
  4807. if ((Math.floor(t) === Math.floor(v) && x.x < y.x) || (Math.floor(r) === Math.floor(v) && x.x > y.x)) {
  4808. q = false;
  4809. return
  4810. }
  4811. }
  4812. p = true;
  4813. m = x.x - y.x + v;
  4814. n = x.y - y.y + w;
  4815. if (m < t) {
  4816. m = t + 1 - Math.pow((t - m + 1), 0.8)
  4817. }
  4818. if (m > r) {
  4819. m = r - 1 + Math.pow((m - r + 1), 0.8)
  4820. }
  4821. if (n < u) {
  4822. n = u + 1 - Math.pow((u - n + 1), 0.8)
  4823. }
  4824. if (n > s) {
  4825. n = s - 1 + Math.pow((n - s + 1), 0.8)
  4826. }
  4827. if (!E) {
  4828. E = x.x
  4829. }
  4830. if (!F) {
  4831. F = x.y
  4832. }
  4833. if (!G) {
  4834. G = h.now()
  4835. }
  4836. H = (x.x - E) / (h.now() - G) / 2;
  4837. I = (x.y - F) / (h.now() - G) / 2;
  4838. if (Math.abs(x.x - E) < 2) {
  4839. H = 0
  4840. }
  4841. if (Math.abs(x.y - F) < 2) {
  4842. I = 0
  4843. }
  4844. E = x.x;
  4845. F = x.y;
  4846. G = h.now();
  4847. L.scrollerTransform(m, n)
  4848. };
  4849. L.onTouchEnd = function(M) {
  4850. if (!M.touches || !M.touches.length) {
  4851. A = false
  4852. }
  4853. if (!q || !p) {
  4854. q = false;
  4855. p = false;
  4856. return
  4857. }
  4858. q = false;
  4859. p = false;
  4860. var Q = 300;
  4861. var R = 300;
  4862. var N = H * Q;
  4863. var S = m + N;
  4864. var O = I * R;
  4865. var T = n + O;
  4866. if (H !== 0) {
  4867. Q = Math.abs((S - m) / H)
  4868. }
  4869. if (I !== 0) {
  4870. R = Math.abs((T - n) / I)
  4871. }
  4872. var P = Math.max(Q, R);
  4873. m = S;
  4874. n = T;
  4875. var V = z * D;
  4876. var U = o * D;
  4877. t = Math.min((K / 2 - V / 2), 0);
  4878. r = -t;
  4879. u = Math.min((J / 2 - U / 2), 0);
  4880. s = -u;
  4881. m = Math.max(Math.min(m, r), t);
  4882. n = Math.max(Math.min(n, s), u);
  4883. L.scrollerTransition(P).scrollerTransform(m, n)
  4884. };
  4885. L.destroy = function() {
  4886. L.initEvents(true);
  4887. delete h.data[L.wrapper.getAttribute("data-zoomer")];
  4888. L.wrapper.setAttribute("data-zoomer", "")
  4889. };
  4890. L.init();
  4891. return L
  4892. };
  4893. a.Zoom.defaults = {
  4894. speed: 300,
  4895. maxZoom: 3,
  4896. minZoom: 1,
  4897. };
  4898. a.fn.zoom = function(k) {
  4899. var l = [];
  4900. this.each(function() {
  4901. var o = null;
  4902. var n = this;
  4903. var m = n.getAttribute("data-zoomer");
  4904. if (!m) {
  4905. m = h.guid();
  4906. h.data[m] = o = new a.Zoom(n, k);
  4907. n.setAttribute("data-zoomer", m)
  4908. } else {
  4909. o = h.data[m]
  4910. }
  4911. l.push(o)
  4912. });
  4913. return l.length === 1 ? l[0] : l
  4914. }
  4915. })(window.jQuery, window.fui, document); (function(a, d, c) {
  4916. var e = null;
  4917. var b = {
  4918. init: function(g) {
  4919. var f = a("#fui_imagePreview");
  4920. if (f.length == 0) {
  4921. f = a('<div id="fui_imagePreview" class="f-imagePreview" ><div class="f-imagePreview-slider" ></div></div>');
  4922. a("body").append(f);
  4923. b.bindEvent(f)
  4924. }
  4925. f.addClass("f-imagePreview-in");
  4926. f[0].dfop = g;
  4927. f.show();
  4928. setTimeout(function() {
  4929. f.removeClass("f-imagePreview-in");
  4930. f.find(".f-imagePreview-slider").slider({
  4931. data: g.data,
  4932. loop: true,
  4933. indicator: true,
  4934. gotonum: g.gotonum
  4935. });
  4936. var h = f.find("img");
  4937. h.addClass("f-zoom");
  4938. h.parent().addClass("f-zoom-scroller");
  4939. h.parent().parent().addClass("f-zoom-wrapper").zoom();
  4940. f.find("img").each(function() {
  4941. var i = a(this)[0];
  4942. i.addEventListener("doubletap",
  4943. function() {
  4944. e && e.cancel();
  4945. e = null
  4946. })
  4947. });
  4948. f = null
  4949. },
  4950. 500)
  4951. },
  4952. bindEvent: function(f) {
  4953. f.on("tap",
  4954. function(h) {
  4955. var i = h.target || h.srcElement;
  4956. var g = a(this);
  4957. var j = g[0].dfop;
  4958. if (j.taphold) {
  4959. g = null;
  4960. j.taphold = false;
  4961. return false
  4962. }
  4963. if (i.tagName !== "IMG") {
  4964. b.close(g)
  4965. } else {
  4966. b.laterCloseEvent()
  4967. }
  4968. g = null
  4969. });
  4970. f.on("taphold",
  4971. function() {
  4972. var g = a(this);
  4973. var i = g[0].dfop;
  4974. var h = "";
  4975. if (g.find("img").length === 1) {
  4976. h = g.find("img").attr("src")
  4977. } else {
  4978. h = g.find(".f-slider-item.f-active img").attr("src")
  4979. }
  4980. i.holdEvent && i.holdEvent(h);
  4981. i.taphold = true;
  4982. g = null;
  4983. return false
  4984. })
  4985. },
  4986. close: function(f) {
  4987. e = null;
  4988. f.addClass("f-imagePreview-out");
  4989. setTimeout(function() {
  4990. f.hide();
  4991. f.removeClass("f-imagePreview-out");
  4992. var g = f.find("img");
  4993. var h = g.parent().parent().addClass("f-zoom-wrapper").zoom();
  4994. a.each(h,
  4995. function(i, j) {
  4996. j && j.destroy && j.destroy()
  4997. });
  4998. f.find(".f-imagePreview-slider").remove();
  4999. f.append('<div class="f-imagePreview-slider" ></div>');
  5000. g = null;
  5001. f = null
  5002. },
  5003. 500)
  5004. },
  5005. laterCloseEvent: function() { ! e && (e = d.later(function() {
  5006. b.close(a("#fui_imagePreview"))
  5007. },
  5008. 300))
  5009. }
  5010. };
  5011. d.imagePreview = function(f) {
  5012. if (f == undefined || !f.data || f.data.length == 0) {
  5013. return
  5014. }
  5015. b.init(f)
  5016. };
  5017. a.fn.imagePreviewClose = function() {
  5018. b.close(a(this))
  5019. }
  5020. })(window.jQuery, window.fui, document); (function(a) {
  5021. a.fn.toptab = function(f, e) {
  5022. var b = a(this);
  5023. f = f || [];
  5024. if (f.length > 0) {
  5025. b.addClass("f-toptab");
  5026. var c = a('<div class="f-toptab-btns" ><div></div></div>');
  5027. var d = a('<div class="f-toptab-content" ></div>');
  5028. a.each(f,
  5029. function(i, j) {
  5030. var g = '<a class="f-toptab-btn' + (i == 0 ? " f-active ": "") + '" data-value="' + i + '" href="#">' + j + "</a>";
  5031. c.find("div").append(g);
  5032. var h = '<div class="f-toptab-content-item' + (i == 0 ? " f-active ": "") + '" data-value="' + i + '" ></div>';
  5033. d.append(h)
  5034. });
  5035. b.append(c);
  5036. b.append(d);
  5037. c[0].callback = e;
  5038. c.find(".f-toptab-btn").on("tap",
  5039. function() {
  5040. var h = a(this);
  5041. var i = h.parent().parent();
  5042. var g = i.next();
  5043. if (!h.hasClass("f-active")) {
  5044. i.find(".f-active").removeClass("f-active");
  5045. h.addClass("f-active");
  5046. g.find(".f-active").removeClass("f-active");
  5047. var k = h.attr("data-value");
  5048. g.find('[data-value="' + k + '"]').addClass("f-active");
  5049. var j = i[0].callback;
  5050. j && j(k)
  5051. }
  5052. h = null;
  5053. i = null;
  5054. g = null
  5055. });
  5056. return d.find(".f-toptab-content-item")
  5057. }
  5058. return null
  5059. }
  5060. })(window.jQuery); (function(a) {
  5061. a.fn.ftimeline = function(f) {
  5062. var c = a(this);
  5063. c.addClass("f-timeline");
  5064. var e = a('<div class="f-timeline-allwrap"></div>');
  5065. var d = a("<ul></ul>");
  5066. var b = a('<li class="f-timeline-header"><div>当前</div></li>');
  5067. d.append(b);
  5068. a.each(f,
  5069. function(j, k) {
  5070. var i = a('<li class="f-timeline-item" ><div class="f-timeline-wrap" ></div></li>');
  5071. if (j == 0) {
  5072. i.find("div").addClass("f-timeline-current")
  5073. }
  5074. var h = i.find(".f-timeline-wrap");
  5075. var g = a('<div class="f-timeline-content"><span class="arrow"></span></div>');
  5076. g.append('<div class="f-timeline-title">' + k.title + "</div>");
  5077. g.append('<div class="f-timeline-body"><span>' + k.people + "</span>" + k.content + "</div>");
  5078. h.append('<span class="f-timeline-date">' + k.time + "</span>");
  5079. h.append(g);
  5080. d.append(i)
  5081. });
  5082. d.append('<li class="f-timeline-ender"><div>开始</div></li>');
  5083. e.html(d);
  5084. c.html(e)
  5085. }
  5086. })(window.jQuery); (function(a, c) {
  5087. var b = {
  5088. init: function(d, g) {
  5089. var f = ' <div class="f-popright" > <div class="f-popright-content"> <div class="f-popright-title" ><div class="f-popright-btn-left">';
  5090. if (g.cancelBtn) {
  5091. f += '<div class="f-popright-btn cancel" data-value="cancel" >' + g.cancelBtn + "</div>"
  5092. }
  5093. if (g.restBtn) {
  5094. f += '<div class="f-popright-btn rest" data-value="rest">' + g.restBtn + "</div>"
  5095. }
  5096. f += "</div>";
  5097. if (g.okBtn) {
  5098. f += '<div class="f-popright-btn ok" data-value="ok">' + g.okBtn + "</div>"
  5099. }
  5100. f += '</div> <div class="f-popright-body" ></div> </div></div>';
  5101. var e = a(f);
  5102. d.parent().append(e);
  5103. e.find(".f-popright-body").append(d);
  5104. d.addClass("f-popright-bodyContent");
  5105. e.find(".f-popright-body").scroll();
  5106. b.bindEvent(e, g);
  5107. d = null;
  5108. e = null
  5109. },
  5110. bindEvent: function(d, e) {
  5111. d.on("tap",
  5112. function(g) {
  5113. g = g || window.event;
  5114. var h = g.target || g.srcElement;
  5115. var f = a(h);
  5116. if (f.hasClass("f-popright")) {
  5117. f.removeClass("active")
  5118. }
  5119. });
  5120. d.find(".f-popright-btn").on("tap", {
  5121. fop: e
  5122. },
  5123. function(h) {
  5124. var f = a(this);
  5125. var i = f.attr("data-value");
  5126. var g = h.data.fop;
  5127. g.callBack && g.callBack(i, f.parents(".f-popright").find(".f-popright-bodyContent"));
  5128. if (i == "ok" || i == "cancel") {
  5129. f.parents(".f-popright").removeClass("active")
  5130. }
  5131. });
  5132. d = null
  5133. }
  5134. };
  5135. a.fn.fpopright = function(f) {
  5136. var e = {
  5137. okBtn: "确定",
  5138. restBtn: "重置",
  5139. cancelBtn: "取消",
  5140. callBack: false
  5141. };
  5142. var d = a(this);
  5143. if (d[0].fop) {
  5144. return d
  5145. }
  5146. a.extend(e, f || {});
  5147. d[0].fop = e;
  5148. b.init(d, e);
  5149. return d
  5150. };
  5151. a.fn.fpoprightShow = function() {
  5152. var e = a(this);
  5153. var d = e.parents(".f-popright");
  5154. if (!d.hasClass("active")) {
  5155. d.addClass("active")
  5156. }
  5157. d = null;
  5158. e = null
  5159. };
  5160. a.fn.fpoprightHide = function() {
  5161. var e = a(this);
  5162. var d = e.parents(".f-popright");
  5163. if (d.hasClass("active")) {
  5164. d.removeClass("active")
  5165. }
  5166. d = null;
  5167. e = null
  5168. }
  5169. })(window.jQuery, window.fui); (function(a) {
  5170. var v = false;
  5171. var s = false;
  5172. var c = false;
  5173. var u = false;
  5174. var w = false;
  5175. var x = 0;
  5176. var l = 0;
  5177. var t = 0;
  5178. var j = false;
  5179. var k = false;
  5180. var n = false;
  5181. var f = "f-swipebtn-handler";
  5182. var g = "f-swipebtn-right";
  5183. var d = "f-swipebtn-btn";
  5184. var h = "f-swipebtn-transitioning";
  5185. var e = "f-swipebtn-selected";
  5186. var p = "." + f;
  5187. var q = "." + g;
  5188. var o = "." + d;
  5189. var m = 0.8;
  5190. var y = function() {
  5191. var z;
  5192. if (x !== l) {
  5193. if (c && c.length > 0) {
  5194. n = x / t;
  5195. if (x < -t) {
  5196. x = -t - Math.pow( - x - t, m)
  5197. }
  5198. for (var B = 0,
  5199. C = c.length; B < C; B++) {
  5200. var A = c[B];
  5201. if (typeof A._buttonOffset === "undefined") {
  5202. A._buttonOffset = A.offsetLeft
  5203. }
  5204. z = A._buttonOffset;
  5205. r(A, (x - z * (1 + Math.max(n, -1))))
  5206. }
  5207. }
  5208. r(v, x);
  5209. l = x
  5210. }
  5211. w = requestAnimationFrame(function() {
  5212. y()
  5213. })
  5214. };
  5215. var r = function(z, A) {
  5216. if (z && z.style) {
  5217. z.style.webkitTransform = "translate(" + A + "px,0)"
  5218. }
  5219. };
  5220. var i = {
  5221. handleEvent: function(z) {
  5222. switch (z.type) {
  5223. case "drag":
  5224. this.drag(z);
  5225. break;
  5226. case "dragend":
  5227. this.dragend(z);
  5228. break;
  5229. case "swiperight":
  5230. this.swiperight(z);
  5231. break;
  5232. case "swipeleft":
  5233. this.swipeleft(z);
  5234. break
  5235. }
  5236. },
  5237. drag: function(F) {
  5238. F = F || window.event;
  5239. var E = F.target || F.srcElement;
  5240. var B = null;
  5241. var z = a(E);
  5242. if (z.hasClass("f-swipebtn")) {
  5243. B = z[0]
  5244. } else {
  5245. B = z.parents(".f-swipebtn")[0]
  5246. }
  5247. z = null;
  5248. if (!j) {
  5249. v = s = c = u = w = false;
  5250. v = B.querySelector(p);
  5251. if (v) {
  5252. s = B.querySelector(q);
  5253. if (s) {
  5254. t = s.offsetWidth;
  5255. c = s.querySelectorAll(o)
  5256. }
  5257. B.classList.remove(h);
  5258. k = B.classList.contains(e)
  5259. }
  5260. }
  5261. var C = F.detail;
  5262. var D = C.direction;
  5263. var A = C.angle;
  5264. if (D === "left" && (A > 150 || A < -150)) {
  5265. if (c) {
  5266. j = true
  5267. }
  5268. } else {
  5269. if (D === "right" && (A > -30 && A < 30)) {
  5270. if ((c && k)) {
  5271. j = true
  5272. }
  5273. }
  5274. }
  5275. if (j) {
  5276. F.stopPropagation();
  5277. F.detail.gesture.preventDefault();
  5278. var G = F.detail.deltaX;
  5279. if (k) {
  5280. G = G - t
  5281. }
  5282. if ((G < 0 && !c)) {
  5283. if (!k) {
  5284. return
  5285. }
  5286. G = 0
  5287. }
  5288. if (G < 0) {
  5289. u = "toLeft"
  5290. } else {
  5291. if (G > 0) {
  5292. u = "toRight"
  5293. } else {
  5294. if (!u) {
  5295. u = "toLeft"
  5296. }
  5297. }
  5298. }
  5299. if (!w) {
  5300. y()
  5301. }
  5302. x = G
  5303. }
  5304. },
  5305. swipeleft: function(z) {
  5306. if (j) {
  5307. z.stopPropagation()
  5308. }
  5309. },
  5310. swiperight: function(z) {
  5311. if (j) {
  5312. z.stopPropagation()
  5313. }
  5314. },
  5315. dragend: function(J) {
  5316. if (!j) {
  5317. return
  5318. }
  5319. J = J || window.event;
  5320. var I = J.target || J.srcElement;
  5321. var G = null;
  5322. var z = a(I);
  5323. if (z.hasClass("f-swipebtn")) {
  5324. G = z[0]
  5325. } else {
  5326. G = z.parents(".f-swipebtn")[0]
  5327. }
  5328. z = null;
  5329. J.stopPropagation();
  5330. if (w) {
  5331. cancelAnimationFrame(w);
  5332. w = null
  5333. }
  5334. var H = J.detail;
  5335. j = false;
  5336. var A = "close";
  5337. var B = u === "toLeft" ? t: 0;
  5338. var L = H.swipe || (Math.abs(x) > B / 2);
  5339. if (L) {
  5340. if (!k) {
  5341. A = "open"
  5342. } else {
  5343. if (H.direction === "left") {
  5344. A = "open"
  5345. }
  5346. }
  5347. }
  5348. G.classList.add(h);
  5349. var F;
  5350. if (A === "open") {
  5351. var N = u === "toLeft" ? -B: B;
  5352. r(v, N);
  5353. F = u === "toLeft" ? c: "undefined";
  5354. if (typeof F !== "undefined") {
  5355. var C = null;
  5356. for (var K = 0; K < F.length; K++) {
  5357. C = F[K];
  5358. r(C, N)
  5359. }
  5360. C.parentNode.classList.add(e);
  5361. G.classList.add(e);
  5362. if (!k) {
  5363. fui.trigger(G, u === "toLeft" ? "slideleft": "slideright")
  5364. }
  5365. }
  5366. } else {
  5367. r(v, 0);
  5368. s && s.classList.remove(e);
  5369. G.classList.remove(e)
  5370. }
  5371. var D;
  5372. if (c && c.length > 0 && c !== F) {
  5373. for (var K = 0,
  5374. M = c.length; K < M; K++) {
  5375. var E = c[K];
  5376. D = E._buttonOffset;
  5377. if (typeof D === "undefined") {
  5378. E._buttonOffset = E.offsetLeft
  5379. }
  5380. r(E, -D)
  5381. }
  5382. }
  5383. }
  5384. };
  5385. var b = function(z) {
  5386. var A = z[0];
  5387. A.addEventListener("drag", i);
  5388. A.addEventListener("dragend", i);
  5389. A.addEventListener("swiperight", i);
  5390. A.addEventListener("swipeleft", i)
  5391. };
  5392. a.fn.fswipebtn = function() {
  5393. a(this).each(function() {
  5394. b(a(this))
  5395. })
  5396. }
  5397. })(window.jQuery); (function(a, c) {
  5398. var b = {
  5399. init: function(d, f) {
  5400. f.id = c.guid();
  5401. var e = '<div class="f-checkbox f-pop" id="pop_' + f.id + '" data-page="' + c.pageid() + '" >';
  5402. e += '<div class="f-checkbox-header" >';
  5403. e += '<div class="f-checkbox-cancel">取消</div>';
  5404. e += '<div class="f-checkbox-ok">确定</div>';
  5405. e += "</div>";
  5406. e += '<div class="f-checkbox-body" >';
  5407. f.dataMap = {};
  5408. a.each(f.data,
  5409. function(g, h) {
  5410. f.dataMap[h[f.ivalue]] = h;
  5411. e += '<div class="f-checkbox-item" data-value="' + h[f.ivalue] + '" >' + h[f.itext] + "</div>"
  5412. });
  5413. e += "</div></div>";
  5414. a("body").append(e);
  5415. c.createMask();
  5416. b.bindEvent(d, f)
  5417. },
  5418. bindEvent: function(e, f) {
  5419. e.on("tap",
  5420. function() {
  5421. var h = a(this);
  5422. if (h.attr("readonly") || h.parents(".lr-form-row").attr("readonly")) {
  5423. return false
  5424. }
  5425. var j = h[0];
  5426. var i = j.fop;
  5427. i.callback && i.callback();
  5428. var g = a("#pop_" + i.id);
  5429. if (!g.hasClass("active")) {
  5430. g.addClass("active");
  5431. c.showMask()
  5432. }
  5433. g.find(".selected").removeClass("selected");
  5434. setTimeout(function() {
  5435. if (i.value != undefined && i.value != "" && i.value != null) {
  5436. var k = i.value.split(",");
  5437. a.each(k,
  5438. function(l, m) {
  5439. g.find('[data-value="' + m + '"]').addClass("selected")
  5440. })
  5441. }
  5442. g = null
  5443. },
  5444. 300);
  5445. return false
  5446. });
  5447. var d = a("#pop_" + f.id);
  5448. d.find(".f-checkbox-body").scroll();
  5449. d.find(".f-checkbox-body").on("tap",
  5450. function(h) {
  5451. h = h || window.event;
  5452. var i = h.target || h.srcElement;
  5453. var g = a(i);
  5454. if (g.hasClass("f-checkbox-item")) {
  5455. if (g.hasClass("selected")) {
  5456. g.removeClass("selected")
  5457. } else {
  5458. g.addClass("selected")
  5459. }
  5460. return false
  5461. }
  5462. });
  5463. d.find(".f-checkbox-cancel").on("tap",
  5464. function() {
  5465. var g = a(this).parents(".f-checkbox");
  5466. g.removeClass("active");
  5467. c.hideMask();
  5468. return false
  5469. });
  5470. d.find(".f-checkbox-ok").on("tap", {
  5471. $self: e,
  5472. fop: f
  5473. },
  5474. function(j) {
  5475. var g = a(this).parents(".f-checkbox");
  5476. g.removeClass("active");
  5477. c.hideMask();
  5478. j = j || window.event;
  5479. var k = j.data.fop;
  5480. var h = j.data.$self;
  5481. var l = [];
  5482. var m = [];
  5483. var i = [];
  5484. g.find(".selected").each(function() {
  5485. var o = a(this).attr("data-value");
  5486. var n = k.dataMap[o];
  5487. m.push(o);
  5488. l.push(n[k.itext]);
  5489. i.push(n)
  5490. });
  5491. if (k.value != String(m)) {
  5492. k.value = String(m);
  5493. k.text = String(l);
  5494. h.trigger("change");
  5495. if ( !! k.change) {
  5496. k.change(k.value, k.text, i, h)
  5497. }
  5498. }
  5499. g = null;
  5500. h = null;
  5501. return false
  5502. });
  5503. d = null
  5504. }
  5505. };
  5506. a.fn.fcheckbox = function(f) {
  5507. var d = a(this);
  5508. if (d.length === 0) {
  5509. return d
  5510. }
  5511. if (d[0].fop) {
  5512. return d
  5513. }
  5514. var e = {
  5515. data: [],
  5516. change: false,
  5517. ivalue: "value",
  5518. itext: "text"
  5519. };
  5520. a.extend(e, f || {});
  5521. d[0].fop = e;
  5522. b.init(d, e);
  5523. return d
  5524. };
  5525. a.fn.fcheckboxSet = function(i) {
  5526. var d = a(this);
  5527. if (d.length > 0) {
  5528. var g = d[0].fop;
  5529. if (i != undefined && i != "" && i != null) {
  5530. var j = i.split(",");
  5531. var h = [];
  5532. var f = [];
  5533. var e = [];
  5534. a.each(j,
  5535. function(k, m) {
  5536. if (m) {
  5537. e.push(m);
  5538. var l = g.dataMap[m];
  5539. if (l) {
  5540. h.push(l[g.itext] || "");
  5541. f.push(l)
  5542. }
  5543. }
  5544. });
  5545. g.value = String(e);
  5546. g.text = String(h);
  5547. d.trigger("change");
  5548. if ( !! g.change) {
  5549. g.change(g.value, g.text, f, d)
  5550. }
  5551. }
  5552. }
  5553. d = null
  5554. };
  5555. a.fn.fcheckboxSetData = function(f) {
  5556. var e = a(this);
  5557. if (e.length > 0) {
  5558. var g = e[0].fop;
  5559. if (g) {
  5560. g.dataMap = {};
  5561. g.data = f || [];
  5562. var d = a("#pop_" + g.id + " .f-scroll");
  5563. d.html("");
  5564. a.each(g.data,
  5565. function(h, i) {
  5566. g.dataMap[i[g.ivalue]] = i;
  5567. d.append('<div class="f-checkbox-item" data-value="' + i[g.ivalue] + '" >' + i[g.itext] + "</div>")
  5568. });
  5569. d = null
  5570. }
  5571. }
  5572. e = null
  5573. }
  5574. })(window.jQuery, window.fui);
  5575. /*
  5576. * 版 本 Learun-Mobile V2.0.0 任联敏捷开发框架(http://www.renlian.cn)
  5577. * Copyright (c) 2013-2018 前端技术开发小组
  5578. * 创建人:任联-前端开发组
  5579. * 日 期:2017.12.15
  5580. * 描 述:任联移动端框架 基础方法
  5581. */
  5582. (function ($, fui, window) {
  5583. "use strict";
  5584. //cordova.js 方法
  5585. $.fn.getHexBackgroundColor = function () {
  5586. var rgb = $(this).css('background-color');
  5587. rgb = rgb.match(/^rgb\((\d+),\s*(\d+),\s*(\d+)\)$/);
  5588. function hex(x) { return ("0" + parseInt(x).toString(16)).slice(-2); }
  5589. return rgb = "#" + hex(rgb[1]) + hex(rgb[2]) + hex(rgb[3]);
  5590. }
  5591. var backbuttonEvent = function () {
  5592. // 判断是否有图片预览
  5593. if ($('#fui_imagePreview').length >0 && !$('#fui_imagePreview').is(':hidden')) {
  5594. $('#fui_imagePreview').imagePreviewClose();
  5595. }
  5596. else if ($('.f-dialog').length > 0) {
  5597. $('.f-dialog').remove();
  5598. $('.f-dialog-mask').remove();
  5599. }
  5600. else {
  5601. fui.loading(false);
  5602. // 判断下当前页面是否有返回键
  5603. var pageInfo = fui.nav.page.data[fui.nav.page.activeid];
  5604. if (pageInfo.op.isBack) {
  5605. window.lrmui.nav.closeCurrent();
  5606. }
  5607. else {
  5608. window.lrmui.layer.confirm('是否退出APP', function (_index) {
  5609. if (_index === '1') {
  5610. navigator.app.exitApp();
  5611. }
  5612. }, '温馨提示', ['否', '是']);
  5613. }
  5614. }
  5615. }
  5616. window.lrmui = {// 任联mobileui框架基础方法
  5617. isreal: false,
  5618. isready: false,
  5619. init: function (callback) {
  5620. document.addEventListener("backbutton", backbuttonEvent, false);
  5621. _init(callback);
  5622. },
  5623. guid: function (separator) {
  5624. return fui.guid(separator);
  5625. },
  5626. pageid: function () {
  5627. return fui.pageid();
  5628. },
  5629. deviceId: function () {// 设备id
  5630. var deviceId = window.lrmui.storage.get('deviceId');
  5631. if (!deviceId) {
  5632. deviceId = window.device ? device.uuid : fui.guid('');
  5633. window.lrmui.storage.set('deviceId', deviceId);
  5634. }
  5635. return deviceId;
  5636. },
  5637. type: function (obj) {
  5638. return fui.type(obj);
  5639. },
  5640. date: {// 日期格式化操作
  5641. parse: function (v) {
  5642. return fui.date.parse(v);
  5643. },
  5644. format: function (v, format) {
  5645. return fui.date.format(v, format);
  5646. }
  5647. },
  5648. actionsheet: function (op) {
  5649. /*id: '',
  5650. data: [], //text:'名称',group:'组名',event:'点击事件',mark:'' 标记后为红色
  5651. cancel: false*/
  5652. fui.actionsheet(op);
  5653. },
  5654. layer: {
  5655. toast: function (msg) {// 消失提示框
  5656. fui.dialog({ msg: msg });
  5657. },
  5658. warning: function (msg, callback, title, btn) {// 警告框
  5659. fui.dialog({ type: 'warning', msg: msg, title: title, callback: callback, btn: btn });
  5660. },
  5661. confirm: function (msg, callback, title, btns) {// 确认消息框
  5662. fui.dialog({ type: 'confirm', msg: msg, title: title, callback: callback, btns: btns });
  5663. },
  5664. popinput: function (msg, callback, title, btns, input) {// 输入消息框
  5665. fui.dialog({ type: 'prompt', msg: msg, title: title, callback: callback, btns: btns });
  5666. },
  5667. loading: function (isShow, msg) {// 加载提示框
  5668. fui.loading(isShow, msg);
  5669. }
  5670. },
  5671. md5: function (str) {
  5672. return $.md5(str);
  5673. },
  5674. jgRegistrationId:false
  5675. };
  5676. function _init(callback) {// 框架初始化方法
  5677. if (window.lrmui.isready) {
  5678. // 开始执行初始化函数
  5679. // 处理 Cordova 暂停并恢复事件
  5680. //document.addEventListener('pause', onPause.bind(this), false);
  5681. //document.addEventListener('resume', onResume.bind(this), false);
  5682. callback();
  5683. }
  5684. else {
  5685. setTimeout(function () {
  5686. _init(callback);
  5687. }, 200);
  5688. }
  5689. }
  5690. function isPlatform() {// 调试浏览器模拟环境,浏览器环境,安卓,IOS
  5691. if (!window.cordova) { // 首先判断是不是浏览器环境
  5692. window.lrmui.platform = 'browser';
  5693. window.lrmui.isready = true; // 表示设备加载完成
  5694. }
  5695. else {// 只有在真机还有模拟环境下才启用
  5696. document.addEventListener('deviceready', onDeviceReady.bind(this), false);// 注册设备是否初始化完成并绑定相应的方法
  5697. document.addEventListener("jpush.openNotification", onOpenNotification.bind(this), false);
  5698. document.addEventListener("jpush.receiveNotification", onReceiveNotification.bind(this), false);
  5699. document.addEventListener("jpush.receiveMessage", onReceiveMessage.bind(this), false);
  5700. }
  5701. }
  5702. isPlatform();
  5703. function onDeviceReady() {
  5704. // 判断当前平台
  5705. if (window.navigator.platform === 'Win32') { // 判断是不是调试浏览器模拟环境
  5706. window.lrmui.platform = 'simulator';
  5707. }
  5708. else {// 真机环境
  5709. window.lrmui.isreal = true;
  5710. window.lrmui.platform = cordova.platformId;
  5711. StatusBar.styleDefault();
  5712. //推送通知初始化
  5713. init_jg_push();
  5714. }
  5715. window.lrmui.isready = true; // 表示设备加载完成
  5716. }
  5717. //推送通知初始化
  5718. function init_jg_push(){
  5719. try {
  5720. window.JPush.init();
  5721. //window.JPush.setDebugMode(true);
  5722. cordova.plugins.notification.badge.configure({ autoClear: true });
  5723. if (device.platform != "Android") {
  5724. window.JPush.setApplicationIconBadgeNumber(0);
  5725. }
  5726. } catch (exception) {
  5727. console.log(exception);
  5728. }
  5729. }
  5730. function onOpenNotification(event){
  5731. try {
  5732. var alertContent;
  5733. if (device.platform == "Android") {
  5734. alertContent = event.alert;
  5735. } else {
  5736. alertContent = event.aps.alert;
  5737. }
  5738. alert("open Notification:" + alertContent);
  5739. } catch (exception) {
  5740. console.log("JPushPlugin:onOpenNotification" + exception);
  5741. }
  5742. }
  5743. function onReceiveNotification(event){
  5744. try {
  5745. var alertContent;
  5746. if (device.platform == "Android") {
  5747. alertContent = event.alert;
  5748. } else {
  5749. alertContent = event.aps.alert;
  5750. }
  5751. cordova.plugins.notification.badge.increase(1, function (badge) {
  5752. console.log("ReceiveNotification badge increase 1");
  5753. });
  5754. } catch (exception) {
  5755. console.log(exception)
  5756. }
  5757. }
  5758. function onReceiveMessage(event){
  5759. try {
  5760. var message;
  5761. if (device.platform == "Android") {
  5762. message = event.message;
  5763. } else {
  5764. message = event.content;
  5765. }
  5766. console.log("ReceiveMessage badge increase 1");
  5767. } catch (exception) {
  5768. console.log("JPushPlugin:onReceiveMessage-->" + exception);
  5769. }
  5770. }
  5771. $(function () {
  5772. $('body').delegate('input[type="password"],input[type="text"],textarea,.lrtextarea', 'tap', function () {
  5773. var $this = $(this);
  5774. if ($this.attr('readonly') || $this.parents('.lr-form-row').attr('readonly')) {
  5775. return false;
  5776. }
  5777. if (!$this.is(":focus")) {
  5778. if ($this.hasClass('lrtextarea')) {
  5779. var range;
  5780. if (window.getSelection) {//ie11 10 9 ff safari
  5781. range = window.getSelection();//创建range
  5782. range.selectAllChildren($this[0]);//range 选择obj下所有子内容
  5783. $this.focus(); //解决ff不获取焦点无法定位问题
  5784. range.collapseToEnd();//光标移至最后
  5785. }
  5786. else if (document.selection) {//ie10 9 8 7 6 5
  5787. range = document.selection.createRange();//创建选择对象
  5788. range.moveToElementText($this[0]);//range定位到obj
  5789. range.collapse(false);//光标移至最后
  5790. range.select();
  5791. }
  5792. }
  5793. else
  5794. {
  5795. $this.focus();
  5796. }
  5797. }
  5798. });
  5799. });
  5800. })(window.jQuery, window.fui, window);/*
  5801. * 版 本 Learun-Mobile V2.0.0 任联敏捷开发框架(http://www.renlian.cn)
  5802. * Copyright (c) 2013-2018 前端技术开发小组
  5803. * 创建人:任联-前端开发组
  5804. * 日 期:2017.12.15
  5805. * 描 述:任联移动端框架 ajax请求方法
  5806. */
  5807. (function ($, renlian, fui, window) {
  5808. "use strict";
  5809. renlian.http = {
  5810. post: function (url, param, callback, dataType) {
  5811. return renlian.http.async('POST', url, param, callback, dataType);
  5812. },
  5813. get: function (url, param, callback, dataType) {
  5814. return renlian.http.async('GET', url, param, callback, dataType);
  5815. },
  5816. webget: function (url, param, callback, dataType) {
  5817. return $.ajax({
  5818. url: url,
  5819. data: param,
  5820. type: 'GET',
  5821. dataType: dataType || "json",
  5822. async: true,
  5823. cache: false,
  5824. success: function (res) {
  5825. callback(res);
  5826. },
  5827. error: function (XMLHttpRequest, textStatus, errorThrown) {
  5828. callback(null);
  5829. },
  5830. beforeSend: function () {
  5831. },
  5832. complete: function () {
  5833. }
  5834. });
  5835. },
  5836. async: function (type, url, param, callback, dataType) {
  5837. return $.ajax({
  5838. url: url,
  5839. data: param,
  5840. type: type,
  5841. dataType: dataType || "json",
  5842. async: true,
  5843. cache: false,
  5844. success: function (res) {
  5845. callback(res);
  5846. },
  5847. error: function (XMLHttpRequest, textStatus, errorThrown) {
  5848. callback(null);
  5849. },
  5850. beforeSend: function () {
  5851. },
  5852. complete: function () {
  5853. }
  5854. });
  5855. /*
  5856. if (window.lrmui.isreal) {
  5857. if (type === 'GET') {
  5858. window.cordovaHTTP.get(url, param, {}, function (res) {
  5859. callback(JSON.parse(res.data));
  5860. }, function () {
  5861. callback(null);
  5862. });
  5863. }
  5864. else {
  5865. window.cordovaHTTP.post(url, param, {}, function (res) {
  5866. callback(JSON.parse(res.data));
  5867. }, function () {
  5868. callback(null);
  5869. });
  5870. }
  5871. }
  5872. else {
  5873. return $.ajax({
  5874. url: url,
  5875. data: param,
  5876. type: type,
  5877. dataType: dataType || "json",
  5878. async: true,
  5879. cache: false,
  5880. success: function (res) {
  5881. callback(res);
  5882. },
  5883. error: function (XMLHttpRequest, textStatus, errorThrown) {
  5884. callback(null);
  5885. },
  5886. beforeSend: function () {
  5887. },
  5888. complete: function () {
  5889. }
  5890. });
  5891. }
  5892. */
  5893. }
  5894. };
  5895. })(window.jQuery, window.lrmui, window.fui, window);/*
  5896. * 版 本 Learun-Mobile V2.0.0 任联敏捷开发框架(http://www.renlian.cn)
  5897. * Copyright (c) 2013-2018 前端技术开发小组
  5898. * 创建人:任联-前端开发组
  5899. * 日 期:2017.12.15
  5900. * 描 述:任联移动端框架 导航路由方法(框架核心部分)
  5901. */
  5902. (function ($, renlian, fui, window) {
  5903. "use strict";
  5904. renlian.nav = {
  5905. data: {// 加载过的页面数据|开发的时候请改完代码保存后刷新下页面
  5906. },
  5907. getpage: function (name) {
  5908. var page = this.data[name];
  5909. var pageobj = null;
  5910. if (page) {
  5911. pageobj = page.jsObj;
  5912. }
  5913. return pageobj;
  5914. },
  5915. go: function (op) {
  5916. var dfop = {
  5917. path: '',
  5918. title: '',
  5919. type: '',// 'right','bottom', 不填为淡入淡出
  5920. backbtn: '<i class="iconfont icon-back_light"></i>',
  5921. isBack: true,
  5922. isTab: false,
  5923. isHead: true,
  5924. fclass: '',
  5925. param: {}// 传递参数
  5926. };
  5927. $.extend(dfop, op || {});
  5928. if (dfop.path === '') {
  5929. fui.dialog({ msg: '温馨提示:不知道页面路径!' });
  5930. return false;
  5931. }
  5932. dfop.start = function (pageinfo) {
  5933. // 页面开始
  5934. if (!pageinfo.op.isTab) {
  5935. $('.lr-tabbar').css('z-index', 2);
  5936. }
  5937. };
  5938. dfop.end = function (pageinfo) {
  5939. var $tab = $('.lr-tabbar');
  5940. $tab.css('z-index', 10);
  5941. // 页面动画结束
  5942. if (pageinfo.op.isTab) {
  5943. $tab.show();
  5944. }
  5945. else {
  5946. $tab.hide();
  5947. }
  5948. var $pagebody = pageinfo.$page.find('.f-page-body');
  5949. var page = renlian.nav.data[pageinfo.op.id];
  5950. if (!pageinfo.op.isBack || !pageinfo.op.isHead) {
  5951. // 如果跳转的页面没有返回的按钮,就把之前带返回按钮的页面删掉
  5952. var pageid = "";
  5953. var _pageinfo = pageinfo;
  5954. for (var i = 0; i < 100; i++) {
  5955. pageid = _pageinfo.preid;
  5956. if (pageid !== "" && pageinfo.id !== pageid) {
  5957. _pageinfo = fui.nav.page.data[pageid];
  5958. if (!_pageinfo.op.isBack || !_pageinfo.op.isHead) {
  5959. break;
  5960. }
  5961. else {
  5962. fui.nav.close(pageid);
  5963. }
  5964. }
  5965. else {
  5966. break;
  5967. }
  5968. }
  5969. pageinfo.preid = "";
  5970. }
  5971. if (!pageinfo.hasLoad) {
  5972. loadhtml(page, $pagebody, pageinfo.op);
  5973. }
  5974. else {// 如果页面已经加载过了,如果页面有reload方法就加载一次
  5975. page.jsObj && page.jsObj.reload && page.jsObj.reload($pagebody, pageinfo);
  5976. // 检测当前头部颜色,并进行设置
  5977. if (window.lrmui.isreal) {
  5978. if (page.jsObj && page.jsObj.headColor) {
  5979. StatusBar.backgroundColorByHexString(page.jsObj.headColor);
  5980. }
  5981. else {
  5982. var _$header = $pagebody.parent().find('.f-page-header');
  5983. if (_$header.length !== 0) {
  5984. var _color = _$header.getHexBackgroundColor();
  5985. StatusBar.backgroundColorByHexString(_color);
  5986. }
  5987. _$header = null;
  5988. }
  5989. }
  5990. }
  5991. };
  5992. dfop.bfdestroy = function (pageinfo) {
  5993. // 页面销毁之前执行
  5994. var page = renlian.nav.data[pageinfo.op.id];
  5995. if (!!page.jsObj && !!page.jsObj.beforedestroy) {
  5996. return page.jsObj.beforedestroy();
  5997. }
  5998. return true;
  5999. };
  6000. dfop.destroy = function (pageinfo) {
  6001. // 页面销毁
  6002. var page = renlian.nav.data[pageinfo.op.id];
  6003. if (!!page.jsObj && !!page.jsObj.destroy) {
  6004. console.log('test destroy')
  6005. page.jsObj.destroy();
  6006. }
  6007. };
  6008. // 去加载页面数据
  6009. load(dfop.path);
  6010. // 渲染页面
  6011. if (!dfop.isBack) {
  6012. dfop.fclass = "lr-page-no-back";
  6013. }
  6014. if (!dfop.isHead) {
  6015. dfop.fclass = dfop.fclass + " lr-page-no-head";
  6016. }
  6017. if (dfop.isTab) {
  6018. dfop.fclass = dfop.fclass + " lr-page-have-tab";
  6019. }
  6020. dfop.id = dfop.path;
  6021. fui.nav.go(dfop);
  6022. },
  6023. closeCurrent: function () {
  6024. fui.nav.closeCurrent();
  6025. },
  6026. close: function (id) {
  6027. console.log('close*****************');
  6028. fui.nav.close(id);
  6029. }
  6030. };
  6031. function load(path) {
  6032. if (!renlian.nav.data[path]) {// 判断下当前页面是否已经加载了
  6033. renlian.nav.data[path] = {
  6034. //cssLoaded: false,
  6035. jsLoaded: false,
  6036. htmlLoaded: false,
  6037. strhtml: ''
  6038. };
  6039. var paths = path.split('/');
  6040. var filename = paths[paths.length - 1];
  6041. // 加载页面css代码
  6042. renlian.http.webget('pages/' + path + '/' + filename + '.css', {}, function (res) {
  6043. if (res !== null) {
  6044. fui.includeCss(res);
  6045. }
  6046. }, 'text');
  6047. //fui.loadCss('pages/' + path + '/' + path + '.css');
  6048. // 加载页面html代码
  6049. renlian.http.webget('pages/' + path + '/' + filename + '.html', {}, function (res) {
  6050. if (res === null) {
  6051. fui.dialog({ msg: '任联信息提示:找不到页面!' });
  6052. }
  6053. renlian.nav.data[path].strhtml = res || '';
  6054. renlian.nav.data[path].htmlLoaded = true;
  6055. }, 'text');
  6056. // 加载页面js代码
  6057. renlian.http.webget('pages/' + path + '/' + filename + '.js', {}, function (res) {
  6058. var strjs = '(function ($,renlian) {renlian.nav.data["' + path + '"].jsObj = ' + (res || 'null;') + '})(window.jQuery,window.lrmui);';
  6059. fui.includeJs(strjs);
  6060. renlian.nav.data[path].jsLoaded = true;
  6061. }, 'text');
  6062. }
  6063. }
  6064. // 加载js代码
  6065. function loadjs(_page, _$pagebody, _op) {
  6066. if (_page.jsLoaded) {
  6067. if (_page.jsObj) {
  6068. if (_page.jsObj.isScroll) {
  6069. _$pagebody.scroll();
  6070. }
  6071. setTimeout(function () {
  6072. _page.jsObj.init && _page.jsObj.init(_$pagebody, _op.param);
  6073. // 检测当前头部颜色,并进行设置
  6074. if (window.lrmui.isreal) {
  6075. if (_page.jsObj.headColor) {
  6076. StatusBar.backgroundColorByHexString(_page.jsObj.headColor);
  6077. }
  6078. else {
  6079. var _$header = _$pagebody.parent().find('.f-page-header');
  6080. if (_$header.length !== 0) {
  6081. var _color = _$header.getHexBackgroundColor();
  6082. StatusBar.backgroundColorByHexString(_color);
  6083. }
  6084. _$header = null;
  6085. }
  6086. }
  6087. }, 100);
  6088. }
  6089. }
  6090. else {
  6091. setTimeout(function () {
  6092. loadjs(_page, _$pagebody);
  6093. }, 200);
  6094. }
  6095. }
  6096. // 加载html代码
  6097. function loadhtml(_page, _$pagebody, _op) {
  6098. if (_page.htmlLoaded) {
  6099. _$pagebody.html(_page.strhtml);
  6100. loadjs(_page, _$pagebody, _op);
  6101. }
  6102. else {
  6103. setTimeout(function () {
  6104. loadhtml(_page, _$pagebody, _op);
  6105. }, 200);
  6106. }
  6107. }
  6108. })(window.jQuery, window.lrmui, window.fui, window);/*
  6109. * 版 本 Learun-Mobile V2.0.0 任联敏捷开发框架(http://www.renlian.cn)
  6110. * Copyright (c) 2013-2018 前端技术开发小组
  6111. * 创建人:任联-前端开发组
  6112. * 日 期:2017.12.15
  6113. * 描 述:任联移动端框架 底部选项卡导航(框架核心部分)
  6114. * 修改日志:2018-02-02 修正go方法无法跳转页面的问题
  6115. */
  6116. (function ($, renlian, fui, window) {
  6117. "use strict";
  6118. renlian.tab = {
  6119. init: function (tabdata) {
  6120. // 首先加载tab数据
  6121. var $tab = $('.lr-tabbar');
  6122. var _html = '';
  6123. $.each(tabdata, function (_index, item) {
  6124. if (item.icon) {
  6125. _html += '\
  6126. <a class="lr-tab-button" data-value="'+ item.page + '" href="#">\
  6127. <i class="unselected iconfont '+ item.icon + '"></i>\
  6128. <i class="selected iconfont '+ item.fillicon + '"></i>\
  6129. <span class="lr-tab-button-text">'+ item.text + '</span>\
  6130. </a>';
  6131. }
  6132. else {
  6133. _html += '\
  6134. <a class="lr-tab-button" data-value="'+ item.page + '" href="#">\
  6135. <img class="unselected" src="'+ item.img + '">\
  6136. <img class="selected" src="'+ item.fillimg +'">\
  6137. <span class="lr-tab-button-text">'+ item.text + '</span>\
  6138. </a>';
  6139. }
  6140. });
  6141. $tab.html(_html);
  6142. $tab.on("tap", ".lr-tab-button", function (e) {
  6143. var $this = $(this);
  6144. if ($this.hasClass('active')) {
  6145. return false;
  6146. }
  6147. var page = $this.attr('data-value');
  6148. var title = $this.find('span').text();
  6149. renlian.nav.go({ path: page, title: title, isBack: false, isTab: true });
  6150. $this.parent().find('.active').removeClass('active');
  6151. $this.addClass('active');
  6152. });
  6153. },
  6154. go: function (page) {
  6155. $('.lr-tabbar [data-value="' + page + '"]').removeClass('active');
  6156. $('.lr-tabbar [data-value="' + page + '"]').trigger('tap');
  6157. }
  6158. };
  6159. })(window.jQuery, window.lrmui, window.fui, window);/*
  6160. * 版 本 Learun-Mobile V2.0.0 任联敏捷开发框架(http://www.renlian.cn)
  6161. * Copyright (c) 2013-2018 前端技术开发小组
  6162. * 创建人:任联-前端开发组
  6163. * 日 期:2017.12.15
  6164. * 描 述:任联移动端框架 客户端存储(框架核心部分)
  6165. */
  6166. (function ($, renlian, fui, window) {
  6167. "use strict";
  6168. renlian.storage = {
  6169. get: function (name) {// 获取
  6170. return JSON.parse(localStorage.getItem(name));
  6171. },
  6172. set: function (name, value) {// 设置
  6173. localStorage.setItem(name, JSON.stringify(value));
  6174. }
  6175. };
  6176. })(window.jQuery, window.lrmui, window.fui, window);
  6177. /*
  6178. * 版 本 Learun-Mobile V2.0.0 任联敏捷开发框架(http://www.renlian.cn)
  6179. * Copyright (c) 2013-2018 前端技术开发小组
  6180. * 创建人:任联-前端开发组
  6181. * 日 期:2017.12.15
  6182. * 描 述:任联移动端框架 日期选择插件
  6183. */
  6184. (function ($, renlian, fui, window) {
  6185. "use strict";
  6186. // 日期选择插件
  6187. $.fn.lrdate = function (op) {
  6188. var $this = $(this);
  6189. var dfop = {
  6190. placeholder: '请选择',
  6191. type: 'datetime',//datetime:2017-10-12 00:00;date:2017-10-12; time:00:00; month:2017-10
  6192. label: ['年', '月', '日', '时', '分'],
  6193. change: false // 选择时间改变的时候触发
  6194. };
  6195. $.extend(dfop, op || {});
  6196. dfop.callback = function () {
  6197. renlian.formblur();
  6198. };
  6199. $this.attr('type', 'lrdate');
  6200. $this.addClass('lr-date');
  6201. $this.html('<div class="text">' + dfop.placeholder + '</div>');
  6202. setTimeout(function () {
  6203. $this.fdtpicker(dfop).on('change', function () {
  6204. var $self = $(this);
  6205. $self.find('.text').text($self[0].fop.value);
  6206. });
  6207. }, 100);
  6208. return $this;
  6209. };
  6210. //任联自定义日期选择
  6211. $.fn.rldate = function (op,call) {
  6212. var $this = $(this);
  6213. var dfop = {
  6214. placeholder: '请选择',
  6215. type: 'datetime',//datetime:2017-10-12 00:00;date:2017-10-12; time:00:00; month:2017-10
  6216. label: ['年', '月', '日', '时', '分'],
  6217. change: false // 选择时间改变的时候触发
  6218. };
  6219. $.extend(dfop, op || {});
  6220. dfop.callback = function () {
  6221. //renlian.formblur();
  6222. };
  6223. setTimeout(function () {
  6224. $this.fdtpicker(dfop).on('change', function () {
  6225. var $self = $(this);
  6226. //$self.attr('route-date',$self[0].fop.value);
  6227. call($self[0].fop.value);
  6228. });
  6229. }, 100);
  6230. return $this;
  6231. };
  6232. // 日期选择插件(设置数据)
  6233. $.fn.lrdateSet = function (value) {
  6234. var $this = $(this);
  6235. function set($this, value) {
  6236. if ($this[0].fop) {
  6237. if (value) {
  6238. switch ($this[0].fop.type) {
  6239. case 'datetime':
  6240. value = fui.date.format(value, 'yyyy-MM-dd hh:mm');
  6241. break;
  6242. case 'date':
  6243. value = fui.date.format(value, 'yyyy-MM-dd');
  6244. break;
  6245. case 'time':
  6246. _value = fui.date.format(value, 'hh:mm');
  6247. if (!_value) {
  6248. _value = fui.date.format('2017-12-18 ' + value, 'hh:mm');
  6249. }
  6250. value = _value;
  6251. break;
  6252. case 'month':
  6253. value = fui.date.format(value, 'yyyy-MM');
  6254. break;
  6255. }
  6256. $this[0].fop.value = value;
  6257. $this.find('.text').text(value);
  6258. }
  6259. else {
  6260. $this[0].fop.value = '';
  6261. $this.find('.text').text($this[0].fop.placeholder);
  6262. }
  6263. }
  6264. else {
  6265. setTimeout(function () {
  6266. set($this, value);
  6267. }, 100);
  6268. }
  6269. }
  6270. set($this, value);
  6271. };
  6272. // 日期选择插件(获取数据)
  6273. $.fn.lrdateGet = function () {
  6274. var $this = $(this);
  6275. return $this[0].fop.value;
  6276. };
  6277. })(window.jQuery, window.lrmui, window.fui, window);
  6278. /*
  6279. * 版 本 Learun-Mobile V2.0.0 任联敏捷开发框架(http://www.renlian.cn)
  6280. * Copyright (c) 2013-2018 前端技术开发小组
  6281. * 创建人:任联-前端开发组
  6282. * 日 期:2017.12.15
  6283. * 描 述:任联移动端框架 选择器插件
  6284. */
  6285. (function ($, renlian, fui, window) {
  6286. "use strict";
  6287. // 选择器(初始化)
  6288. $.fn.lrpicker = function (op) {
  6289. var $this = $(this);
  6290. if ($this.length === 0) {
  6291. return $this;
  6292. }
  6293. var dfop = {
  6294. placeholder: '请选择',
  6295. data: [],
  6296. level: 1,
  6297. ivalue: 'value',
  6298. itext: 'text'
  6299. };
  6300. $.extend(dfop, op || {});
  6301. dfop.callback = function () {
  6302. renlian.formblur();
  6303. };
  6304. $this.attr('type', 'lrpicker');
  6305. $this.addClass('lr-picker');
  6306. $this.html('<div class="text">' + dfop.placeholder + '</div>');
  6307. setTimeout(function () {
  6308. $this.fpoppicker(dfop).on('change', function () {
  6309. var $self = $(this);
  6310. var text = $self[0].fop.text;
  6311. $self.find('.text').text(text.replace(/,/g, '/'));
  6312. });
  6313. }, 100);
  6314. return $this;
  6315. };
  6316. // 选择器(获取数据值)
  6317. $.fn.lrpickerGet = function (type) {
  6318. var $this = $(this);
  6319. if ($this.length === 0) {
  6320. return "";
  6321. }
  6322. var fop = $this[0].fop;
  6323. if (type === 'text') {
  6324. return fop.text;
  6325. }
  6326. else {
  6327. return fop.value;
  6328. }
  6329. };
  6330. // 选择器(设置数据值)
  6331. $.fn.lrpickerSet = function (value) {
  6332. var $this = $(this);
  6333. if ($this.length === 0) {
  6334. return false;
  6335. }
  6336. function set(value, $this) {
  6337. if (!$this[0].fop) {
  6338. setTimeout(function () {
  6339. set(value, $this);
  6340. }, 100);
  6341. }
  6342. else {
  6343. var fop = $this[0].fop;
  6344. if (value) {
  6345. fop._lrTmpValue = value;
  6346. }
  6347. $this.fpoppickerSet(value);
  6348. if (value === '') {
  6349. fop.value = '';
  6350. fop.text = '';
  6351. $this.find('.text').text(fop.placeholder);
  6352. }
  6353. else if (fop.text !== "" && fop.text !== undefined && fop.text !== null) {
  6354. $this.find('.text').text(fop.text.replace(/,/g, '/'));
  6355. }
  6356. }
  6357. }
  6358. set(value, $this);
  6359. };
  6360. // 选择器(更新数据)
  6361. $.fn.lrpickerSetData = function (data) {
  6362. var $this = $(this);
  6363. if ($this.length === 0) {
  6364. return false;
  6365. }
  6366. function updateData(data, $this) {
  6367. if (!$this[0].fop) {
  6368. setTimeout(function () {
  6369. updateData(data, $this);
  6370. }, 100);
  6371. }
  6372. else {
  6373. $this.fpoppickerSetData(data);
  6374. $this.lrpickerSet($this[0].fop._lrTmpValue);
  6375. }
  6376. }
  6377. updateData(data, $this);
  6378. };
  6379. })(window.jQuery, window.lrmui, window.fui, window);
  6380. /*
  6381. * 版 本 Learun-Mobile V2.0.0 任联敏捷开发框架(http://www.renlian.cn)
  6382. * Copyright (c) 2013-2018 前端技术开发小组
  6383. * 创建人:任联-前端开发组
  6384. * 日 期:2017.12.15
  6385. * 描 述:任联移动端框架 开关插件
  6386. */
  6387. (function ($, renlian, fui, window) {
  6388. "use strict";
  6389. // 开关插件(初始化)
  6390. $.fn.lrswitch = function () {
  6391. var $this = $(this);
  6392. $this.attr('type', 'lrswitch');
  6393. $this.on('tap', function () {
  6394. renlian.formblur();
  6395. });
  6396. return $this.fswitch();
  6397. };
  6398. // 开关插件(初始化)
  6399. $.fn.rlswitch = function () {
  6400. var $this = $(this);
  6401. $this.attr('type', 'lrswitch');
  6402. $this.on('tap', function () {
  6403. //renlian.formblur();
  6404. });
  6405. return $this.fswitch();
  6406. };
  6407. // 开关插件(设置值)1选中 0 没有选中
  6408. $.fn.lrswitchSet = function (value) {
  6409. $(this).fswitchSet(value);
  6410. };
  6411. // 开关插件(获取值)
  6412. $.fn.lrswitchGet = function () {
  6413. return $(this).fswitchGet();
  6414. };
  6415. })(window.jQuery, window.lrmui, window.fui, window);/*
  6416. * 版 本 Learun-Mobile V2.0.0 任联敏捷开发框架(http://www.renlian.cn)
  6417. * Copyright (c) 2013-2018 前端技术开发小组
  6418. * 创建人:任联-前端开发组
  6419. * 日 期:2017.12.15
  6420. * 描 述:任联移动端框架 表单方法插件
  6421. */
  6422. (function ($, renlian, fui, window) {
  6423. "use strict";
  6424. // 表单验证
  6425. $.fn.lrformValid = function () {
  6426. var validateflag = true;
  6427. var validHelper = fui.validator;
  6428. $(this).find("[isvalid=yes]").each(function () {
  6429. var $this = $(this);
  6430. var checkexpession = $(this).attr("checkexpession");
  6431. var checkfn = validHelper['is' + checkexpession];
  6432. if (!checkexpession || !checkfn) { return false; }
  6433. var errormsg = $(this).attr("errormsg") || "";
  6434. // 获取数据值
  6435. var value;
  6436. if ($this.hasClass('lrtextarea')) {
  6437. value = $this.text();
  6438. }
  6439. else {
  6440. var type = $this.attr('type');
  6441. if (type === 'lrpicker') {
  6442. value = $this.lrpickerGet();
  6443. }
  6444. else if (type === 'lrdate') {
  6445. value = $this.lrdateGet();
  6446. }
  6447. else if (type === 'lrcheckbox') {
  6448. value = $this.lrcheckboxGet();
  6449. }
  6450. else if (type === 'lrselect') {
  6451. value = $this.lrselectGet();
  6452. }
  6453. else {
  6454. value = $this.val();
  6455. }
  6456. }
  6457. var r = { code: true, msg: '' };
  6458. if (checkexpession === 'LenNum' || checkexpession === 'LenNumOrNull' || checkexpession === 'LenStr' || checkexpession === 'LenStrOrNull') {
  6459. var len = $this.attr("length");
  6460. r = checkfn(value, len);
  6461. } else {
  6462. r = checkfn(value);
  6463. }
  6464. if (!r.code) {
  6465. validateflag = false;
  6466. fui.dialog({ msg: errormsg + r.msg });
  6467. return false;
  6468. }
  6469. });
  6470. return validateflag;
  6471. };
  6472. // 获取表单数据
  6473. $.fn.lrformGet = function (keyValue) {
  6474. var resdata = {};
  6475. $(this).find('input,textarea,.lr-picker,.lr-date,.f-switch,.lrtextarea,.lr-checkbox,.lr-select,.lr-imagepicker').each(function (r) {
  6476. var $this = $(this);
  6477. var id = $this.attr('id');
  6478. if (id) {
  6479. var type = $this.attr('type');
  6480. switch (type) {
  6481. case "lrpicker":
  6482. resdata[id] = $this.lrpickerGet() || '';
  6483. break;
  6484. case "lrdate":
  6485. resdata[id] = $this.lrdateGet() || '';
  6486. break;
  6487. case "lrswitch":
  6488. resdata[id] = $this.lrswitchGet();
  6489. break;
  6490. case "lrcheckbox":
  6491. resdata[id] = $this.lrcheckboxGet();
  6492. break;
  6493. case "lrselect":
  6494. resdata[id] = $this.lrselectGet();
  6495. break;
  6496. case "lrimagepicker":
  6497. resdata[id] = $this.imagepickerGet();
  6498. break;
  6499. default:
  6500. if ($this.hasClass('lrtextarea')) {
  6501. var value1 = $this.text() || '';
  6502. resdata[id] = $.trim(value1);
  6503. }
  6504. else {
  6505. var value2 = $this.val() || '';
  6506. resdata[id] = $.trim(value2);
  6507. }
  6508. break;
  6509. }
  6510. resdata[id] += '';
  6511. if (resdata[id] === '') {
  6512. resdata[id] = '&nbsp;';
  6513. }
  6514. if (resdata[id] === '&nbsp;' && !keyValue) {
  6515. resdata[id] = '';
  6516. }
  6517. }
  6518. });
  6519. return resdata;
  6520. };
  6521. // 设置表单数据
  6522. $.fn.lrformSet = function (data) {
  6523. var $this = $(this);
  6524. for (var id in data) {
  6525. var value = data[id];
  6526. var $obj = $this.find('#' + id);
  6527. if ($obj.length >= 0 && value !== null) {
  6528. var type = $obj.attr('type');
  6529. switch (type) {
  6530. case "lrpicker":
  6531. $obj.lrpickerSet(value);
  6532. break;
  6533. case "lrdate":
  6534. $obj.lrdateSet(value);
  6535. break;
  6536. case "lrswitch":
  6537. $obj.lrswitchSet(value);
  6538. break;
  6539. case "lrcheckbox":
  6540. $obj.lrcheckboxSet(value);
  6541. break;
  6542. case "lrselect":
  6543. $obj.lrselectSet(value);
  6544. break;
  6545. case "lrimagepicker":
  6546. resdata[id] = $this.imagepickerSet(value);
  6547. break;
  6548. default:
  6549. if ($obj.hasClass('lrtextarea')) {
  6550. $obj.text(value);
  6551. }
  6552. else {
  6553. $obj.val(value);
  6554. }
  6555. break;
  6556. }
  6557. }
  6558. }
  6559. };
  6560. renlian.formblur = function () {// 是输入框失去焦点,隐藏输入键盘
  6561. // 失去焦点
  6562. var pageid = renlian.pageid();
  6563. $('#' + pageid).find('input[type="password"]:focus,input[type="text"]:focus,textarea:focus,.lrtextarea:focus').blur();
  6564. if (renlian.isreal) {// 真机调试下隐藏键盘
  6565. window.Keyboard.hide();
  6566. }
  6567. };
  6568. })(window.jQuery, window.lrmui, window.fui, window);
  6569. /*
  6570. * 版 本 Learun-Mobile V2.0.0 任联敏捷开发框架(http://www.renlian.cn)
  6571. * Copyright (c) 2013-2018 前端技术开发小组
  6572. * 创建人:任联-前端开发组
  6573. * 日 期:2017.12.15
  6574. * 描 述:任联移动端框架 分页列表插件
  6575. */
  6576. (function ($, renlian, fui, window) {
  6577. "use strict";
  6578. // 列表分页加载
  6579. var _lrpagination = {
  6580. renderData: function (op, data, page, records) {
  6581. op.lrpage = page;
  6582. op.lrrecords = records;
  6583. op.lrtotal = parseInt(parseInt(records) / parseInt(op.lrrows)) + (parseInt(records) % parseInt(op.lrrows) > 0 ? 1 : 0);
  6584. if (data) {
  6585. var startnum = (page - 1) * op.lrrows + 1;
  6586. for (var i = 0, l = data.length; i < l; i++) {
  6587. op.lrdata.push(data[i]);
  6588. var _html = '';
  6589. var $item = null;
  6590. if (op.lrbtns.length > 0) {
  6591. $item = $('\
  6592. <div data-index="' + (startnum + i - 1) + '" class="lr-page-item f-swipebtn" >\
  6593. <div class="f-swipebtn-handler"></div>\
  6594. <div class="f-swipebtn-right"></div>\
  6595. </div>');
  6596. _html = op.lrrenderData(startnum + i, data[i], $item.find('.f-swipebtn-handler'));
  6597. }
  6598. else {
  6599. $item = $('<div data-index="' + (startnum + i - 1) + '" class="lr-page-item" ></div>');
  6600. _html = op.lrrenderData(startnum + i, data[i], $item);
  6601. }
  6602. if (_html !== '') {
  6603. var _$html = $(_html);
  6604. _$html.attr('data-index',startnum + i - 1);
  6605. _$html.addClass('lr-page-item');
  6606. op.$list.append(_$html);
  6607. if (op.lrbtns.length > 0) {
  6608. _$html.addClass('f-swipebtn');
  6609. var $handler = $('<div class="f-swipebtn-handler">' + _$html.html() + '</div>');
  6610. var $btn = $('<div class="f-swipebtn-right"></div>');
  6611. _$html.html($handler);
  6612. _$html.append($btn);
  6613. $.each(op.lrbtns, function (_index, _item) {
  6614. var _$item = $(_item).addClass('f-swipebtn-btn');
  6615. $btn.append(_$item);
  6616. });
  6617. _$html.fswipebtn();
  6618. $handler = null;
  6619. $btn = null;
  6620. }
  6621. _$html = null;
  6622. } else {
  6623. op.$list.append($item);
  6624. if (op.lrbtns.length > 0) {
  6625. var $btns = $item.find('.f-swipebtn-right');
  6626. $.each(op.lrbtns, function (_index, _item) {
  6627. var _$item = $(_item).addClass('f-swipebtn-btn');
  6628. $btns.append(_$item);
  6629. });
  6630. $btns = null;
  6631. $item.fswipebtn();
  6632. }
  6633. }
  6634. $item = null;
  6635. }
  6636. }
  6637. },
  6638. reload: function () {
  6639. fui.loading(true, '加载数据中');
  6640. var self = this;
  6641. var op = self.options;
  6642. var pageparam = {
  6643. page: 1,
  6644. rows: op.lrrows
  6645. };
  6646. op.lrgetData && op.lrgetData(pageparam, function (data, records) {
  6647. op.$list.html("");
  6648. op.lrdata = [];
  6649. _lrpagination.renderData(op, data, 1, records);
  6650. fui.loading(false);
  6651. op = null;
  6652. self = null;
  6653. });
  6654. }
  6655. };
  6656. $.fn.lrpagination = function (op) {
  6657. var dfop = {
  6658. lclass: 'lr-list',
  6659. rows: 10, // 每页行数
  6660. getData: function (param, callback) {// 获取数据 param 分页参数,callback 异步回调
  6661. callback([], 0);
  6662. },
  6663. renderData: function (_index, _item) {// 渲染数据模板
  6664. return '';
  6665. },
  6666. click: false, // item, $self 点击事件,
  6667. down: {
  6668. contentinit: '下拉可以刷新',
  6669. contentdown: '下拉可以刷新',
  6670. contentover: '释放立即刷新',
  6671. contentrefresh: '正在刷新...'
  6672. },
  6673. up: {
  6674. contentinit: '上拉显示更多',
  6675. contentdown: '上拉显示更多',
  6676. contentrefresh: '正在加载...',
  6677. contentnomore: '没有更多数据了'
  6678. }
  6679. };
  6680. $.extend(dfop, op || {});
  6681. var $this = $(this);
  6682. $this[0].lrop = dfop;
  6683. var fop = {
  6684. lrdata: [],
  6685. lrpage: 1, // 当前页
  6686. lrrecords: 0, // 总记录数
  6687. lrtotal: 0, // 总页数
  6688. lrrows: dfop.rows,
  6689. lrgetData: dfop.getData,
  6690. lrrenderData: dfop.renderData,
  6691. lrbtns: dfop.btns || [],
  6692. lrclick: dfop.click,
  6693. down: {
  6694. contentinit: dfop.down.contentinit,
  6695. contentdown: dfop.down.contentdown,
  6696. contentover: dfop.down.contentover,
  6697. contentrefresh: dfop.down.contentrefresh,
  6698. callback: function () {
  6699. var self = this;
  6700. var op = self.options;
  6701. var pageparam = {
  6702. page: 1,
  6703. rows: op.lrrows
  6704. };
  6705. op.lrgetData && op.lrgetData(pageparam, function (data, records) {
  6706. op.$list.html("");
  6707. op.lrdata = [];
  6708. _lrpagination.renderData(op, data, 1, records);
  6709. self.endPulldownToRefresh();
  6710. self.refresh(true);
  6711. });
  6712. }
  6713. },
  6714. up: {
  6715. contentinit: dfop.up.contentinit,
  6716. contentdown: dfop.up.contentdown,
  6717. contentrefresh: dfop.up.contentrefresh,
  6718. contentnomore: dfop.up.contentnomore,
  6719. callback: function () {
  6720. var self = this;
  6721. var op = self.options;
  6722. op.lrpage = op.lrpage + 1;
  6723. var pageparam = {
  6724. page: op.lrpage,
  6725. rows: op.lrrows
  6726. };
  6727. if (op.lrpage > op.lrtotal) {
  6728. self.endPullupToRefresh(true);
  6729. }
  6730. else {
  6731. op.lrgetData && op.lrgetData(pageparam, function (data, records) {
  6732. _lrpagination.renderData(op, data, op.lrpage, records);
  6733. if (op.lrpage >= op.lrtotal) {
  6734. self.endPullupToRefresh(true);
  6735. }
  6736. else {
  6737. self.endPullupToRefresh();
  6738. }
  6739. });
  6740. }
  6741. }
  6742. }
  6743. };
  6744. var $res = $this.pullRefresh(fop);
  6745. var $list = $('<div class="' + dfop.lclass + '" ></div>');
  6746. $($res.wrapper.children[1]).prepend($list);
  6747. $list.html("");
  6748. fui.loading(true, '加载数据中');
  6749. var _fop = $res.options;
  6750. _fop.$list = $list;
  6751. $list.delegate('.lr-page-item', 'tap', { op: _fop }, function (e) {
  6752. e = e || window.event;
  6753. var et = e.target || e.srcElement;
  6754. var $et = $(et);
  6755. var op = e.data.op;
  6756. var data = op.lrdata;
  6757. var $this = $(this);
  6758. var _index = $this.attr('data-index');
  6759. op.lrclick && op.lrclick(data[_index], $this, $et);
  6760. });
  6761. var pageparam = {
  6762. page: 1,
  6763. rows: _fop.lrrows
  6764. };
  6765. _fop.lrgetData && _fop.lrgetData(pageparam, function (data, records) {
  6766. $list.html("");
  6767. _fop.lrdata = [];
  6768. _lrpagination.renderData(_fop, data, 1, records);
  6769. fui.loading(false);
  6770. _fop = null;
  6771. });
  6772. fop = null;
  6773. dfop = null;
  6774. op = null;
  6775. $res.reload = _lrpagination.reload;
  6776. return $res;
  6777. };
  6778. })(window.jQuery, window.lrmui, window.fui, window);
  6779. /*
  6780. * 版 本 Learun-Mobile V2.0.0 任联敏捷开发框架(http://www.renlian.cn)
  6781. * Copyright (c) 2013-2018 前端技术开发小组
  6782. * 创建人:任联-前端开发组
  6783. * 日 期:2017.12.15
  6784. * 描 述:任联移动端框架 启动屏
  6785. */
  6786. (function ($, renlian, fui, window) {
  6787. "use strict";
  6788. renlian.splashscreen = {
  6789. hide: function () {
  6790. console.log("*************[ renlian.splashscreen.hide() ]");
  6791. renlian.isreal && navigator.splashscreen && navigator.splashscreen.hide();
  6792. },
  6793. show: function () {
  6794. console.log("*************[ renlian.splashscreen.show() ]");
  6795. renlian.isreal && navigator.splashscreen && navigator.splashscreen.show();
  6796. }
  6797. };
  6798. })(window.jQuery, window.lrmui, window.fui, window);/**
  6799. * @fileoverview
  6800. * - Using the 'QRCode for Javascript library'
  6801. * - Fixed dataset of 'QRCode for Javascript library' for support full-spec.
  6802. * - this library has no dependencies.
  6803. *
  6804. * @author davidshimjs
  6805. * @see <a href="http://www.d-project.com/" target="_blank">http://www.d-project.com/</a>
  6806. * @see <a href="http://jeromeetienne.github.com/jquery-qrcode/" target="_blank">http://jeromeetienne.github.com/jquery-qrcode/</a>
  6807. */
  6808. var QRCode;
  6809. (function () {
  6810. //---------------------------------------------------------------------
  6811. // QRCode for JavaScript
  6812. //
  6813. // Copyright (c) 2009 Kazuhiko Arase
  6814. //
  6815. // URL: http://www.d-project.com/
  6816. //
  6817. // Licensed under the MIT license:
  6818. // http://www.opensource.org/licenses/mit-license.php
  6819. //
  6820. // The word "QR Code" is registered trademark of
  6821. // DENSO WAVE INCORPORATED
  6822. // http://www.denso-wave.com/qrcode/faqpatent-e.html
  6823. //
  6824. //---------------------------------------------------------------------
  6825. function QR8bitByte(data) {
  6826. this.mode = QRMode.MODE_8BIT_BYTE;
  6827. this.data = data;
  6828. this.parsedData = [];
  6829. // Added to support UTF-8 Characters
  6830. for (var i = 0, l = this.data.length; i < l; i++) {
  6831. var byteArray = [];
  6832. var code = this.data.charCodeAt(i);
  6833. if (code > 0x10000) {
  6834. byteArray[0] = 0xF0 | ((code & 0x1C0000) >>> 18);
  6835. byteArray[1] = 0x80 | ((code & 0x3F000) >>> 12);
  6836. byteArray[2] = 0x80 | ((code & 0xFC0) >>> 6);
  6837. byteArray[3] = 0x80 | (code & 0x3F);
  6838. } else if (code > 0x800) {
  6839. byteArray[0] = 0xE0 | ((code & 0xF000) >>> 12);
  6840. byteArray[1] = 0x80 | ((code & 0xFC0) >>> 6);
  6841. byteArray[2] = 0x80 | (code & 0x3F);
  6842. } else if (code > 0x80) {
  6843. byteArray[0] = 0xC0 | ((code & 0x7C0) >>> 6);
  6844. byteArray[1] = 0x80 | (code & 0x3F);
  6845. } else {
  6846. byteArray[0] = code;
  6847. }
  6848. this.parsedData.push(byteArray);
  6849. }
  6850. this.parsedData = Array.prototype.concat.apply([], this.parsedData);
  6851. if (this.parsedData.length != this.data.length) {
  6852. this.parsedData.unshift(191);
  6853. this.parsedData.unshift(187);
  6854. this.parsedData.unshift(239);
  6855. }
  6856. }
  6857. QR8bitByte.prototype = {
  6858. getLength: function (buffer) {
  6859. return this.parsedData.length;
  6860. },
  6861. write: function (buffer) {
  6862. for (var i = 0, l = this.parsedData.length; i < l; i++) {
  6863. buffer.put(this.parsedData[i], 8);
  6864. }
  6865. }
  6866. };
  6867. function QRCodeModel(typeNumber, errorCorrectLevel) {
  6868. this.typeNumber = typeNumber;
  6869. this.errorCorrectLevel = errorCorrectLevel;
  6870. this.modules = null;
  6871. this.moduleCount = 0;
  6872. this.dataCache = null;
  6873. this.dataList = [];
  6874. }
  6875. QRCodeModel.prototype = {
  6876. addData: function (data) { var newData = new QR8bitByte(data); this.dataList.push(newData); this.dataCache = null; }, isDark: function (row, col) {
  6877. if (row < 0 || this.moduleCount <= row || col < 0 || this.moduleCount <= col) { throw new Error(row + "," + col); }
  6878. return this.modules[row][col];
  6879. }, getModuleCount: function () { return this.moduleCount; }, make: function () { this.makeImpl(false, this.getBestMaskPattern()); }, makeImpl: function (test, maskPattern) {
  6880. this.moduleCount = this.typeNumber * 4 + 17; this.modules = new Array(this.moduleCount); for (var row = 0; row < this.moduleCount; row++) { this.modules[row] = new Array(this.moduleCount); for (var col = 0; col < this.moduleCount; col++) { this.modules[row][col] = null; } }
  6881. this.setupPositionProbePattern(0, 0); this.setupPositionProbePattern(this.moduleCount - 7, 0); this.setupPositionProbePattern(0, this.moduleCount - 7); this.setupPositionAdjustPattern(); this.setupTimingPattern(); this.setupTypeInfo(test, maskPattern); if (this.typeNumber >= 7) { this.setupTypeNumber(test); }
  6882. if (this.dataCache == null) { this.dataCache = QRCodeModel.createData(this.typeNumber, this.errorCorrectLevel, this.dataList); }
  6883. this.mapData(this.dataCache, maskPattern);
  6884. }, setupPositionProbePattern: function (row, col) { for (var r = -1; r <= 7; r++) { if (row + r <= -1 || this.moduleCount <= row + r) continue; for (var c = -1; c <= 7; c++) { if (col + c <= -1 || this.moduleCount <= col + c) continue; if ((0 <= r && r <= 6 && (c == 0 || c == 6)) || (0 <= c && c <= 6 && (r == 0 || r == 6)) || (2 <= r && r <= 4 && 2 <= c && c <= 4)) { this.modules[row + r][col + c] = true; } else { this.modules[row + r][col + c] = false; } } } }, getBestMaskPattern: function () {
  6885. var minLostPoint = 0; var pattern = 0; for (var i = 0; i < 8; i++) { this.makeImpl(true, i); var lostPoint = QRUtil.getLostPoint(this); if (i == 0 || minLostPoint > lostPoint) { minLostPoint = lostPoint; pattern = i; } }
  6886. return pattern;
  6887. }, createMovieClip: function (target_mc, instance_name, depth) {
  6888. var qr_mc = target_mc.createEmptyMovieClip(instance_name, depth); var cs = 1; this.make(); for (var row = 0; row < this.modules.length; row++) { var y = row * cs; for (var col = 0; col < this.modules[row].length; col++) { var x = col * cs; var dark = this.modules[row][col]; if (dark) { qr_mc.beginFill(0, 100); qr_mc.moveTo(x, y); qr_mc.lineTo(x + cs, y); qr_mc.lineTo(x + cs, y + cs); qr_mc.lineTo(x, y + cs); qr_mc.endFill(); } } }
  6889. return qr_mc;
  6890. }, setupTimingPattern: function () {
  6891. for (var r = 8; r < this.moduleCount - 8; r++) {
  6892. if (this.modules[r][6] != null) { continue; }
  6893. this.modules[r][6] = (r % 2 == 0);
  6894. }
  6895. for (var c = 8; c < this.moduleCount - 8; c++) {
  6896. if (this.modules[6][c] != null) { continue; }
  6897. this.modules[6][c] = (c % 2 == 0);
  6898. }
  6899. }, setupPositionAdjustPattern: function () {
  6900. var pos = QRUtil.getPatternPosition(this.typeNumber); for (var i = 0; i < pos.length; i++) {
  6901. for (var j = 0; j < pos.length; j++) {
  6902. var row = pos[i]; var col = pos[j]; if (this.modules[row][col] != null) { continue; }
  6903. for (var r = -2; r <= 2; r++) { for (var c = -2; c <= 2; c++) { if (r == -2 || r == 2 || c == -2 || c == 2 || (r == 0 && c == 0)) { this.modules[row + r][col + c] = true; } else { this.modules[row + r][col + c] = false; } } }
  6904. }
  6905. }
  6906. }, setupTypeNumber: function (test) {
  6907. var bits = QRUtil.getBCHTypeNumber(this.typeNumber); for (var i = 0; i < 18; i++) { var mod = (!test && ((bits >> i) & 1) == 1); this.modules[Math.floor(i / 3)][i % 3 + this.moduleCount - 8 - 3] = mod; }
  6908. for (var i = 0; i < 18; i++) { var mod = (!test && ((bits >> i) & 1) == 1); this.modules[i % 3 + this.moduleCount - 8 - 3][Math.floor(i / 3)] = mod; }
  6909. }, setupTypeInfo: function (test, maskPattern) {
  6910. var data = (this.errorCorrectLevel << 3) | maskPattern; var bits = QRUtil.getBCHTypeInfo(data); for (var i = 0; i < 15; i++) { var mod = (!test && ((bits >> i) & 1) == 1); if (i < 6) { this.modules[i][8] = mod; } else if (i < 8) { this.modules[i + 1][8] = mod; } else { this.modules[this.moduleCount - 15 + i][8] = mod; } }
  6911. for (var i = 0; i < 15; i++) { var mod = (!test && ((bits >> i) & 1) == 1); if (i < 8) { this.modules[8][this.moduleCount - i - 1] = mod; } else if (i < 9) { this.modules[8][15 - i - 1 + 1] = mod; } else { this.modules[8][15 - i - 1] = mod; } }
  6912. this.modules[this.moduleCount - 8][8] = (!test);
  6913. }, mapData: function (data, maskPattern) {
  6914. var inc = -1; var row = this.moduleCount - 1; var bitIndex = 7; var byteIndex = 0; for (var col = this.moduleCount - 1; col > 0; col -= 2) {
  6915. if (col == 6) col--; while (true) {
  6916. for (var c = 0; c < 2; c++) {
  6917. if (this.modules[row][col - c] == null) {
  6918. var dark = false; if (byteIndex < data.length) { dark = (((data[byteIndex] >>> bitIndex) & 1) == 1); }
  6919. var mask = QRUtil.getMask(maskPattern, row, col - c); if (mask) { dark = !dark; }
  6920. this.modules[row][col - c] = dark; bitIndex--; if (bitIndex == -1) { byteIndex++; bitIndex = 7; }
  6921. }
  6922. }
  6923. row += inc; if (row < 0 || this.moduleCount <= row) { row -= inc; inc = -inc; break; }
  6924. }
  6925. }
  6926. }
  6927. }; QRCodeModel.PAD0 = 0xEC; QRCodeModel.PAD1 = 0x11; QRCodeModel.createData = function (typeNumber, errorCorrectLevel, dataList) {
  6928. var rsBlocks = QRRSBlock.getRSBlocks(typeNumber, errorCorrectLevel); var buffer = new QRBitBuffer(); for (var i = 0; i < dataList.length; i++) { var data = dataList[i]; buffer.put(data.mode, 4); buffer.put(data.getLength(), QRUtil.getLengthInBits(data.mode, typeNumber)); data.write(buffer); }
  6929. var totalDataCount = 0; for (var i = 0; i < rsBlocks.length; i++) { totalDataCount += rsBlocks[i].dataCount; }
  6930. if (buffer.getLengthInBits() > totalDataCount * 8) {
  6931. throw new Error("code length overflow. ("
  6932. + buffer.getLengthInBits()
  6933. + ">"
  6934. + totalDataCount * 8
  6935. + ")");
  6936. }
  6937. if (buffer.getLengthInBits() + 4 <= totalDataCount * 8) { buffer.put(0, 4); }
  6938. while (buffer.getLengthInBits() % 8 != 0) { buffer.putBit(false); }
  6939. while (true) {
  6940. if (buffer.getLengthInBits() >= totalDataCount * 8) { break; }
  6941. buffer.put(QRCodeModel.PAD0, 8); if (buffer.getLengthInBits() >= totalDataCount * 8) { break; }
  6942. buffer.put(QRCodeModel.PAD1, 8);
  6943. }
  6944. return QRCodeModel.createBytes(buffer, rsBlocks);
  6945. }; QRCodeModel.createBytes = function (buffer, rsBlocks) {
  6946. var offset = 0; var maxDcCount = 0; var maxEcCount = 0; var dcdata = new Array(rsBlocks.length); var ecdata = new Array(rsBlocks.length); for (var r = 0; r < rsBlocks.length; r++) {
  6947. var dcCount = rsBlocks[r].dataCount; var ecCount = rsBlocks[r].totalCount - dcCount; maxDcCount = Math.max(maxDcCount, dcCount); maxEcCount = Math.max(maxEcCount, ecCount); dcdata[r] = new Array(dcCount); for (var i = 0; i < dcdata[r].length; i++) { dcdata[r][i] = 0xff & buffer.buffer[i + offset]; }
  6948. offset += dcCount; var rsPoly = QRUtil.getErrorCorrectPolynomial(ecCount); var rawPoly = new QRPolynomial(dcdata[r], rsPoly.getLength() - 1); var modPoly = rawPoly.mod(rsPoly); ecdata[r] = new Array(rsPoly.getLength() - 1); for (var i = 0; i < ecdata[r].length; i++) { var modIndex = i + modPoly.getLength() - ecdata[r].length; ecdata[r][i] = (modIndex >= 0) ? modPoly.get(modIndex) : 0; }
  6949. }
  6950. var totalCodeCount = 0; for (var i = 0; i < rsBlocks.length; i++) { totalCodeCount += rsBlocks[i].totalCount; }
  6951. var data = new Array(totalCodeCount); var index = 0; for (var i = 0; i < maxDcCount; i++) { for (var r = 0; r < rsBlocks.length; r++) { if (i < dcdata[r].length) { data[index++] = dcdata[r][i]; } } }
  6952. for (var i = 0; i < maxEcCount; i++) { for (var r = 0; r < rsBlocks.length; r++) { if (i < ecdata[r].length) { data[index++] = ecdata[r][i]; } } }
  6953. return data;
  6954. }; var QRMode = { MODE_NUMBER: 1 << 0, MODE_ALPHA_NUM: 1 << 1, MODE_8BIT_BYTE: 1 << 2, MODE_KANJI: 1 << 3 }; var QRErrorCorrectLevel = { L: 1, M: 0, Q: 3, H: 2 }; var QRMaskPattern = { PATTERN000: 0, PATTERN001: 1, PATTERN010: 2, PATTERN011: 3, PATTERN100: 4, PATTERN101: 5, PATTERN110: 6, PATTERN111: 7 }; var QRUtil = {
  6955. PATTERN_POSITION_TABLE: [[], [6, 18], [6, 22], [6, 26], [6, 30], [6, 34], [6, 22, 38], [6, 24, 42], [6, 26, 46], [6, 28, 50], [6, 30, 54], [6, 32, 58], [6, 34, 62], [6, 26, 46, 66], [6, 26, 48, 70], [6, 26, 50, 74], [6, 30, 54, 78], [6, 30, 56, 82], [6, 30, 58, 86], [6, 34, 62, 90], [6, 28, 50, 72, 94], [6, 26, 50, 74, 98], [6, 30, 54, 78, 102], [6, 28, 54, 80, 106], [6, 32, 58, 84, 110], [6, 30, 58, 86, 114], [6, 34, 62, 90, 118], [6, 26, 50, 74, 98, 122], [6, 30, 54, 78, 102, 126], [6, 26, 52, 78, 104, 130], [6, 30, 56, 82, 108, 134], [6, 34, 60, 86, 112, 138], [6, 30, 58, 86, 114, 142], [6, 34, 62, 90, 118, 146], [6, 30, 54, 78, 102, 126, 150], [6, 24, 50, 76, 102, 128, 154], [6, 28, 54, 80, 106, 132, 158], [6, 32, 58, 84, 110, 136, 162], [6, 26, 54, 82, 110, 138, 166], [6, 30, 58, 86, 114, 142, 170]], G15: (1 << 10) | (1 << 8) | (1 << 5) | (1 << 4) | (1 << 2) | (1 << 1) | (1 << 0), G18: (1 << 12) | (1 << 11) | (1 << 10) | (1 << 9) | (1 << 8) | (1 << 5) | (1 << 2) | (1 << 0), G15_MASK: (1 << 14) | (1 << 12) | (1 << 10) | (1 << 4) | (1 << 1), getBCHTypeInfo: function (data) {
  6956. var d = data << 10; while (QRUtil.getBCHDigit(d) - QRUtil.getBCHDigit(QRUtil.G15) >= 0) { d ^= (QRUtil.G15 << (QRUtil.getBCHDigit(d) - QRUtil.getBCHDigit(QRUtil.G15))); }
  6957. return ((data << 10) | d) ^ QRUtil.G15_MASK;
  6958. }, getBCHTypeNumber: function (data) {
  6959. var d = data << 12; while (QRUtil.getBCHDigit(d) - QRUtil.getBCHDigit(QRUtil.G18) >= 0) { d ^= (QRUtil.G18 << (QRUtil.getBCHDigit(d) - QRUtil.getBCHDigit(QRUtil.G18))); }
  6960. return (data << 12) | d;
  6961. }, getBCHDigit: function (data) {
  6962. var digit = 0; while (data != 0) { digit++; data >>>= 1; }
  6963. return digit;
  6964. }, getPatternPosition: function (typeNumber) { return QRUtil.PATTERN_POSITION_TABLE[typeNumber - 1]; }, getMask: function (maskPattern, i, j) { switch (maskPattern) { case QRMaskPattern.PATTERN000: return (i + j) % 2 == 0; case QRMaskPattern.PATTERN001: return i % 2 == 0; case QRMaskPattern.PATTERN010: return j % 3 == 0; case QRMaskPattern.PATTERN011: return (i + j) % 3 == 0; case QRMaskPattern.PATTERN100: return (Math.floor(i / 2) + Math.floor(j / 3)) % 2 == 0; case QRMaskPattern.PATTERN101: return (i * j) % 2 + (i * j) % 3 == 0; case QRMaskPattern.PATTERN110: return ((i * j) % 2 + (i * j) % 3) % 2 == 0; case QRMaskPattern.PATTERN111: return ((i * j) % 3 + (i + j) % 2) % 2 == 0; default: throw new Error("bad maskPattern:" + maskPattern); } }, getErrorCorrectPolynomial: function (errorCorrectLength) {
  6965. var a = new QRPolynomial([1], 0); for (var i = 0; i < errorCorrectLength; i++) { a = a.multiply(new QRPolynomial([1, QRMath.gexp(i)], 0)); }
  6966. return a;
  6967. }, getLengthInBits: function (mode, type) { if (1 <= type && type < 10) { switch (mode) { case QRMode.MODE_NUMBER: return 10; case QRMode.MODE_ALPHA_NUM: return 9; case QRMode.MODE_8BIT_BYTE: return 8; case QRMode.MODE_KANJI: return 8; default: throw new Error("mode:" + mode); } } else if (type < 27) { switch (mode) { case QRMode.MODE_NUMBER: return 12; case QRMode.MODE_ALPHA_NUM: return 11; case QRMode.MODE_8BIT_BYTE: return 16; case QRMode.MODE_KANJI: return 10; default: throw new Error("mode:" + mode); } } else if (type < 41) { switch (mode) { case QRMode.MODE_NUMBER: return 14; case QRMode.MODE_ALPHA_NUM: return 13; case QRMode.MODE_8BIT_BYTE: return 16; case QRMode.MODE_KANJI: return 12; default: throw new Error("mode:" + mode); } } else { throw new Error("type:" + type); } }, getLostPoint: function (qrCode) {
  6968. var moduleCount = qrCode.getModuleCount(); var lostPoint = 0; for (var row = 0; row < moduleCount; row++) {
  6969. for (var col = 0; col < moduleCount; col++) {
  6970. var sameCount = 0; var dark = qrCode.isDark(row, col); for (var r = -1; r <= 1; r++) {
  6971. if (row + r < 0 || moduleCount <= row + r) { continue; }
  6972. for (var c = -1; c <= 1; c++) {
  6973. if (col + c < 0 || moduleCount <= col + c) { continue; }
  6974. if (r == 0 && c == 0) { continue; }
  6975. if (dark == qrCode.isDark(row + r, col + c)) { sameCount++; }
  6976. }
  6977. }
  6978. if (sameCount > 5) { lostPoint += (3 + sameCount - 5); }
  6979. }
  6980. }
  6981. for (var row = 0; row < moduleCount - 1; row++) { for (var col = 0; col < moduleCount - 1; col++) { var count = 0; if (qrCode.isDark(row, col)) count++; if (qrCode.isDark(row + 1, col)) count++; if (qrCode.isDark(row, col + 1)) count++; if (qrCode.isDark(row + 1, col + 1)) count++; if (count == 0 || count == 4) { lostPoint += 3; } } }
  6982. for (var row = 0; row < moduleCount; row++) { for (var col = 0; col < moduleCount - 6; col++) { if (qrCode.isDark(row, col) && !qrCode.isDark(row, col + 1) && qrCode.isDark(row, col + 2) && qrCode.isDark(row, col + 3) && qrCode.isDark(row, col + 4) && !qrCode.isDark(row, col + 5) && qrCode.isDark(row, col + 6)) { lostPoint += 40; } } }
  6983. for (var col = 0; col < moduleCount; col++) { for (var row = 0; row < moduleCount - 6; row++) { if (qrCode.isDark(row, col) && !qrCode.isDark(row + 1, col) && qrCode.isDark(row + 2, col) && qrCode.isDark(row + 3, col) && qrCode.isDark(row + 4, col) && !qrCode.isDark(row + 5, col) && qrCode.isDark(row + 6, col)) { lostPoint += 40; } } }
  6984. var darkCount = 0; for (var col = 0; col < moduleCount; col++) { for (var row = 0; row < moduleCount; row++) { if (qrCode.isDark(row, col)) { darkCount++; } } }
  6985. var ratio = Math.abs(100 * darkCount / moduleCount / moduleCount - 50) / 5; lostPoint += ratio * 10; return lostPoint;
  6986. }
  6987. }; var QRMath = {
  6988. glog: function (n) {
  6989. if (n < 1) { throw new Error("glog(" + n + ")"); }
  6990. return QRMath.LOG_TABLE[n];
  6991. }, gexp: function (n) {
  6992. while (n < 0) { n += 255; }
  6993. while (n >= 256) { n -= 255; }
  6994. return QRMath.EXP_TABLE[n];
  6995. }, EXP_TABLE: new Array(256), LOG_TABLE: new Array(256)
  6996. }; for (var i = 0; i < 8; i++) { QRMath.EXP_TABLE[i] = 1 << i; }
  6997. for (var i = 8; i < 256; i++) { QRMath.EXP_TABLE[i] = QRMath.EXP_TABLE[i - 4] ^ QRMath.EXP_TABLE[i - 5] ^ QRMath.EXP_TABLE[i - 6] ^ QRMath.EXP_TABLE[i - 8]; }
  6998. for (var i = 0; i < 255; i++) { QRMath.LOG_TABLE[QRMath.EXP_TABLE[i]] = i; }
  6999. function QRPolynomial(num, shift) {
  7000. if (num.length == undefined) { throw new Error(num.length + "/" + shift); }
  7001. var offset = 0; while (offset < num.length && num[offset] == 0) { offset++; }
  7002. this.num = new Array(num.length - offset + shift); for (var i = 0; i < num.length - offset; i++) { this.num[i] = num[i + offset]; }
  7003. }
  7004. QRPolynomial.prototype = {
  7005. get: function (index) { return this.num[index]; }, getLength: function () { return this.num.length; }, multiply: function (e) {
  7006. var num = new Array(this.getLength() + e.getLength() - 1); for (var i = 0; i < this.getLength(); i++) { for (var j = 0; j < e.getLength(); j++) { num[i + j] ^= QRMath.gexp(QRMath.glog(this.get(i)) + QRMath.glog(e.get(j))); } }
  7007. return new QRPolynomial(num, 0);
  7008. }, mod: function (e) {
  7009. if (this.getLength() - e.getLength() < 0) { return this; }
  7010. var ratio = QRMath.glog(this.get(0)) - QRMath.glog(e.get(0)); var num = new Array(this.getLength()); for (var i = 0; i < this.getLength(); i++) { num[i] = this.get(i); }
  7011. for (var i = 0; i < e.getLength(); i++) { num[i] ^= QRMath.gexp(QRMath.glog(e.get(i)) + ratio); }
  7012. return new QRPolynomial(num, 0).mod(e);
  7013. }
  7014. }; function QRRSBlock(totalCount, dataCount) { this.totalCount = totalCount; this.dataCount = dataCount; }
  7015. QRRSBlock.RS_BLOCK_TABLE = [[1, 26, 19], [1, 26, 16], [1, 26, 13], [1, 26, 9], [1, 44, 34], [1, 44, 28], [1, 44, 22], [1, 44, 16], [1, 70, 55], [1, 70, 44], [2, 35, 17], [2, 35, 13], [1, 100, 80], [2, 50, 32], [2, 50, 24], [4, 25, 9], [1, 134, 108], [2, 67, 43], [2, 33, 15, 2, 34, 16], [2, 33, 11, 2, 34, 12], [2, 86, 68], [4, 43, 27], [4, 43, 19], [4, 43, 15], [2, 98, 78], [4, 49, 31], [2, 32, 14, 4, 33, 15], [4, 39, 13, 1, 40, 14], [2, 121, 97], [2, 60, 38, 2, 61, 39], [4, 40, 18, 2, 41, 19], [4, 40, 14, 2, 41, 15], [2, 146, 116], [3, 58, 36, 2, 59, 37], [4, 36, 16, 4, 37, 17], [4, 36, 12, 4, 37, 13], [2, 86, 68, 2, 87, 69], [4, 69, 43, 1, 70, 44], [6, 43, 19, 2, 44, 20], [6, 43, 15, 2, 44, 16], [4, 101, 81], [1, 80, 50, 4, 81, 51], [4, 50, 22, 4, 51, 23], [3, 36, 12, 8, 37, 13], [2, 116, 92, 2, 117, 93], [6, 58, 36, 2, 59, 37], [4, 46, 20, 6, 47, 21], [7, 42, 14, 4, 43, 15], [4, 133, 107], [8, 59, 37, 1, 60, 38], [8, 44, 20, 4, 45, 21], [12, 33, 11, 4, 34, 12], [3, 145, 115, 1, 146, 116], [4, 64, 40, 5, 65, 41], [11, 36, 16, 5, 37, 17], [11, 36, 12, 5, 37, 13], [5, 109, 87, 1, 110, 88], [5, 65, 41, 5, 66, 42], [5, 54, 24, 7, 55, 25], [11, 36, 12], [5, 122, 98, 1, 123, 99], [7, 73, 45, 3, 74, 46], [15, 43, 19, 2, 44, 20], [3, 45, 15, 13, 46, 16], [1, 135, 107, 5, 136, 108], [10, 74, 46, 1, 75, 47], [1, 50, 22, 15, 51, 23], [2, 42, 14, 17, 43, 15], [5, 150, 120, 1, 151, 121], [9, 69, 43, 4, 70, 44], [17, 50, 22, 1, 51, 23], [2, 42, 14, 19, 43, 15], [3, 141, 113, 4, 142, 114], [3, 70, 44, 11, 71, 45], [17, 47, 21, 4, 48, 22], [9, 39, 13, 16, 40, 14], [3, 135, 107, 5, 136, 108], [3, 67, 41, 13, 68, 42], [15, 54, 24, 5, 55, 25], [15, 43, 15, 10, 44, 16], [4, 144, 116, 4, 145, 117], [17, 68, 42], [17, 50, 22, 6, 51, 23], [19, 46, 16, 6, 47, 17], [2, 139, 111, 7, 140, 112], [17, 74, 46], [7, 54, 24, 16, 55, 25], [34, 37, 13], [4, 151, 121, 5, 152, 122], [4, 75, 47, 14, 76, 48], [11, 54, 24, 14, 55, 25], [16, 45, 15, 14, 46, 16], [6, 147, 117, 4, 148, 118], [6, 73, 45, 14, 74, 46], [11, 54, 24, 16, 55, 25], [30, 46, 16, 2, 47, 17], [8, 132, 106, 4, 133, 107], [8, 75, 47, 13, 76, 48], [7, 54, 24, 22, 55, 25], [22, 45, 15, 13, 46, 16], [10, 142, 114, 2, 143, 115], [19, 74, 46, 4, 75, 47], [28, 50, 22, 6, 51, 23], [33, 46, 16, 4, 47, 17], [8, 152, 122, 4, 153, 123], [22, 73, 45, 3, 74, 46], [8, 53, 23, 26, 54, 24], [12, 45, 15, 28, 46, 16], [3, 147, 117, 10, 148, 118], [3, 73, 45, 23, 74, 46], [4, 54, 24, 31, 55, 25], [11, 45, 15, 31, 46, 16], [7, 146, 116, 7, 147, 117], [21, 73, 45, 7, 74, 46], [1, 53, 23, 37, 54, 24], [19, 45, 15, 26, 46, 16], [5, 145, 115, 10, 146, 116], [19, 75, 47, 10, 76, 48], [15, 54, 24, 25, 55, 25], [23, 45, 15, 25, 46, 16], [13, 145, 115, 3, 146, 116], [2, 74, 46, 29, 75, 47], [42, 54, 24, 1, 55, 25], [23, 45, 15, 28, 46, 16], [17, 145, 115], [10, 74, 46, 23, 75, 47], [10, 54, 24, 35, 55, 25], [19, 45, 15, 35, 46, 16], [17, 145, 115, 1, 146, 116], [14, 74, 46, 21, 75, 47], [29, 54, 24, 19, 55, 25], [11, 45, 15, 46, 46, 16], [13, 145, 115, 6, 146, 116], [14, 74, 46, 23, 75, 47], [44, 54, 24, 7, 55, 25], [59, 46, 16, 1, 47, 17], [12, 151, 121, 7, 152, 122], [12, 75, 47, 26, 76, 48], [39, 54, 24, 14, 55, 25], [22, 45, 15, 41, 46, 16], [6, 151, 121, 14, 152, 122], [6, 75, 47, 34, 76, 48], [46, 54, 24, 10, 55, 25], [2, 45, 15, 64, 46, 16], [17, 152, 122, 4, 153, 123], [29, 74, 46, 14, 75, 47], [49, 54, 24, 10, 55, 25], [24, 45, 15, 46, 46, 16], [4, 152, 122, 18, 153, 123], [13, 74, 46, 32, 75, 47], [48, 54, 24, 14, 55, 25], [42, 45, 15, 32, 46, 16], [20, 147, 117, 4, 148, 118], [40, 75, 47, 7, 76, 48], [43, 54, 24, 22, 55, 25], [10, 45, 15, 67, 46, 16], [19, 148, 118, 6, 149, 119], [18, 75, 47, 31, 76, 48], [34, 54, 24, 34, 55, 25], [20, 45, 15, 61, 46, 16]]; QRRSBlock.getRSBlocks = function (typeNumber, errorCorrectLevel) {
  7016. var rsBlock = QRRSBlock.getRsBlockTable(typeNumber, errorCorrectLevel); if (rsBlock == undefined) { throw new Error("bad rs block @ typeNumber:" + typeNumber + "/errorCorrectLevel:" + errorCorrectLevel); }
  7017. var length = rsBlock.length / 3; var list = []; for (var i = 0; i < length; i++) { var count = rsBlock[i * 3 + 0]; var totalCount = rsBlock[i * 3 + 1]; var dataCount = rsBlock[i * 3 + 2]; for (var j = 0; j < count; j++) { list.push(new QRRSBlock(totalCount, dataCount)); } }
  7018. return list;
  7019. }; QRRSBlock.getRsBlockTable = function (typeNumber, errorCorrectLevel) { switch (errorCorrectLevel) { case QRErrorCorrectLevel.L: return QRRSBlock.RS_BLOCK_TABLE[(typeNumber - 1) * 4 + 0]; case QRErrorCorrectLevel.M: return QRRSBlock.RS_BLOCK_TABLE[(typeNumber - 1) * 4 + 1]; case QRErrorCorrectLevel.Q: return QRRSBlock.RS_BLOCK_TABLE[(typeNumber - 1) * 4 + 2]; case QRErrorCorrectLevel.H: return QRRSBlock.RS_BLOCK_TABLE[(typeNumber - 1) * 4 + 3]; default: return undefined; } }; function QRBitBuffer() { this.buffer = []; this.length = 0; }
  7020. QRBitBuffer.prototype = {
  7021. get: function (index) { var bufIndex = Math.floor(index / 8); return ((this.buffer[bufIndex] >>> (7 - index % 8)) & 1) == 1; }, put: function (num, length) { for (var i = 0; i < length; i++) { this.putBit(((num >>> (length - i - 1)) & 1) == 1); } }, getLengthInBits: function () { return this.length; }, putBit: function (bit) {
  7022. var bufIndex = Math.floor(this.length / 8); if (this.buffer.length <= bufIndex) { this.buffer.push(0); }
  7023. if (bit) { this.buffer[bufIndex] |= (0x80 >>> (this.length % 8)); }
  7024. this.length++;
  7025. }
  7026. }; var QRCodeLimitLength = [[17, 14, 11, 7], [32, 26, 20, 14], [53, 42, 32, 24], [78, 62, 46, 34], [106, 84, 60, 44], [134, 106, 74, 58], [154, 122, 86, 64], [192, 152, 108, 84], [230, 180, 130, 98], [271, 213, 151, 119], [321, 251, 177, 137], [367, 287, 203, 155], [425, 331, 241, 177], [458, 362, 258, 194], [520, 412, 292, 220], [586, 450, 322, 250], [644, 504, 364, 280], [718, 560, 394, 310], [792, 624, 442, 338], [858, 666, 482, 382], [929, 711, 509, 403], [1003, 779, 565, 439], [1091, 857, 611, 461], [1171, 911, 661, 511], [1273, 997, 715, 535], [1367, 1059, 751, 593], [1465, 1125, 805, 625], [1528, 1190, 868, 658], [1628, 1264, 908, 698], [1732, 1370, 982, 742], [1840, 1452, 1030, 790], [1952, 1538, 1112, 842], [2068, 1628, 1168, 898], [2188, 1722, 1228, 958], [2303, 1809, 1283, 983], [2431, 1911, 1351, 1051], [2563, 1989, 1423, 1093], [2699, 2099, 1499, 1139], [2809, 2213, 1579, 1219], [2953, 2331, 1663, 1273]];
  7027. function _isSupportCanvas() {
  7028. return typeof CanvasRenderingContext2D != "undefined";
  7029. }
  7030. // android 2.x doesn't support Data-URI spec
  7031. function _getAndroid() {
  7032. var android = false;
  7033. var sAgent = navigator.userAgent;
  7034. if (/android/i.test(sAgent)) { // android
  7035. android = true;
  7036. var aMat = sAgent.toString().match(/android ([0-9]\.[0-9])/i);
  7037. if (aMat && aMat[1]) {
  7038. android = parseFloat(aMat[1]);
  7039. }
  7040. }
  7041. return android;
  7042. }
  7043. var svgDrawer = (function () {
  7044. var Drawing = function (el, htOption) {
  7045. this._el = el;
  7046. this._htOption = htOption;
  7047. };
  7048. Drawing.prototype.draw = function (oQRCode) {
  7049. var _htOption = this._htOption;
  7050. var _el = this._el;
  7051. var nCount = oQRCode.getModuleCount();
  7052. var nWidth = Math.floor(_htOption.width / nCount);
  7053. var nHeight = Math.floor(_htOption.height / nCount);
  7054. this.clear();
  7055. function makeSVG(tag, attrs) {
  7056. var el = document.createElementNS('http://www.w3.org/2000/svg', tag);
  7057. for (var k in attrs)
  7058. if (attrs.hasOwnProperty(k)) el.setAttribute(k, attrs[k]);
  7059. return el;
  7060. }
  7061. var svg = makeSVG("svg", { 'viewBox': '0 0 ' + String(nCount) + " " + String(nCount), 'width': '100%', 'height': '100%', 'fill': _htOption.colorLight });
  7062. svg.setAttributeNS("http://www.w3.org/2000/xmlns/", "xmlns:xlink", "http://www.w3.org/1999/xlink");
  7063. _el.appendChild(svg);
  7064. svg.appendChild(makeSVG("rect", { "fill": _htOption.colorLight, "width": "100%", "height": "100%" }));
  7065. svg.appendChild(makeSVG("rect", { "fill": _htOption.colorDark, "width": "1", "height": "1", "id": "template" }));
  7066. for (var row = 0; row < nCount; row++) {
  7067. for (var col = 0; col < nCount; col++) {
  7068. if (oQRCode.isDark(row, col)) {
  7069. var child = makeSVG("use", { "x": String(col), "y": String(row) });
  7070. child.setAttributeNS("http://www.w3.org/1999/xlink", "href", "#template")
  7071. svg.appendChild(child);
  7072. }
  7073. }
  7074. }
  7075. };
  7076. Drawing.prototype.clear = function () {
  7077. while (this._el.hasChildNodes())
  7078. this._el.removeChild(this._el.lastChild);
  7079. };
  7080. return Drawing;
  7081. })();
  7082. var useSVG = document.documentElement.tagName.toLowerCase() === "svg";
  7083. // Drawing in DOM by using Table tag
  7084. var Drawing = useSVG ? svgDrawer : !_isSupportCanvas() ? (function () {
  7085. var Drawing = function (el, htOption) {
  7086. this._el = el;
  7087. this._htOption = htOption;
  7088. };
  7089. /**
  7090. * Draw the QRCode
  7091. *
  7092. * @param {QRCode} oQRCode
  7093. */
  7094. Drawing.prototype.draw = function (oQRCode) {
  7095. var _htOption = this._htOption;
  7096. var _el = this._el;
  7097. var nCount = oQRCode.getModuleCount();
  7098. var nWidth = Math.floor(_htOption.width / nCount);
  7099. var nHeight = Math.floor(_htOption.height / nCount);
  7100. var aHTML = ['<table style="border:0;border-collapse:collapse;">'];
  7101. for (var row = 0; row < nCount; row++) {
  7102. aHTML.push('<tr>');
  7103. for (var col = 0; col < nCount; col++) {
  7104. aHTML.push('<td style="border:0;border-collapse:collapse;padding:0;margin:0;width:' + nWidth + 'px;height:' + nHeight + 'px;background-color:' + (oQRCode.isDark(row, col) ? _htOption.colorDark : _htOption.colorLight) + ';"></td>');
  7105. }
  7106. aHTML.push('</tr>');
  7107. }
  7108. aHTML.push('</table>');
  7109. _el.innerHTML = aHTML.join('');
  7110. // Fix the margin values as real size.
  7111. var elTable = _el.childNodes[0];
  7112. var nLeftMarginTable = (_htOption.width - elTable.offsetWidth) / 2;
  7113. var nTopMarginTable = (_htOption.height - elTable.offsetHeight) / 2;
  7114. if (nLeftMarginTable > 0 && nTopMarginTable > 0) {
  7115. elTable.style.margin = nTopMarginTable + "px " + nLeftMarginTable + "px";
  7116. }
  7117. };
  7118. /**
  7119. * Clear the QRCode
  7120. */
  7121. Drawing.prototype.clear = function () {
  7122. this._el.innerHTML = '';
  7123. };
  7124. return Drawing;
  7125. })() : (function () { // Drawing in Canvas
  7126. function _onMakeImage() {
  7127. this._elImage.src = this._elCanvas.toDataURL("image/png");
  7128. this._elImage.style.display = "block";
  7129. this._elCanvas.style.display = "none";
  7130. }
  7131. // Android 2.1 bug workaround
  7132. // http://code.google.com/p/android/issues/detail?id=5141
  7133. if (this._android && this._android <= 2.1) {
  7134. var factor = 1 / window.devicePixelRatio;
  7135. var drawImage = CanvasRenderingContext2D.prototype.drawImage;
  7136. CanvasRenderingContext2D.prototype.drawImage = function (image, sx, sy, sw, sh, dx, dy, dw, dh) {
  7137. if (("nodeName" in image) && /img/i.test(image.nodeName)) {
  7138. for (var i = arguments.length - 1; i >= 1; i--) {
  7139. arguments[i] = arguments[i] * factor;
  7140. }
  7141. } else if (typeof dw == "undefined") {
  7142. arguments[1] *= factor;
  7143. arguments[2] *= factor;
  7144. arguments[3] *= factor;
  7145. arguments[4] *= factor;
  7146. }
  7147. drawImage.apply(this, arguments);
  7148. };
  7149. }
  7150. /**
  7151. * Check whether the user's browser supports Data URI or not
  7152. *
  7153. * @private
  7154. * @param {Function} fSuccess Occurs if it supports Data URI
  7155. * @param {Function} fFail Occurs if it doesn't support Data URI
  7156. */
  7157. function _safeSetDataURI(fSuccess, fFail) {
  7158. var self = this;
  7159. self._fFail = fFail;
  7160. self._fSuccess = fSuccess;
  7161. // Check it just once
  7162. if (self._bSupportDataURI === null) {
  7163. var el = document.createElement("img");
  7164. var fOnError = function () {
  7165. self._bSupportDataURI = false;
  7166. if (self._fFail) {
  7167. self._fFail.call(self);
  7168. }
  7169. };
  7170. var fOnSuccess = function () {
  7171. self._bSupportDataURI = true;
  7172. if (self._fSuccess) {
  7173. self._fSuccess.call(self);
  7174. }
  7175. };
  7176. el.onabort = fOnError;
  7177. el.onerror = fOnError;
  7178. el.onload = fOnSuccess;
  7179. el.src = "data:image/gif;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAAHElEQVQI12P4//8/w38GIAXDIBKE0DHxgljNBAAO9TXL0Y4OHwAAAABJRU5ErkJggg=="; // the Image contains 1px data.
  7180. return;
  7181. } else if (self._bSupportDataURI === true && self._fSuccess) {
  7182. self._fSuccess.call(self);
  7183. } else if (self._bSupportDataURI === false && self._fFail) {
  7184. self._fFail.call(self);
  7185. }
  7186. };
  7187. /**
  7188. * Drawing QRCode by using canvas
  7189. *
  7190. * @constructor
  7191. * @param {HTMLElement} el
  7192. * @param {Object} htOption QRCode Options
  7193. */
  7194. var Drawing = function (el, htOption) {
  7195. this._bIsPainted = false;
  7196. this._android = _getAndroid();
  7197. this._htOption = htOption;
  7198. this._elCanvas = document.createElement("canvas");
  7199. this._elCanvas.width = htOption.width;
  7200. this._elCanvas.height = htOption.height;
  7201. el.appendChild(this._elCanvas);
  7202. this._el = el;
  7203. this._oContext = this._elCanvas.getContext("2d");
  7204. this._bIsPainted = false;
  7205. this._elImage = document.createElement("img");
  7206. this._elImage.alt = "Scan me!";
  7207. this._elImage.style.display = "none";
  7208. this._el.appendChild(this._elImage);
  7209. this._bSupportDataURI = null;
  7210. };
  7211. /**
  7212. * Draw the QRCode
  7213. *
  7214. * @param {QRCode} oQRCode
  7215. */
  7216. Drawing.prototype.draw = function (oQRCode) {
  7217. var _elImage = this._elImage;
  7218. var _oContext = this._oContext;
  7219. var _htOption = this._htOption;
  7220. var nCount = oQRCode.getModuleCount();
  7221. var nWidth = _htOption.width / nCount;
  7222. var nHeight = _htOption.height / nCount;
  7223. var nRoundedWidth = Math.round(nWidth);
  7224. var nRoundedHeight = Math.round(nHeight);
  7225. _elImage.style.display = "none";
  7226. this.clear();
  7227. for (var row = 0; row < nCount; row++) {
  7228. for (var col = 0; col < nCount; col++) {
  7229. var bIsDark = oQRCode.isDark(row, col);
  7230. var nLeft = col * nWidth;
  7231. var nTop = row * nHeight;
  7232. _oContext.strokeStyle = bIsDark ? _htOption.colorDark : _htOption.colorLight;
  7233. _oContext.lineWidth = 1;
  7234. _oContext.fillStyle = bIsDark ? _htOption.colorDark : _htOption.colorLight;
  7235. _oContext.fillRect(nLeft, nTop, nWidth, nHeight);
  7236. // 안티 앨리어싱 방지 처리
  7237. _oContext.strokeRect(
  7238. Math.floor(nLeft) + 0.5,
  7239. Math.floor(nTop) + 0.5,
  7240. nRoundedWidth,
  7241. nRoundedHeight
  7242. );
  7243. _oContext.strokeRect(
  7244. Math.ceil(nLeft) - 0.5,
  7245. Math.ceil(nTop) - 0.5,
  7246. nRoundedWidth,
  7247. nRoundedHeight
  7248. );
  7249. }
  7250. }
  7251. this._bIsPainted = true;
  7252. };
  7253. /**
  7254. * Make the image from Canvas if the browser supports Data URI.
  7255. */
  7256. Drawing.prototype.makeImage = function () {
  7257. if (this._bIsPainted) {
  7258. _safeSetDataURI.call(this, _onMakeImage);
  7259. }
  7260. };
  7261. /**
  7262. * Return whether the QRCode is painted or not
  7263. *
  7264. * @return {Boolean}
  7265. */
  7266. Drawing.prototype.isPainted = function () {
  7267. return this._bIsPainted;
  7268. };
  7269. /**
  7270. * Clear the QRCode
  7271. */
  7272. Drawing.prototype.clear = function () {
  7273. this._oContext.clearRect(0, 0, this._elCanvas.width, this._elCanvas.height);
  7274. this._bIsPainted = false;
  7275. };
  7276. /**
  7277. * @private
  7278. * @param {Number} nNumber
  7279. */
  7280. Drawing.prototype.round = function (nNumber) {
  7281. if (!nNumber) {
  7282. return nNumber;
  7283. }
  7284. return Math.floor(nNumber * 1000) / 1000;
  7285. };
  7286. return Drawing;
  7287. })();
  7288. /**
  7289. * Get the type by string length
  7290. *
  7291. * @private
  7292. * @param {String} sText
  7293. * @param {Number} nCorrectLevel
  7294. * @return {Number} type
  7295. */
  7296. function _getTypeNumber(sText, nCorrectLevel) {
  7297. var nType = 1;
  7298. var length = _getUTF8Length(sText);
  7299. for (var i = 0, len = QRCodeLimitLength.length; i <= len; i++) {
  7300. var nLimit = 0;
  7301. switch (nCorrectLevel) {
  7302. case QRErrorCorrectLevel.L:
  7303. nLimit = QRCodeLimitLength[i][0];
  7304. break;
  7305. case QRErrorCorrectLevel.M:
  7306. nLimit = QRCodeLimitLength[i][1];
  7307. break;
  7308. case QRErrorCorrectLevel.Q:
  7309. nLimit = QRCodeLimitLength[i][2];
  7310. break;
  7311. case QRErrorCorrectLevel.H:
  7312. nLimit = QRCodeLimitLength[i][3];
  7313. break;
  7314. }
  7315. if (length <= nLimit) {
  7316. break;
  7317. } else {
  7318. nType++;
  7319. }
  7320. }
  7321. if (nType > QRCodeLimitLength.length) {
  7322. throw new Error("Too long data");
  7323. }
  7324. return nType;
  7325. }
  7326. function _getUTF8Length(sText) {
  7327. var replacedText = encodeURI(sText).toString().replace(/\%[0-9a-fA-F]{2}/g, 'a');
  7328. return replacedText.length + (replacedText.length != sText ? 3 : 0);
  7329. }
  7330. /**
  7331. * @class QRCode
  7332. * @constructor
  7333. * @example
  7334. * new QRCode(document.getElementById("test"), "http://jindo.dev.naver.com/collie");
  7335. *
  7336. * @example
  7337. * var oQRCode = new QRCode("test", {
  7338. * text : "http://naver.com",
  7339. * width : 128,
  7340. * height : 128
  7341. * });
  7342. *
  7343. * oQRCode.clear(); // Clear the QRCode.
  7344. * oQRCode.makeCode("http://map.naver.com"); // Re-create the QRCode.
  7345. *
  7346. * @param {HTMLElement|String} el target element or 'id' attribute of element.
  7347. * @param {Object|String} vOption
  7348. * @param {String} vOption.text QRCode link data
  7349. * @param {Number} [vOption.width=256]
  7350. * @param {Number} [vOption.height=256]
  7351. * @param {String} [vOption.colorDark="#000000"]
  7352. * @param {String} [vOption.colorLight="#ffffff"]
  7353. * @param {QRCode.CorrectLevel} [vOption.correctLevel=QRCode.CorrectLevel.H] [L|M|Q|H]
  7354. */
  7355. QRCode = function (el, vOption) {
  7356. this._htOption = {
  7357. width: 256,
  7358. height: 256,
  7359. typeNumber: 4,
  7360. colorDark: "#000000",
  7361. colorLight: "#ffffff",
  7362. correctLevel: QRErrorCorrectLevel.H
  7363. };
  7364. if (typeof vOption === 'string') {
  7365. vOption = {
  7366. text: vOption
  7367. };
  7368. }
  7369. // Overwrites options
  7370. if (vOption) {
  7371. for (var i in vOption) {
  7372. this._htOption[i] = vOption[i];
  7373. }
  7374. }
  7375. if (typeof el == "string") {
  7376. el = document.getElementById(el);
  7377. }
  7378. if (this._htOption.useSVG) {
  7379. Drawing = svgDrawer;
  7380. }
  7381. this._android = _getAndroid();
  7382. this._el = el;
  7383. this._oQRCode = null;
  7384. this._oDrawing = new Drawing(this._el, this._htOption);
  7385. if (this._htOption.text) {
  7386. this.makeCode(this._htOption.text);
  7387. }
  7388. };
  7389. /**
  7390. * Make the QRCode
  7391. *
  7392. * @param {String} sText link data
  7393. */
  7394. QRCode.prototype.makeCode = function (sText) {
  7395. this._oQRCode = new QRCodeModel(_getTypeNumber(sText, this._htOption.correctLevel), this._htOption.correctLevel);
  7396. this._oQRCode.addData(sText);
  7397. this._oQRCode.make();
  7398. this._el.title = sText;
  7399. this._oDrawing.draw(this._oQRCode);
  7400. this.makeImage();
  7401. };
  7402. /**
  7403. * Make the Image from Canvas element
  7404. * - It occurs automatically
  7405. * - Android below 3 doesn't support Data-URI spec.
  7406. *
  7407. * @private
  7408. */
  7409. QRCode.prototype.makeImage = function () {
  7410. if (typeof this._oDrawing.makeImage == "function" && (!this._android || this._android >= 3)) {
  7411. this._oDrawing.makeImage();
  7412. }
  7413. };
  7414. /**
  7415. * Clear the QRCode
  7416. */
  7417. QRCode.prototype.clear = function () {
  7418. this._oDrawing.clear();
  7419. };
  7420. /**
  7421. * @name QRCode.CorrectLevel
  7422. */
  7423. QRCode.CorrectLevel = QRErrorCorrectLevel;
  7424. })();/*
  7425. * 版 本 Learun-Mobile V2.0.0 任联敏捷开发框架(http://www.renlian.cn)
  7426. * Copyright (c) 2013-2018 前端技术开发小组
  7427. * 创建人:任联-前端开发组
  7428. * 日 期:2017.12.15
  7429. * 描 述:任联移动端框架 条码扫描插件
  7430. */
  7431. (function ($, renlian, fui, window) {
  7432. "use strict";
  7433. renlian.code = {
  7434. scan: function (callback) {
  7435. if (renlian.isreal) {
  7436. cordova.plugins.barcodeScanner.scan(
  7437. function (result) {
  7438. if (result.text !== undefined && result.text !== null && result.text !== '') {
  7439. !!callback && callback({
  7440. status: 'success',
  7441. msg: result.text
  7442. });
  7443. }
  7444. },
  7445. function (error) {
  7446. !!callback && callback({
  7447. status: 'error',
  7448. msg: error
  7449. });
  7450. },
  7451. {
  7452. preferFrontCamera: false, // iOS and Android
  7453. showFlipCameraButton: false, // iOS and Android
  7454. showTorchButton: true, // iOS and Android
  7455. torchOn: false, // Android, launch with the torch switched on (if available)
  7456. saveHistory: true, // Android, save scan history (default false)
  7457. prompt: "将二维码/条码放入框内,即可自动扫描", // Android
  7458. resultDisplayDuration: 500, // Android, display scanned text for X ms. 0 suppresses it entirely, default 1500
  7459. formats: "QR_CODE,DATA_MATRIX,UPC_A,UPC_E,EAN_8,EAN_13,CODE_39,CODE_93,CODE_128,CODABAR,ITF,RSS14,PDF_417,RSS_EXPANDED", // default: all but PDF_417 and RSS_EXPANDED
  7460. //orientation: "landscape", // Android only (portrait|landscape), default unset so it rotates with the device
  7461. disableAnimations: true, // iOS
  7462. disableSuccessBeep: false // iOS and Android
  7463. }
  7464. );
  7465. }
  7466. else {
  7467. renlian.layer.warning('浏览器环境不支持扫描', null, '任联提示', '好的');
  7468. }
  7469. },
  7470. encode: function (op) {// id:div的id,text:需要生成的文本;width:宽度;height:高度;colorDark,colorLight;
  7471. var qrcode = new QRCode(document.getElementById(op.id), {
  7472. text: op.text || "http://www.renlian.cn/",
  7473. width: op.width || 128,
  7474. height: op.height || 128,
  7475. colorDark: op.colorDark || "#000000",
  7476. colorLight: op.colorLight || "#ffffff",
  7477. correctLevel: QRCode.CorrectLevel.H
  7478. });
  7479. }
  7480. };
  7481. })(window.jQuery, window.lrmui, window.fui, window);/*
  7482. * 版 本 Learun-Mobile V2.0.0 任联敏捷开发框架(http://www.renlian.cn)
  7483. * Copyright (c) 2013-2018 前端技术开发小组
  7484. * 创建人:任联-前端开发组
  7485. * 日 期:2018.01.08
  7486. * 描 述:任联移动端框架 图片选择插件(支持拍照和从相册中选择)
  7487. */
  7488. (function ($, renlian, fui, window) {
  7489. "use strict";
  7490. var _ft = null;
  7491. // 选择图片从相册中
  7492. renlian.imagePick = function (callback, op) {
  7493. if (renlian.isreal) {
  7494. var dfop = {
  7495. maximumImagesCount: 9,
  7496. width: 1920,
  7497. height: 1440,
  7498. quality: 100
  7499. };
  7500. $.extend(dfop, op || {});
  7501. ImagePicker.getPictures(function (result) {
  7502. !!callback && callback(result);
  7503. }, function (err) {
  7504. }, dfop);
  7505. }
  7506. else {
  7507. renlian.layer.warning('浏览器环境不支持图片选择', null, '任联提示', '好的');
  7508. }
  7509. };
  7510. // 拍照获取图片
  7511. renlian.camera = function (callback) {
  7512. if (renlian.isreal) {
  7513. navigator.camera.getPicture(
  7514. function (imageURI) {
  7515. callback(imageURI);
  7516. },
  7517. function () {
  7518. }, {
  7519. quality: 50, // 相片质量是50
  7520. sourceType: Camera.PictureSourceType.Camera, // 设置摄像头拍照获取
  7521. destinationType: Camera.DestinationType.FILE_URI, // 以文件路径返回
  7522. saveToPhotoAlbum: true
  7523. });
  7524. }
  7525. else {
  7526. renlian.layer.warning('浏览器环境不支持拍照', null, '任联提示', '好的');
  7527. }
  7528. };
  7529. var _imagepicker = {
  7530. addImage: function (url, op, _fileId) {
  7531. var $imagePicker = $('#' + op.id);
  7532. var $imageHandle = $imagePicker.find('.lr-imagepicker-handle').parent();
  7533. var _html = '\
  7534. <div class="lr-imagepicker-item" >\
  7535. <img src="'+ url + '" />\
  7536. <div class="lr-imagepicker-remove" data-value="'+ _fileId + '" ><i class="iconfont icon-roundclosefill"></i><div></div></div>\
  7537. </div>';
  7538. $imageHandle.before(_html);
  7539. $imageHandle = null;
  7540. },
  7541. upload: function (url, op, callback) {// 上传图片文件
  7542. if (_ft === null) {
  7543. _ft = new FileTransfer();
  7544. }
  7545. if (op.uploadUrl) {
  7546. if (op.getParams) {
  7547. op.params = op.getParams();
  7548. }
  7549. op.params = op.params || {};
  7550. op.params.data = op.value;
  7551. _ft.upload(url, encodeURI(op.uploadUrl),
  7552. function (r) {
  7553. var _res = JSON.parse(r.response);
  7554. if (_res.code === 200) {
  7555. callback(true, url, op, _res.data);
  7556. }
  7557. else {
  7558. callback(false, url, op);
  7559. }
  7560. },
  7561. function (error) {
  7562. callback(false, url, op);
  7563. },
  7564. {
  7565. chunkedMode: false,
  7566. params: op.params || {}
  7567. }
  7568. );
  7569. }
  7570. else {
  7571. callback(true, url, op, renlian.guid());
  7572. }
  7573. },
  7574. uploads: function (data, index, op, callback, callback2) {
  7575. if (data.length > index) {
  7576. _imagepicker.upload(data[index], op, function (isOk, _url, _op, _fileId) {
  7577. callback(isOk, _url, _op, _fileId);
  7578. _imagepicker.uploads(data, index + 1, op, callback, callback2);
  7579. });
  7580. }
  7581. else {
  7582. callback2();
  7583. }
  7584. },
  7585. down: function (imgUrl) {
  7586. cordova.plugins.photoLibrary.requestAuthorization(
  7587. function () {
  7588. // User gave us permission to his library, retry reading it!
  7589. cordova.plugins.photoLibrary.getLibrary(
  7590. function ({ library }) {
  7591. //var url = 'file:///...'; // file or remote URL. url can also be dataURL, but giving it a file path is much faster
  7592. var album = 'renlianADMSApp';
  7593. cordova.plugins.photoLibrary.saveImage(imgUrl, album,
  7594. function (libraryItem) {
  7595. renlian.layer.toast('保存成功');
  7596. }, function (err) {
  7597. renlian.layer.toast('保存失败' + err);
  7598. });
  7599. },
  7600. function (err) {
  7601. if (err.startsWith('Permission')) {
  7602. // call requestAuthorization, and retry
  7603. }
  7604. // Handle error - it's not permission-related
  7605. console.log('权限' + err);
  7606. }
  7607. );
  7608. },
  7609. function (err) {
  7610. renlian.layer.toast('用户拒绝访问' + + err);
  7611. // User denied the access
  7612. }, // if options not provided, defaults to {read: true}.
  7613. {
  7614. read: true,
  7615. write: true
  7616. }
  7617. );
  7618. }
  7619. };
  7620. $.fn.imagepicker = function (op) {
  7621. var dfop = {
  7622. maxCount: 9,
  7623. isOnlyCamera: false,
  7624. params: {}
  7625. };
  7626. $.extend(dfop, op || {});
  7627. var $this = $(this);
  7628. $this[0].op = dfop;
  7629. var id = $this.attr('id');
  7630. if (!id) {
  7631. id = renlian.guid();
  7632. $this.attr('id', id);
  7633. }
  7634. dfop.id = id;
  7635. dfop.value = renlian.guid();
  7636. $this.addClass('lr-imagepicker');
  7637. $this.attr('type','lrimagepicker');
  7638. $this.html('\
  7639. <div class="lr-imagepicker-item">\
  7640. <div class="lr-imagepicker-handle" ><i class="iconfont icon-add1"></i></div >\
  7641. </div>');
  7642. $this.find('.lr-imagepicker-handle').on('tap', function () {
  7643. var $this = $(this);
  7644. if ($this.attr('readonly') || $this.parents('.lr-form-row').attr('readonly')) {
  7645. return false;
  7646. }
  7647. var $imagePicker = $this.parents('.lr-imagepicker');
  7648. var op = $imagePicker[0].op;
  7649. if (dfop.isOnlyCamera) {
  7650. renlian.camera(function (res) {
  7651. renlian.layer.loading(true, '正在上传...');
  7652. // 上传文件
  7653. _imagepicker.upload(res, op, function (isOk, _url, _op, _fileId) {
  7654. renlian.layer.loading(false);
  7655. if (isOk) {
  7656. _imagepicker.addImage(_url, _op, _fileId);
  7657. }
  7658. });
  7659. });
  7660. } else {
  7661. var _data = [{
  7662. text: '拍照',
  7663. event: function () {
  7664. renlian.camera(function (res) {
  7665. renlian.layer.loading(true, '正在上传...');
  7666. // 上传文件
  7667. _imagepicker.upload(res, op, function (isOk, _url, _op, _fileId) {
  7668. renlian.layer.loading(false);
  7669. if (isOk) {
  7670. _imagepicker.addImage(_url, _op, _fileId);
  7671. }
  7672. });
  7673. });
  7674. }
  7675. }, {
  7676. text: '从手机相册选择',
  7677. event: function () {
  7678. renlian.imagePick(function (res) {
  7679. renlian.layer.loading(true, '正在上传...');
  7680. _imagepicker.uploads(res, 0, op, function (isOk, _url, _op, _fileId) {
  7681. if (isOk) {
  7682. _imagepicker.addImage(_url, _op, _fileId);
  7683. }
  7684. }, function () {
  7685. renlian.layer.loading(false);
  7686. });
  7687. });
  7688. }
  7689. }];
  7690. renlian.actionsheet({
  7691. id: 'lrimagepicker',
  7692. data: _data
  7693. });
  7694. }
  7695. });
  7696. $this.delegate('.lr-imagepicker-remove>i', 'tap', { op: dfop }, function (e) {
  7697. var op = e.data.op;
  7698. var fileId = $(this).parent().attr('data-value');
  7699. var $imapge = $(this).parent().parent();
  7700. $imapge.remove();
  7701. $imapge = null;
  7702. op.deleteImg && op.deleteImg(fileId);
  7703. return false;
  7704. });
  7705. $this.delegate('img', 'tap', { op: dfop }, function (e) {
  7706. var op = e.data.op;
  7707. var data = [];
  7708. var fileId = $(this).parent().find('.lr-imagepicker-remove').attr('data-value');
  7709. var _index = 0;
  7710. $(this).parent().parent().find('img').each(function () {
  7711. var _fileId = $(this).parent().find('.lr-imagepicker-remove').attr('data-value');
  7712. var src = $(this).attr('src');
  7713. if (_fileId === fileId) {
  7714. _index = data.length;
  7715. }
  7716. data.push(src);
  7717. });
  7718. fui.imagePreview({
  7719. data: data, gotonum: _index,
  7720. holdEvent: function (_src) {
  7721. var _data = [{
  7722. text: '保存图片',
  7723. event: function () {
  7724. if (_src.indexOf('http://') !== -1) {
  7725. _imagepicker.down(_src, op);
  7726. }
  7727. else {
  7728. renlian.layer.toast('本地图片无需保存');
  7729. }
  7730. }
  7731. }];
  7732. renlian.actionsheet({
  7733. id: 'lrimagepicker',
  7734. data: _data
  7735. });
  7736. }
  7737. });
  7738. return false;
  7739. });
  7740. return $this;
  7741. };
  7742. $.fn.imagepickerGet = function () {
  7743. var $this = $(this);
  7744. if ($this.hasClass('lr-imagepicker')) {
  7745. var _op = $this[0].op;
  7746. $this = null;
  7747. return _op.value;
  7748. }
  7749. $this = null;
  7750. return '';
  7751. }
  7752. $.fn.imagepickerSet = function (value) {
  7753. if (value != undefined && value != null && value != '' && value != 'undefined' && value != 'null') {
  7754. var $this = $(this);
  7755. if ($this.hasClass('lr-imagepicker')) {
  7756. var op = $this[0].op;
  7757. op.value = value;
  7758. op.downFile(value, function (data) {
  7759. $.each(data, function (index, _item) {
  7760. _imagepicker.addImage(op.downUrl + _item.name, op, _item.id);
  7761. });
  7762. });
  7763. }
  7764. }
  7765. }
  7766. })(window.jQuery, window.lrmui, window.fui, window);/*
  7767. * 版 本 Learun-Mobile V2.0.0 任联敏捷开发框架(http://www.renlian.cn)
  7768. * Copyright (c) 2013-2018 前端技术开发小组
  7769. * 创建人:任联-前端开发组
  7770. * 日 期:2017.12.15
  7771. * 描 述:任联移动端框架 进度条插件
  7772. */
  7773. (function ($, renlian, fui, window) {
  7774. "use strict";
  7775. $.fn.progressSet = function (value) {
  7776. if (value === undefined || value === null || value === "") {
  7777. return;
  7778. }
  7779. var _style = 'transform: translate3d('+(value - 100)+'%, 0px, 0px);';
  7780. $(this).find('span').attr('style', _style);
  7781. };
  7782. })(window.jQuery, window.lrmui, window.fui, window);/*
  7783. * 版 本 Learun-Mobile V2.0.0 任联敏捷开发框架(http://www.renlian.cn)
  7784. * Copyright (c) 2013-2018 前端技术开发小组
  7785. * 创建人:任联-前端开发组
  7786. * 日 期:2018.07.06
  7787. * 描 述:日期查询选择框
  7788. */
  7789. (function ($, renlian, fui, window) {
  7790. "use strict";
  7791. var _multiplequery = {
  7792. init: function ($self, op) {
  7793. var $content = $self.find('.lr-tool-right-btn-content').show();
  7794. $content.parents('.f-page').append($content);
  7795. $content.show();
  7796. $content.fpopright({
  7797. callBack: function (type, $content) {
  7798. if (type === 'ok') {// 确定
  7799. setTimeout(function () {
  7800. var data = $content.lrformGet();
  7801. op.callback && op.callback(data);
  7802. }, 300);
  7803. }
  7804. else if (type === 'rest') {// 重置
  7805. setTimeout(function () {
  7806. var data = $content.lrformGet();
  7807. $.each(data, function (_id, _item) {
  7808. data[_id] = "";
  7809. });
  7810. $content.lrformSet(data);
  7811. }, 300);
  7812. }
  7813. }
  7814. });
  7815. $content.parents('.f-popright-body').addClass('lr-tool-right-btn-body ');
  7816. $self.on('tap', { $content: $content }, function (e) {
  7817. e.data.$content.fpoprightShow();
  7818. });
  7819. return $content;
  7820. }
  7821. };
  7822. $.fn.multiplequery = function (op) {
  7823. var $this = $(this);
  7824. if ($this.length === 0) {
  7825. return $this;
  7826. }
  7827. if ($this[0].dfop) {
  7828. return $this;
  7829. }
  7830. var dfop = {
  7831. callback: false
  7832. };
  7833. $.extend(dfop, op || {});
  7834. $this[0].dfop = dfop;
  7835. return _multiplequery.init($this, dfop);
  7836. };
  7837. })(window.jQuery, window.lrmui, window.fui, window);/*
  7838. * 版 本 Learun-Mobile V2.0.0 任联敏捷开发框架(http://www.renlian.cn)
  7839. * Copyright (c) 2013-2018 前端技术开发小组
  7840. * 创建人:任联-前端开发组
  7841. * 日 期:2018.07.06
  7842. * 描 述:日期查询选择框
  7843. */
  7844. (function ($, renlian, fui, window) {
  7845. "use strict";
  7846. var _searchdate = {
  7847. init: function ($self, op) {
  7848. var _html = '\
  7849. <div class="lr-search-date" >\
  7850. <a href="javascript:;" class="lr-search-date-btn" data-value="0">今天</a>\
  7851. <a href="javascript:;" class="lr-search-date-btn" data-value="1">近7天</a>\
  7852. <a href="javascript:;" class="lr-search-date-btn" data-value="2">近1个月</a>\
  7853. <a href="javascript:;" class="lr-search-date-btn" data-value="3">近3个月</a>\
  7854. <a href="javascript:;" class="lr-search-date-btn active" data-value="4">自定义</a>\
  7855. <div class="lr-search-date-custmer">\
  7856. <div class="lr-form-row"><label>开始时间</label><div id="lr_search_date_custmer1"></div></div>\
  7857. <div class="lr-form-row"><label>结束时间</label><div id="lr_search_date_custmer2"></div></div>\
  7858. </div >\
  7859. </div>';
  7860. var _$html = $(_html);
  7861. $self.parents('.f-page').append(_$html);
  7862. _$html.fpopright({
  7863. restBtn: '',
  7864. callBack: function (type, $content) {
  7865. if (type === 'ok') {
  7866. var btn = $content.find('.lr-search-date-btn.active').attr('data-value');
  7867. if (btn === '4') {
  7868. setTimeout(function () {
  7869. var begin = ($content.find('#lr_search_date_custmer1').lrdateGet() || '1000-01-01') + " 00:00:00";
  7870. var end = ($content.find('#lr_search_date_custmer2').lrdateGet() || fui.date.get('yyyy-MM-dd')) + " 23:59:59";
  7871. op.callback && op.callback(begin, end);
  7872. }, 300);
  7873. }
  7874. }
  7875. }
  7876. });
  7877. _$html.find('#lr_search_date_custmer1').lrdate({
  7878. type: 'date'
  7879. });
  7880. _$html.find('#lr_search_date_custmer2').lrdate({
  7881. type: 'date'
  7882. });
  7883. _$html.find('.lr-search-date-btn').on('tap', { dfop: op }, function (e) {
  7884. var $this = $(this);
  7885. var v = $this.attr('data-value');
  7886. var _op = e.data.dfop;
  7887. var $p = $this.parents('.lr-search-date');
  7888. var begin = '';
  7889. var end = '';
  7890. $p.find('.lr-search-date-custmer').hide();
  7891. $p.find('.lr-search-date-btn').removeClass('active');
  7892. $this.addClass('active');
  7893. switch (v) {
  7894. case '0':// 今天
  7895. $p.fpoprightHide();
  7896. setTimeout(function () {
  7897. begin = fui.date.get('yyyy-MM-dd 00:00:00');
  7898. end = fui.date.get('yyyy-MM-dd 23:59:59');
  7899. _op.callback && _op.callback(begin, end);
  7900. }, 300);
  7901. break;
  7902. case '1':// 近7天
  7903. $p.fpoprightHide();
  7904. setTimeout(function () {
  7905. begin = fui.date.get('yyyy-MM-dd 00:00:00', 'd', -6);
  7906. end = fui.date.get('yyyy-MM-dd 23:59:59');
  7907. _op.callback && _op.callback(begin, end);
  7908. }, 300);
  7909. break;
  7910. case '2':// 近1个月
  7911. $p.fpoprightHide();
  7912. setTimeout(function () {
  7913. begin = fui.date.get('yyyy-MM-dd 00:00:00', 'm', -1);
  7914. end = fui.date.get('yyyy-MM-dd 23:59:59');
  7915. _op.callback && _op.callback(begin, end);
  7916. }, 300);
  7917. break;
  7918. case '3':// 近3个月
  7919. $p.fpoprightHide();
  7920. setTimeout(function () {
  7921. begin = fui.date.get('yyyy-MM-dd 00:00:00', 'm', -3);
  7922. end = fui.date.get('yyyy-MM-dd 23:59:59');
  7923. _op.callback && _op.callback(begin, end);
  7924. }, 300);
  7925. break;
  7926. case '4':// 自定义
  7927. $p.find('.lr-search-date-custmer').show();
  7928. break;
  7929. }
  7930. });
  7931. $self.on('tap', { $content: _$html }, function (e) {
  7932. e.data.$content.fpoprightShow();
  7933. });
  7934. }
  7935. };
  7936. $.fn.searchdate = function (op) {
  7937. var $this = $(this);
  7938. if ($this.length === 0) {
  7939. return $this;
  7940. }
  7941. if ($this[0].dfop) {
  7942. return $this;
  7943. }
  7944. var dfop = {
  7945. callback: false
  7946. };
  7947. $.extend(dfop, op || {});
  7948. $this[0].dfop = dfop;
  7949. _searchdate.init($this, dfop);
  7950. return $this;
  7951. };
  7952. })(window.jQuery, window.lrmui, window.fui, window);/*
  7953. * 版 本 Learun-Mobile V2.0.0 任联敏捷开发框架(http://www.renlian.cn)
  7954. * Copyright (c) 2013-2018 前端技术开发小组
  7955. * 创建人:任联-前端开发组
  7956. * 日 期:2018.06.12
  7957. * 描 述:任联移动端框架 列表左移按钮
  7958. */
  7959. (function ($, renlian, fui, window) {
  7960. "use strict";
  7961. var _lrlistswipe = {
  7962. init: function ($this, op) {
  7963. $this.addClass('f-swipebtn');
  7964. var $handler = $('<div class="f-swipebtn-handler">' + $this.html() + '</div>');
  7965. var $btn = $('<div class="f-swipebtn-right"></div>');
  7966. $this.html($handler);
  7967. $this.append($btn);
  7968. $.each(op.btns, function (_index, _item) {
  7969. var _$item = $(_item).addClass('f-swipebtn-btn');
  7970. $btn.append(_$item);
  7971. });
  7972. $this.fswipebtn();
  7973. $this = null;
  7974. $handler = null;
  7975. $btn = null;
  7976. }
  7977. };
  7978. $.fn.lrlistswipe = function (op) {
  7979. var dfop = {
  7980. btns: []
  7981. };
  7982. $.extend(dfop, op || {});
  7983. $(this).each(function () {
  7984. _lrlistswipe.init($(this), dfop);
  7985. });
  7986. };
  7987. })(window.jQuery, window.lrmui, window.fui, window);/*
  7988. * 版 本 Learun-Mobile V2.0.0 任联敏捷开发框架(http://www.renlian.cn)
  7989. * Copyright (c) 2013-2018 前端技术开发小组
  7990. * 创建人:任联-前端开发组
  7991. * 日 期:2017.12.15
  7992. * 描 述:任联移动端框架 多选框插件
  7993. */
  7994. (function ($, renlian, fui, window) {
  7995. "use strict";
  7996. // 多选框(初始化)
  7997. $.fn.lrcheckbox = function (op) {
  7998. var $this = $(this);
  7999. if ($this.length === 0) {
  8000. return $this;
  8001. }
  8002. var dfop = {
  8003. placeholder: '请选择',
  8004. data: [],
  8005. ivalue: 'value',
  8006. itext: 'text',
  8007. change: false
  8008. };
  8009. $.extend(dfop, op || {});
  8010. dfop.callback = function () {
  8011. renlian.formblur();
  8012. };
  8013. $this.attr('type', 'lrcheckbox');
  8014. $this.addClass('lr-checkbox');
  8015. $this.html('<div class="text">' + dfop.placeholder + '</div>');
  8016. setTimeout(function () {
  8017. $this.fcheckbox(dfop).on('change', function () {
  8018. var $self = $(this);
  8019. var text = $self[0].fop.text || '';
  8020. var $text = $self.find('.text');
  8021. if (text === ''){
  8022. $self.find('.text').text($self[0].fop.placeholder);
  8023. }
  8024. else {
  8025. $text.html('');
  8026. var textlist = text.split(',');
  8027. $.each(textlist, function (_index, _item) {
  8028. var _html = '<div class="lr-checkbox-item" >' + _item + '</div>';
  8029. $text.append(_html);
  8030. });
  8031. }
  8032. $text = null;
  8033. });
  8034. }, 100);
  8035. return $this;
  8036. };
  8037. // 多选框(获取数据值)
  8038. $.fn.lrcheckboxGet = function (type) {
  8039. var $this = $(this);
  8040. if ($this.length === 0) {
  8041. return "";
  8042. }
  8043. var fop = $this[0].fop;
  8044. if (type === 'text') {
  8045. return fop.text;
  8046. }
  8047. else {
  8048. return fop.value;
  8049. }
  8050. };
  8051. // 多选框(设置数据值)
  8052. $.fn.lrcheckboxSet = function (value) {
  8053. var $this = $(this);
  8054. if ($this.length === 0) {
  8055. return false;
  8056. }
  8057. function set(value, $this) {
  8058. if (!$this[0].fop) {
  8059. setTimeout(function () {
  8060. set(value, $this);
  8061. }, 100);
  8062. }
  8063. else {
  8064. var fop = $this[0].fop;
  8065. if (value) {
  8066. fop._lrTmpValue = value;
  8067. }
  8068. $this.fcheckboxSet(value);
  8069. if (value === '') {
  8070. fop.value = '';
  8071. fop.text = '';
  8072. $this.find('.text').text(fop.placeholder);
  8073. }
  8074. }
  8075. }
  8076. set(value, $this);
  8077. };
  8078. // 多选框(更新数据)
  8079. $.fn.lrcheckboxSetData = function (data) {
  8080. var $this = $(this);
  8081. if ($this.length === 0) {
  8082. return false;
  8083. }
  8084. function updateData(data, $this) {
  8085. if (!$this[0].fop) {
  8086. setTimeout(function () {
  8087. updateData(data, $this);
  8088. }, 100);
  8089. }
  8090. else {
  8091. $this.fcheckboxSetData(data);
  8092. $this.lrcheckboxSet($this[0].fop._lrTmpValue);
  8093. }
  8094. }
  8095. updateData(data, $this);
  8096. };
  8097. })(window.jQuery, window.lrmui, window.fui, window);